Files
llm-wiki/raw/official-docs/keycloak-oidc-logout-endpoint-official.md

14 KiB

title, source_type, url, archive_url, related_branches, related_projects, tags, created
title source_type url archive_url related_branches related_projects tags created
official-doc / Keycloak — RP-Initiated Logout Endpoint (end_session_endpoint, id_token_hint, post_logout_redirect_uri) official-doc https://www.keycloak.org/docs/latest/server_admin/#rp-initiated-logout
feature-keycloak-oauth2-proxy-oidc-flow
keycloak-patterns
official-doc
keycloak-patterns
auth
keycloak
oidc
2026-07-17

official-doc / Keycloak — RP-Initiated Logout Endpoint (end_session_endpoint, id_token_hint, post_logout_redirect_uri)

Layer: raw/ — 외부 자료(공식 문서 / 대기업 기술 블로그)의 원문 발췌·출처 기록. 본 템플릿은 raw/official-docs/raw/company-tech-blogs/ 두 폴더가 공유. 검증된 요약은 /ingestwiki/concepts/source-summary-template 형식으로 별도 작성. 원본은 raw에 영구 보관.

source_type 허용값

  • official-doc — 공식 레퍼런스 / 표준 / 사양 (Keycloak 공식 문서, Red Hat 운영)

Parent / 활용 branch (필수, 최소 1개+)

Branch 이 자료가 정당화하는 결정
raw/branch-notes/feature-keycloak-oauth2-proxy-oidc-flow Keycloak 측 RP-Initiated Logout 요구사항 — end_session_endpoint(/realms/{realm}/protocol/openid-connect/logout) + id_token_hint + post_logout_redirect_uri 파라미터 명세. branch D6(RP-Initiated Logout 채택)가 UNSUPPORTED_DECISION 이었던 것을 이 자료의 Keycloak 측 근거로 해소

출처 / Source

  • 원본 URL: https://www.keycloak.org/docs/latest/server_admin/#rp-initiated-logout (§SSO Protocols → OIDC → RP-Initiated Logout, §Keycloak server OIDC URI endpoints, §Clients → Logout settings 모두 동일 단일 페이지 내 앵커)
  • 보조 URL (엔드포인트 정의 인용 출처, 동일 keycloak.org 도메인): https://www.keycloak.org/securing-apps/oidc-layers (§Endpoints — Logout endpoint)
  • 아카이브 URL: (미수집)
  • 저자 / 조직: Keycloak (Red Hat) — Server Administration Guide / Securing Applications and Services Guide
  • 발행일: rolling docs. 페이지 내 "Edit this section" GitHub 링크 메타데이터에 version=26.7.0 명시 — Keycloak 26.x 문서, 사용자 요청 대상 버전과 일치 (버전 drift 없음). 단 "latest" 는 rolling snapshot 이므로 향후 재확인 시 내용이 바뀔 수 있음.
  • 마지막 확인일: 2026-07-17

⚠️ URL 경로 변경 사실 기록: 사용자가 지정한 원 URL https://www.keycloak.org/docs/latest/securing_apps/index.html 은 fetch 시 HTTP 404 (WebFetch 도구로 직접 확인). Keycloak 문서 사이트가 재편되어, 예전 "Securing Applications and Services Guide" 단일 챕터 페이지는 사라지고 https://www.keycloak.org/securing-apps/oidc-layers (개요/엔드포인트 목록) + https://www.keycloak.org/docs/latest/server_admin/ (Server Administration Guide 내 SSO Protocols 챕터, RP-Initiated Logout 상세)로 콘텐츠가 이전되었다. 두 페이지 모두 keycloak.org 도메인 내부이며, 요청받은 5개 논점 중 4개(2~5번, id_token_hint/post_logout_redirect_uri/무-id_token_hint 동작/Backchannel Logout URL)는 server_admin 페이지에, 1번(logout endpoint 정의)은 oidc-layers 페이지에 있었다.

또한 기존 raw/official-docs/keycloak-securing-apps-overview-official (url: https://www.keycloak.org/securing-apps/overview)를 self-grep 확인한 결과 logout/end_session 관련 인용이 전무함을 확인 — 본 문서와 중복이 아니다.

왜 저장했는지 / Why archived

oauth2-proxy 측 문서(raw/official-docs/oauth2-proxy-endpoints-signout-official)는 /oauth2/sign_out + rd/{id_token} placeholder 메커니즘까지만 증명하고, end_session_endpoint / id_token_hint / post_logout_redirect_uri 각각의 Keycloak 측 정의·필수 여부·유효성 검증 규칙은 증명하지 못했다 (해당 문서의 "메모" 섹션이 이 공백을 명시적으로 남겨둠). 본 문서는 Keycloak 공식 Server Administration Guide 의 RP-Initiated Logout 섹션에서 그 공백을 직접 메운다 — branch D6 를 두 문서의 조합으로 완전히 해소하기 위한 두 번째 절반의 근거.

핵심 인용 / Key quotes (verbatim, 7문장 — 사용자 dispatch 지시가 5개 논점을 명시적으로 요구해 3~5개 기본 범위를 초과)

[securing-apps/oidc-layers §Endpoints — Logout endpoint] "The logout endpoint logs out the authenticated user."

[server_admin §SSO Protocols → RP-Initiated Logout] "This is also a browser-based logout where the logout starts by redirecting the user to a specific endpoint at Keycloak."

[server_admin §SSO Protocols → RP-Initiated Logout] "The user might be optionally requested to confirm the logout in case the id_token_hint parameter was not used."

[server_admin §SSO Protocols → RP-Initiated Logout] "After logout, the user is automatically redirected to the specified post_logout_redirect_uri as long as it is provided as a parameter."

[server_admin §SSO Protocols → RP-Initiated Logout] "Note that you need to include either the client_id or id_token_hint parameter in case the post_logout_redirect_uri is included."

[server_admin §SSO Protocols → RP-Initiated Logout] "Also the post_logout_redirect_uri parameter needs to match one of the Valid Post Logout Redirect URIs specified in the client configuration."

[server_admin §Clients → Logout settings → Backchannel logout URL] "URL that will cause the client to log itself out when a logout request is sent to this realm (via end_session_endpoint)."

Claims Extracted / 추출된 주장

Claim ID Claim (이 자료가 직접 말하는 것) Evidence quote Strength Applies to Does not prove
KC-LOGOUT-C1 Keycloak 의 OIDC logout endpoint (/realms/{realm-name}/protocol/openid-connect/logout) 는 인증된 사용자를 로그아웃시키는 엔드포인트다 [securing-apps/oidc-layers §Endpoints] "The logout endpoint logs out the authenticated user." official-vendor-doc Keycloak 이 노출하는 OIDC logout endpoint 의 기본 역할 정의 이 경로가 OIDC discovery 문서(.well-known/openid-configuration)의 end_session_endpoint 필드 값과 정확히 동일하게 노출된다는 명시적 문장은 이 인용에 없음 (Backchannel logout URL 설명 문구 "via end_session_endpoint" 로 간접 확인 — KC-LOGOUT-C7 참조)
KC-LOGOUT-C2 RP-Initiated Logout 은 사용자를 Keycloak 의 특정 엔드포인트로 리다이렉트시켜 시작하는 브라우저 기반 로그아웃이다 [server_admin §RP-Initiated Logout] "This is also a browser-based logout where the logout starts by redirecting the user to a specific endpoint at Keycloak." official-vendor-doc RP-Initiated Logout 흐름 채택(D6)의 메커니즘 근거 이 리다이렉트 대상이 정확히 end_session_endpoint 라는 명명으로 discovery 메타데이터에 노출되는지는 이 문장만으로 확정되지 않음
KC-LOGOUT-C3 id_token_hint 파라미터가 전달되지 않으면 사용자가 로그아웃 확인(confirm)을 요구받을 수 있다 (optional) [server_admin §RP-Initiated Logout] "The user might be optionally requested to confirm the logout in case the id_token_hint parameter was not used." official-vendor-doc id_token_hint 미전달 시 UX (confirmation 요구 가능성) — dispatch 논점 4 직접 근거 "optionally requested" 가 client 의 Logout confirmation 설정과 어떻게 상호작용하는지 세부 조건은 이 한 문장만으로 완전히 분리되지 않음
KC-LOGOUT-C4 logout 후 post_logout_redirect_uri 파라미터가 제공되면 사용자는 자동으로 그 URI 로 리다이렉트된다 [server_admin §RP-Initiated Logout] "After logout, the user is automatically redirected to the specified post_logout_redirect_uri as long as it is provided as a parameter." official-vendor-doc post_logout_redirect_uri 의 기본 동작(자동 redirect) Logout confirmation 이 활성화된 client 의 경우 자동 redirect 대신 confirmation 페이지에 링크/버튼 형태로 제공될 수 있음(별도 서버 admin 설정 문구, 본 raw 범위 밖 세부 — 메모 참조)
KC-LOGOUT-C5 post_logout_redirect_uri 를 포함하려면 client_id 또는 id_token_hint 파라미터 중 하나를 반드시 함께 포함해야 한다 [server_admin §RP-Initiated Logout] "Note that you need to include either the client_id or id_token_hint parameter in case the post_logout_redirect_uri is included." official-vendor-doc RP-Initiated Logout 호출 시 파라미터 조합 요구사항 (id_token_hint 없이 client_id 만으로도 post_logout_redirect_uri 사용 가능함을 의미) client_id 만 제공한 경우와 id_token_hint 만 제공한 경우의 동작 차이(예: 세션 특정 로그아웃 정밀도)는 이 인용에 명시 없음
KC-LOGOUT-C6 post_logout_redirect_uri 는 client 설정의 Valid Post Logout Redirect URIs 목록 중 하나와 일치해야 한다 [server_admin §RP-Initiated Logout] "Also the post_logout_redirect_uri parameter needs to match one of the Valid Post Logout Redirect URIs specified in the client configuration." official-vendor-doc post_logout_redirect_uri 유효성 검증 규칙 — dispatch 논점 3 (등록된 redirect URI 여야 하는지) 직접 근거 매칭 실패 시 정확한 응답(에러 코드/에러 페이지)이 무엇인지는 이 인용에 명시되지 않음
KC-LOGOUT-C7 client 의 Backchannel logout URL 설정 필드는, 이 realm 에 로그아웃 요청이 전송되었을 때(원문 표현: "via end_session_endpoint") client 스스로 로그아웃하게 만드는 URL 이다 [server_admin §Logout settings → Backchannel logout URL] "URL that will cause the client to log itself out when a logout request is sent to this realm (via end_session_endpoint)." official-vendor-doc Backchannel Logout URL 클라이언트 설정 필드의 역할 — dispatch 논점 5 직접 근거. RP-Initiated Logout(end_session_endpoint) 호출이 backchannel logout 전파의 트리거라는 것도 이 문장이 명시 Backchannel logout token 의 payload/claim 형식 자체, 그리고 이 URL 이 비어있을 때의 Admin URL fallback 상세는 이 인용 범위 밖(원문 뒷문장에 있으나 본 raw 핵심 인용에서는 생략)

Strength 허용값

  • official-vendor-doc — 위 7개 claim 모두 Keycloak 공식 문서(Server Administration Guide / Securing Applications and Services Guide, keycloak.org 도메인) 원문에서 직접 발췌

Usage Boundaries / 적용 경계

  • 이 자료가 직접 증명하는 것:
    • KC-LOGOUT-C1~C2: Keycloak OIDC logout endpoint 의 정의와 RP-Initiated Logout 의 브라우저 기반 리다이렉트 메커니즘
    • KC-LOGOUT-C3: id_token_hint 미전달 시 로그아웃 확인이 요구될 수 있다는 것
    • KC-LOGOUT-C4~C6: post_logout_redirect_uri 의 자동 리다이렉트 동작 + 필수 동반 파라미터(client_id/id_token_hint) + 등록된 redirect URI 매칭 검증 규칙
    • KC-LOGOUT-C7: Backchannel Logout URL client 설정 필드의 역할과 트리거 조건
  • 이 자료가 증명하지 않는 것:
    • oauth2-proxy 가 이 파라미터들을 정확히 어떻게 채워 호출하는지 (그 절반은 raw/official-docs/oauth2-proxy-endpoints-signout-official 가 증명)
    • Keycloak 세션이 RP-Initiated Logout 호출 후 실제로(runtime) 종료되는지의 실측 검증 — 본 문서는 명세일 뿐 (branch-note Claims To Verify 표의 실측 항목 대상)
    • post_logout_redirect_uri 매칭 실패 시의 정확한 HTTP 응답/에러 메시지
    • Front-channel logout 과 Back-channel logout 중 어느 쪽이 이 프로젝트(P1A oauth2-proxy)에 더 적합한지의 trade-off 판단(원문은 "Back-Channel Logout 이 더 reliable" 이라는 일반 권고만 제공하며, 본 raw 의 핵심 인용 범위에는 포함하지 않음)
    • 본 branch(feature-keycloak-oauth2-proxy-oidc-flow)는 P1A 학습 노트, documented-only 등급. 이 raw 자료는 Keycloak 공식 문서의 verbatim 발췌일 뿐 — 내 프로젝트에서 실제로 RP-Initiated Logout 을 구성·시연했다는 근거가 아니다. actually-implemented/locally-verified 로 승격 금지.
  • 내 프로젝트에 적용하려면 추가 확인이 필요한 것:
    • Keycloak 26.x 에서 .well-known/openid-configuration discovery 응답의 end_session_endpoint 필드 값이 실제로 /realms/{realm}/protocol/openid-connect/logout 과 일치하는지 실측(discovery JSON 확인)
    • Valid Post Logout Redirect URIs client 설정과 oauth2-proxy --whitelist-domain/rd 리다이렉트 대상 설정 간의 정합성

메모 / Notes

나중에 wiki로 옮길 때 참고할 짧은 메모. 검증되지 않은 내 추론은 여기에 두지 말 것.

  • raw/official-docs/oauth2-proxy-endpoints-signout-official 의 O2PE-C1C4 (oauth2-proxy 측: /oauth2/sign_out, rd/{id_token} placeholder, --whitelist-domain)와 본 문서의 KC-LOGOUT-C1C7 (Keycloak 측: end_session_endpoint, id_token_hint, post_logout_redirect_uri, Backchannel Logout URL)을 합치면 D6 (RP-Initiated Logout 채택)의 handshake 양쪽이 모두 공식 문서로 뒷받침된다. 다만 "Keycloak 세션이 실제로 끊기는지" 는 여전히 실측(runtime) 확인 대상 — documented-only 유지.
  • Backchannel logout 수신 측(oauth2-proxy 가 Logout Token 을 받는 엔드포인트를 제공하는지)은 oauth2-proxy-endpoints-signout-official.md 도 본 문서도 증명하지 않음 — 별도 미확인 사항으로 남음.
  • 추가로 봐야 할 동일 출처 페이지: server_admin 가이드의 "Front-channel Logout"/"Backchannel Logout" 절 본문(원문 존재 확인함, 본 raw 핵심 인용에는 미포함 — 필요 시 후속 raw로 분리 등록)