All Projects → sventorben → keycloak-home-idp-discovery

sventorben / keycloak-home-idp-discovery

Licence: MIT license
Keycloak: Home IdP Discovery - discover home identity provider or realm by email domain

Programming Languages

java
68154 projects - #9 most used programming language
HTML
75241 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to keycloak-home-idp-discovery

keycloak-restrict-client-auth
A Keycloak authenticator to restrict authorization on clients
Stars: ✭ 34 (-19.05%)
Mutual labels:  keycloak, keycloak-provider, keycloak-extension, keycloak-authenticator
keyonic-v2
A Keycloak Mobile Implementation using Angular v4 and Ionic v3
Stars: ✭ 23 (-45.24%)
Mutual labels:  keycloak, keycloak-server
IP2Location-C-Library
IP2Location C library enables the user to find the country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather station code, weather station name, mobile, usage types, etc that any IP address or hostname originates from.
Stars: ✭ 37 (-11.9%)
Mutual labels:  domain
nest-keycloak-connect
keycloak-nodejs-connect module for Nest
Stars: ✭ 174 (+314.29%)
Mutual labels:  keycloak
realm-tester
Writing tests using Realm Java
Stars: ✭ 14 (-66.67%)
Mutual labels:  realm
keycloak-spring-boot-rest-angular-demo
Demo for configuring Keycloak authentication for a spring-boot rest service and AngularJs web client
Stars: ✭ 24 (-42.86%)
Mutual labels:  keycloak
keycloak-admin-go
Keycloak Admin REST client for go
Stars: ✭ 17 (-59.52%)
Mutual labels:  keycloak
e-shop
Sample Spring Cloud microservices e-shop.
Stars: ✭ 48 (+14.29%)
Mutual labels:  keycloak
registry
TLD Management Software
Stars: ✭ 32 (-23.81%)
Mutual labels:  domain
electron-react-ts-rxdb-realm-sqlite
Demo of Native Databases with Electron and ReactJS. Realm, SQLite and RxDB ( with LevelDB/IndexedDB/InMemory adapters)
Stars: ✭ 27 (-35.71%)
Mutual labels:  realm
hosts
冷莫(trli)的规则唯一一个提供全球比较全的库Cold Mo (TRLI) rules is the only one to provide a global comparison of the library.
Stars: ✭ 4 (-90.48%)
Mutual labels:  domain
hidden-gems
Ranking of Steam games which favors "hidden gems". Featured in PC Gamer.
Stars: ✭ 37 (-11.9%)
Mutual labels:  discovery
BlackIQ.ir
BlackIQ.ir Source Code
Stars: ✭ 14 (-66.67%)
Mutual labels:  domain
Cloudflare-dns-update
Allows me to update my CloudFlare dns record so that I can have access to my server with a dynamic IP
Stars: ✭ 35 (-16.67%)
Mutual labels:  domain
RChat
No description or website provided.
Stars: ✭ 58 (+38.1%)
Mutual labels:  realm
springboot-react-keycloak
The goal of this project is to secure movies-app using Keycloak(with PKCE). movies-app consists of two applications: one is a Spring Boot Rest API called movies-api and another is a ReactJS application called movies-ui.
Stars: ✭ 192 (+357.14%)
Mutual labels:  keycloak
keycloak-kubernetes
Keycloak deployment into Kubernetes cluster
Stars: ✭ 25 (-40.48%)
Mutual labels:  keycloak
SilverScreener
A feature-rich movie guide app, that lets you discover movies from TMDb.
Stars: ✭ 24 (-42.86%)
Mutual labels:  realm
keycloak-protocol-cas
CAS protocol provider for Keycloak
Stars: ✭ 67 (+59.52%)
Mutual labels:  keycloak
vertx-vue-keycloak
This repo holds the source codes for the Medium Article "Vert.x + VueJS + OAuth2 in 5 steps"
Stars: ✭ 20 (-52.38%)
Mutual labels:  keycloak

Keycloak: Home IdP Discovery

This is a simple Keycloak authenticator to redirect users to their home identity provider during login.

GitHub release (latest SemVer) Keycloak Dependency Version Keycloak.X ready GitHub Release Date Github Last Commit

CI build open issues

What is it good for?

When a federated user wants to login via Keycloak, Keycloak will present a username/password form and a list of configured identity providers to the user. The user needs to choose an identity provider to get redirected. This authenticator allows to skip the step of selecting an identity provider.

How does it work?

If this authenticator gets configured as part of a browser based login flow, Keycloak will present a username form (without password form and without list of configured identity providers). A user can then enter an email address. Keycloak will then choose an identity provider based on the provided email domain and forward the user to the chosen provider.

How to install?

Download a release (*.jar file) that works with your Keycloak version from the list of releases.

Server

Copy the jar to the providers folder and execute the following command:

${kc.home.dir}/bin/kc.sh build

Container image (Docker)

For Docker-based setups mount or copy the jar to /opt/keycloak/providers.

You may want to check docker-compose.yml as an example.

Maven/Gradle

Packages are being released to GitHub Packages. You find the coordinates here!

It may happen that I remove older packages without prior notice, because the storage is limited on the free tier.

How to configure?

Configure email domains

Email domains can be configured per identity provider. Currently, this can only be achieved via Identity Providers REST API. Make sure to post the full body, as you may receive from a GET request to the same endpoint, plus the home.idp.discovery.domains configuration.

PUT /{realm}/identity-provider/instances/{alias}
{
  ...
  "config": {
    "home.idp.discovery.domains": "example.com##example.net",
    ...
  },
  ...
}

Note that domains need to be separated by two hashtags (##).

You can also use the Admin CLI (kcadm):

kcadm.sh update identity-provider/instances/{alias} -s 'config."home.idp.discovery.domains"="example.com##example.net"'

Add Authenticator Execution

  • Navigate to Authentication
  • Create a custom Browser flow
  • Click Add execution
  • Select Home IdP Discovery

Configuration options

To configure click: Actions > Config

Authenticator configuration

Option Description
Forward to linked IdP If switched on, federated users (with already linked IdPs) will be forwarded to a linked IdP even if no IdP has been configured for the user's email address. Federated users can also use their local username for login instead of their email address.

If switched off, users will only be forwarded to IdPs with matching email domains.

Show configured email domains in Admin console

⚠️ Please not that this currently only works with the old admin console. Please see #86 for details.

  • Navigate to Realm Settings
  • Click Themes tab
  • Choose home-idp-discovery for the Admin Console Theme
  • Click Save
  • Reload the admin console (press F5 in your browser)
  • Navigate to an identity provider
  • Click Home IdP Discovery tab

View email domains

Frequently asked questions

Does it (already) work with Quarkus/Keycloak.X?

Yes it does!

Please note that with the release of Keycloak 17.0.0 the Quarkus-based distro (aka Keycloak.X) is now fully supported by the Keycloak team. Hence, I dropped support for the Wildfly-based distro already. Though this library may still work with the Wildfly-based distro, I will no longer put any efforts into keeping this extension compatible.

Does it work with the legady Wildfly-based Keycloak distro?

Maybe! There is even a high chance it will, since this extension does not make use of any Quarkus-related functionality. For installation instructions, please refer to an older version of this readme.

Does it work with Keycloak version X.Y.Z?

If you are using Keycloak version X (e.g. X.y.z), version X.b.c should be compatible. Keycloak SPIs are quite stable. So, there is a high chance this authenticator will work with other versions, too. Check the details of latest build results for an overview or simply give it a try.

Authenticator version X.b.c is compiled against Keycloak version X.y.z. For example, version 16.3.1 will be compiled against Keycloak version 16.y.z.

I do not guarantee what version a.b or y.z will be. Neither do I backport features to older version, nor maintain any older versions of this authenticator. If you need the latest features or bugfixes for an older version, please fork this project or update your Keycloak instance. I recommend doing the latter on regular basis anyways.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].