Skip to content

docs(security): add OAuth2/OIDC integration guide for Keycloak#733

Open
mihir-dixit2k27 wants to merge 1 commit into
kgateway-dev:mainfrom
mihir-dixit2k27:docs/add-oauth2-oidc-keycloak-guide
Open

docs(security): add OAuth2/OIDC integration guide for Keycloak#733
mihir-dixit2k27 wants to merge 1 commit into
kgateway-dev:mainfrom
mihir-dixit2k27:docs/add-oauth2-oidc-keycloak-guide

Conversation

@mihir-dixit2k27

Copy link
Copy Markdown

Description

kgateway has OAuth2/OIDC support but no how-to for it. This adds a Keycloak guide under the security section — GatewayExtension setup, TrafficPolicy attachment, cookie config, and denyRedirect so API clients get a 401 instead of a redirect to the Keycloak login page.

Follows the same file/reuse pattern as the existing extauth/basic and extauth/apikey guides. All YAML field names checked against the API reference.

Change Type

/kind documentation

Changelog

Added OAuth2/OIDC Keycloak integration guide under the security section.

Additional Notes

Pre-existing blog build errors on main are unrelated to this PR — new pages build clean.

Fixes #732

Comment thread assets/docs/pages/security/oauth2-keycloak.md Outdated
Comment thread assets/docs/pages/security/oauth2-keycloak.md Outdated
Comment thread assets/docs/pages/security/oauth2-keycloak.md Outdated
Comment thread assets/docs/pages/security/oauth2-keycloak.md Outdated
Comment thread assets/docs/pages/security/oauth2-keycloak.md Outdated
Comment thread assets/docs/pages/security/oauth2-keycloak.md Outdated
Comment thread assets/docs/pages/security/oauth2-keycloak.md Outdated
Comment thread assets/docs/pages/security/oauth2-keycloak.md Outdated
Comment thread assets/docs/pages/security/oauth2-keycloak.md Outdated
Comment thread assets/docs/pages/security/oauth2-keycloak.md Outdated
Comment thread assets/docs/pages/security/oauth2-keycloak.md Outdated
Comment thread assets/docs/pages/security/oauth2-keycloak.md Outdated
Comment thread assets/docs/pages/security/oauth2-keycloak.md Outdated
Comment thread assets/docs/pages/security/oauth2-keycloak.md Outdated
Comment thread assets/docs/pages/security/oauth2-keycloak.md Outdated
Comment thread assets/docs/pages/security/oauth2-keycloak.md Outdated
Comment thread assets/docs/pages/security/oauth2-keycloak.md Outdated
Comment thread assets/docs/pages/security/oauth2-keycloak.md Outdated
Comment thread assets/docs/pages/security/oauth2-keycloak.md
Comment thread assets/docs/pages/security/oauth2-keycloak.md Outdated
Comment thread content/docs/envoy/main/security/oauth2/_index.md
Comment thread content/docs/envoy/main/security/oauth2/_index.md Outdated

@kristin-kronstain-brown kristin-kronstain-brown left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overall the content looks good! I left some line edits to help with clarity. Could you also add wrapper topics for the latest and 2.2.x directories as well? And resolve conflicts.

@mihir-dixit2k27 mihir-dixit2k27 force-pushed the docs/add-oauth2-oidc-keycloak-guide branch 2 times, most recently from 96c19fd to 83f9e7e Compare June 9, 2026 22:09
Add a new OAuth2/OIDC guide under the security section that walks
through protecting an HTTPRoute using kgateway's built-in authorization
code flow with Keycloak as the identity provider.

Changes:
- assets/docs/pages/security/oauth2-keycloak.md: full guide covering
  GatewayExtension setup, TrafficPolicy attachment, cookie configuration,
  and denyRedirect for API clients (401 instead of browser redirect)
- content/docs/envoy/main/security/oauth2/_index.md: parent section page
- content/docs/envoy/main/security/oauth2/keycloak.md: thin content file
  following the established reuse pattern
- content/docs/envoy/main/security/_index.md: add OAuth2/OIDC card

All field names (issuerURI, clientID, clientSecretRef, denyRedirect,
endSessionEndpoint, cookies.names, cookies.sameSite) verified against
gateway.kgateway.dev/v1alpha1 API reference. All shortcodes verified
against existing guides. Hugo build confirmed no errors on new pages.

Signed-off-by: Mihir Dixit <dixitmihir1@gmail.com>
@mihir-dixit2k27 mihir-dixit2k27 force-pushed the docs/add-oauth2-oidc-keycloak-guide branch from 83f9e7e to 1415cd2 Compare June 9, 2026 22:13
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.

docs: add OAuth2/OIDC integration guides for Keycloak, Auth0, and other IdPs

2 participants