*: add standup script for LDAP
This commit is contained in:
42
examples/config-ldap.ldif
Normal file
42
examples/config-ldap.ldif
Normal file
@@ -0,0 +1,42 @@
|
||||
dn: dc=example,dc=org
|
||||
objectClass: dcObject
|
||||
objectClass: organization
|
||||
o: Example Company
|
||||
dc: example
|
||||
|
||||
dn: ou=People,dc=example,dc=org
|
||||
objectClass: organizationalUnit
|
||||
ou: People
|
||||
|
||||
dn: cn=jane,ou=People,dc=example,dc=org
|
||||
objectClass: person
|
||||
objectClass: inetOrgPerson
|
||||
sn: doe
|
||||
cn: jane
|
||||
mail: janedoe@example.com
|
||||
userpassword: foo
|
||||
|
||||
dn: cn=john,ou=People,dc=example,dc=org
|
||||
objectClass: person
|
||||
objectClass: inetOrgPerson
|
||||
sn: doe
|
||||
cn: john
|
||||
mail: johndoe@example.com
|
||||
userpassword: bar
|
||||
|
||||
# Group definitions.
|
||||
|
||||
dn: ou=Groups,dc=example,dc=org
|
||||
objectClass: organizationalUnit
|
||||
ou: Groups
|
||||
|
||||
dn: cn=admins,ou=Groups,dc=example,dc=org
|
||||
objectClass: groupOfNames
|
||||
cn: admins
|
||||
member: cn=john,ou=People,dc=example,dc=org
|
||||
member: cn=jane,ou=People,dc=example,dc=org
|
||||
|
||||
dn: cn=developers,ou=Groups,dc=example,dc=org
|
||||
objectClass: groupOfNames
|
||||
cn: developers
|
||||
member: cn=jane,ou=People,dc=example,dc=org
|
||||
51
examples/config-ldap.yaml
Normal file
51
examples/config-ldap.yaml
Normal file
@@ -0,0 +1,51 @@
|
||||
issuer: http://127.0.0.1:5556/dex
|
||||
storage:
|
||||
type: sqlite3
|
||||
config:
|
||||
file: examples/dex.db
|
||||
web:
|
||||
http: 0.0.0.0:5556
|
||||
|
||||
connectors:
|
||||
- type: ldap
|
||||
name: OpenLDAP
|
||||
id: ldap
|
||||
config:
|
||||
host: localhost:10389
|
||||
|
||||
# No TLS for this setup.
|
||||
insecureNoSSL: true
|
||||
|
||||
# This would normally be a read-only user.
|
||||
bindDN: cn=admin,dc=example,dc=org
|
||||
bindPW: admin
|
||||
|
||||
userSearch:
|
||||
baseDN: ou=People,dc=example,dc=org
|
||||
filter: "(objectClass=person)"
|
||||
username: mail
|
||||
# "DN" (case sensitive) is a special attribute name. It indicates that
|
||||
# this value should be taken from the entity's DN not an attribute on
|
||||
# the entity.
|
||||
idAttr: DN
|
||||
emailAttr: mail
|
||||
nameAttr: cn
|
||||
|
||||
groupSearch:
|
||||
baseDN: ou=Groups,dc=example,dc=org
|
||||
filter: "(objectClass=groupOfNames)"
|
||||
|
||||
# A user is a member of a group when their DN matches
|
||||
# the value of a "member" attribute on the group entity.
|
||||
userAttr: DN
|
||||
groupAttr: member
|
||||
|
||||
# The group name should be the "cn" value.
|
||||
nameAttr: cn
|
||||
|
||||
staticClients:
|
||||
- id: example-app
|
||||
redirectURIs:
|
||||
- 'http://127.0.0.1:5555/callback'
|
||||
name: 'Example App'
|
||||
secret: ZXhhbXBsZS1hcHAtc2VjcmV0
|
||||
Reference in New Issue
Block a user