Banno / getsentry-ldap-auth

A Sentry extension to add an LDAP server as an authention source.
Apache License 2.0
163 stars 53 forks source link

Populate sentry_useremail with email address #13

Closed barronhagerman closed 7 years ago

barronhagerman commented 8 years ago

Summary

Email verification was added in Sentry Server 8.6, which uses a new table named sentry_useremail to store email addresses for verification rather than using the email address already in the auth_user table. This updates the sentry-ldap-auth plugin so the sentry_useremail table is populated with the value of the LDAP user's mail attribute.

Fixes #11

How to test

  1. With an instance of Sentry Server 8.6 or higher, pip install git+https://github.com/Banno/getsentry-ldap-auth.git@populate-useremail
  2. Log in with an LDAP user's credentials
  3. Query the sentry_useremail table to verify that the e-mail address is populated as expected

    Notes

    • This has been made backward-compatible with Sentry Server versions before 8.6, so no exceptions are thrown due to the lack of the sentry.models.UserEmail model
eugeneromero commented 7 years ago

Awesome, will test right away. Thanks guys!