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

refactor: broadly refactor Vault client #270

Merged
merged 1 commit into from
Sep 23, 2024
Merged

Conversation

abtreece
Copy link
Owner

This commit broadly refactors the Vault backend to improve K/V lookup for both V1 and V2 KVs. It properly leverages the prefix configuration for the Secrets Engine path and accomodates the differences between the KV v1 and KV v2 endpoints, specifically the use of data in the secret path. This returns the Vault backend back to pathing parity with the other backends. It also means this commit is a breaking change and is not backwards compatible with configurations that use the more explicit pathing.

This commit also resolves issue #244

@abtreece abtreece added bug Something isn't working enhancement New feature or request labels Sep 23, 2024
This commit broadly refactors the Vault backend to improve K/V lookup for both V1 and V2 KVs. It properly leverages the `prefix` configuration for the Secrets Engine path and accomodates the differences between the KV v1 and KV v2 endpoints, specifically the use of `data` in the secret path. This returns the Vault backend back to pathing parity with the other backends. It also means this commit is a breaking change and is not backwards compatible with configurations that use the more explicit pathing.

This commit also resolves issue #244
@abtreece abtreece force-pushed the refactor-vault-backend branch from 7c677e3 to 780a399 Compare September 23, 2024 18:36
pkg/backends/vault/client.go Dismissed Show dismissed Hide dismissed
Copy link

codecov bot commented Sep 23, 2024

Codecov Report

Attention: Patch coverage is 0% with 95 lines in your changes missing coverage. Please review.

Project coverage is 15.59%. Comparing base (13d837c) to head (780a399).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/backends/vault/client.go 0.00% 95 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #270       +/-   ##
===========================================
- Coverage   34.23%   15.59%   -18.64%     
===========================================
  Files           7       19       +12     
  Lines         669     1706     +1037     
===========================================
+ Hits          229      266       +37     
- Misses        386     1384      +998     
- Partials       54       56        +2     

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

@abtreece abtreece merged commit 780a399 into main Sep 23, 2024
9 checks passed
@abtreece abtreece deleted the refactor-vault-backend branch September 23, 2024 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant