-
Notifications
You must be signed in to change notification settings - Fork 152
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
Add secret type for Param.Credentials #300
Conversation
pkg/param/param.go
Outdated
@@ -90,12 +91,14 @@ type CredentialType string | |||
|
|||
const ( | |||
CredentialTypeKeyPair CredentialType = "keyPair" | |||
CredentialTypeAWS CredentialType = "aws" |
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.
Should we make this CredentialTypeSecret
too? In case we want something similar for Azure.
@SupriyaKasten
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.
My thinking was, at this point, we should materialize the type information. For @SupriyaKasten's case, we can also add CredentialTypeAzure
.
pkg/param/param.go
Outdated
if err != nil { | ||
return nil, errors.Wrap(err, "Failed to fetch the secret") | ||
} | ||
switch string(s.Type) { |
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 would push this logic into the secrets package and expose it through ValidateCredential
or just validate
This reverts commit ad3cbce.
* Revert "Update getOSSecret to use Secret credentials in AWS (#309)" This reverts commit 2192605. * Revert "Add secret type credential to validation code (#308)" This reverts commit 9178d4c. * Revert "Support creating S3 args from Secret type Credential (#305)" This reverts commit d8f7d76. * Revert "Add secret type for Param.Credentials (#300)" This reverts commit ad3cbce.
Change Overview
Adds a union member for param.Credentials to accommodate generic secret types.
Pull request type
Please check the type of change your PR introduces: