Skip to content

[Bug Report]: OIDC autodiscovery fails in Azure environment #3206

Description

@ssddanbrown

Describe the Bug

Microsoft can provide the following format at its jwks_uri:

{
      "kty": "RSA",
      "use": "sig",
      "kid": "abcabcabc",
      "x5t": "abcabcabc",
      "n": "xxxxyyyyyzzzz",
      "e": "AQAB",
      "x5c": [
        "aaaabbbbcccc"
      ],
      "issuer": "https://login.microsoftonline.com/xxx-xxx-xxx/v2.0"
    }

We have the following logic to filter keys to the compatible ones:

return array_filter($keys, function (array $key) {
return $key['kty'] === 'RSA' && $key['use'] === 'sig' && $key['alg'] === 'RS256';
});

This fails due to the alg property being non-existent.

Couple of things we need to do:

  • Check MS provided keys against the standard, support their format if we can identity.
  • Update our filtering to not hard fail on potentially non-assured properties (Relevant to the spec)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions