keycloak

Issues running example keycloak spring-boot app

蓝咒 提交于 2019-12-04 07:29:15
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 a bean of type 'org.keycloak.adapters.springboot.KeycloakSpringBootConfigResolver' in your

Trying to log in to Keycloak Admin WS

橙三吉。 提交于 2019-12-04 05:36:12
I need to configure realms in Keycloak by the Admin WS accessible at the path http://KeycloakServer:8081/auth/admin/realms So in Postman I run the following request URL: http://KeycloakServer:8081/auth/admin/realms Method: POST Body: { "enabled": true, "id": "TestRealm", } I get a 401 Unauthorized response, so I think it is necessary to authenticate to the Admin WS. But in the docs I cannot find any information about the type of authentication required and the syntax. Do you know how to authenticate to the Keycloak WSs? Thank you Do a POST request to https://hostname:8080/auth/realms/master

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

keycloak CORS filter spring boot

人盡茶涼 提交于 2019-12-04 00:41:56
I am using keycloak to secure my rest service. I am refering to the tutorial given here . I created the rest and front end. Now when I add keycloak on the backend I get CORS error when my front end makes api call. Application.java file in spring boot looks like @SpringBootApplication public class Application { public static void main( String[] args ) { SpringApplication.run(Application.class, args); } @Bean public WebMvcConfigurer corsConfiguration() { return new WebMvcConfigurerAdapter() { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/api/*")

Authenticate a rest api using keycloak access token (received from Authorization header in the HTTP GET request from the front end) in node js

冷暖自知 提交于 2019-12-03 21:43:02
var loadData = function () { var url = 'http://localhost:3000/users'; var req = new XMLHttpRequest(); req.open('GET', url, true); req.setRequestHeader('Accept', 'application/json'); req.setRequestHeader('Authorization', 'Bearer ' + keycloak.token); req.onreadystatechange = function () { if (req.readyState == 4) { if (req.status == 200) { console.log('Success'); } else if (req.status == 403) { console.log('Forbidden'); } } } req.send(); }; Above is my front end code requesting the REST API and passing the keycloak token in the authorization header which will be needed for authentication at the

How to integrate or make use of KeyCloak user database in my application?

隐身守侯 提交于 2019-12-03 20:32:57
So far I have been playing with KeyCloak and been able to set it up and running the customer-portal example successfully. Now I need to actually use it in my application, and I am not totally sure whether KeyCloak is the right thing that I am looking for, but I believe my need is just a common use case and hopefully KeyCloak is the right software that I am looking for.. When a user comes to my website, he registers and makes a post. Both the post and the user information is stored into databases, and the link between the user and post, i.e. who made which post? So I have two tables in my

How to properly do delegated user self-administration with Keycloak

孤者浪人 提交于 2019-12-03 16:46:27
I’ve got questions on how to properly do delegated user self-administration with Keycloak. Some background information: We are working with hundreds or even thousands of organizations for which we want to manage access to our applications. Some of these organizations are our internal divisions for which we have active directories. Users from these organizations can be integrated through “User Storage Federation” and they will continue to be maintained in the respective directories. Some of these organizations are part of larger organizations which have proper identity providers. Users from

Keycloak behind apache reverse proxy

十年热恋 提交于 2019-12-03 12:49:49
问题 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 running HTTP only. Say it's running on local ip 172.s port 8080. I have also configured an apache reverse proxy. Say it's running on local ip 172.a and public ip 55.a. This proxy responds to both port 80, but all the HTTP traffic is automatically

Using Keycloak behind a reverse proxy: Could not open Admin loginpage because mixed Content

牧云@^-^@ 提交于 2019-12-03 11:42:41
问题 so I have a problem getting keycloak 3.2.1 to work behind kong (0.10.3), a reverse proxy based on nginx. Scenario is: I call keycloak via my gateway-route via https://{gateway}/auth and it shows me the entrypoint with keycloak logo, link to admin console etc. - so far so good. But when clicking on administration console -> calling https://{gateway}/auth/admin/master/console/ , keycloak tries to load its css/js via http (see screenie below), which my browser blocks because mixed content. I

Enabling remote access to Keycloak

感情迁移 提交于 2019-12-03 10:04:41
I'm using the Keycloak authorization server in order to manage my application permissions. However, I've found out the standalone server can be accessed locally only. http://localhost:8080/auth works, but not it does http://myhostname:8080/auth . This issue doesn't permit accessing the server from the internal network. Xtreme Biker The standalone Keycloak server runs on the top of a JBoss Wildfly instance and this server doesn't allow accessing it externally by default, for security reasons (it should be only for the administration console, but seems to affect every url in case of Keycloak).