I'm using Devise with LDAP authentication in a Rails 4 application. The ldap.yml
looks like
development:
host: my.ldap.server
port: 636
attribute: sAMAccountName
base: OU=Accounts,DC=my,DC=ldap,DC=server
admin_user: CN=ServiceAccount,OU=LDAP,OU=Service Accounts,DC=my,DC=ldap,DC=server
admin_password: super_secret_password
ssl: true
production:
...
I want to be able to access this programmatically, but I cannot figure out how to do it. I can access by reading directly from the file by doing
However, this is not 100% accurate because if the values in the file had changed without the Rails server being restarted, the "live" values that Rails is actually using would be different.
How can I get to these "live" values? I can't find anything on this.