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

OpenID Provider Metadata is not valid #5

Open
ahukkanen opened this issue Dec 11, 2023 · 4 comments
Open

OpenID Provider Metadata is not valid #5

ahukkanen opened this issue Dec 11, 2023 · 4 comments

Comments

@ahukkanen
Copy link

The OpenID provider metadata that is generated here is not valid:

data = {
"issuer": app_config.ISSUER,
"jwks_uri": jwks_uri,
}

This is a problem for connecting libraries that validate that the returned metadata is correct as defined by the specification.

As per the specification, the following metadata values are marked as REQUIRED:

  • issuer - OK
  • authorization_endpoint - MISSING
  • jwks_uri - OK
  • response_types_supported - MISSING
  • subject_types_supported - MISSING
  • id_token_signing_alg_values_supported - MISSING

The following data definition (for example) would return valid metadata:

    data = {
        "issuer": app_config.ISSUER,
        "authorization_endpoint": f"{app_config.ISSUER}/auth",
        "jwks_uri": jwks_uri,
        "response_types_supported": ["id_token"],
        "subject_types_supported": ["public", "pairwise"],
        "id_token_signing_alg_values_supported": ["RS256"],
    }
@akikoskinen
Copy link
Contributor

Good report 👍 This shall be fixed.

voneiden added a commit that referenced this issue Dec 13, 2023
Dummy values are picked mostly from tunnistamo DummyOidcBackendBase.

Refs: HP-2110 and GH #5
@voneiden
Copy link
Contributor

@ahukkanen Are you aware of any requirements regarding the authorization_endpoint? I set it to a dummy value of https://localhost/openid/authorize in the PR, but feel free to leave a comment before I merge.

@ahukkanen
Copy link
Author

@voneiden The specification does not specify any particular format, so it is up to the OIDC server implementation.

For the tester tool (or the service connecting to the tester tool) it is not used for anything, so it can be anything and does not need to respond to any requests, as long as it is defined in the metadata.

voneiden added a commit that referenced this issue Dec 14, 2023
Dummy values are picked mostly from tunnistamo DummyOidcBackendBase.

Refs: HP-2110 and GH #5
@akikoskinen
Copy link
Contributor

As intermediary news, the fix is already in the container image 0.1.0. But not yet in PyPI, that's coming up.

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

No branches or pull requests

3 participants