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

fix(ksm): handle duplicate secrets with the same uid #652

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

Conversation

robbert229
Copy link
Contributor

Keeper Secrets Manager can return multiple records with the same uid. This is because KSM is now returning a secret for each time a secret is referenced. This breaks previous assumptions.

Description

Removing previous ksm sanity check ensuring a record is only returned once, and added supporting tests.

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.21 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)

Other information

I implemented the original keeper secrets manager functionality back in #468.

Keeper Secrets Manager can return multiple records with the same
uid. This is because KSM is now returning a secret for each time
a secret is referenced. This breaks previous assumptions.

Signed-off-by: John Rowley <[email protected]>
@robbert229 robbert229 force-pushed the bugfix/keeper-secrets-manager branch from e585d00 to f8ee3f4 Compare July 8, 2024 21:03
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.64%. Comparing base (42a43f0) to head (f8ee3f4).
Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #652      +/-   ##
==========================================
+ Coverage   72.16%   73.64%   +1.47%     
==========================================
  Files          26       26              
  Lines        1994     1586     -408     
==========================================
- Hits         1439     1168     -271     
+ Misses        458      314     -144     
- Partials       97      104       +7     

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

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