Skip to content

Instantly share code, notes, and snippets.

@prathamesh-sonpatki
Created October 16, 2012 14:20
Show Gist options
  • Save prathamesh-sonpatki/3899536 to your computer and use it in GitHub Desktop.
Save prathamesh-sonpatki/3899536 to your computer and use it in GitHub Desktop.
ldap.yml
## Authorizations
# Uncomment out the merging for each enviornment that you'd like to include.
# You can also just copy and paste the tree (do not include the "authorizations") to each
# enviornment if you need something different per enviornment.
authorizations: &AUTHORIZATIONS
#group_base: dc=corp, dc=betterlabs, dc=net
## Requires config.ldap_check_group_membership in devise.rb be true
# Can have multiple values, must match all to be authorized
#required_groups:
# If only a group name is given, membership will be checked against "uniqueMember"
# - cn=admins,ou=groups,dc=test,dc=com
# - cn=users,ou=groups,dc=test,dc=com
#- cn=RoR,ou=user,ou=betterlabs,dc=corp,dc=betterlabs,dc=net
# If an array is given, the first element will be the attribute to check against, the second the group name
#- ["memberOf", "CN=RoR,OU=user,OU=betterlabs,DC=corp,DC=betterlabs,DC=net"]
## Requires config.ldap_check_attributes in devise.rb to be true
## Can have multiple attributes and values, must match all to be authorized
require_attribute:
memberOf: CN=abc,OU=user,OU=betterlabs,DC=foo,DC=bar,DC=baz
## Enviornments
development:
host: 192.168.3.254
port: 3268
attribute: sAMAccountName
base: dc=foo, dc=bar, dc=baz
admin_user: cn=readme, cn=Users, dc=foo, dc=bar, dc=baz
admin_password: 12345
ssl: false
# <<: *AUTHORIZATIONS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment