Skip to content

feat(config): add credential_store key#854

Open
ivannalisetska wants to merge 1 commit into
mainfrom
ivannalisetska/SUP-7238
Open

feat(config): add credential_store key#854
ivannalisetska wants to merge 1 commit into
mainfrom
ivannalisetska/SUP-7238

Conversation

@ivannalisetska
Copy link
Copy Markdown
Contributor

@ivannalisetska ivannalisetska commented Jun 5, 2026

  • Add credential_store config key (auto, keyring, shm) with precedence env > local > user
  • Propagate the configured value into BUILDKITE_CREDENTIAL_STORE at startup so bk auth login uses it without --credential-store
  • Update help text on bk config set/get and bk auth login

TASK: SUP-7238

Description

Changes

Add credential_store key to bk config (auto, keyring, shm).
Wire it through bk config set/get/list/unset with validation.
Export the configured value into BUILDKITE_CREDENTIAL_STORE at process start so every command (notably bk auth login) picks it up without flags.
Precedence: --credential-store flag > env > local config > user config > auto.
Update help text on bk config set/get and bk auth login.
Unit tests for the new key, precedence chain, and the env bridge.

Can skip if changes are simple or clear from the commit messages.
-->

Testing

  • Tests have run locally (with go test ./...) 39 packages, all ok, zero failures.
  • Code is formatted (with go fmt ./...) no files needed reformatting.

Disclosures / Credits

- Add credential_store config key (auto, keyring, shm) with precedence env > local > user
- Propagate the configured value into BUILDKITE_CREDENTIAL_STORE at startup so bk auth
  login uses it without --credential-store
- Update help text on bk config set/get and bk auth login

TASK: SUP-7238
@ivannalisetska ivannalisetska requested review from a team as code owners June 5, 2026 22:54
Comment thread main.go

// Must run before kong dispatches: bk auth login builds its keyring
// before factory.New() does.
factory.ApplyCredentialStoreFromConfig(conf)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I don't think this would recognise a local config unless --credential-store is also passed, eg bk auth login --local wouldn't respect a local .bk.yaml config being present.

We'd need to ensure login respects --local config, or only support user configs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants