Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ldap authenticator #207

Merged
merged 8 commits into from
Sep 1, 2022
Merged

Ldap authenticator #207

merged 8 commits into from
Sep 1, 2022

Conversation

dmgav
Copy link
Contributor

@dmgav dmgav commented May 10, 2022

Implementation of LDAP authenticator. The authenticator could be configured in .yml file as

authentication:
    providers:
        - provider: ldap_local 
          authenticator: tiled.authenticators:LDAPAuthenticator
          args:
              server_address: localhost
              server_port: 1389
              bind_dn_template: "cn={username},ou=users,dc=example,dc=org"
              use_tls: false
              use_ssl: false
    tiled_admins:
        - provider: ldap_local 
          id: user02

Copy link
Contributor

@dylanmcreynolds dylanmcreynolds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let preface this comment by acknowledging this is the very first test_authenticators.py commit, so thanks for adding it!

Possibly for a later PR, but have you thought of mocking the ldap3 code? I have no experience mocking ldap, but there even seems to be some support in ldap3 https://ldap3.readthedocs.io/en/latest/mocking.html

@danielballan
Copy link
Member

  • I am grateful that this has unit tests, period. (More than I did with PAM, OIDC, SAML!)
  • I agree with @dylanmcreynolds that this would be a good use for mocking.
  • Given internal NSLS-II time pressures I think I'm in favor of refactoring to mocking in a separate PR.

@danielballan danielballan merged commit 3f4a7c8 into bluesky:main Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants