Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Enable caching tokens for multiple vault namespaces #695

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DaThumpingRabbit
Copy link
Contributor

Description

As mentioned in this comment #660 (comment), the token caching strategy currently does not include support for multiple namespaces when using Vault Enterprise

Right now, it is configured to use different files per auth method and per identifier when possible (roleID for approles, username for user/pass)
With this PR, it will also include the name of the namespacxe when provided, and use default when not

Checklist

Please make sure that your PR fulfills the following requirements:

  • Reviewed the guidelines for contributing to this repository
  • The commit message follows the Conventional Commits Guidelines.
  • Tests for the changes have been updated
  • Are you adding dependencies? If so, please run go mod tidy -compat=1.22.7 to ensure only the minimum is pulled in.
  • Docs have been added / updated
  • Optional. My organization is added to USERS.md.

Type of Change

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • New tests
  • Build/CI related changes
  • Documentation content changes
  • Other (please describe)

@DaThumpingRabbit DaThumpingRabbit force-pushed the feat/token-cache-namespace branch from 65f5e0f to d2907ea Compare February 14, 2025 13:48
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 96.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 71.58%. Comparing base (42a43f0) to head (d2907ea).
Report is 16 commits behind head on main.

Files with missing lines Patch % Lines
pkg/auth/vault/userpass.go 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #695      +/-   ##
==========================================
- Coverage   72.16%   71.58%   -0.59%     
==========================================
  Files          26       29       +3     
  Lines        1994     2611     +617     
==========================================
+ Hits         1439     1869     +430     
- Misses        458      590     +132     
- Partials       97      152      +55     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DaThumpingRabbit
Copy link
Contributor Author

@werne2j @jkayani
Could you please have a look at this PR ? It should be included in the same release as #660 if possible since both are improving the same feature

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