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

[BUG] App registration scope fails validation if contains underscores #43895

Closed
marrobi opened this issue Jan 23, 2025 · 1 comment · Fixed by #44040
Closed

[BUG] App registration scope fails validation if contains underscores #43895

marrobi opened this issue Jan 23, 2025 · 1 comment · Fixed by #44040
Assignees
Labels
Azure.Identity bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization.
Milestone

Comments

@marrobi
Copy link

marrobi commented Jan 23, 2025

An API scope with an underscores fails validation by com.azure.identity.implementation.util.ScopeUtil. Such as api://<app_id>/user_impersonation.

The same issue has been fixed in the .net SDK in 2022, but remains in the Java SDK.

Azure/azure-sdk-for-net#30647

This pattern needs to allow underscore:

private static final Pattern SCOPE_PATTERN = Pattern.compile("^[0-9a-zA-Z-.:/]+$");

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jan 23, 2025
@joshfree joshfree added bug This issue requires a change to an existing behavior in the product in order to be resolved. and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jan 27, 2025
@github-actions github-actions bot removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jan 27, 2025
@joshfree joshfree added this to the 2025-02 milestone Jan 27, 2025
@joshfree
Copy link
Member

Thanks @marrobi. @billwert could you port the fix from the .NET SDK and double check the other languages too

@joshfree joshfree moved this from Untriaged to Not Started in Azure Identity SDK Improvements Feb 3, 2025
billwert added a commit to billwert/azure-sdk-for-java that referenced this issue Feb 5, 2025
@billwert billwert moved this from Not Started to In Progress in Azure Identity SDK Improvements Feb 5, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in Azure Identity SDK Improvements Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Identity bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization.
Projects
Development

Successfully merging a pull request may close this issue.

3 participants