-
Notifications
You must be signed in to change notification settings - Fork 127
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
Change the default value for the authority host option to be read from the environment variable first. #4980
Conversation
sdk/identity/azure-identity/inc/azure/identity/detail/client_credential_core.hpp
Show resolved
Hide resolved
Added |
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 you please cover the "read-from-the-environment" behavior with tests?
See CredentialTestHelper::EnvironmentOverride
.
And if you permanently keep "" = public cloud
, then you probably also need some tests via CredentialTestHelper::SimulateTokenRequest
, that the request URL is the authority URL.
Otherwise, I think, just creating the options and making sure the AuthorityHost
matches the env variable, is sufficient (each credential / common credential impl already has tests verifying that the URL of the request being made does match the authority URL supplied via options).
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 am approving with an assumption that #5002 will be addressed before the release and the "get option value from the environment" tests will be written. I don't mind if that comes in subsequent PRs. If that is not what you're planning to do, I'd like to talk 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.
I think you're unintentionally introducing a regression in WorkloadIdentityCredential
(see comment for workload_identity_credential.cpp
below)
Fixes #4875
Ultimately, this isn't a breaking change, but rather a bug fix to match user intention:
If, for some reason, the user really wanted the previous behavior, and ignore the environment variable set on the environment, they can explicitly set the
AuthorityHost
option to the desired value. This way the intent is explicit and clear, rather than implicit/accidental.