rbCAS / CASino

CASino is a Ruby-based Single Sign-On solution supporting the CAS standard
MIT License
329 stars 189 forks source link

CASino integration to several folder in AD using LDAP #196

Open adrianpanatra opened 4 years ago

adrianpanatra commented 4 years ago

I successfully connect the CASino gems to Active Directory by using LDAP. But the problem is, I need to gather the data in AD that located in several folders. How can I do this? In my cas.yml code I write like this

development:
  <<: *defaults
  frontend:
    sso_name: AUTHENTICATION CENTER
  authenticators:
    my_company_ldap:
      authenticator: LDAP
      options:
        host: LDAP_HOST
        port: 389
        base: OU=Users,OU=UserFolder1,OU=Root,DC=company,DC=com
        username_attribute: sAMAccountName
        encryption: false
        admin_user: ADMIN
        admin_password: admin
        extra_attributes:
          email: mail
          fullname: displayname

How I can connect to several folders in AD? I tried to write another base: inside it but it only read the newest base, I also tried to customized the value of cas.yml inside the controller, but I need to restart the server to apply the changes. Can I make the base: to read several folders not only UserFolder1?