You can spot the pain instantly. Someone tries to open a Confluence page for a restricted internal project. The login redirects, loops once, then dumps them back at the main screen, confused and locked out. The culprit? Identity chaos. The fix? Understanding how Confluence and Keycloak are meant to talk.
Confluence organizes collaboration. Keycloak manages identities. Alone, each is strong, but together they can finally make single sign-on feel effortless instead of fragile. The Confluence Keycloak integration ties Atlassian’s documentation hub to an enterprise-grade OpenID Connect (OIDC) identity broker. That means every Confluence space, user, and group maps directly to a known identity that you can audit, revoke, or automate.
Integrating the two is a matter of logic more than code. Confluence acts as the relying party. Keycloak becomes the identity authority. When a user logs in, Confluence requests an authentication token from Keycloak through OIDC. Keycloak verifies credentials, applies realm-based rules, and returns claims about who the user is and what they can do. Confluence then enforces access based on those roles. The handshake might take milliseconds, but the gain in traceability lasts much longer.
If access keeps looping or roles fail to sync, look at the claim mappings first. Keycloak’s “groups” often appear under a different claim key than Confluence expects. Also check redirect URIs. Confluence is picky about exact matches. Keep both sides consistent with HTTPS and trailing slashes. A well-defined realm policy and RBAC mapping will save you hours of debugging.
Featured snippet answer: To connect Confluence with Keycloak, register Confluence as an OIDC client in Keycloak, configure SSO settings in Confluence with the client ID, secret, and redirect URLs, then test user login flow to ensure roles and group claims propagate correctly.