keycloak

Retrieve Keycloak user data using received access token

限于喜欢 提交于 2019-12-04 17:23:35
I am developing a WildFly-Backend (in Java) that accepts HTTP requests (from a custom Frontend) that are signed with the user's Keycloak bearer access token through the "Authorization" HTTP header. The Backend connection itself is already secured with the Keycloak adapter for WildFly, but internally, I want to check who the user is (user groups, name, etc.) and return verying responses. I figured that it would be possible to just send this data from the Frontend, but then people could easily fake the request once they have an access token. Is there a way to retrieve things like user data while

Enabling remote access to Keycloak

て烟熏妆下的殇ゞ 提交于 2019-12-04 15:55:42
问题 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. 回答1: 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

Keycloak Integration with Spring Boot

夙愿已清 提交于 2019-12-04 15:39:16
How to integrate keycloak with a spring boot application. Do we have to give all the resources and its role permission in application.properties? Then what is the use of keycloak.json? Then I need some clarification on those export settings in the admin console of keycloak. Do we have to include that file in the config of application? 1) First add these dependencies to your build.gradle (I'm using gradle, but it's the same for pom.xml if you're a Maven guy): // keycloak compile 'org.keycloak:keycloak-spring-boot-adapter:2.5.1.Final' compile 'org.keycloak:keycloak-tomcat8-adapter:2.5.1.Final' 2

Keycloak provider and user storage

丶灬走出姿态 提交于 2019-12-04 15:24:20
I have a running java ee application and now i want to integrate keycloak as authentication server. The only thing i have troubles is the user storage. I want to have all the user data in my java application. The problem now: If the user registers on the keycloak frontend, my java application doesn´t know that the user has registered, so i cannot create a new entity. I found out that keycloak is able to load some custom modules ( https://keycloak.github.io/docs/userguide/keycloak-server/html/providers.html ) but i haven´t found any examples. Is there any solution where keycloak notifys my java

Keycloak Remove First Name and Last Name fields on Registration Screen

六月ゝ 毕业季﹏ 提交于 2019-12-04 14:42:12
In Keycloak we have a created a custom ftl registration theme that has removed the optional first name and last name fields. Our system only requires the user to have an email address and password. However when the user hits enter an error is displayed indicating that the first name and last name need to be entered. In the Keycloak UserModel these fields are optional, and it is also possible to create users via the admin console / api without firstname and lastname. How do we remove these fields from the keycloak form validation on the registration screen? Profile Validation can be disabled

OAuth 2.0 OpenID Connect Loopback and Keycloak

南楼画角 提交于 2019-12-04 13:36:28
I'm unable to connect to Keycloak from Loopback. I've been trying to use the keycloak-connect lib: https://github.com/keycloak/keycloak-nodejs-connect This is my current server/boot/root.js module.exports = function (server) { var session = require('express-session'); var Keycloak = require('keycloak-connect'); var memoryStore = new session.MemoryStore(); var keycloak = new Keycloak({ store: memoryStore }); server.use(session({ secret: 'xxx', resave: false, saveUninitialized: true, store: memoryStore, })) server.use(keycloak.middleware({})); server.get('/*', keycloak.protect(), function (req,

Keycloak client for ASP.NET Core

早过忘川 提交于 2019-12-04 13:30:00
问题 Is there any existing Keycloak client for Asp.net Core? I have found a NuGet package for .net but it doesn't work with Core. Do you have any ideas how to easily integrate with this security server (or maybe using any other alternatives)? 回答1: I've played a bit with this today. The most straightforward way is too use OpenId standard. In Startup.cs I used OpenIdConnect Authentication: public void Configure(...) { (...) app.UseCookieAuthentication(new CookieAuthenticationOptions {

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

Login to Keycloak using API

陌路散爱 提交于 2019-12-04 08:06:25
问题 I have 2 different applications: say Application1 and Application2 . I have integrated Application2 with keycloak and I am able to login to this application using Keycloak's login page. Now what I want is, if I login to my Application1 (without keycloak), I should be able to call some API of keycloak to login to application2 (without rendering keycloak's login page). It is feasible? If yes, how? Any help will be highly appreciated. Thanks 回答1: You are effectively asking your users to trust