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

verdaccio-ldap-group-fix

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

verdaccio-ldap-group-fix - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

.jshintrc

30

index.js

@@ -40,4 +40,5 @@ const Promise = require('bluebird');

ldapUser.cn,
...ldapUser._groups ? ldapUser._groups.map((group) => group.cn) : [],
...ldapUser.memberOf ? ldapUser.memberOf.map((groupDn) => rfc2253.parse(groupDn).get('CN')) : [],
// _groups or memberOf could be single els or arrays.
...ldapUser._groups ? [].concat(ldapUser._groups).map((group) => group.cn) : [],
...ldapUser.memberOf ? [].concat(ldapUser.memberOf).map((groupDn) => rfc2253.parse(groupDn).get('CN')) : [],
];

@@ -57,8 +58,25 @@ })

.catch((err) => {
// 'No such user' is reported via error
this._logger.warn({
err: err
}, 'LDAP error on close @{err}');
user: user,
err: err,
}, `LDAP error ${err}`);
return false; // indicates failure
})
})
.asCallback(callback);
.finally((ldapUser) => {
/*
* LdapClient.closeAsync doesn't work with node 10.x
*
* return LdapClient.closeAsync()
* .catch((err) => {
* this._logger.warn({
* err: err
* }, 'LDAP error on close @{err}');
* });
*/
LdapClient.close();
return ldapUser;
})
.asCallback(callback);
};

16

package.json
{
"name": "verdaccio-ldap-group-fix",
"version": "2.1.0",
"description": "LDAP auth plugin for verdaccio with fix for groups",
"version": "2.1.1",
"description": "LDAP auth plugin for verdaccio",
"author": "Alexandre L.",

@@ -11,14 +11,16 @@ "repository": {

"dependencies": {
"bluebird": "^3.5.1",
"bluebird": "~3.5.1",
"ldapauth-fork": "~4.0.2",
"rfc2253": "^0.1.1"
"rfc2253": "~0.1.1"
},
"devDependencies": {
"bunyan": "^1.8.12",
"bunyan": "~1.8.12",
"chai": "~4.1.2",
"jshint": "~2.9.5",
"mocha": "~4.1.0"
"ldap-server-mock": "~1.0.0",
"mocha": "~5.2.0"
},
"scripts": {
"pretest": "./node_modules/jshint/bin/jshint index.js",
"test": "echo 'todo'"
"test": "mocha --exit tests/bootstrap.spec.js tests/**/*.spec.js"
},

@@ -25,0 +27,0 @@ "keywords": [

@@ -31,3 +31,6 @@ # verdaccio-ldap [![Build Status](https://travis-ci.org/Alexandre-io/verdaccio-ldap.svg?branch=master)](https://travis-ci.org/Alexandre-io/verdaccio-ldap) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/b15683d154d44347bccc4360d48436a7)](https://www.codacy.com/app/alexandre_io/verdaccio-ldap?utm_source=github.com&utm_medium=referral&utm_content=Alexandre-io/verdaccio-ldap&utm_campaign=Badge_Grade) [![Greenkeeper badge](https://badges.greenkeeper.io/Alexandre-io/verdaccio-ldap.svg)](https://greenkeeper.io/)

groupSearchBase: 'ou=groups,dc=myorg,dc=com',
groupSearchFilter: '(memberUid={{dn}})',
# If you have memberOf support on your ldap
searchAttributes: ['*', 'memberOf']
# Else, if you don't (use one or the other):
# groupSearchFilter: '(memberUid={{dn}})'
# Optional

@@ -34,0 +37,0 @@ cache: False

Sorry, the diff of this file is not supported yet

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