Add Support for keychain#64
Merged
Merged
Conversation
Introduce Write, CheckPermissions, and EnsurePermissions so config files can be written and validated at 0600 without duplicating logic.
Store tokens and OIDC secrets via go-keyring under "Thalassa Cloud CLI", with auto/file/keychain selection through THALASSA_CREDENTIAL_STORE.
Move secrets out of ~/.tcloud when keychain is available, migrate plaintext credentials on load, and redact secrets from SanitizedConfig.
Warn on load when ~/.tcloud is world-readable and let users run `tcloud context fix` to restrict access to 0600.
Use SanitizedConfig so `tcloud context view` never prints tokens or client secrets, including when they are loaded from keychain.
Implement the client.authentication.k8s.io ExecCredential JSON writer used by the kubernetes credential exec plugin.
Add shared kubeconfig templates so cluster session tokens can be provided via a kubectl exec plugin instead of being written to disk.
Let exec credential calls pin organisation and project so kubeconfig access keeps working after the active tcloud context changes.
Register `tcloud kubernetes credential` for kubectl, embed organisation and project in exec args, and add --inline-token for the legacy flow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Support for keychain