Skip to content
cecilialau6776Public

About

A ColdFront plugin to authenticate with REMOTE_USER and pull user info from LDAP

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

ruldap - Remote User LDAP

A ColdFront plugin that provides LDAPRemoteUserBackend that will configure a user based on information pulled from LDAP. If a user doesn't exist in LDAP, the user will not be created.

Installation

If you're using a virtual environment (following ColdFront's deployment instructions should have you make and use a virtual environment), make sure you're in the virutal environment first.

pip install git+https://github.com/cecilialau6776/ruldap

Configuration

Add the following to ColdFront's local settings:

INSTALLED_APPS += ["coldfront_plugin_ru_ldap"]
MIDDLEWARE += ["django.contrib.auth.middleware.RemoteUserMiddleware"]
AUTHENTICATION_BACKENDS.remove("django.contrib.auth.backends.ModelBackend")
AUTHENTICATION_BACKENDS += [
    "coldfront_plugin_ru_ldap.backend.LDAPRemoteUserBackend",
]

If you wish to define a custom header, append coldfront_plugin_ru_ldap.middleware.CustomHeaderMiddleware to MIDDLEWARE instead and set RULDAP_CUSTOM_HEADER="HTTP_MY_CUSTOM_HEADER". This value can be spoofed. Be careful and read the warning from Django's docs.

Another availible setting is RULDAP_EXPECT_EMAIL. Setting this to True will check the header against the user's email rather than the username.

About

A ColdFront plugin to authenticate with REMOTE_USER and pull user info from LDAP

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages