레이블이 LDAP인 게시물을 표시합니다. 모든 게시물 표시
레이블이 LDAP인 게시물을 표시합니다. 모든 게시물 표시

2013년 8월 16일 금요일

centos 5.9 python 2.7 python-ldap 설치

yum installl openldap24-libs.i386
yum installl openldap24-libs.x86_64
yum installl openldap24-libs-devel.i386
yum installl openldap24-libs-devel.x86_64

python-ldap-2.4.13.tar.gz download

tar -xvzf python-ldap-2.4.13.tar.gz

cd python-ldap-2.4.13
emacs setup.cfg

lib 에 /usr/lib64/openldap24 ,/usr/lib/openldap24 추가
include 에 /usr/include/openldap24 추가

python setup.py install




2013년 8월 14일 수요일

mac ldap lib 설치

http://projects.skurfer.com/posts/2011/python_ldap_lion/

rb 파일만 넣고
brew install하면 끝남.

그후에 python-ldap 하면 됨.

python ldap 2.3.13

https://pypi.python.org/pypi/python-ldap/2.3.13


centos 6
yum install openldap24-libs-devel.x86_64

2009년 11월 30일 월요일

spring ldap 연동시 authentication method 설정법

spring ldap에선 기본이 Context.SECURITY_AUTHENTICATION 이 simple 이다.

그래서 아래와 같이 만들고

[code java] public class DigestMD5DirContextAuthenticationStrategy implements
DirContextAuthenticationStrategy {
 /*
  * (non-Javadoc)
  * @see org.springframework.ldap.core.support.DirContextAuthenticationStrategy#setupEnvironment(java.util.Hashtable,
  * java.lang.String, java.lang.String)
  */
 public void setupEnvironment(Hashtable env, String userDn, String password) {
  env.put(Context.SECURITY_AUTHENTICATION, "DIGEST-MD5");
  env.put(Context.SECURITY_PRINCIPAL, userDn);
  env.put(Context.SECURITY_CREDENTIALS, password);
 }  /*
  * (non-Javadoc)
  * @see org.springframework.ldap.core.support.DirContextAuthenticationStrategy#processContextAfterCreation(javax.naming.directory.DirContext,
  * java.lang.String, java.lang.String)
  */
 public DirContext processContextAfterCreation(DirContext ctx, String userDn, String password) {
  return ctx; }
} [/code]

아래와 같이 설정하면 된다.

[code xml] <bean id="digestMD5DirContextAuthenticationStrategy" class="common.ldap.DigestMD5DirContextAuthenticationStrategy"/>
    
     <bean id="contextSource" class="org.springframework.security.ldap.DefaultSpringSecurityContextSource">
      <constructor-arg value="연결정보">
      <property name="userDn" value="정보" />
      <property name="password" value="정보" />
      <property name="authenticationStrategy" ref="digestMD5DirContextAuthenticationStrategy" />
  </bean>
 [/code]


 

 

위와 같이 하면 된다.