feat: support separate session keyrings and Passage identity files - #436
feat: support separate session keyrings and Passage identity files#436issei-m wants to merge 5 commits into
Conversation
|
Thanks for the PR and it's a solid start with right inheritance model and split. There are also still some things to sort out before merging:
Once a user sets any Potential cheapest fix: in
on Also some other minor findings:
|
|
@mbevc1 Thanks for the review. Here’s a quick update. Addressed
Added session overrides for the five store-location options mentioned, with tests and docs.
Updated the PR title and summary so it appears separately in the generated release notes. Not changed
You’re right that this breaks backward compatibility from a semantic-versioning perspective. It doesn’t affect aws-vault CLI users, but it could break projects using this module as a library. Would a major-version bump be more appropriate, or should I preserve v7 compatibility with the nil fallback?
Kept it because it preserves backend auto-detection for directly constructed values and matches the primary keyring code.
I left this out because I don’t see a likely use case for configuring biometrics differently between the primary and session keyrings. It can be revisited if a concrete use case comes up.
Kept it as-is since it is used by the |
|
Thanks @issei-m , would you mind resolving conflicts as well? |
|
Oh, also to answer your question; The PR already changes the signatures of Since it should be a three-line fallback, let's not go with the major bump. |
Allow cached sessions to use an independently configured keyring while preserving the existing shared-keyring default. Keep long-lived credentials and OIDC tokens in the primary keyring. Refs ByteNess#433 AI-assisted with OpenAI Codex.
5359d3c to
191711e
Compare
|
@mbevc1 Added the nil fallback in GetProviderForProfile as suggested, and rebased onto the latest main to resolve the conflicts. I also added debug messages to distinguish primary and session keyring initialization, including when they share the same instance. |
Closes #433.
Summary
This adds optional keyring configuration for cached sessions through
--session-*options andAWS_VAULT_SESSION_*environment variables.When no session-specific setting is provided, aws-vault continues to use the same keyring instance as before. Unspecified session settings inherit the primary keyring configuration.
Long-lived credentials and SSO OIDC tokens remain in the primary keyring, while cached temporary credentials use the session keyring.
Independently of session keyring configuration,
--passage-identities-fileandAWS_VAULT_PASSAGE_IDENTITIES_FILEcan now select the identity file used by the primary Passage backend. Passage identity selection is provided by ByteNess/keyring#109, released in keyring v1.13.0.Testing
go test ./...go vet ./...The separate Passage stores and identities were tested with the following setup:
AI disclosure
OpenAI Codex assisted with the implementation, tests, documentation, and review. I reviewed and edited the complete diff and manually tested the behaviour described above.
Checklist
README.mdupdated if the change is user-visible, breaking changes are called out explicitly