首页 > 其他分享 >keycloak LDAP federation

keycloak LDAP federation

时间:2023-07-02 20:12:57浏览次数:42  
标签:DN users Settings DC user LDAP federation keycloak

LDAP federation

https://www.keycloak.org/docs/latest/server_admin/#_ldap

Keycloak includes an LDAP/AD provider. You can federate multiple different LDAP servers in one Keycloak realm and map LDAP user attributes into the Keycloak common user model.

By default, Keycloak maps the username, email, first name, and last name of the user account, but you can also configure additional mappings. Keycloak’s LDAP/AD provider supports password validation using LDAP/AD protocols and storage, edit, and synchronization modes

 

Required LDAP configuration fields

https://dmc.datical.com/administer/configure-keycloak-ldap.htm

In the Add user federation provider section, add the following required settings:

TabFieldValueNotes
Settings Edit Mode

READ_ONLY: Users
UNSYNCHED: Groups

Be sure to select UNSYNCHED if you are creating a group.
Settings Vendor Active Directory The LDAP provider you are using. Ensure that Active Directory is selected for Groups to work correctly.
Settings Username LDAP Attribute Attribute that contains the user name.

Set this value to username and then configure mappers to designate the desired attribute to map to it. If you want to create a group, select group-ldap-mapper.

See the Attribute Mappers section below for more information.

Settings RDN LDAP Attribute CN  
Settings Connection URL The connection URL to your LDAP server.

Usually of the following format: ldaps://LDAP_HOST:636

Select the Test Connection button to confirm.

Settings Users DN The full DN of the LDAP tree where your users are located.

This DN is the LDAP user parent.

Example: It would be CN=users,DC=example,DC=com assuming that your typical user has a DN like: uid=john,ou=users,dc=example,dc=com

This is not a group DN. You must specify a node that contains users.

Settings Bind type Simple  
Settings Bind DN DN of the administrative or service user that accesses the information to use.

Example: CN=Administrator,CN=Users,DC=demo,DC=example,DC=com

Group Example:
OU=test,DC=test,DC=datical,DC=net

Settings Bind Credentials Password of LDAP admin

Select Test Authentication to test the Bind DN/Bind Credential pair. Continue if it passes.

  • If it fails, check the Keycloak log to find the reason. Run the following command: datical-control logs keycloak
  • If the reason is PKIX Path building failed, see note below on PKIX
Settings LDAP Filter Filter value

Used to filter the full list of users and groups in the "Users DN" node to just the users and groups you want to import into Keycloak.

  • Can use a filter like (mail=*) to only include users with an email address (excludes service account users)
  • Can filter based on groups or anything else you need
  Search Scope Subtree or One Level If the node listed in "Users DN" contains nested nodes with users, select "Subtree". Otherwise select "one level".
Settings and Mappers Other Attributes Default or as you need  

 

标签:DN,users,Settings,DC,user,LDAP,federation,keycloak
From: https://www.cnblogs.com/lightsong/p/17521285.html

相关文章

  • GlobalProtect配合privacyIDEA对接ldap做二步验证
    #Authorhttps://cnblogs.com/id404GlobalProtect的和privacyIDEA的安装部署及基础设置可参考前一篇博文https://www.cnblogs.com/id404/p/17484847.html PaloAlto设备在前一篇文章的基础不需要修改,本文重点在privacyIDEA的配置上 一、对接ldap   点击TestLDAP......
  • keycloak~CountDownLatch在keycloak中的使用
    概念在Java中,CountDownLatch是一个线程同步的辅助类,用于等待其他线程完成操作。如果CountDownLatch实例被丢失或无法访问,可能会导致无法正常使用该对象。这可能会导致等待线程永远处于等待状态,无法继续执行。如果意外丢失了CountDownLatch对象,你可以尝试以下方法进行恢复或处理:......
  • Open Project 系列2 --- 集成LDAP
    一、概要1.承上启下OpenProject系列二、配置1.配置页面OpenProject可以通过页面来配置LDAP。(1)使用Admin账户登录后点击右上角头像,进入"Administration->Authentication->LDAPAuthentication"页面:(2)点击右上角的"Authenticationmode":三、参考1.官方ht......
  • 基于LDAP&&Role-based Authorization Strategy实现Jenkins团队权限管理
    在实际工作中,存在多个团队都需要Jenkins来实现持续交付,但是又希望不同团队之间进行隔离,每个项目有自己的view,只能看到自己项目的jenkinsjob.但是,jenkins默认的权限管理体系不支持用户组或角色的配置,这里利用Role-basedAuthorizationStrategy实现上述目的权限角色配置直接跳过......
  • AD 域服务简介(一)- 基于 LDAP 的 AD 域服务器搭建及其使用(转)
    一、前言1.1AD域服务什么是目录(directory)呢?日常生活中使用的电话薄内记录着亲朋好友的姓名、电话与地址等数据,它就是telephonedirectory(电话目录);计算机中的文件系统(filesystem)内记录着文件的文件名、大小与日期等数据,它就是filedirectory(文件目录)。如果这些目录内的数......
  • HDFS Federation
    HDFSFederationHDFSFederationBackgroundMultipleNamenodes/NamespacesKeyBenefitsFederationConfigurationConfiguration:FormattingNamenodesUpgradingfromanolderreleaseandconfiguringfederationAddinganewNamenodetoanexistingHDFSclusterManaging......
  • Spring Boot 3.1中如何整合Spring Security和Keycloak
    在今年2月14日的时候,Keycloak团队宣布他们正在弃用大多数Keycloak适配器。其中包括SpringSecurity和SpringBoot的适配器,这意味着今后Keycloak团队将不再提供针对SpringSecurity和SpringBoot的集成方案。但是,如此强大的Keycloak,还要用怎么办呢?本文就来聊聊,在最新的SpringBo......
  • keycloak~自定义登出接口
    keycloak提供了登出的接口,不过它是一个post方法,需要你根据client_id,client_secret及refresh_token进行登出操作的,有时不太灵活,所以我又自己封装了一下,通过客户端浏览器上存储的session_id进行会话登出。kc提供的logoutapi:{{host}}/auth/realms/fabao/protocol/openid-connect......
  • LDAPserver相关配置
    [root@schedulershell]#catldapserver.sh#!/bin/bash##LdapServerinstallScript#author:liulingfeng#2023-04-29#--------------------------------------------#1、关闭防火墙sed-i'/SELINUX/s/enforcing/disabled/'/etc/selinux/configsystemctl......
  • kubernetes部署Open-LDAP、Go-admin-ldap
    1.搭建openLDAP1.1.创建命名空间kubectlcreatenamespacekube-ops1.2.创建pvc存储使用的是nfs方式挂载,storageClassName为默认,所以可写可不写。mkdir-p~/ldap;cd~/ldapcat>pvc.yaml<<EOFapiVersion:v1kind:PersistentVolumeClaimmetadata:name:ldap-dat......