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.1.tar.gz (19.8 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.1-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

django_lastpass_sp-0.1.1-py2-none-any.whl (11.5 kB view details)

Uploaded Python 2

File details

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

File metadata

File hashes

Hashes for django-lastpass-sp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5d26aa830512c480998fe30164913775f8bc676d08be81f0bf5c07282b71d037
MD5 8e470da60f1ade8a4b0d8fe2b110aedc
BLAKE2b-256 dc54d5c66296f749f9ae4faf438ba29a35c2de5b42ac6fc5f4c9fc3ccbfdba8e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_lastpass_sp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 90bb795e7bcf703a959f1170e5c784d0e9522ef2382d670b458d1efa67c010b3
MD5 2486dc3b18be03684c4eee4b528718a6
BLAKE2b-256 65e7c022186eebd0ad5b36a2f3418d8bb6f8eb9e45481ec23ad8a480b6790e57

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_lastpass_sp-0.1.1-py2-none-any.whl
Algorithm Hash digest
SHA256 6cbc23d276a3b8e92b41597ed867860cb2962dc2f1efba3db7724545e2588e8a
MD5 cf4a7bcb8bdb9a8d67c28c8ceb3d7adc
BLAKE2b-256 378d43d781df29b0d24809ac634dd4c8f22d68d1cb122c5816ce5b7f10d3f43a

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