-
Notifications
You must be signed in to change notification settings - Fork 4
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
Remove Redis secrets backend #35
Conversation
@@ -110,8 +110,6 @@ func parseSecretsLookupURN(ctx context.Context, logger *slog.Logger, urn string) | |||
return newSecretManager(ctx, logger, u, newGCPSecretsManager) | |||
case "az": | |||
return newSecretManager(ctx, logger, u, newAzSecretsManager) | |||
case "redis": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also get rid of the whole URN stuff here too? We don't need to stuff everything into a string in cloudv2 repo - we only do that in connect because it's a commandline arg.
Ideally these are just the implementations of aws, gcp and az secret managers that satisfy some interface in the connect repo and can be plugged in there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. It makes perfect sense. Wanted to reuse the secret provider creation mechanism (from URL), but this way looks a lot simpler, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have an optional thing - I don't want to block this work, but I would love a less sneaky API.
secrets/gcp.go
Outdated
@@ -18,7 +18,7 @@ type gcpSecretsManager struct { | |||
logger *slog.Logger | |||
} | |||
|
|||
func newGCPSecretsManager(ctx context.Context, logger *slog.Logger, url *url.URL) (secretAPI, error) { | |||
func NewGCPSecretsManager(ctx context.Context, logger *slog.Logger, url *url.URL) (SecretAPI, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have context on this PR, but it seems weird we pass in a URL here but it's actually a projectID in hiding. Can we simplify the interface here? Then we can keep the URN business in the CLI for connect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simplified
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome and just what I was thinking - thank you!
No description provided.