argoproj-labs / argocd-vault-plugin

An Argo CD plugin to retrieve secrets from Secret Management tools and inject them into Kubernetes secrets
https://argocd-vault-plugin.readthedocs.io
Apache License 2.0
784 stars 185 forks source link

feat[ibmsm]: Secret group name resolution and simpler key interpolation #609

Closed jgawor closed 2 months ago

jgawor commented 4 months ago

Description

The existing behavior is unchanged.

Checklist

Please make sure that your PR fulfills the following requirements:

Type of Change

Other information

jkayani commented 4 months ago

Thanks for the PR! I'll try to review within the next week or so. Initial thoughts:

Again, thanks for the contribution - code, tests and all. Glad to see this could be implemented without breaking existing behavior as well!

codecov-commenter commented 4 months ago

Codecov Report

Attention: Patch coverage is 72.82609% with 25 lines in your changes are missing coverage. Please review.

Project coverage is 72.00%. Comparing base (42a43f0) to head (5832898).

Files Patch % Lines
pkg/backends/ibmsecretsmanager.go 72.82% 18 Missing and 7 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #609 +/- ## ========================================== - Coverage 72.16% 72.00% -0.16% ========================================== Files 26 26 Lines 1994 2072 +78 ========================================== + Hits 1439 1492 +53 - Misses 458 475 +17 - Partials 97 105 +8 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jgawor commented 4 months ago

@jkayani I updated the docs. Please take a look.

jgawor commented 3 months ago

@jkayani I addressed your comments and updated the PR. Thanks! As to the motivation for the PR, it was the overall ease of use. For group names, that's simple. Using the group ids is non-portable from one instance of IBM Secrets Manager to another (e.g. in different regions). Also, trying to decipher the security group id from a path (and mapping it to a group in IBM Secrets Manager) is much harder than a name. As to the simplified path syntax, we actually use the vault plugin with two backends: IBM and AWS. Injecting secrets with the AWS Secrets Manager is simple and does not usually jsonPath or other modifiers. With the existing IBM backend, the jsonPath modifier is pretty much always needed. So, the idea was to remove that requirement and maybe make moving between the backends a bit simpler.