Questions tagged [keycloak]

Keycloak is an integrated single sign-on (SSO) and identity manager (IDM) for browser apps and RESTful web services. It is built on top of JBoss and WildFly, it complies with the OAuth 2.0, Open ID Connect (OIDC), JSON Web Token (JWT) and SAML 2.0 specifications.

About

Keycloak is a free and open source Identity and Access Management solution aimed at modern applications and services. It makes it easy to secure applications and services with little to no code.

Offers an integrated single sign-on (SSO) and identity manager for browser applications and RESTful web services. Built on top WildFly / JBoss and implements the OAuth 2.0, Open ID Connect and JSON Web Token (JWT) and SAML 2.0 specifications.

Keycloak was initially targeted towards the JBoss and WildFly communities, but it has solutions for many other environments like Tomcat, Jetty, Node.js, Ruby on Rails, Grails, etc. Options are to deploy it with an existing applicationserver, as a black-box appliance, or as an OpenShift, Kubernetes, or Docker service.

Features

  • Single sign-on (SSO) and single log out (SLO) for browser applications
  • Social Broker. Enable Google, Facebook, Yahoo, and Twitter social login without any code required.
  • Optional LDAP(S) or Active Directory identity federation
  • Optional user registration
  • Password and TOTP support (via Google Authenticator or FreeOTP)
  • Client X.509 certificate authentication coming soon
  • User session management from both administrator and user perspective
  • Customizable themes for user facing pages: login, grant pages, account management, emails, and administrator console all customizable!
  • OAuth Bearer token administrator for REST services
  • Integrated browser app to REST service token propagation
  • Administrator REST API
  • OAuth 2.0 Grant requests
  • CORS support
  • CORS Web Origin management and validation
  • Completely centrally managed user and role mapping metadata. Minimal configuration at the application side
  • Admin Console for managing users, roles, role mappings, applications, user sessions, allowed CORS web origins, and OAuth clients
  • Deployable as a WAR, appliance, or an OpenShift, Kubernetes, and Docker service
  • Supports JBoss AS7, EAP 6.x/7.x, and WildFly applications, as well as Node.js, other non-Java applications
  • JavaScript/HTML 5 adapter for pure JavaScript applications
  • Session management from admin console
  • Revocation policies
  • Password policies
  • OpenID Connect Support
  • SAML 2.0 support

Useful links

7431 questions
24
votes
5 answers

Globally disable https keycloak

The deployment is on AWS and I do not want to tunnel to the box and open a browser to disable it. There seems to exist a configuration: "ssl-required":"none" that can be placed in the keycloak-server.json file, but I'm not sure under which object.…
BatteryAcid
  • 8,381
  • 5
  • 28
  • 40
24
votes
2 answers

Keycloak Logout Request

I wanted to ask if there is a way to logout from keycloak via a single http request. I already tried to POST /protocol/openid-connect/logout or /tokens/logout, but the result is always a ORIGIN-Problem. But the calling ORIGIN is configured in…
Stack
  • 297
  • 1
  • 4
  • 13
23
votes
1 answer

Keycloak cookies : KEYCLOAK_SESSION,Oauth_token_request_state, KEYCLOAK_IDENTITY

Can someone please explain the cookies set by Keycloak: KEYCLOAK_SESSION,Oauth_token_request_state, KEYCLOAK_IDENTITY. What is the relevance of each cookies?
23
votes
5 answers

Access the keycloak API from postman

I have tried to access the keycloak API from the postman. but it is showing 400 bad request. I was calling api in the below format.…
Programmer
  • 657
  • 4
  • 9
  • 21
22
votes
6 answers

Use Keycloak Spring Adapter with Spring Boot 3

I updated to Spring Boot 3 in a project that uses the Keycloak Spring Adapter. Unfortunately, it doesn't start because the KeycloakWebSecurityConfigurerAdapter extends WebSecurityConfigurerAdapter which was first deprecated in Spring Security and…
Samuel
  • 547
  • 1
  • 3
  • 14
22
votes
4 answers

Keycloak Admin console not accessible

I'm trying to setup Keycloak on a root server but I cannot access the admin console from the internet. I've installed the keycloak server and put it behind an nginx reverse proxy on the same machine. I've setup a letsencrypt cert for the domain.…
Manuel Mauky
  • 2,116
  • 4
  • 21
  • 25
22
votes
1 answer

Introspection Endpoint of KeyCloak server

I am trying to explore features of KeyCloak server and want to get information about access token by using /openid-connect/token/introspect endpoint. So, I am sending next request to this endpoint curl -v --data…
Alfred Moon
  • 987
  • 1
  • 10
  • 21
22
votes
2 answers

Mocking a Keycloak token for testing a Spring controller

I want to write unit tests for my spring controller. I'm using keycloak's openid flow to secure my endpoints. In my tests I'm using the @WithMockUser annotation to mock an authenticated user. My problem is that I'm reading the userId from the token…
Peter Lustig
  • 1,585
  • 1
  • 18
  • 34
22
votes
2 answers

Spring Boot keycloak and basic authentication together in the same project

I have an issue with Spring Boot security. What I want is to have two different authentication for the same project at the same time in Spring Boot. The one is SSO (keycloak authentication) for all path except '/download/export/*' , the other one…
gubak
  • 343
  • 1
  • 4
  • 9
21
votes
3 answers

trying to up keycloak with docker but it's not starting . Operation ("add") failed - address:

05:49:02,840 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("subsystem" => "microprofile-metrics-smallrye")]): java.lang.NullPointerException at…
spidy
  • 539
  • 1
  • 6
  • 7
21
votes
4 answers

Keycloak User Roles missing in REST API

I would like to ask, if somebody knows, why there are no roles within the user details in REST ADMIN API request. I saw some posts dealing with this topic, but there were either no clear answer or they propose to use keycloak-admin-client, but that…
troger19
  • 1,159
  • 2
  • 12
  • 29
21
votes
2 answers

Keycloak - Is it possible share a common set of users between realms?

I am trying to implement keycloak as an SSO for my company. I have created two realms, realm A and realm B. I want to use same set of users for both realms ie I need give access to users for both realms. Is it possible to do this in Keycloak?
Charlie
  • 3,113
  • 3
  • 38
  • 60
21
votes
5 answers

Fetch Logged In Username in a webapp secured with Keycloak

I have secured an enterprise application with Keycloak using standard wildfly based Keycloak adapters. Issue that I am facing is that the rest web services when invoked, needs to know the username that is currently logged in. How do I get the logged…
aksappy
  • 3,400
  • 3
  • 23
  • 49
20
votes
6 answers

Enable role authentication with spring boot (security) and keycloak?

I am trying to do a simple thing. Want to make a request to a single endpoint and send a bearer token (from a client), I want this token to be validated and depending on the role assigned on keycloak accept/deny request on my endpoint. I followed…
jpganz18
  • 5,508
  • 17
  • 66
  • 115
20
votes
5 answers

How can I get other users info(username, firstname) by id? [Keycloak]

How can I get user keycloak attributes (username, firstname, email...) based on user id? The user I'm using in the Keycloak session has already the role view-users assigned so I should be able to list at least all users, is there any Keycloak class…
User6300
  • 325
  • 1
  • 3
  • 10