keycloak

How to implement Keycloak in Angular 6?

我的未来我决定 提交于 2020-01-16 05:29:09
问题 Can anybody help me with the integration from Keycloak in to Angular 6 ? I don't know how I must start and how to initialize the Javascript Adapter 回答1: I used this one: https://github.com/mauriciovigolo/keycloak-angular Every step described there, and an example how to integrate also included. 回答2: If you are using Angular 8+ and Keycloak OpenId Connect for enabling REST Login, Logout, Check Session then you can use this angular dependency: Angular Keycloak Dependency for version 2+ tested

Failed adding user by keycloak-admin-client to Keycloak due to “unknown resource”

杀马特。学长 韩版系。学妹 提交于 2020-01-15 11:04:56
问题 I tried to use keycloak-admin-client in Java code like below, and then I got exceptions. From the exceptions, it looks like that it failed in constructing the API URL, even before reaching Keycloak. Does anybody have idea why this happened? I am running Keycloak inside a docker container and exposed port 8078. public static void main(String ... args) { Keycloak kc = KeycloakBuilder.builder() .serverUrl("http://localhost:8078/auth") .realm("master") .username("admin") .password("admin")

How to get javax.servlet.Filter called before Keycloak Authentication

六月ゝ 毕业季﹏ 提交于 2020-01-13 08:16:55
问题 We have developed a REST API using the resteasy. (deployed in wildfly 10) Basically these REST APIs are called internally from another application and end points are secured with keycloak. But one endpoint is exposed to outside party (that endpoint is also secured with keycloak). But since the outside party can't provide the Keycloak Autherization code, we have done an implementation where client is registerred with application generated auth_key and client will call the endpoint with that

Emulating tenants using roles

六月ゝ 毕业季﹏ 提交于 2020-01-12 06:15:28
问题 We are developing a keycloak(5.0.0) based solution where our clients can create their account with us and manage their own users - and only their users. Initially with thought that we could use realms for this. Every client gets their own realm. After initial testing we deemed it might not be a good solution as after creating ~500 realms the application becomes unresponsive(https://issues.jboss.org/browse/KEYCLOAK-4593). We decided to try using Groups to emulate a tenant. Our objective is to

Communication between two micro services - keycloak clients

 ̄綄美尐妖づ 提交于 2020-01-06 14:29:18
问题 I have two services registered as two keycloak clients in the same realm. Access type of both the clients is set to public in keycloak client settings. Both the services works fine when we try to login via Keycloak. After login to first(service-1) user does some operation, for which I need to make a REST call to (service-2). Now If I try to do a REST call from one service to other, It redirects to HTML and returns some HTML response instead of actual response. What is the Way I can make calls

Cannot get Keycloak Tomcat 7 adapter to work (version 3.4.3.Final)

雨燕双飞 提交于 2020-01-06 05:56:27
问题 I have a Spring Boot 1.5.2 Web App packaged as a .war hosted on an Apache Tomcat 7.0.68. I want to use the Keycloak Tomcat Adapter but I encounter HTTP 401 returns on every endpoints included in the configuration... I am using the 3.4.3.Final version. I have read the doc @ http://www.keycloak.org/docs/2.5/securing_apps/topics/oidc/java/tomcat-adapter.html. Facts: The users, groups, roles, realm, client etc. exist in the main Keycloak configuration. Downloaded https://downloads.jboss.org

Keycloak user federator

冷暖自知 提交于 2020-01-05 10:31:59
问题 I'm trying to put my new custom Federator in Keycloak so I've compiled my jar filed created using mvn clean install into standalone/configuration/providers following this guide. I then restarted the Wildfly 8 server but it doesn't seem to register my customer Federation provider. Is there a reason why this isn't working? 回答1: Add a file META-INF/services/org.keycloak.models.UserFederationProviderFactory containing the full classname of your custom provider factory . For example be.abc.def

Keycloak user federator

自闭症网瘾萝莉.ら 提交于 2020-01-05 10:31:15
问题 I'm trying to put my new custom Federator in Keycloak so I've compiled my jar filed created using mvn clean install into standalone/configuration/providers following this guide. I then restarted the Wildfly 8 server but it doesn't seem to register my customer Federation provider. Is there a reason why this isn't working? 回答1: Add a file META-INF/services/org.keycloak.models.UserFederationProviderFactory containing the full classname of your custom provider factory . For example be.abc.def

by securing and endpoint with a role, works for GET methods bot not POST, I receive 403 Forbidden

霸气de小男生 提交于 2020-01-05 04:18:15
问题 By using Keycloack springboot adapter (with spring security), when defining the typical SecurityConfig (which extends from KeycloakWebSecurityConfigurerAdapter ), and overriding the "configure" method, I run into a problem when defining access roles for an endpoint, like follows: // typically access is defined something like this: http .authorizeRequests() .antMatchers(GET, "/SOME_ENDPOINT").hasRole("SOME_ROLE") .... This works for me, but when I change GET for POST, suddenly my API responds

Unauthorized request, 401, using Spring if I open a modal or I send an ajax request

有些话、适合烂在心里 提交于 2020-01-05 04:07:19
问题 I have a problem with Keycloak and Spring Boot .. I developed a web-app with some modal and ajax request, sometimes, and I don't know why, I receive status 401 if I click on an href to open a modal, or if I submit a form via ajax... I don't see any error log server-side, but I checked the request and I have WWW-Authenticate: Bearer realm="Unknown" . I think it is weird. This is the entire request: 1. Request URL: MyUrl 2. Request Method: GET 3. Status Code: 401 Unauthorized 4. Remote Address: