-
Notifications
You must be signed in to change notification settings - Fork 88
feat: add AZKV_AUTH env var for azure key vault #711
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
Conversation
This also fixes #408 |
Signed-off-by: Nate Scherer <[email protected]>
Signed-off-by: Nate Scherer <[email protected]>
Signed-off-by: Nate Scherer <[email protected]>
Signed-off-by: Nate Scherer <[email protected]>
Signed-off-by: Nate Scherer <[email protected]>
a56d0a1
to
e4ffdcb
Compare
Done! |
} | ||
chain = append(chain, cred) | ||
default: | ||
panic("Environment variable 'AZKV_AUTH' is set to an unsupported value!") |
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.
why not return 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.
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 assumption was we should cause the entire rendering to fail immediately if someone provides a malformed variable value as vals (and any tools calling it) won't produce the desired output if the auth type can't be determined.
If you disagree, though, I'm happy to refactor to throw an 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.
@natescherer we should not use panic as mush as we can.
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.
Okay, I refactored, built and tested, let me know what you think.
208f6ea
to
545e58b
Compare
Signed-off-by: Nate Scherer <[email protected]>
545e58b
to
1700ba2
Compare
* feat: add AZKV_AUTH env var for azure key vault Signed-off-by: Nate Scherer <[email protected]> * fix: switch to using NewChainedTokenCredential Signed-off-by: Nate Scherer <[email protected]> * fix: append to slices Signed-off-by: Nate Scherer <[email protected]> * fix: properly append to slices Signed-off-by: Nate Scherer <[email protected]> * docs: update azure key vault docs Signed-off-by: Nate Scherer <[email protected]> * refactor: return error instead of panicking Signed-off-by: Nate Scherer <[email protected]> --------- Signed-off-by: Nate Scherer <[email protected]> Signed-off-by: CorentinPtrl <[email protected]>
Apologies for the confusion on opening this PR earlier than I intended to.
This PR adds support for being able to choose which authentication method you use for Azure Key Vault, as well as correcting the documentation which incorrectly described how the azidentity Go module currently handled authentication.
Please let me know if you want me to update or change anything!