A Sentry extension to add an LDAP server as an authentication source.
Archived. The repository is read-only: no more fixes or releases will come.
pip install sentry-ldap-authREADME as published on PyPI with version 2.9.
sentry-ldap-auth
A Django custom authentication backend for Sentry. This module extends the functionality of django-auth-ldap with Sentry specific features.
Features
- Users created by this backend are managed users. Managed fields are not editable through the Sentry account page.
- Users may be auto-added to an Organization upon creation.
Prerequisites
Versions 2.0 and newer require Sentry 8. For Sentry 7 support, use the 1.1 release
Installation
To install, simply add sentry-ldap-auth to your requirements.txt for your Sentry environment (or pip install sentry-ldap-auth).
Configuration
This module extends the django-auth-ldap and all the options it provides are supported (up to v1.2.x, at least).
To configure Sentry to use this module, add sentry_ldap_auth.backend.SentryLdapBackend to your AUTHENTICATION_BACKENDS in your sentry.conf.py, like this:
AUTHENTICATION_BACKENDS = AUTHENTICATION_BACKENDS + (
'sentry_ldap_auth.backend.SentryLdapBackend',
)
Then, add any applicable configuration options. Depending on your environment, and especially if you are running Sentry in containers, you might consider using python-decouple so you can set these options via environment variables.
sentry-ldap-auth Specific Options
AUTH_LDAP_DEFAULT_SENTRY_ORGANIZATION = u'My Organization Name'
Auto adds created user to the specified organization (matched by name) if it exists.
AUTH_LDAP_SENTRY_ORGANIZATION_ROLE_TYPE = 'member'
Role type auto-added users are assigned. Valid values in a default installation of Sentry are 'member', 'admin', 'manager' & 'owner'. However, custom roles can also be added to Sentry, in which case these are also valid.