Skip to content

Add OIDC issuer validation #840

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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Conversation

Avery-Dunn
Copy link

@Avery-Dunn Avery-Dunn commented Jul 18, 2025

Adds new validation according to: https://identitydivision.visualstudio.com/Engineering/_workitems/edit/3268768

The issuer returned by the call to the OIDC endpoint (.well-known/openid-configuration) is valid if one of the following is true:

  • It exactly matches the authority URL
  • It has a known Microsoft host (e.g., login.microsoftonline.com)
  • It has the same scheme and host as the authority (path can be different)
  • For CIAM, the issuer follows the pattern of {tenant}.ciamlogin.com, even when using a custom domain

The validation behavior was added to authority.py, and new tests were added to test_authority.py to cover it

In addition, a few other tests in test_authority.py and test_application.py were given valid issuers in their mocked OIDC discovery responses in order to pass validation, but were otherwise unchanged.

(this is the full implementation of the work started in this draft PR: #830)

@Avery-Dunn Avery-Dunn requested a review from a team as a code owner July 18, 2025 21:32
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