Re: [Re: subversion, saslauthd, ldap and encryption]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Hi again

> In otehr words: I'm in the process of creating a ldap subversion user
> and give him perms to act as other users. subversion has its passwrod
> in plain text ,but other ldap users also need plain text passwrods?

I've configured ldapdb auxprop plugin.
my svn uses sasl, that uses ldapdb.

But it only works if the user (regulr user) have it password in
plain text. 
ldap communiction is encrypted (TLS), svn communication is encrypted,
but we don't like having plaintext passwsords in our ldap DB.
so we'll move to apache+ssl.

But, let me paste my conf , just because it has been a hard work looking
too many links and maybe it helps anyone in the future.

-- ldap server --

Authentication Algorithm:

installed cyrus-sasl-ldap for digest-md5 support.

SASL rewrite rule in Slapd

in /etc/openldap/slapd.conf added 

authz-regexp "^uid=([a-z]+).*,cn=digest-md5,cn=auth" \
password-hash {CLEARTEXT}
authz-policy to   <- SASL Proxy Authorization

** the regexp is a little differnt from the doc becasu svn adds its
realm like @realm and it must be removed.

added special user:

# cat subversion2.ldif 
dn: uid=subversion,ou=People,dc=pic,dc=es
uid: subversion@pic
cn: subversion
objectClass: account
objectClass: posixAccount
objectClass: top
userPassword: plaintextpassword
loginShell: /bin/bash
uidNumber: 70000
gidNumber: 1307
homeDirectory: /home/subversion
gecos: mail
saslAuthzTo: ldap:///ou=People,dc=pic,dc=es??sub?(organizationName=PIC) <- SASL Proxy Authorization

** in our case, we want subversion to act as any user with
organizationName=PIC. You could add your own ldap search.

cat /usr/lib64/sasl2/slapd.conf 
auxprop_plugin: slapd

** this should remove warnings in messages, but seems that it does not work.

Oct  4 15:53:21 ldap1-test slaptest: auxpropfunc error invalid parameter supplied
Oct  4 15:53:21 ldap1-test slapd[3156]: auxpropfunc error invalid parameter supplied

-- subversion server --

# cat /srv/svn/test/conf/svnserve.conf 
anon-access = read
auth-access = write
authz-db = authz
realm = pic

use-sasl = true
min-encryption = 128
max-encryption = 256 

# cat /srv/svn/test/conf/authz 
services = arnaubria


# cat /usr/lib64/sasl2/svn.conf 
pwcheck_method: auxprop
auxprop_plugin: ldapdb
ldapdb_uri: ldap://
ldapdb_id: subversion@pic
ldapdb_pw: r3m0t3
ldapdb_mech: DIGEST-MD5
ldapdb_starttls: demand
ldapdb_rc: /usr/lib64/sasl2/ldaprc

# cat /usr/lib64/sasl2/ldaprc
TLS_CACERT /etc/pki/tls/certs/TERENASSLCA.crt

** did not find ldapdb params for cacert and TLS-reqcert.

finally, your user must have its password in plaintext:

$ svn co svn://$SVNSERVER/test
Reino de autentificación: <svn://$SVNSERVER:3690> pic
Usuario: arnaubria
Clave de 'arnaubria': 

ATTENTION!  Your password for authentication realm:
Almacenar la clave sin cifrar (sí/no)? no
Revisión obtenida: 0

For testing:

# ldapwhoami  -ZZ -U subversion@pic -Y DIGEST-MD5 
SASL/DIGEST-MD5 authentication started
Please enter your password: 
SASL username: subversion@pic
SASL data security layer installed.


# ldapwhoami  -ZZ -U subversion@pic -Y DIGEST-MD5 -X u:arnaubria 
SASL/DIGEST-MD5 authentication started
Please enter your password: 
SASL username: u:arnaubria
SASL data security layer installed.

Interesting links:

thanks for your indications Dan.


[Index of Archives]     [Info Cyrus]     [Squirrel Mail]     [Linux Media]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux