cas5.2集成ldap
参考的文章:
https://blog.csdn.net/oLinBSoft/article/details/82152302
cas官网集成ldap:https://apereo.github.io/cas/5.2.x/installation/Configuration-Properties.html#ldap-authentication-1
1.cas的pom.xml添加:
cd /usr/local/cas-overlay-template-5.3
<dependency><groupId>org.apereo.cas</groupId><artifactId>cas-server-support-ldap</artifactId><version>${cas.version}</version></dependency>
mvn clean
mvn install
重新部署,在浏览器 https://xxx:8443 测试ok
2.修改配置文件apache-tomcat-8.5.32/webapps/cas/WEB-INF/classes/application.properties
注释掉默认的账号密码
##
# CAS Authentication Credentials
#默认账号密码
#cas.authn.accept.users=casuser::Mellon
###################ldap authentication######################
cas.authn.ldap[0].type=AUTHENTICATED
cas.authn.ldap[0].ldapUrl=ldap://192.168.169.136:389
cas.authn.ldap[0].useSsl=false
cas.authn.ldap[0].connectTimeout=5000
cas.authn.ldap[0].baseDn=dc=liuzhihui,dc=com
#使用uid或者mail或者mobile登陆
cas.authn.ldap[0].userFilter=(|(uid={user})(mail={user})(mobile={user}))
cas.authn.ldap[0].subtreeSearch=true
cas.authn.ldap[0].usePasswordPolicy=false
cas.authn.ldap[0].bindDn=cn=manager,dc=liuzhihui,dc=com
cas.authn.ldap[0].bindCredential=123cas.authn.ldap[0].principalAttributeId=uid
#设置为空,则执行用户简单绑定以验证凭据,就是明文,MD5,sha等密码都能登录
#设置为userPassword,密码使用sha加密
cas.authn.ldap[0].principalAttributePassword=userPassword
cas.authn.ldap[0].principalAttributeList=uid,sn,cn,o,mail,mobile
cas.authn.ldap[0].allowMultiplePrincipalAttributeValues=true
cas.authn.ldap[0].allowMultiplePrincipalAttributeValue=true
##
#此处是个坑,开始我以为这里是配置密码加密方式,于是和LDAP里面配置一样的MD5或者SHA,结果一直认证不成功,后来才发现
,原来这里是在密码验证之前
#对密码再做一次encode,如果配置为NONE,则什么都不做,直接使用默认的SHA加密方式(AbstractCompareAuthenticationHandler里面配置)加密密码后与LDAP里面的密码比对,如果配置为DEFAULT则先用配置的#algorithm encode明文一次,再使用默认的
SHA加密方式加密后与LDAP里面的密码比对
#cas.authn.ldap[0].passwordEncoder.type=NONE
#cas.authn.ldap[0].passwordEncoder.characterEncoding=UTF-8
#cas.authn.ldap[0].passwordEncoder.encodingAlgorithm=MD5
cas.authn.ldap[0].enhanceWithEntryResolver=true
cas.authn.ldap[0].dnFormat=uid=%s,ou=users,dc=liuzhihui,dc=com
#cas.authn.ldap[0].additionalAttributes=
cas.authn.ldap[0].principalAttributeList=displayName,givenName,mail,sn,cn,commonName,department,title,description,telephoneNumber,physicalDeliveryOfficeName,memberOf
cas.authn.ldap[0].minPoolSize=3
cas.authn.ldap[0].maxPoolSize=50
cas.authn.ldap[0].validateOnCheckout=true
cas.authn.ldap[0].validatePeriodically=true
3.重新启动cas
4.ldap新添加一个用户 uid是登陆cas的账号 密码要加密sha
cas默认的加密方式是sha,输入用户名密码后,加密,在与ladp对比
自定义加密
https://blog.csdn.net/Anumbrella/article/details/81149249
cas5.2集成ldap相关推荐
- ldap 统一认证 java_如何在你的系统里集成LDAP统一认证
一.为什么需要统一认证 日常办公经常会有多套系统,如果各个系统各自维护一套用户认证,用户需要记住多个用户名密码. 系统各自管理用户认证的方式,不但会有重复建设的问题,用户体验也会差,经常会有用户忘记密 ...
- ldap配置系列二:jenkins集成ldap
ldap配置系列二:jenkins集成ldap jenkins简介 jenkins是一个独立的.开放源码的自动化服务器,它可以用于自动化与构建.测试.交付或部署软件相关的各种任务. jenkins官方 ...
- 【Kylin】60-20-040-集成-Kylin集成LDAP
Apache Kylin 版本:2.5.2 在生产环境下,通过集成 LDAP 实现了 Apache Kylin 的身份认证. 生成密码 为了安全起见,conf/kylin.properties 配置文 ...
- Ambari 集成LDAP技术方案
Ambari 集成LDAP技术方案 一.集成准备 1.TCL安装部署 wget http://nchc.dl.sourceforge.net/sourceforge/tcl/tcl8.4.11-src ...
- linux samba 配置ldap认证,Samba集成Ldap认证
Samba集成Ldap认证 1.基础安装 yum -y install samba-common samba samba-client smbldap-tools openldap-clients ...
- gitlab集成ldap认证
官网文档地址:https://docs.gitlab.com/13.10/ee/administration/auth/ldap/index.html 在gitlab集成ldap配置时候,ldap里面 ...
- SpringBoot集成Ldap
目录 什么是Ldap 为什么需要Ldap Ldap基本模型 Springboot集成Ldap Springboot操作Ldap 什么是Ldap 轻型目录访问协议(英文:Lightweight Dire ...
- Gogs集成LDAP
上一篇文章Gogs安装教程讲了Gogs的安装过程,本次讲Gogs如何集成LDAP.Gogs为何要集成LDAP呢? 轻型目录访问协议(英文:Lightweight Directory Access Pr ...
- centos7 svn集成ldap用户认证
概述 前面,我记录了一下openldap的搭建,搭建过后,这里记录一下,如何将ldap的认证,集成到svn中.集成的办法,目前是有两种: 1. svn直接通过svn端口直接访问的,通过sasl实现ld ...
- 【Knox】CDP集群Knox服务集成LDAP,WEB UI登录正常,使用RestAPI无法正常访问401 Authentication failed 解决方式
问题经过 最近在使用Knox 服务集成 LDAP 后,在 Knox Web UI 界面中,使用Ldap 用户名.密码能够成功登录,但是在使用REST API 请求服务数据时,就会报401 Authen ...
最新文章
- matlab直方图绘制
- 如何借助 svn update 自动更新线上的web
- 【pointnet++点云识别】基于pointnet++的点云地理数据识别的MATLAB仿真
- 使用React,Redux和Router进行真正的集成测试
- 通用智能传感集线器(Sensorhub)介绍
- Zimbra系统资料
- mysql最小费用最大流问题_最小费用最大流问题
- 河南oracle客户端,解决Oracle监听服务报错
- python使用-Python 应该怎么去练习和使用?
- python3使用paramiko
- 关于XCP标定CANape的界面安全会话DLL库
- SolidKit.ERPs ERP集成接口工具(for SOLIDWORKS PDM)
- 微信小程序开发-轮播图的实现
- react-ssr之路由配置
- Android开发中导入字体库
- 实现远程连接阿里云的数据库
- Overflow during an arithmetic operation (type P) in program(数据溢出)
- Karto Slam 参数配置
- 金仓数据库KingbaseES SYS_BULKLOAD工具的使用
- 后台成功返回succ,但是前端data.result =='succ' 并不成立
热门文章
- Android 6.0 sensor 框架详解 (application层)
- Small Basic 语言 学习笔记
- 关于STM32Flash详解
- 新浪微博广告投放展现形式、展现位置!微博推广广告有效果吗?
- Inno Setup 6.0.0+ 繁体中文语言包
- php怎么调用php语言包,thinkphp里怎么调用语言包
- bochs上网镜像怎么上网_bochs win7镜像可上网版
- win10计算机系统优化设置,win10最详细优化设置 win10全面优化教程
- 【我为车狂性感车模win7主题】
- traceroute/tracert原理