Banno / getsentry-ldap-auth

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

AUTH_LDAP_DEFAULT_SENTRY_ORGANIZATION not working #19

Closed Sajito closed 7 years ago

Sajito commented 7 years ago

Hi,

I'm trying to get this working in my docker sentry setup. I managed to get the logging working basically. When I log in with ldap data the user gets created, but it's not added the organization.

My ldap configuration looks like this:

import ldap from django_auth_ldap.config import LDAPSearch, GroupOfUniqueNamesType

AUTH_LDAP_GLOBAL_OPTIONS = env('AUTH_LDAP_GLOBAL_OPTIONS')

AUTH_LDAP_SERVER_URI = env('AUTH_LDAP_SERVER_URI') AUTH_LDAP_START_TLS = Bool(env('AUTH_LDAP_START_TLS', False)) AUTH_LDAP_BIND_DN = env('AUTH_LDAP_BIND_DN') AUTH_LDAP_BIND_PASSWORD = env('AUTH_LDAP_BIND_PASSWORD')

AUTH_LDAP_DEFAULT_SENTRY_ORGANIZATION = u'Sentry' AUTH_LDAP_SENTRY_ORGANIZATION_ROLE_TYPE = 'member' AUTH_LDAP_SENTRY_ORGANIZATION_GLOBAL_ACCESS = True

AUTH_LDAP_USER_SEARCH = LDAPSearch( env('SEARCH_DN'), ldap.SCOPE_SUBTREE, '(mail=%(user)s)', )

AUTH_LDAP_USER_ATTR_MAP = { 'name': 'cn', 'email': 'mail' }

AUTHENTICATION_BACKENDS = AUTHENTICATION_BACKENDS + ( 'django_auth_ldap.backend.LDAPBackend', )

As I said everything seems to be working, but the user is not getting added to the organization, which definitely exists in the database.

Anyone got an idea what's wrong?

I'm using Sentry 8.11 and latest sentry_ldap_auth.

Thank you

Sajito commented 7 years ago

Meeeh. Closing here.

I got the wrong authentication backend... Using the django backend not the sentry backend.

suuzee commented 4 years ago

Meeeh. Closing here.

I got the wrong authentication backend... Using the django backend not the sentry backend.

Hello, what's the correct backend? Please tell me. Thanks!