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

Support KnownAuthorities across all languages #1054

Open
jongio opened this issue Feb 29, 2020 · 3 comments
Open

Support KnownAuthorities across all languages #1054

jongio opened this issue Feb 29, 2020 · 3 comments

Comments

@jongio
Copy link
Member

@jongio jongio commented Feb 29, 2020

Right now, when a user wants to work with an alternate cloud they have to specify the authority host in code.

Python has implemented a KnownAuthorties object that allows a user to reference the known other cloud authorities via a const like this:

credential = DefaultAzureCredential(authority=KnownAuthorities.AZURE_GOVERNMENT)

All of the other languages require the user to specify the full url to the known authority, like this:

new EnvironmentCredentialBuilder().authorityHost("https://login.microsoftonline.us/").build()

Ideally, we are consistent across all langs for this.

I have filed issues for the other 4 langs:

JS: Azure/azure-sdk-for-js#7597
.NET: Azure/azure-sdk-for-net#10228
Java: Azure/azure-sdk-for-java#8627
Go: Azure/azure-sdk-for-go#7745

@jongio

This comment has been minimized.

Copy link
Member Author

@jongio jongio commented Feb 29, 2020

Related: Azure/azure-sdk-for-java#8626 - [FEATURE REQ] Support setAuthorityHost with CredentialBuilderBase #8626

@adrianhall

This comment has been minimized.

Copy link
Member

@adrianhall adrianhall commented Mar 2, 2020

Sounds like we should put this in the general guidelines as well, so that future implementors of a new language will take it into consideration. I suspect this belongs in the "azurecore.md" file. Want to take a swag at a PR for this, @jongio?

@jongio

This comment has been minimized.

Copy link
Member Author

@jongio jongio commented Mar 2, 2020

Will do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.