-
Notifications
You must be signed in to change notification settings - Fork 261
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
feat: Add Azure Key Vault Variable Provider #2472
Conversation
If you rebase against the latest |
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.
Looks great overall! I did not actually run the code, but it looks pretty straight forward to me. I think we can merge this. The only points I had were nitpicks.
e133c03
to
0a3e792
Compare
Awesome feedback @rylev I refactored the PR as part of 0a3e792 When implementing |
Url::parse(url).unwrap() | ||
} | ||
} | ||
impl FromStr for AzureAuthorityHost { |
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'm confused actually - what are the FromStr
and From<String>
impls for AzureAuthorityHost
used for? It seems like they could just be deleted.
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.
Hmm, it's used in the AzureKeyVaultProvider::new
function, to construct AzureAuthorityHost
from raw strings provided as part of runtime config file
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.
Hmm... AzureKeyVaultProvider::new
only seems to be called in AzureKeyVaultVariablesProviderOpts::build_provider
which passes a AzureAuthorityHost
directly (not a string representation). That means that the only valid AzureAuthorityHost
string representations in the runtime config file is whatever matches AzureAuthorityHost
's deserialize implementation which is just a one-to-one mapping with the Rust identifier.
In other words, the runtime config will only accept the string "AzurePublicCloud" for the public cloud option. Other options like "public" and "publiccloud" won't work. Are you seeing something different in testing?
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.
Makes sense. I tried without FromStr and From<String>
. When users provide a wrong value for AzureAuthorityHost
a corresponding error is presented and showing allowed values to the user - which is good.
I rebased on most recent main and pushed the change once again
Signed-off-by: Thorsten Hans <thorsten.hans@fermyon.com>
…der impl Signed-off-by: Thorsten Hans <thorsten.hans@fermyon.com>
Signed-off-by: Thorsten Hans <thorsten.hans@fermyon.com>
…rityHost Signed-off-by: Thorsten Hans <thorsten.hans@fermyon.com>
3ce78df
to
06a73d5
Compare
This PR adds Azure Key Vault as Variable provider.
Users can provide a runtime config using necessary information for Client Credential Flow:
If not specified,
authority_host
will default toAzurePublicCloud
.Unfortunately, I wasn't able to run
make lint
andmake test
on my machine. Both commands ran into errors shown below.Am I missing something on my machine?
Output from
make lint
Output from
make test