keycloak-services

Spring Boot Keycloak - Bearer: How to solve NOT_ATTEMPTED: bearer only?

僤鯓⒐⒋嵵緔 提交于 2019-12-06 09:21:57
问题 Angular v. v4.0.2 Spring Boot v. 1.5.2.RELEASE Keycloak v.2.4.0.Final (will upgrade later) I read this mail converstion about the same problem: http://keycloak-user.88327.x6.nabble.com/keycloak-user-NOT-ATTEMPTED-bearer-only-error-while-trying-to-access-server-from-client-td927.html and this http://slackspace.de/articles/authentication-with-spring-boot-angularjs-and-keycloak/ I use the following http service for making authorized requests: @Injectable() export class AuthHttpService extends

Keycloak SSL setup using docker image

别说谁变了你拦得住时间么 提交于 2019-12-06 01:47:03
问题 I am trying to deploy keycloak using docker image (https://hub.docker.com/r/jboss/keycloak/ version 4.5.0-Final) and facing an issue with setting up SSL. According to the docs Keycloak image allows you to specify both a private key and a certificate for serving HTTPS. In that case you need to provide two files: tls.crt - a certificate tls.key - a private key Those files need to be mounted in /etc/x509/https directory. The image will automatically convert them into a Java keystore and

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

拈花ヽ惹草 提交于 2019-12-05 17:44:39
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 via REST without admin account . To realize this I: create a realm inside the real created a client configured the access type of the client to "confidential" saved and activated the "Service Accounts Enabled" option that will apear after the save. enable under scopes the client-roles of the "real-management" (see screenshot) requested an access

Keycloak - Get all Users mapped to roles

╄→гoц情女王★ 提交于 2019-12-05 09:25:34
I know keycloak has exposed below api, <dependency> <groupId>org.keycloak</groupId> <artifactId>keycloak-services</artifactId> <version>2.0.0.Final</version> </dependency> With complete documentation here . I cannot find the required api here to fetch all users with specific role mapped to them. Problem Statement - I need to pick all users from keycloak server who have a specific role. I need to send email to all users with role mapped to them. There is an outstanding feature request asking for this function via the API. In the meantime if your requirement is once-off you could obtain the user

Cant access keycloak rest API methods *404*

醉酒当歌 提交于 2019-12-05 05:56:45
I am using the latest keycloak image in docker and can access the standard admin console at http://localhost:9080 . However, I cant seem to access any of the paths specified in the documentation for Admin REST api. For instance, the base path /auth and Resource Get clients belonging to the realm Returns a list of clients belonging to the realm: /{realm}/clients I am getting a 404. So is for any other method in the documentation . The only path returning a valid 200 json response is http://localhost:9080/auth/realms/ {realm-name}/ which according to the documentation be reachable at basepath +

Didn't find publicKey for kid ,Keycloak?

那年仲夏 提交于 2019-12-05 01:06:11
I am getting this exception "Didn't find publicKey for kid" while calling endpoint from angular js 2 to the widlfly server . authentication happened in keycloak , however i am calling about 8 endpoints from different clients (different micro services ) within same realm using same token but i got this exception only for this microservice call . i am sure that the user has all roles for all clients . i also decoded the token on JWT to verify that. sometimes it works and sometimes no!! this the exception stack trace : Caused by: java.lang.RuntimeException: Unexpected error: java.security

Keycloak: How to auto redirect Keycloak user to OKTA SSO page instead of clicking on button?

隐身守侯 提交于 2019-12-04 10:12:26
I have followed the guide https://ultimatesecurity.pro/post/okta-saml/ , to configure OKTA Saml with keycloak. After this configuration, I see Okta/saml login button on login page, clicking on which, the user is redirected to Okta login/SSO. Now, is there a way to avoid clicking on this button everytime such that when the keycloak login page appears, user is auto redirected to Okta SSO automatically instead of shown keycloak login form with okta redirect button? If not, is it possible to enter okta username password within the keycloak form fields and keycloak have it validated internally from

Keycloak SSL setup using docker image

北城余情 提交于 2019-12-04 08:15:22
I am trying to deploy keycloak using docker image ( https://hub.docker.com/r/jboss/keycloak/ version 4.5.0-Final) and facing an issue with setting up SSL. According to the docs Keycloak image allows you to specify both a private key and a certificate for serving HTTPS. In that case you need to provide two files: tls.crt - a certificate tls.key - a private key Those files need to be mounted in /etc/x509/https directory. The image will automatically convert them into a Java keystore and reconfigure Wildfly to use it. I followed the given steps and provided the volume mount setting with a folder

Generate JWT Token in Keycloak and get the public key to verify the JWT token on a third party platform

帅比萌擦擦* 提交于 2019-12-04 03:43:17
There is an Endpoint to a backend server which gives a JSON response on pinging and is protected by an Apigee Edge Proxy . Currently, this endpoint has no security and we want to implement Bearer only token authentication for all the clients making the request. All the clients making the requests to API will send that JWT token in Authorization Bearer and Apigee Edge will be used to verify the JWT Token. How do I use Keycloak to generate this JWT token? Also, Apigee needs a public key of the origin of the JWT token (the server which signed the JWT token, in this case, I believe that is

Access the keycloak API from postman

社会主义新天地 提交于 2019-11-30 23:04:02
问题 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. http://{hostname}:8080/auth/realms/master/protocol/openid-connect/token?username=admin&password=admin&client_id=admin-cli&grant_type=password In the headers I have set the content_type as application/x-www-form-urlencoded I am getting the response as below. { "error": "invalid_request", "error_description": "Missing form parameter: grant_type" } Can any one help