-
Notifications
You must be signed in to change notification settings - Fork 5.1k
[Identity] Updating scope validation #31154
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
[Identity] Updating scope validation #31154
Conversation
|
API change check API changes are not detected in this pull request. |
| { | ||
| private const string DefaultSuffix = "/.default"; | ||
| private const string ScopePattern = "^[0-9a-zA-Z-.:/]+$"; | ||
| private const string ScopePattern = "^[0-9a-zA-Z-_.:/]+$"; |
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.
Should this validation be used for all sub-process based credentials? It looks like only Cli and Powershell use it today.
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.
Yes, it should, although it might not be at the moment. Also, when I made this update, I did a brief investigation I found that there are other possible scope characters that this regex is still not supporting. We need to do a deeper investigation of both, but given that we have 2 customers blocked by this, and user_impersonation is such a common scope, I think we should push out this minor fix although it might be incomplete. I created a new issue #31170, to track what work remains here.
* [Identity] Adding AdditionallyAllowedTenants to constrain multi-tenant auth (#31037) * [Identity] Adding AdditionallyAllowedTenants to constrain multi-tenant auth * updating API spec * adding dev-time credentials * adding user-auth credentials * refactor additional tenants to base options * adding default and environment credentials * update/add tests * update API spec * update changelog and breaking_changes * update assembly version * Update sdk/identity/Azure.Identity/CHANGELOG.md Co-authored-by: Heath Stewart <[email protected]> * Update sdk/identity/Azure.Identity/CHANGELOG.md Co-authored-by: Heath Stewart <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/AuthorizationCodeCredentialOptions.cs Co-authored-by: Christopher Scott <[email protected]> * Update sdk/identity/Azure.Identity/src/TenantIdResolver.cs Co-authored-by: Christopher Scott <[email protected]> * Update sdk/identity/Azure.Identity/CHANGELOG.md Co-authored-by: Heath Stewart <[email protected]> * fb * fb * fb * fb * fb * Update sdk/identity/Azure.Identity/src/Credentials/VisualStudioCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/ClientAssertionCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/AzurePowerShellCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/AzurePowerShellCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/AzureCliCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/CHANGELOG.md Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/VisualStudioCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/VisualStudioCodeCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/VisualStudioCodeCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/TokenCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/UsernamePasswordCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/OnBehalfOfCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/InteractiveBrowserCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/DeviceCodeCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/DefaultAzureCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/DefaultAzureCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/DefaultAzureCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/ClientSecretCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/ClientCertificateCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * updating troubleshooting.md * update snippets * undo snippet indent Co-authored-by: Heath Stewart <[email protected]> Co-authored-by: Christopher Scott <[email protected]> Co-authored-by: Scott Addie <[email protected]> * [Identity] Updating scope validation (#31154) * Identity Updating docs for 1.7.0 release (#31251) * Identity Updating docs for 1.7.0 release * update release date * re-add DAC devcred timeout test coverage * fix formatting issues introduced by merge * update api spec Co-authored-by: Heath Stewart <[email protected]> Co-authored-by: Christopher Scott <[email protected]> Co-authored-by: Scott Addie <[email protected]>
…1258) * [Identity] Adding AdditionallyAllowedTenants to constrain multi-tenant auth (Azure#31037) * [Identity] Adding AdditionallyAllowedTenants to constrain multi-tenant auth * updating API spec * adding dev-time credentials * adding user-auth credentials * refactor additional tenants to base options * adding default and environment credentials * update/add tests * update API spec * update changelog and breaking_changes * update assembly version * Update sdk/identity/Azure.Identity/CHANGELOG.md Co-authored-by: Heath Stewart <[email protected]> * Update sdk/identity/Azure.Identity/CHANGELOG.md Co-authored-by: Heath Stewart <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/AuthorizationCodeCredentialOptions.cs Co-authored-by: Christopher Scott <[email protected]> * Update sdk/identity/Azure.Identity/src/TenantIdResolver.cs Co-authored-by: Christopher Scott <[email protected]> * Update sdk/identity/Azure.Identity/CHANGELOG.md Co-authored-by: Heath Stewart <[email protected]> * fb * fb * fb * fb * fb * Update sdk/identity/Azure.Identity/src/Credentials/VisualStudioCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/ClientAssertionCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/AzurePowerShellCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/AzurePowerShellCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/AzureCliCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/CHANGELOG.md Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/VisualStudioCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/VisualStudioCodeCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/VisualStudioCodeCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/TokenCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/UsernamePasswordCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/OnBehalfOfCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/InteractiveBrowserCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/DeviceCodeCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/DefaultAzureCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/DefaultAzureCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/DefaultAzureCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/ClientSecretCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * Update sdk/identity/Azure.Identity/src/Credentials/ClientCertificateCredentialOptions.cs Co-authored-by: Scott Addie <[email protected]> * updating troubleshooting.md * update snippets * undo snippet indent Co-authored-by: Heath Stewart <[email protected]> Co-authored-by: Christopher Scott <[email protected]> Co-authored-by: Scott Addie <[email protected]> * [Identity] Updating scope validation (Azure#31154) * Identity Updating docs for 1.7.0 release (Azure#31251) * Identity Updating docs for 1.7.0 release * update release date * re-add DAC devcred timeout test coverage * fix formatting issues introduced by merge * update api spec Co-authored-by: Heath Stewart <[email protected]> Co-authored-by: Christopher Scott <[email protected]> Co-authored-by: Scott Addie <[email protected]>
Relaxes scope validation to allow '_' character, for common scopes such as
user_impersonationFixes #30647