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

Add secret type for Param.Credentials #300

Merged
merged 5 commits into from
Sep 19, 2019
Merged

Conversation

hakanmemisoglu
Copy link
Contributor

@hakanmemisoglu hakanmemisoglu commented Sep 18, 2019

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:

  • Work in Progress
  • Refactoring (no functional changes, no api changes)
  • Trivial/Minor
  • Bugfix
  • Feature
  • Documentation

@@ -90,12 +91,14 @@ type CredentialType string

const (
CredentialTypeKeyPair CredentialType = "keyPair"
CredentialTypeAWS CredentialType = "aws"
Copy link
Contributor

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

Copy link
Contributor Author

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.

@hakanmemisoglu hakanmemisoglu changed the title Add AWS secret support for Param Add secret type for Param.Credentials Sep 19, 2019
if err != nil {
return nil, errors.Wrap(err, "Failed to fetch the secret")
}
switch string(s.Type) {
Copy link
Contributor

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

@mergify mergify bot merged commit ad3cbce into master Sep 19, 2019
hakanmemisoglu pushed a commit that referenced this pull request Sep 20, 2019
mergify bot pushed a commit that referenced this pull request Sep 20, 2019
* 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.
@pavannd1 pavannd1 deleted the add-secret-type-param branch October 1, 2019 21:08
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.

None yet

3 participants