-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix protocol issues in OpenID Connect server
Stop exposing all known claims by default in the issued ID token and instead honor scopes requested by the client. Currently, the supported scopes include the profile and email scopes defined by OpenID Connect (insofar as Gafaelfawr has the data). Set the aud claim on ID tokens to the client ID rather than a fixed audience value that matches the Gafaelfawr issuer, bringing the implementation in line with the intent of the specification. Tie the expiration time of OpenID Connect ID tokens to the expiration of the underlying Gafaelfawr token used as an authentication basis. Require the oidcServer.issuer configuration setting use the https scheme, since the protocol requires that. Include the scope that was used for ID token issuance in the response from the token endpoint, since the spec may require that if unknown scopes were requested. Declare, in the OpenID configuration endpoint, that the only supported response mode is query.
- Loading branch information
Showing
14 changed files
with
428 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
### Backwards-incompatible changes | ||
|
||
- When acting as an OpenID Connect server, Gafaelfawr no longer exposes all claims by default. Instead, it now honors the `scope` parameter in the request, which must include `openid` and may include `profile` and `email`. | ||
- Require the `oidcServer.issuer` configuration setting use the `https` scheme, since this is required by the OpenID Connect 1.0 specification. | ||
- Set the `aud` claim in OpenID Connect ID tokens issued by Gafaelfawr to the client ID of the requesting client instead of a fixed audience used for all tokens. | ||
- OpenID Connect ID tokens issued by Gafaelfawr now inherit their expiration time from the underlying Gafaelfawr token used as the authentication basis for the ID token. Previously, OpenID Connect ID tokens would receive the full default lifetime even when issued on the basis of Gafaelfawr tokens that were about to expire. | ||
|
||
### Bug fixes | ||
|
||
- Include the scope used to issue the ID token in the reply from the OpenID Connect server token endpoint. | ||
- In the response from `/.well-known/openid-configuration`, declare that the only supported response mode of the OpenID Connect server is `query`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.