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的域控制器上配置域的林双向信任关系,并且可传递,如下图 ...
随机推荐
- Shell获取文件的文件名和扩展名的例子
这篇文章主要介绍了Shell获取文件的文件名和扩展名的例子,简明版的代码实例,看了就懂,需要的朋友可以参考下 basename example.tar.gz .tar.gz # => examp ...
- ndk 开发
5.用NDK来编译程序 1. 现在我们用安装好的NDK来编译一个简单的程序吧,我们选择ndk自带的例子hello-jni,我的位于E:/android-ndk-r5/samples/hello-jn ...
- 基于tomcat7 web开发中的一点小东西
控制台: org.apache.jasper.compiler.TldLocationsCache tldScanJar 信息: At least one JAR was scanned for TL ...
- C++中的public、private、protected成员继承问题
我是C++菜鸟,刚学了一点C++. 先看例子1: /* Item.h */ #include <iostream> #include <string> class It ...
- C语言union关键字,union和struct区别
union 关键字的用法与struct 的用法非常类似. union 维护足够的空间来置放多个数据成员中的“一种”,而不是为每一个数据成员配置空间,在union 中所有的数据成员共用一个空间,同一时间 ...
- 附1 hystrix详述(1)
一.hystrix的作用 控制被依赖服务的延时和失败 防止在复杂系统中的级联失败 可以进行快速失败(不需要等待)和快速恢复(当依赖服务失效后又恢复正常,其对应的线程池会被清理干净,即剩下的都是未使用的 ...
- 支持5G-WiFi的安卓设备搜索不到5G信号解决方法
安卓设备必须获得root权限,然后修改 /system/etc/wifi/nvram_net.txt 文件, 将ccode = CN 改为 ccode = ALL.保存并重启即可. 三星EK-GC11 ...
- 简单MapReduce思维导图
- spring cloud 报错Error creating bean with name 'hystrixCommandAspect' ,解决方案
spring cloud 升级到最新版 后,报错: org.springframework.beans.factory.BeanCreationException: Error creating be ...
- [Javascript] Function Expression Ex, Changing Declarations to Expressions
Inside the Haunted Hickory House file, developers for the Forest of Function Expressions Theme Park ...