Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

waterlock-ldap-auth

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

waterlock-ldap-auth

LDAP authentication for waterlock

  • 0.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Waterlock LDAP Auth

Build Status NPM version

waterlock-ldap-auth is a module for waterlock providing a LDAP authentication method for users based on customizeable LDAP queries. It uses ldapauth-fork to faciliate LDAP authentication.

Usage

npm install waterlock-ldap-auth

set the following option in your waterlock.js config file

authMethod:[
  {
    name: "waterlock-ldap-auth",
    connection: {
      url: "ldaps://ldap.example.com:636",
      bindDn: "uid=myadminusername,ou=users,o=example.com",
      bindCredentials: "mypassword",
      searchBase: "ou=users,o=example.com",
      searchFilter: "(uid={{username}})",
      cache: true
    },
    attributes: {}
  }
]

Auth Model

LDAP auth adds the following attributes onto the Auth model:

  entryUUID: {
    type: 'string',
    unique: true
  },
  dn: {
    type: 'string',
    unique: true
  }

They map the dn and theentryUUID values of the LDAP user to the Auth model.

With the way waterlock is designed and this model you can override any of these attributes.

waterlock-ldap-auth will create a new Auth and User if LDAP authentication succeeds but no Auth/User is found.

Mapping LDAP attributes

It is possible to map attributes from the LDAP user object to the Auth model automatically. Just add objects to the attributes property:

authMethod:[
  {
    name: "waterlock-ldap-auth",
    connection: { ... },
    attributes: {
      uid: {
        uid: {
          type: 'string'
        }
      },
      cn: {
        fullname: {
          type: 'string'
        }
      },
      mail: {
        email: {
          type: 'string'
        }
      }
    }
  }
]

This example adds a mapping from LDAP to Auth model:

LDAPAuth modelType
uiduidstring
cnfullnamestring
mailemailstring

License

Waterlock LDAP Auth is licensed under the MIT license. See the LICENSE file for more details.

Keywords

FAQs

Package last updated on 17 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc