- Notifications
You must be signed in to change notification settings - Fork1.1k
feat(cli): add macOS support for session token keyring storage#20613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Add support for storing the CLI session token in the OS keyring on macOSwhen the --use-keyring flag is provided.
| func (operatingSystemKeyring)Set(service,credentialstring)error { | ||
| // if the added secret has multiple lines or some non ascii, | ||
| // macOS will hex encode it on return. To avoid getting garbage, we | ||
| // encode all passwords |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@ethanndickson what are your thoughts on keeping this base64 encoding/decoding? It's borrowed fromhttps://github.com/zalando/go-keyring/. I don't think we explicitly need it given our token format.
| typestoredCredentialsmap[string]struct { | ||
| CoderURLstring`json:"coder_url"` | ||
| APITokenstring`json:"api_token"` | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@ethanndickson this is essentially what gets stored as a JSON blob (b64 encoded -see my other comment). Looks like this in my keychain. Any problems/concerns for Coder Desktop on macOS, in terms of future session token sharing?
Uh oh!
There was an error while loading.Please reload this page.
Add support for storing the CLI session token in the OS keyring on macOS when the --use-keyring flag is provided.
#19403
https://www.notion.so/coderhq/CLI-Session-Token-in-OS-Keyring-293d579be592808b8b7fd235304e50d5