Я пытаюсь использовать ldap_devise_authenticatable в моем приложении rails.Я имею в виду https://github.com/cschiewek/devise_ldap_authenticatable и http://random -rails.blogspot.com / 2010/07 / ldap-authentication-with-devise.html .
Я сейчас нахожусьсталкивающиеся проблемы с настройкой файла ldap.yml на сервер ldap, который я использую.Я столкнулся с трудностью при определении того, какие параметры должны быть заполнены именно какими деталями.
Мне удалось собрать некоторую информацию из http://net -ldap.rubyforge.org / classes / Net / LDAP.HTML .Но так как этот урок в основном для gem net-ldap.Это не полностью соответствует моим целям.
Не могли бы вы предложить мне хороший учебник по LDAP ... специфичный для параметров, которые мне нужно заполнить в качестве значений для ldap.yml, который я использую для обоихАвторизация и окружающая среда.Важное сомнение, которое у меня возникло:
У меня есть представление о том, какие значения параметров вводить в среде, но я не знаю, какие данные ввести для параметров, связанных с авторизацией.Я прокомментировал несколько деталей, которые следует заполнить своими сомнениями в ldap.yml, указанном ниже.Пожалуйста, помогите мне с ними, если это возможно.
Мой текущий 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: ou=groups,dc=test,dc=com
## 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
# If an array is given, the first element will be the attribute to check against, the second the group name
- ["moreMembers", "cn=users,ou=groups,dc=test,dc=com"]
## 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:
objectClass: inetOrgPerson
authorizationRole: postsAdmin
## Enviornments
development:
host: # ip address is to be filled in here..
port: # port number goes here..
attribute: cn # what does attribute and cn signify?? what are the other things I can fill attribute with like uid, and..what else ??
base: # my tree base details go in here..
admin_user: cn=admin_name,dc=test,dc=com # do I need to enter the domain component also ? or just the admin_name would do?
admin_password: # password goes in here..
ssl: true # when would I be using this..??
# <<: *AUTHORIZATIONS - how & where can I use this..??
test:
host: # ip address is to be filled in here..
port: # port number goes here..
attribute: cn # what does attribute and cn signify?? what are the other things I can fill attribute with like uid, and..what else ??
base: # my tree base details go in here..
admin_user: cn=admin_name,dc=test,dc=com
admin_password: # password goes in here..
ssl: true
# <<: *AUTHORIZATIONS - how can I use this..
production:
host: # ip address is to be filled in here..
port: # port number goes here..
attribute: cn # what does attribute and cn signify?? what are the other things I can fill attribute with like uid, and..what else ??
base: # my tree base details go in here..
admin_user: cn=admin_name,dc=test,dc=com
admin_password: # password goes in here..
ssl: true
# <<: *AUTHORIZATIONS - how can I use this..
Спасибо за помощь ..