feat: add endpoint, token, and TLS cert storage for CLI client#35
Open
watcharaponthod-code wants to merge 1 commit into
Open
feat: add endpoint, token, and TLS cert storage for CLI client#35watcharaponthod-code wants to merge 1 commit into
watcharaponthod-code wants to merge 1 commit into
Conversation
Store token, cert_path, and cert_key_path alongside permify_url and tenant in the profile YAML config (~/.permify/config or user-specified path). The configure command now prompts for these optional values. The gRPC client reads stored credentials at dial time: - bearer token is attached via PerRPCCredentials - cert/key pair enables mTLS via credentials.NewTLS - PERMIFY_TOKEN, PERMIFY_CERT_PATH, PERMIFY_CERT_KEY_PATH env vars override stored values when set Closes Permify#2
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.
Closes #2
What this does
Stores oken, cert_path, and cert_key_path in the profile YAML alongside the existing permify_url and enant fields, so users don't have to supply credentials on every invocation.
Changes
core/config/config.go
core/client/grpc.go
core/cli/configure.go
core/cmd/{data,permission,schema,tenancy}/client.go
Storage location
Credentials are stored in the YAML profile file (default path is set by the CLI bootstrap, typically ~/.permify/config on Unix or %USERPROFILE%.permify\config on Windows), as described in the issue comments.
Backward compatibility
All new fields use yaml:"...,omitempty", so existing config files without the new keys continue to work unchanged - the client falls back to insecure/anonymous mode.