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

feat(oidc): jwt response for introspection #5840

Merged
merged 18 commits into from
Aug 27, 2023

Conversation

james-d-elliott
Copy link
Member

@james-d-elliott james-d-elliott commented Aug 11, 2023

This implements the standard for JWT encoded and signed responses from the introspection endpoint. This has been implemented as per the IETF draft https://datatracker.ietf.org/doc/html/draft-ietf-oauth-jwt-introspection-response and as it is a draft (it is also an expired draft) so it should be noted that this implementation may be removed or changed without any regard for breaking changes. While this factor points in the direction of this never receiving ratification the IANA has accepted registration of the metadata parameters for this specification which points to the fact that it probably will.

@authelia
Copy link

authelia bot commented Aug 11, 2023

Artifacts

These changes are published for testing on Buildkite, DockerHub and GitHub Container Registry.

Docker Container

  • docker pull authelia/authelia:feat-jwt-response-for-introspection
  • docker pull ghcr.io/authelia/authelia:feat-jwt-response-for-introspection

@netlify
Copy link

netlify bot commented Aug 11, 2023

Deploy Preview for authelia-staging ready!

Name Link
🔨 Latest commit 8c794cf
🔍 Latest deploy log https://app.netlify.com/sites/authelia-staging/deploys/64e978569a32c2000762aaa3
😎 Deploy Preview https://deploy-preview-5840--authelia-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@james-d-elliott james-d-elliott force-pushed the feat-jwt-response-for-introspection branch 2 times, most recently from c2d624f to c289662 Compare August 11, 2023 23:34
@codecov
Copy link

codecov bot commented Aug 11, 2023

Codecov Report

Merging #5840 (bc7b0aa) into master (8d196b7) will increase coverage by 0.47%.
The diff coverage is 73.74%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5840      +/-   ##
==========================================
+ Coverage   73.03%   73.51%   +0.47%     
==========================================
  Files         280      281       +1     
  Lines       23742    24056     +314     
  Branches      443      443              
==========================================
+ Hits        17341    17685     +344     
+ Misses       5657     5630      -27     
+ Partials      744      741       -3     
Flag Coverage Δ
backend 74.67% <73.74%> (+0.49%) ⬆️
frontend 58.27% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
internal/handlers/handler_oauth_introspection.go 0.00% <0.00%> (ø)
internal/handlers/handler_oidc_userinfo.go 0.00% <0.00%> (ø)
internal/oidc/types.go 100.00% <ø> (ø)
internal/oidc/util.go 98.87% <98.86%> (-0.02%) ⬇️
...rnal/configuration/validator/identity_providers.go 94.43% <100.00%> (+0.24%) ⬆️
internal/handlers/handler_oidc_authorization.go 23.45% <100.00%> (+0.95%) ⬆️
internal/model/oidc.go 95.92% <100.00%> (+54.80%) ⬆️
internal/oidc/client.go 100.00% <100.00%> (ø)
internal/oidc/discovery.go 100.00% <100.00%> (ø)
internal/oidc/handler_introspection.go 100.00% <100.00%> (ø)

@james-d-elliott james-d-elliott marked this pull request as ready for review August 17, 2023 12:07
@james-d-elliott james-d-elliott force-pushed the feat-jwt-response-for-introspection branch 3 times, most recently from 3e0a29c to b8b6168 Compare August 19, 2023 21:11
@james-d-elliott james-d-elliott force-pushed the feat-jwt-response-for-introspection branch from b8b6168 to 52aa15e Compare August 19, 2023 21:30
@james-d-elliott james-d-elliott force-pushed the feat-jwt-response-for-introspection branch 5 times, most recently from de2f7b8 to 3f056d1 Compare August 20, 2023 01:33
@james-d-elliott james-d-elliott added this to the v4.38.0 milestone Aug 20, 2023
@james-d-elliott james-d-elliott added the area/openid-connect OpenID Connect 1.0 / OAuth 2.0 related features/bugs label Aug 20, 2023
@james-d-elliott james-d-elliott force-pushed the feat-jwt-response-for-introspection branch 7 times, most recently from f0f098d to 2f380e1 Compare August 21, 2023 10:11
Copy link
Member

@nightah nightah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of nits and a question.

content:
application/json:
schema:
$ref: '#/components/schemas/openid.spec.ErrorResponseGeneric'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this cause a rendering issue with the OpenAPI spec?

This implements the standard for JWT encoded and signed responses from the introspection endpoint. This has been implemented as per the IETF draft https://www.ietf.org/archive/id/draft-ietf-oauth-jwt-introspection-response-12.html and as it is a draft and that draft is currently expired it should be noted that this implementation may be removed or changed without any regard for breaking changes. While these factors all point in the direction of this may never receive ratification the IANA has accepted registration of the metadata parameters for this specification.

Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
@james-d-elliott james-d-elliott force-pushed the feat-jwt-response-for-introspection branch from 2f380e1 to 047a1ca Compare August 25, 2023 10:19
Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
@james-d-elliott james-d-elliott force-pushed the feat-jwt-response-for-introspection branch from 757c5d5 to 8c98fdd Compare August 26, 2023 05:20
@james-d-elliott james-d-elliott merged commit 34b7a47 into master Aug 27, 2023
49 checks passed
@james-d-elliott james-d-elliott deleted the feat-jwt-response-for-introspection branch August 27, 2023 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/openid-connect OpenID Connect 1.0 / OAuth 2.0 related features/bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants