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

auth: Allow getting session and access token with custom scope #1669

Closed
wants to merge 2 commits into from

Conversation

alexweininger
Copy link
Member

@alexweininger alexweininger commented Jan 25, 2024

Changes are pulled from @JasonYeMSFT's original PR #1643. Jason needs this change to support a feature in the Databases extension.

Creating as a draft because this code change still breaks some things.

Known breakages:

  1. Breaks zip deploy. Fixed in the appservice shared package by 751ee12
  2. Zip deploying to a function/app service app in a sovereign cloud. (along with all other kudu operations like viewing deployments and logs) Fixed in the azure shared package by appservice: Use management endpoint for all kudu calls #1677

@alexweininger alexweininger requested a review from a team as a code owner January 25, 2024 23:36
@alexweininger alexweininger marked this pull request as draft January 25, 2024 23:36
@alexweininger
Copy link
Member Author

@bwateratmsft I'm investigating this, but would appreciate some help figuring out why this would break zip deploy for sovereign clouds.

@alexweininger
Copy link
Member Author

alexweininger commented Jan 26, 2024

I found that the access token audiences are different between the working and broken access tokens.

Broken access token audience: “https://management.chinacloudapi.cn\” (resource manager endpoint)
Working access token audience: “https://management.core.chinacloudapi.cn\” (management endpoint)

That's probably the issue, now on to fixing it...

@alexweininger
Copy link
Member Author

Looks like I already investigated and found out about the endpoint difference in December #1637

However, that was changing the default if no scopes were passed. This change makes it so scopes will be respected, but now the wrong scopes are being passed in 🙃

@alexweininger
Copy link
Member Author

alexweininger commented Jan 26, 2024

See #1670 for details on how I fixed the sovereign cloud issue. Once #1670 is merged and released, we'll be good to merge this too.

@alexweininger
Copy link
Member Author

Ok so #1670 broke a bunch of other stuff so #1677 is the actual fix that doesn't break everything! 😄

alexweininger added a commit to microsoft/vscode-azurefunctions that referenced this pull request Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant