8000 Add support for RP-initiated OIDC logout by route443 · Pull Request #96 · nginxinc/nginx-openid-connect · GitHub
[go: up one dir, main page]

Skip to content

Conversation

route443
Copy link
Contributor
@route443 route443 commented Jun 7, 2024

Implement support for RP-initiated logout in accordance with OpenID Connect RP-Initiated Logout 1.0. Introduce the oidc_end_session_endpoint variable to specify the end_session_endpoint URL.

If oidc_end_session_endpoint is not set or is empty, the default behavior of logging out only on the NGINX side is maintained. When set, the endpoint triggers the RP-initiated logout as specified in the OIDC specification.

This PR is based on the revised PR #87 initially submitted by user @llomgui. Thank you to @llomgui for the initial implementation and contribution.

Summary of Changes

  • Added oidc_end_session_endpoint variable to specify the OIDC end session endpoint URL.
  • Updated the logout function to:
    • Handle RP-initiated logout by redirecting to the specified end_session_endpoint.
    • Include logic to renew ID token if refresh token is available, but session_jwt is expired.
    • Fall back to traditional logout if both tokens are absent.

@route443 route443 force-pushed the rp-initiated-logout branch from dae4ed3 to ded18f2 Compare June 8, 2024 06:54
Implement support for RP-initiated logout in accordance with OpenID Connect RP-Initiated Logout 1.0.
Introduce "oidc_end_session_endpoint" variable to specify the "end_session_endpoint" URL.

If "oidc_end_session_endpoint" is not set or is empty, the default behavior of logging out only on the NGINX side is maintained. When set, the endpoint triggers the RP-initiated logout as specified in the specification.
@route443 route443 force-pushed the rp-initiated-logout branch from ded18f2 to 323e6f9 Compare June 14, 2024 17:24
8000
@route443 route443 merged commit 6ea7364 into nginxinc:main Jul 2, 2024
@llomgui
Copy link
llomgui commented Jul 3, 2024

Hey @route443,

Do you plan to create a PR to update the current files https://github.com/nginxinc/kubernetes-ingress/tree/main/internal/configs/oidc with your latest changes?
Or do you want me to update my PR nginx/kubernetes-ingress#4986 ?

Thank you with this merge.

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.

3 participants

0