mirror of
https://github.com/grafana/grafana.git
synced 2025-01-26 08:16:59 -06:00
ldap: improved ldap test env with more structured users and groups
This commit is contained in:
parent
5e08bf5130
commit
37efa934f1
1
.gitignore
vendored
1
.gitignore
vendored
@ -43,6 +43,7 @@ fig.yml
|
||||
docker-compose.yml
|
||||
docker-compose.yaml
|
||||
/conf/provisioning/**/custom.yaml
|
||||
/conf/ldap_dev.toml
|
||||
profile.cov
|
||||
/grafana
|
||||
/local
|
||||
|
@ -80,7 +80,15 @@ EOF
|
||||
done
|
||||
fi
|
||||
|
||||
for file in `ls /etc/ldap/prepopulate/*.ldif`; do
|
||||
for file in `ls /etc/ldap/prepopulate/units/*.ldif`; do
|
||||
slapadd -F /etc/ldap/slapd.d -l "$file"
|
||||
done
|
||||
|
||||
for file in `ls /etc/ldap/prepopulate/groups/*.ldif`; do
|
||||
slapadd -F /etc/ldap/slapd.d -l "$file"
|
||||
done
|
||||
|
||||
for file in `ls /etc/ldap/prepopulate/users/*.ldif`; do
|
||||
slapadd -F /etc/ldap/slapd.d -l "$file"
|
||||
done
|
||||
|
||||
|
@ -1,10 +0,0 @@
|
||||
dn: cn=ldapadmin,dc=grafana,dc=org
|
||||
mail: ldapadmin@grafana.com
|
||||
userPassword: grafana
|
||||
objectClass: person
|
||||
objectClass: top
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: organizationalPerson
|
||||
sn: ldapadmin
|
||||
cn: ldapadmin
|
||||
memberOf: cn=admins,dc=grafana,dc=org
|
@ -1,5 +0,0 @@
|
||||
dn: cn=admins,dc=grafana,dc=org
|
||||
cn: admins
|
||||
member: cn=ldapadmin,dc=grafana,dc=org
|
||||
objectClass: groupOfNames
|
||||
objectClass: top
|
@ -1,10 +0,0 @@
|
||||
dn: cn=ldapeditor,dc=grafana,dc=org
|
||||
mail: ldapeditor@grafana.com
|
||||
userPassword: grafana
|
||||
objectClass: person
|
||||
objectClass: top
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: organizationalPerson
|
||||
sn: ldapeditor
|
||||
cn: ldapeditor
|
||||
memberOf: cn=users,dc=grafana,dc=org
|
5
docker/blocks/openldap/prepopulate/groups/admins.ldif
Normal file
5
docker/blocks/openldap/prepopulate/groups/admins.ldif
Normal file
@ -0,0 +1,5 @@
|
||||
dn: cn=admins,ou=groups,dc=grafana,dc=org
|
||||
cn: admins
|
||||
objectClass: groupOfNames
|
||||
objectClass: top
|
||||
member: cn=ldap-admin,ou=users,dc=grafana,dc=org
|
5
docker/blocks/openldap/prepopulate/groups/backend.ldif
Normal file
5
docker/blocks/openldap/prepopulate/groups/backend.ldif
Normal file
@ -0,0 +1,5 @@
|
||||
dn: cn=backend,ou=groups,dc=grafana,dc=org
|
||||
cn: backend
|
||||
objectClass: groupOfNames
|
||||
objectClass: top
|
||||
member: cn=ldap-editor,dc=grafana,dc=org
|
5
docker/blocks/openldap/prepopulate/groups/editor.ldif
Normal file
5
docker/blocks/openldap/prepopulate/groups/editor.ldif
Normal file
@ -0,0 +1,5 @@
|
||||
dn: cn=editors,ou=groups,dc=grafana,dc=org
|
||||
cn: editors
|
||||
objectClass: groupOfNames
|
||||
objectClass: top
|
||||
member: cn=ldap-editor,ou=users,dc=grafana,dc=org
|
5
docker/blocks/openldap/prepopulate/groups/frontend.ldif
Normal file
5
docker/blocks/openldap/prepopulate/groups/frontend.ldif
Normal file
@ -0,0 +1,5 @@
|
||||
dn: cn=frontend,ou=groups,dc=grafana,dc=org
|
||||
cn: frontend
|
||||
objectClass: groupOfNames
|
||||
objectClass: top
|
||||
member: cn=ldap-frontend-1,ou=users,dc=grafana,dc=org
|
3
docker/blocks/openldap/prepopulate/units/groups.ldif
Normal file
3
docker/blocks/openldap/prepopulate/units/groups.ldif
Normal file
@ -0,0 +1,3 @@
|
||||
dn: ou=groups,dc=grafana,dc=org
|
||||
objectclass: top
|
||||
objectclass: organizationalUnit
|
3
docker/blocks/openldap/prepopulate/units/users.ldif
Normal file
3
docker/blocks/openldap/prepopulate/units/users.ldif
Normal file
@ -0,0 +1,3 @@
|
||||
dn: ou=users,dc=grafana,dc=org
|
||||
objectclass: top
|
||||
objectclass: organizationalUnit
|
11
docker/blocks/openldap/prepopulate/users/ldap-admin.ldif
Normal file
11
docker/blocks/openldap/prepopulate/users/ldap-admin.ldif
Normal file
@ -0,0 +1,11 @@
|
||||
dn: cn=ldap-admin,ou=users,dc=grafana,dc=org
|
||||
mail: ldap-admin@grafana.com
|
||||
userPassword: grafana
|
||||
objectClass: person
|
||||
objectClass: top
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: organizationalPerson
|
||||
sn: ldap-admin
|
||||
cn: ldap-admin
|
||||
memberOf: cn=admins,ou=groups,dc=grafana,dc=org
|
||||
memberOf: cn=editors,ou=groups,dc=grafana,dc=org
|
10
docker/blocks/openldap/prepopulate/users/ldap-editor.ldif
Normal file
10
docker/blocks/openldap/prepopulate/users/ldap-editor.ldif
Normal file
@ -0,0 +1,10 @@
|
||||
dn: cn=ldap-editor,ou=users,dc=grafana,dc=org
|
||||
mail: ldap-editor@grafana.com
|
||||
userPassword: grafana
|
||||
objectClass: person
|
||||
objectClass: top
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: organizationalPerson
|
||||
sn: ldap-editor
|
||||
cn: ldap-editor
|
||||
memberOf: cn=editors,ou=groups,dc=grafana,dc=org
|
@ -0,0 +1,10 @@
|
||||
dn: cn=ldap-frontend-1,ou=users,dc=grafana,dc=org
|
||||
mail: ldap-frontend-1@grafana.com
|
||||
userPassword: grafana
|
||||
objectClass: person
|
||||
objectClass: top
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: organizationalPerson
|
||||
sn: ldap-frontend-1
|
||||
cn: ldap-frontend-1
|
||||
memberOf: cn=frontend,ou=groups,dc=grafana,dc=org
|
@ -1,9 +1,9 @@
|
||||
dn: cn=ldapviewer,dc=grafana,dc=org
|
||||
mail: ldapviewer@grafana.com
|
||||
dn: cn=ldap-viewer,ou=users,dc=grafana,dc=org
|
||||
mail: ldap-viewer@grafana.com
|
||||
userPassword: grafana
|
||||
objectClass: person
|
||||
objectClass: top
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: organizationalPerson
|
||||
sn: ldapviewer
|
||||
cn: ldapviewer
|
||||
sn: ldap-viewer
|
||||
cn: ldap-viewer
|
@ -1,5 +0,0 @@
|
||||
dn: cn=users,dc=grafana,dc=org
|
||||
cn: users
|
||||
member: cn=ldapeditor,dc=grafana,dc=org
|
||||
objectClass: groupOfNames
|
||||
objectClass: top
|
Loading…
Reference in New Issue
Block a user