keycloak

KeyCloak User Federation AND DYNAMIC ROLES

醉酒当歌 提交于 2021-02-10 07:05:53
问题 I am using this guide http://www.keycloak.org/docs/3.2/server_development/topics/user-storage.html to configure user federation. This works fine and my users can login. My users are stored in a Mysql Database. Users have different roles - also store in mysql. I am not not sure of how to add roles to the UserModel. I've implemented getUserXXX methods e.g @Override public UserModel getUserByEmail(String email, RealmModel realm) { LOGGER.info("LOADING BY EMAIL"); try (Connection connection = ds

java.lang.LinkageError: ClassCastException RuntimeDelegate.class

一曲冷凌霜 提交于 2021-02-10 06:01:21
问题 I have this error java.lang.LinkageError: ClassCastException: attempting to tomcat-debug-eclispe/wtpwebapps/xwiki-debug-eclipse/WEB-INF/lib/jsr311-api-1.1.1.jar!/javax/ws/rs/ext/RuntimeDelegate.class to tomcat-debug-eclispe/lib/jboss-jaxrs-api_2.0_spec-1.0.1.Final.jar!/javax/ws/rs/ext/RuntimeDelegate.class I'm using an open source wiki platform called xwiki https://github.com/xwiki/xwiki-platform This platform somewhere include jsr311-api-1.1.1.jar and need it. Now I want to connect through

java.lang.LinkageError: ClassCastException RuntimeDelegate.class

ぐ巨炮叔叔 提交于 2021-02-10 06:00:47
问题 I have this error java.lang.LinkageError: ClassCastException: attempting to tomcat-debug-eclispe/wtpwebapps/xwiki-debug-eclipse/WEB-INF/lib/jsr311-api-1.1.1.jar!/javax/ws/rs/ext/RuntimeDelegate.class to tomcat-debug-eclispe/lib/jboss-jaxrs-api_2.0_spec-1.0.1.Final.jar!/javax/ws/rs/ext/RuntimeDelegate.class I'm using an open source wiki platform called xwiki https://github.com/xwiki/xwiki-platform This platform somewhere include jsr311-api-1.1.1.jar and need it. Now I want to connect through

Keycloak provides invalid signature with Istio and JWT

萝らか妹 提交于 2021-02-10 05:51:42
问题 I'm using Keycloak (latest) for Auth 2.0 , to validate authentication, provide a token (JWT) and with the token provided, allows the access to the application URLs, based in the permissions. Keycloak is currently running in Kubernates, with Istio as Gateway. For Keycloak, this is the policy being used: apiVersion: authentication.istio.io/v1alpha1 kind: Policy metadata: name: application-auth-policy spec: targets: - name: notification origins: - jwt: issuer: http://<service_name>http.

Keycloak provides invalid signature with Istio and JWT

主宰稳场 提交于 2021-02-10 05:51:31
问题 I'm using Keycloak (latest) for Auth 2.0 , to validate authentication, provide a token (JWT) and with the token provided, allows the access to the application URLs, based in the permissions. Keycloak is currently running in Kubernates, with Istio as Gateway. For Keycloak, this is the policy being used: apiVersion: authentication.istio.io/v1alpha1 kind: Policy metadata: name: application-auth-policy spec: targets: - name: notification origins: - jwt: issuer: http://<service_name>http.

idp initiated sso using keycloak

▼魔方 西西 提交于 2021-02-09 08:48:10
问题 This question is in the area of SAML based IDP initiated SSO. As a POC, I have two keycloak instances, say keycloak1 and keycloak2. I would want to achieve the below : Authentication would be done at keycloak1 keycloak1 then directs to keycloak2 to access an keycloak2 client application. To do so, a) create a saml client at keycloak1 under realm1. With IdP initiated SSO Name set as some name without spaces) --> say, keycloakclientsaml . In the Fine Grain SAML Endpoint Configuration section,

Keycloak uma-grant type tickets for service accounts do not seem to work with policies

心已入冬 提交于 2021-02-09 05:41:32
问题 I am trying to use the Keycloak AuthzClient to register resources and related permissions in a resource server. I have a resource server "resourceserver" with authz service enabled. Using the AuthzClient, initialized with the json file containing the resource server's client id and secret, I'm able to obtain a pat. ... authzClient.obtainAccessToken().getToken(); ResourceRepresentation resource = new ResourceRepresentation(); resource.setName("myresource"); resource.setUris(new HashSet<>

Keycloak uma-grant type tickets for service accounts do not seem to work with policies

纵然是瞬间 提交于 2021-02-09 05:29:10
问题 I am trying to use the Keycloak AuthzClient to register resources and related permissions in a resource server. I have a resource server "resourceserver" with authz service enabled. Using the AuthzClient, initialized with the json file containing the resource server's client id and secret, I'm able to obtain a pat. ... authzClient.obtainAccessToken().getToken(); ResourceRepresentation resource = new ResourceRepresentation(); resource.setName("myresource"); resource.setUris(new HashSet<>

HTTP and HTTPS with keycloack + spring

*爱你&永不变心* 提交于 2021-02-08 11:43:20
问题 I am trying to secure my application using keycloak. I use angular for my frontend and spring boot for my backend. Using only http, everything works fine, the problem is, if I want to use HTTPS along side HTTP, I am having a problem with the backend throwing an error like: o.k.a.BearerTokenRequestAuthenticator : Failed to verify token org.keycloak.common.VerificationException: Invalid token issuer. Expected 'http://myDomain/auth/realms/realmName', but was 'https://myDomain/auth/realms

An error occurred while executing doInBackground() for keyclock authService.performTokenRequest() function

左心房为你撑大大i 提交于 2021-02-08 10:38:46
问题 While integrating Keyclock SDK , I try to exchange authorization code to access token authService.performTokenRequest( resp.createTokenExchangeRequest(), new AuthorizationService.TokenResponseCallback() { @Override public void onTokenRequestCompleted( TokenResponse resp, AuthorizationException ex) { if (resp != null) { // exchange succeeded } else { // authorization failed, check ex for more details } } }); I got the following error, java.lang.RuntimeException: An error occurred while