Skip to main content

Django LastPass SAML authenticator

Project description

This is a hacky extension to django-saml-service-provider that, instead of onelogin, uses LastPass Enterprise as an IdP.

Installation

Get it from PyPI:

pip install django-lastpass-sp

Example configuration

# Check the LastPass SAML metadata for the bits after '.../login/'
LASTPASS_CONNECTOR_ID = '1234567/abc4'

# This is the certificate given by LastPass
# or LASTPASS_CERTIFICATE if you want the cert in your conf
LASTPASS_CERTIFICATE_FILE = os.path.join(BASE_DIR, 'lastpass.crt')

# Private key, try it like this:
# openssl genrsa > samlsp.key
# or SAML_SP_KEY if you want the key in your conf
SAML_SP_KEY_FILE = os.path.join(BASE_DIR, 'samlsp.key')

# Certificate, try with self-signed:
# openssl req -new -x509 -key samlsp.key -out samlsp.crt -days 365
# or SAML_SP_CERTIFICATE if you want the key in your conf
SAML_SP_CERTIFICATE_FILE = os.path.join(BASE_DIR, 'samlsp.crt')

# Optional!
# Contact info provided in the metadata
SAML_SP_CONTACT_INFO = {
    "technical": {
        "givenName": "Admin",
        "emailAddress": "admin@example.com",
    }
}

# Optional!
# Ditto for organization info
SAML_SP_ORGANIZATION_INFO = {
    "en-US": {
        "name": "acme",
        "displayname": 'Acme Inc',
        "url": "http://example.com/",
    }
}

AUTHENTICATION_BACKENDS = (
    # This is just so you don't block yourself out
    #'django.contrib.auth.backends.ModelBackend',
    # This is the beef
    'sp.auth_backend.SAMLServiceProviderBackend',
)

# Optional
# Create new users with admin and/or staff accounts
# Both default to False
LASTPASS_CREATE_ADMIN = True
LASTPASS_CREATE_STAFF = True

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-lastpass-sp-0.1.3.tar.gz (20.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

django_lastpass_sp-0.1.3-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

django_lastpass_sp-0.1.3-py2-none-any.whl (12.5 kB view details)

Uploaded Python 2

File details

Details for the file django-lastpass-sp-0.1.3.tar.gz.

File metadata

File hashes

Hashes for django-lastpass-sp-0.1.3.tar.gz
Algorithm Hash digest
SHA256 c5db791b78289b536b8e160948c0922d2dc432b5604c9e153d3bad2e12c8b142
MD5 12b70169ce57c09e5adcd1d0cc220113
BLAKE2b-256 1e2123b93447c657467f5c0e629c527694f9222d6e79307d07c9873417115c8b

See more details on using hashes here.

File details

Details for the file django_lastpass_sp-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for django_lastpass_sp-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c8b4b819828c601ddeb625aa10d2b70ac89cafd83f75f4e3dd894791de055b2d
MD5 7d110e7bbae8c01e5bb83e355104f6ef
BLAKE2b-256 498e345579804f2529754cece9eaf4d64ab62b21e336f2d9b74e87dbc9ffe07b

See more details on using hashes here.

File details

Details for the file django_lastpass_sp-0.1.3-py2-none-any.whl.

File metadata

File hashes

Hashes for django_lastpass_sp-0.1.3-py2-none-any.whl
Algorithm Hash digest
SHA256 bbc5661472a09104fae3eb11e7fefb132ce519d5874ff52b9f30f6664de00827
MD5 600188cc83044c80b2862995f4e1fb3a
BLAKE2b-256 92d8814c859c85e30aed86b06fbc314f80d61d9ef6dc0783fbe8a732fe615daa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page