keycloak

“HTTPS required” while logging in to Keycloak as admin

徘徊边缘 提交于 2019-12-31 21:34:50
问题 I am using Keycloak (version 1.0.4.Final) in JBOSS AS 7.1.1 server. The server is on Amazon AWS. I am able to start the jboss server with keycloak. i can see the keycloak default screen while hitting the URL - ServerIP:8080/auth But when i am clicking on the Administration Console link to go to the login screen. I am getting a page saying - HTTPS required The server is on AWS, changing to "ssl-required" : "none", in General Adapter Config has not helped. How to resolve this issue? Edit: I was

Keycloak with NGINX proxy server not authenticating rest api

大憨熊 提交于 2019-12-30 05:01:06
问题 I have a sample app which correctly secures the rest api locally without nginx. Now when I put this in production behind a nginx proxy it does not work. No errors. It allows all request. Front end serer with ssl is https://frontend.com Back end server with ssl is https://backend.com Keycloak proxy forward is true Front end server(node server on 9000) <-> NGINX <-> Keycloak (running on 8180) nginx file sample upstream keycloak_server { server localhost:8180; } upstream node_server { server

Issues running example keycloak spring-boot app

末鹿安然 提交于 2019-12-30 03:08:11
问题 I'm trying to run example app from: https://github.com/keycloak/keycloak-quickstarts/tree/latest/app-springboot I'm getting error: *************************** APPLICATION FAILED TO START *************************** Description: Parameter 1 of method setKeycloakSpringBootProperties in org.keycloak.adapters.springboot.KeycloakBaseSpringBootConfiguration required a bean of type 'org.keycloak.adapters.springboot.KeycloakSpringBootConfigResolver' that could not be found. Action: Consider defining

How to setup the CORS configuration in keycloak to allow an ajax request?

房东的猫 提交于 2019-12-29 08:15:34
问题 I am trying to use keycloak as an authentication server. I try to get the token with an ajax request. It works fine in curl but not in my angular due to CORS. I have set the client to Direct access grant enable to true and I have added * to Web Origin. fetch("http://localhost:8080/auth/realms/master/protocol/openid-connect/token", { body: "grant_type=password&client_id=admin-cli&username=adrien&password=adrien&undefined=", headers: { Accept: "application/json, text/plain, */*,application/x

How to get Keycloak users via REST without admin account

旧街凉风 提交于 2019-12-28 03:02:27
问题 Is there a way to get a list of users on a Keycloak realm via REST WITHOUT using an admin account? Maybe some sort of assignable role from the admin console? Looking for any ideas. Right now I'm using admin credentials to grab an access token, then using that token to pull users from the realm/users endpoint. Getting the token (from node.js app via request ): uri: `${keycloakUri}/realms/master/protocol/openid-connect/token`, form: { grant_type: 'password', client_id: 'admin-cli', username:

Enable Https in JHipster Project which Uses KeyCloak

故事扮演 提交于 2019-12-25 18:28:47
问题 I have a similar question, which was poorly written by me and so now I put the question in a clearer way hopefully: I have generated a project using Jhipster and Keycloak (follow this tutorial: https://developer.okta.com/blog/2018/06/25/react-spring-boot-photo-gallery-pwa). It works fine until I want to turn on https. So say in the keycloak admin panel, I choose 'all request need https'. And then when I login, I get an error page saying "https required". My question is, what exactly should I

endless redirect on keycloak 3.1.0 with reverse proxy

主宰稳场 提交于 2019-12-25 09:27:25
问题 I am using keycloak 3.1.0 Final I am checking the working of openid connect in keycloak. But got stuck in the middle. Everything works fine when keycloak and spring-boot running in localhost (meaning spring-boot's auth-server-url = localhost:8080/auth and redirect url etc in keycloak also are pointing to localhost* ). Now I wanted to check by putting both of them behind Reverse proxy server (Nginx) I am starting keycloak in standalone mode using the command: bin/standalone.sh -b=0.0.0.0 I

Include user locale to the Keycloak ID token

别等时光非礼了梦想. 提交于 2019-12-25 07:54:24
问题 I would like Keycloak (1.4.0) to include the users' chosen locale to the ID token. I have come as far as creating a user attribute mapper, which was supposed to map the locale attribute to the token, but it does not work. Does anybody know how to do this? Thanks in advance. Edit: I have learnt what I know abput Keycloak Locales from this class: http://grepcode.com/file/repository.jboss.org/nexus/content/repositories/releases/org.keycloak/keycloak-forms-common-freemarker/1.2.0.Final/org

Python Keycloak Get Roles and Groups of user

故事扮演 提交于 2019-12-25 01:54:17
问题 Using Key Cloak created groups and assigned roles to the groups. Than created the users and assigned the users to specific groups. To access all this in my application I am using Python-Keycloak As mentioned in github doc, using following code to access the user information. from keycloak import KeycloakOpenID keycloak_openid = KeycloakOpenID(server_url="http://localhost:8080/auth/", client_id="account", realm_name="demo", client_secret_key="my_secret_key") config_well_know = keycloak_openid

!role error in keycloak while accessing a resource

左心房为你撑大大i 提交于 2019-12-25 01:45:36
问题 I have secured my rest api with Keycloak. After authentication, when I try to access rest API , I get: 403 error. Unable to access rest api. Reason !role. In configuration I have specified role as *: ConstraintSecurityHandler securityHandler = new ConstraintSecurityHandler(); context.setSecurityHandler(securityHandler); securityHandler.addRole("*"); ConstraintMapping constraintMapping = new ConstraintMapping(); constraintMapping.setPathSpec("/*"); Constraint constraint = new Constraint();