feat(client/cli): reusable client configuration#1496
Merged
Conversation
Signed-off-by: Tibor Kircsi <tkircsi@cisco.com>
Signed-off-by: Tibor Kircsi <tkircsi@cisco.com>
Signed-off-by: Tibor Kircsi <tkircsi@cisco.com>
Signed-off-by: Tibor Kircsi <tkircsi@cisco.com>
Signed-off-by: Tibor Kircsi <tkircsi@cisco.com>
Contributor
|
The latest Buf updates on your PR. Results from workflow Buf CI / verify-proto (pull_request).
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
arpad-csepi
approved these changes
May 12, 2026
Member
arpad-csepi
left a comment
There was a problem hiding this comment.
nit: might worth to add a flag for disable redact if the user want to see the sensitive data as well in the dirctl context show
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 #1158
Context CLI Summary
This PR adds a
dirctl contextcommand group for inspecting and switching reusable client configuration profiles:dirctl context listlists configured contexts and marks the persistedcurrent_context.dirctl context currentprints the persisted current context, with--quietand--jsonvariants for prompt/status integrations.dirctl context set <name>persists a configured context as the active default.dirctl context show [name]displays the effective resolved client configuration with sensitive values redacted.dirctl context validate [name]validates one or all configured contexts and reports actionable errors.Contexts are selected by
--context,DIRECTORY_CLIENT_CONTEXT, or the persistedcurrent_context, and are resolved through the shared client config package for CLI and SDK reuse.Default Config Path
The default client config path is:
If
XDG_CONFIG_HOMEis not set, the path falls back to:Config Schema
The config file contains a persisted current context and a map of named contexts:
Only fields required for the selected auth mode need to be set. Sensitive values such as
auth_tokenandspiffe_tokenare redacted bydirctl context show.Example Config