add test with ldap- and pg-server

This commit is contained in:
Lars Kanis
2011-05-24 11:14:26 +02:00
parent 634a952269
commit 56534e4f93
4 changed files with 181 additions and 2 deletions

36
test/fixtures/config-ldapdb.yaml vendored Normal file
View File

@ -0,0 +1,36 @@
---
ldap_connection:
host: localhost
port: 1389
# auth:
# method: :simple
# username: dc=example,dc=com
# password:
ldap_users:
base: dc=example,dc=com
filter: (&(cn=*)(sAMAccountName=*))
name_attribute: sAMAccountName
ldap_groups:
base: dc=example,dc=com
filter: (member=*)
name_attribute: cn
member_attribute: member
pg_connection:
host: localhost
dbname: postgres
pg_users:
# WHERE-condition to identify LDAP generated users
# filter: rolcanlogin AND oid IN (SELECT pam.member FROM pg_auth_members pam JOIN pg_roles pr ON pr.oid=pam.roleid WHERE pr.rolname='edv')
filter: rolcanlogin AND NOT rolsuper
create_options: LOGIN
pg_groups:
# WHERE-condition to identify LDAP generated groups
# filter: NOT rolcanlogin AND rolname='edv'
filter: NOT rolcanlogin
create_options: NOLOGIN
grant_options:

38
test/fixtures/ldapdb.yaml vendored Normal file
View File

@ -0,0 +1,38 @@
---
dc=example,dc=com:
cn:
- Top object
cn=Fred Flintstone,dc=example,dc=com:
cn:
- Fred Flintstone
mail:
- fred@bedrock.org
- fred.flintstone@bedrock.org
sn:
- Flintstone
sAMAccountName:
- fred
cn=Wilma Flintstone,dc=example,dc=com:
cn:
- Wilma Flintstone
mail:
- wilma@bedrock.org
sAMAccountName:
- wilma
cn=Flintstones,dc=example,dc=com:
cn:
- Flintstones
member:
- cn=Fred Flintstone,dc=example,dc=com
- cn=Wilma Flintstone,dc=example,dc=com
cn=Wilmas,dc=example,dc=com:
cn:
- Wilmas
member:
- cn=Wilma Flintstone,dc=example,dc=com
cn=All Users,dc=example,dc=com:
cn:
- All Users
member:
- cn=Wilmas,dc=example,dc=com
- cn=Fred Flintstone,dc=example,dc=com