使用Devise进行Ruby on Rails的LDAP身份验证

时间:2013-01-29 02:35:41

标签: ruby-on-rails devise active-directory ldap

需要帮助才能使其正常工作,现在它说

Completed 401 Unauthorized in 1ms

感谢任何建议

ldap.yml

authorizations: &AUTHORIZATIONS
## Authorization
group_base: : ou=Group, dc=company, dc=com
required_groups:
- cn=proxyagent,ou=profile,dc=company,dc=com
require_attribute:
obectclass=*
authorizationRole: memberuid
attribute: cn

development:
 host: ldap-33.company.com
 port: 389
 attribute: uid
 base: ou=People,dc=company,dc=com; ou=People, ou=mcdata,dc=company,dc=com
 admin_user: cn=proxyagent,ou=profile,dc=company,dc=com
 admin_password: welcome
ssl: true
<<: *AUTHORIZATIONS

user.rb

class User < ActiveRecord::Base

devise :ldap_authenticatable,:rememberable, :trackable

请告诉我错误的地方,Splunk的正确设置是:

 Host: ldap-33.company.com
Port: 389
Bind DN: cn=proxyagent,ou=profile,dc=company,dc=com
Bind DB Pass:  welcome
User base DN:ou=People,dc=company,dc=com; ou=People, ou=mcdata,dc=company,dc=com
User base filter:  (objectclass=person)
User name attribute:  uid
Real Name attribute: cn
Group mapping attribute: uid

Group settings:
 Group base DN: ou=Group, dc=company, dc=com
 Group base filter: (obectclass=*)
 Group name attribute: cn
 Group member attribute: memberuid

谢谢!

d

1 个答案:

答案 0 :(得分:0)

在主持人替换

ldap-33.company.comldap://33.company.comldap.33.company.com