CentOS5(RHEL5)+LDAP+Apache2+WebDAV+Subversionè¨å®ã¡ã¢
LDAPã®è¨å®
è¨å®ã«é¢ãã¦ã¯LDAPによるパスワードの一元管理ãåèã«ããã°ããããä¸ç¹æ³¨æãå¿
è¦ã
è¨äºä¸ã§ã¯userPasswordå±æ§ã«é¢ããã¢ã¯ã»ã¹å¶éã
access to attribute=userPassword
by self write
by dn="cn=root,dc=itboost,dc=co,dc=jp" write
by anonymous auth
by * none
ã¨ãªã£ã¦ããããCentOS5ã§æ¨æºã®openldap-2.3.27ã§ã¯
access to attrs=userPassword
by self write
by dn="cn=root,dc=itboost,dc=co,dc=jp" write
by anonymous auth
by * none
ã¨attributeã®ä»£ããã«attrsã使ãå¿ è¦ãããã
Apache2+WebDAV
ãã¼ãã£ã«ãã¹ãã®è¨å®ã¯ãããªæã
<VirtualHost svn.example.com> <Location "/"> DAV svn SVNListParentPath on SVNParentPath /var/repos AuthType Basic AuthBasicProvider ldap AuthName "Subversion Repository Server" AuthzLDAPAuthoritative off AuthLDAPURL ldap://ldap.example.com/ou=People,dc=example,dc=com?uid require valid-user </Location> </VirtualHost>
DAVãã£ã¬ã¯ãã£ãã¯ãã£ã¬ã¯ããªã³ã³ããã¹ã*1ãªã®ã§ãDirectory,Location,Fileã®ä¸ã«ãããå¿
è¦ãããã¾ãããDirectoryã§æå®ãããã£ã¬ã¯ããªã¨SVNParentPath,SVNPathã§æå®ãããã£ã¬ã¯ããªãåä¸ã ã¨301ã¨ã©ã¼ãåºã¾ãããã®ãããLocationãã£ã¬ã¯ãã£ããå©ç¨ããã®ãé©å½ã ã¨æãã¾ãã
LDAPèªè¨¼ã«ã¤ãã¦ã¯Resuire valid-userãå©ç¨ããå ´åã¯ãAuthzLDAPAuthoritativeãoffã«ããå¿
è¦ãããã®ã注æç¹ã¨ãªãã¾ãã
ã¬ãã¸ããªä½æç°¡æã¹ã¯ãªãã
/var/reposã«æ°è¦ã¬ãã¸ããªãä½æããç°¡æã¹ã¯ãªããã
#!/bin/bash if [ $UID -eq 0 ];then /usr/bin/svnadmin create /var/repos/$1 /usr/bin/svn import -m 'import skelton' /usr/share/subversion/skel file:///var/repos/$1 /bin/chown apache:apache /var/repos/$1 else sudo $0 $1 fi
root以å¤ã§ä½¿ãã«ã¯visudoã§ãã®ã¹ã¯ãªãããsudoã§ä½¿ããããã«ããã*2