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
20
votes
1 answer

Access Keycloak REST Admin API using a service account (client credential grant)

I like to manage keycloak from my own application:create user & clients, display users & client. As this is not a real user but a machine I would like to use a service account with a client credential grant as proposed in How to get Keycloak users…
Dennis Seidel
  • 519
  • 1
  • 3
  • 13
20
votes
1 answer

Programmatically authenticate user with Keycloak in java

I have been looking through the Keycloak documentation but cannot see how to do this. With Java, I'd like to take a valid userid and password and then generate a token. How can I do this?
user840930
  • 5,214
  • 21
  • 65
  • 94
20
votes
3 answers

Obtain id_token with Keycloak

Who knows how to obtain the id_token with Keycloak? I have been working with Keycloak in Java (Spring, JEE) and postman. The basics work fine but I need the id_token since there are some claims that they are not present in the access_token but they…
Pablo Bastidas
  • 608
  • 1
  • 6
  • 17
20
votes
3 answers

Keycloak client vs user

I understand that keycloak has built-in clients and we add the users later on. But in general, what is the difference between a client and a user in Keycloak?
Orkun
  • 6,998
  • 8
  • 56
  • 103
20
votes
4 answers

Export all users from KeyCloak

I have a specific use case in which we want to ask Keycloak for all the users and the groups and roles for each user, on a daily basis. For reconciliation purposes with other internal systems. Currently we are using the provided Keycloak endpoints…
Michel
  • 9,220
  • 13
  • 44
  • 59
20
votes
3 answers

Keycloak JavaScript API to get current logged in user

We plan to use keycloak to secure a bunch of web apps, some written in Java, some in JavaScript (with React). After the user is logged in by keycloak, each of those web apps needs to retrieve the user that is logged in and the realm/client roles…
Alex
  • 351
  • 1
  • 3
  • 7
20
votes
5 answers

Keycloak behind apache reverse proxy

I have surfed through google without finding any concrete answers or examples, so again trying my luck here (often get lucky). The problem I have a single spring boot RESTful service running behind an apache reverse proxy. This RESTful service is…
Gogi
  • 1,695
  • 4
  • 23
  • 36
20
votes
1 answer

Localization of custom keycloak login theme

I am implementing a custom login page for keycloak (version 2.5), by following this guide. I added my own custom styling, now I am trying to add the Dutch locale. Currently no Dutch locale is provided, so I provided following properties…
Jacob van Lingen
  • 8,989
  • 7
  • 48
  • 78
19
votes
5 answers

Keycloak: Could not find resource for full path

I am trying to get the REST API of keycloak to work. Thanks to this post I was able to get the token. But when trying the example for the list of users in the first answer, I get the error: "error": "RESTEASY003210: Could not find resource for full…
flololan
  • 373
  • 1
  • 2
  • 13
19
votes
1 answer

How to have Keycloak login page in iframe?

There is a web server running locally, and I want to have Keycloak (on another domain) login page inside the iframe. I tried the following setting in the Keycloak Real Settings > Security Defenses > Headers > Content-Security-Policy frame-src 'self'…
srgbnd
  • 5,404
  • 9
  • 44
  • 80
19
votes
5 answers

KeyCloak : No 'Access-Control-Allow-Origin' header is present on the requested resource

I'm using Angular 8.0.3 and keycloak 6.0.1 to make the front authentication. Problem I managed to get to the keycloak login page from my application. After logging in with my login details, an error occurs : -localhost/:1 Access to XMLHttpRequest at…
19
votes
2 answers

How to create a Script Mapper in Keycloak?

I need to create a Protocol Mapper of type Script Mapper in Keycloak. The script should get a user attribute, check its size, and put it on the token. I found no documentation or examples of how a script should be created. From the bits and pieces I…
Jacobs2000
  • 856
  • 2
  • 15
  • 25
19
votes
6 answers

Keycloak API always returns 401

I'm trying to interact with Keycloak via its REST API. I have the master realm and the default admin user, and a test realm. Firstly, I get an access token for the admin account and test realm: let data = { grant_type : 'password', client_id…
Jayce444
  • 8,725
  • 3
  • 27
  • 43
19
votes
3 answers

Gluu vs keycloack vs wso2 identity management

My company is using Auth0 for identity management and we would like to migrate to one of: Keycloak Gluu Wso2 identity management Can you suggest what advantages and disadvantage have any platform? Are there features that stand out for any in…
Klevin Kona
  • 361
  • 1
  • 3
  • 15
18
votes
3 answers

keycloak-js initialization failed because an ancestor violates the Content Security Policy directive: "frame-ancestors 'self'

I have a NGINX (1.14.1) which forwards /auth request to Keycloak (14.0.0) running in a cloud. Here is the NGINX configuration in /etc/nginx/conf.d/my.domain.biz.conf server { listen 80; server_name my.domain.biz; return 301…
user3357926
  • 435
  • 1
  • 4
  • 13