Net :: LDAP :: Devise :: SessionsController#create主机名中的错误“ <*某些主机名*>”与服务器证书不匹配

时间:2018-06-20 23:03:06

标签: ruby-on-rails ruby ldap

每次用户登录时,都会在生产环境中出现上述错误。这是我的ldap.yml

authorizations: &AUTHORIZATIONS
  allow_unauthenticated_bind: false
  group_base: ou=groups,dc=test,dc=com
  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

## Environment

development:
  host: *hostname*
  port: 389
  attribute: uid
  base: ou=people,o=foo,o=foo.foo
  ssl: none
  # <<: *AUTHORIZATIONS

test:
  host: localhost
  port: 3389
  attribute: cn
  base: ou=people,dc=test,dc=com
  admin_user: cn=admin,dc=test,dc=com
  admin_password: admin_password
  ssl: simple_tls
  # <<: *AUTHORIZATIONS

production:
  host: *hostname*
  port: 389
  attribute: uid
  base: ou=people,o=foo,o=foo.foo
  ssl: start_tls
  # <<: *AUTHORIZATIONS

此文件工作正常,并且完全没有被修改,但是出现此错误。它在项目中添加了一些内容后出现,如果我部署了项目的先前版本,则可以正常工作。我不知道此错误来自何处以及可能是什么原因造成的。

如果有人能弄清楚发生了什么,我将非常感激。

0 个答案:

没有答案