CAS连接微软活动目录的配置方法
原文地址:http://blog.csdn.net/baozhengw/article/details/3857669
在微软活动目录中建立一个用户节点,帐号为wangzhenyu,cn为zhenyu wang,并设置登陆口令,这时候在cas中用wangzhenyu的帐号登陆失败,解决办法是:安装apache directory studio,建立一个到微软活动目录的连接,连接时使用微软活动目录所在的windows2003服务器的超级用户帐号,连接成功后,在LDAP树中找从ou=nsc下找i到CN=zhengyu wang这个节点,给这个节点手工添加一个uid属性,设置uid的值为wangzhenyu,添加成功后,在cas登陆页面中再使用wangzhenyu帐号及ad中设置的口令就可以成功登录了.
<?xml version="1.0" encoding="utf-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean id="authenticationManager" class="org.jasig.cas.authentication.AuthenticationManagerImpl">
<property name="credentialsToPrincipalResolvers">
<list>
<bean class="org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver"/>
<bean class="org.jasig.cas.authentication.principal.HttpBasedServiceCredentialsToPrincipalResolver"/>
</list>
</property>
<property name="authenticationHandlers">
<list>
<bean class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler" p:httpClient-ref="httpClient"/>
<!--<bean
class="org.jasig.cas.authentication.handler.support.SimpleTestUsernamePasswordAuthenticationHandler" />-->
<bean class="org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler">
<property name="filter" value="uid=%u"/>
<!--seem must have ou node-->
<!--<property name="searchBase" value="ou=nsc,dc=nhncdev,dc=com" /> -->
<property name="searchBase" value="ou=nsc,dc=nhncdev,dc=com"/>
<property name="contextSource" ref="contextSource"/>
</bean>
</list>
</property>
</bean>
<bean id="userDetailsService" class="org.springframework.security.userdetails.memory.InMemoryDaoImpl">
<property name="userMap">
<value></value>
</property>
</bean>
<bean id="attributeRepository" class="org.jasig.services.persondir.support.StubPersonAttributeDao">
<property name="backingMap">
<map>
<entry key="uid" value="uid"/>
<entry key="eduPersonAffiliation" value="eduPersonAffiliation"/>
<entry key="groupMembership" value="groupMembership"/>
</map>
</property>
</bean>
<bean id="serviceRegistryDao" class="org.jasig.cas.services.InMemoryServiceRegistryDaoImpl"/>
<bean id="contextSource" class="org.jasig.cas.adaptors.ldap.util.AuthenticatedLdapContextSource">
<property name="anonymousReadOnly" value="false"/>
<property name="userName" value="cn=zhenyu wang,ou=nsc,dc=nhncdev,dc=com"/>
<property name="password" value="Hello123"/>
<property name="pooled" value="true"/>
<property name="urls">
<list>
<value>ldap://10.34.114.54:389/</value>
</list>
</property>
<property name="baseEnvironmentProperties">
<map>
<entry>
<key>
<value>java.naming.security.authentication</value>
</key>
<value>simple</value>
</entry>
</map>
</property>
</bean>
</beans>
CAS连接微软活动目录的配置方法的更多相关文章
- 在Linux下访问Windows共享目录的配置方法
在Linux下访问Windows共享目录的配置方法 1.在Windows上设置一个共享目录 如:将d:\RedHat_disk设置为共享目录 2.在Windows上创建一个用户,如tommy,密码11 ...
- Server 2008 R2 安装活动目录和配置DNS及故障解决
一.安装windows2008_64bit_r2 给服务器设置密码:xxxxxxxx 二.安装配置DNS规则 1.更改服务器主机名:DCserver 2.配置静态IP地址 IP地址:10.0.100. ...
- Windows访问Linux下的共享目录的配置方法
user安全级别 第一步:安装samba3(如果已经安装就跳过这一步) [root@rhce2 /]# yum groupinstall "CIFS file server" 第 ...
- LUMEN框架多数据库连接配置方法
LUMEN作为一款API导向很浓的框架,配置极简化,默认只支持一路DB配置 然而随着业务复杂度的提高,引入多个数据库连接似乎无法避免,下面介绍一下LUMEN连接多个数据库的配置方法: 修改.env文件 ...
- PL/SQL连接64位Oracle配置方法
问题原因: plsql developer无法连接64位oracle server的原因是,plsql是32位的,没有64位的版本,而oracle是64位,两者不兼容. 配置方法: 1.下载64位Or ...
- Win2008远程多用户登陆的配置方法 另附详细设置: Windows server 2008 R2实现多用户远程连接
Win2008远程多用户登陆的配置方法 在使用Windows 2008远程登录功能时,如果需要进行多用户登录,可以采用以下配置方法: 首先要启用远程桌面这一功能:右击“我的电脑”→ 属性 → ...
- PL/SQL Developer 连接Oracle数据库详细配置方法
PL/SQL Developer 连接Oracle数据库详细配置方法 近段时间很多网友提出监听配置相关问题,客户终端(Client)无法连接服务器端(Server).本文现对监听配置作一简单介绍,给出 ...
- Apache 配置方法(虚拟目录、域名、虚拟主机等)
基本配置 Define SRVROOT "C:/Apache24" #宏定义一个主站点目录常量ServerRoot "${SRVROOT}" ...
- windows 活动目录双向信任配置
活动目录A:ess.com 192.168.1.20/24 活动目录B:ups.com 192.168.1.30/24 Step1:在活动目录B的域控制器上配置域的林双向信任关系,并且可传递,如下图 ...
随机推荐
- zookeeper原理及功能介绍(转)
本文转自https://www.cnblogs.com/onetwo/p/6420062.html 1.ZooKeeper是什么? ZooKeeper是一个分布式的,开放源码的分布式应用程序协调服务, ...
- msgpack传文件
msgpack传文件 procedure TForm1.Button1Click(Sender: TObject);var ms, ms2: TMemoryStream; pack: TSimpleM ...
- mormot允许跨域访问
mormot允许跨域访问 ctxt.OutCustomHeaders:='Access-Control-Allow-Origin:*' 允许跨域访问 其实其他HTTP控件要实现跨域访问,也是类似设置. ...
- Appium+python自动化3-启动淘宝app
前言 前面两篇环境已经搭建好了,接下来就是需要启动APP,如何启动app呢?首先要获取包名,然后获取launcherActivity.获取这两个关键东西的方法很多,这里就不一一多说,小伙伴们可以各显神 ...
- 详解Spring中的Profile
前言 由于在项目中使用Maven打包部署的时候,经常由于配置参数过多(比如Nginx服务器的信息.ZooKeeper的信息.数据库连接.Redis服务器地址等),导致实际现网的配置参数与测试服务器参数 ...
- 为apache安装mod_wsgi的时候出现-fpic的问题
1.为了在apache里跑python项目,需要安装模块mod_wsgi 2.但是由于yum只支持python2.6,所以通过yum install mod_wsgi方式安装的mod_wsgi是pyt ...
- C语言:指针的几种形式
字符串的两种形式: 1.字符数组 char name[32] = “zhangsan”;//只能在初始化时这样做 strcpy(name,”lisi”);//整体赋值只能通过s ...
- WampServer和phpStorm的用法
WampServer的安装 修改默认的浏览器和文本编辑器 phpStore创建一个PHP工程 在phpStore中运行我们的项目 配制一个PHP Script运行环境 配制一个PHP Web Page ...
- NTP Server
Network Time Protocol互联网时间协议 NTP is intended to synchronize all participating computers to within a ...
- elasticSearch nested exist与missing查询
elasticSearch nested查询,简单意义上,你可以理解为,它不会被索引,只是被暂时隐藏起来,而查询的时候,开关就是使用nested query/filter去查询 下面我有一个例子,是查 ...