-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- chore(es6): use nullish operator, arrow fns - dep(async): removed dependency - dep(ldapjs): bump version from 1.0.2 to 2.3.3 - test: add an authentication test
- Loading branch information
Showing
17 changed files
with
444 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,8 @@ on: | |
push: | ||
branches: | ||
- master | ||
paths: | ||
- package.json | ||
|
||
env: | ||
CI: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[core] | ||
server=ldaps://127.0.0.1:3636 | ||
timeout=5000 | ||
rejectUnauthorized=false | ||
|
||
[dns] | ||
dn1=uid=%u,ou=users,dc=example,dc=com | ||
dn2=uid=%u,ou=people,dc=example,dc=com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
-----BEGIN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YkXOYm49QHl8Y0XtWtvXNrYiyr | ||
mnbW5iyOhxkggxfD8gxWQW+l9rZFlfCHAkGZw2M8lw5iV2uiXZKiWtuB1aN7i2AH | ||
YTYP7hqb4MOUd9lpJ93irHw2KbejY6rIxIZVyjN4Y4IUGF67fj1RPcDgRIy55c28 | ||
grSmnCLrYSYRsA5jeEB6PAknx3OuLtYj8WvZPe4KiP77r+YIN9nBywF9sVdd | ||
-----END CERTIFICATE----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
-----BEGIN PRIVATE KEY----- | ||
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC8hWmnizuif/qp | ||
PtfX/+Kcb1C17sakGkYwASmUJZotvmT+BeHPwAfOasjP9AXWtQnJv5R+C//hTCdh | ||
CrMo66OtplSZoMbWGQHSgL3J7i+QUfYQikpwcYXm7bsmWKtQ39eUQ+wHh9H0G0+Y | ||
uNcXELRWoN3DK+Kjd9EyeEGLDJP297XtAfCnR9E/s5dyDCijMhSx0Thg/lqRGRK+ | ||
29n10cxO5Gxisep24FWMaLJlhpMpbvKC/c1yC1nxftOt/2l5UTMklNzvixP5QwhU | ||
NH4nTU+/PRfq1QjpJCX89li7Ln0Rx6hgvIdGbLgkOptAliUyZ4CazBnvuZ8j9OY0 | ||
01rsKJopAgMBAAECggEANJ44Ix9lgbGe0OZNcGhnY6peKKmAoAUFWhi49jSYl/Pw | ||
VEZoBIhgpWiArCo8BvV4yerDE3td7BBJXXiTEPTUNn+aVVbeqJtKOurcDiSA+hMm | ||
Tu+KX2AQM6he+BD/oA8aKLPciS2LmEqXKNVOk42CCDvWKcdx9pZWuXN/N8RG+EMn | ||
us8hOtEJjtJNUKwmD/HTIBDgkklIHBo+q/T8yrtKOkoKhX3jPDjDYPADLf86djCw | ||
0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This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh | ||
|
||
if ! dpkg -l | grep -q slapd; then | ||
sudo apt install --no-install-recommends -y gcc gettext make g++ apparmor-utils slapd ldap-utils ldapscripts | ||
sudo service slapd stop | ||
sudo systemctl disable slapd.service | ||
fi | ||
|
||
sudo killall slapd | ||
sudo aa-complain /usr/sbin/slapd | ||
|
||
if [ ! -d "/tmp/slapd" ]; then sudo mkdir /tmp/slapd; fi | ||
sudo rm -rf /tmp/slapd/* /var/lib/ldap/* | ||
|
||
sudo slapd -f test/fixtures/linux/slapd.conf -h "ldap://localhost:3389 ldaps://localhost:3636" | ||
sleep 2 | ||
ldapadd -x -D "cn=admin,dc=example,dc=com" -w "rAR84,NZ=F" -H ldap://localhost:3389 -f test/fixtures/testdata.ldif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
include /etc/ldap/schema/core.schema | ||
include /etc/ldap/schema/cosine.schema | ||
include /etc/ldap/schema/misc.schema | ||
include /etc/ldap/schema/inetorgperson.schema | ||
# include /etc/ldap/schema/nis.schema | ||
|
||
pidfile /var/run/slapd/slapd.pid | ||
|
||
modulepath /usr/lib/ldap | ||
|
||
database ldif | ||
directory /tmp/slapd | ||
|
||
suffix "dc=example,dc=com" | ||
rootdn "cn=admin,dc=example,dc=com" | ||
rootpw {SSHA}2Gl8VBvuOxkhcrVCRNzDcCG9ecJHg0gl | ||
|
||
TLSCertificateFile test/config/slapdcert.pem | ||
TLSCertificateKeyFile test/config/slapdkey.pem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
|
||
dn: cn=config | ||
objectClass: olcGlobal | ||
cn: config | ||
|
||
dn: cn=module,cn=config | ||
objectClass: olcModuleList | ||
cn: module | ||
olcModulepath: /usr/lib/ldap | ||
olcModuleload: back_mdb.la | ||
|
||
dn: cn=schema,cn=config | ||
objectClass: olcSchemaConfig | ||
cn: schema | ||
|
||
include: file:///etc/ldap/schema/core.ldif | ||
|
||
dn: olcDatabase=frontend,cn=config | ||
objectClass: olcDatabaseConfig | ||
objectClass: olcFrontendConfig | ||
olcDatabase: frontend | ||
|
||
dn: olcDatabase=mdb,cn=config | ||
objectClass: olcDatabaseConfig | ||
objectClass: olcMdbConfig | ||
olcDatabase: mdb | ||
OlcDbMaxSize: 1073741824 | ||
olcSuffix: dc=example,dc=com | ||
olcRootDN: cn=Manager,dc=example,dc=com | ||
olcRootPW: rAR84,NZ=F | ||
olcDbDirectory: /var/tmp/slapd | ||
olcDbIndex: objectClass eq | ||
|
||
dn: olcDatabase=monitor,cn=config | ||
objectClass: olcDatabaseConfig | ||
olcDatabase: monitor | ||
olcRootDN: cn=config | ||
olcMonitoring: FALSE | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
|
||
/usr/bin/sed -i -e '/^server/ s/:389/:3389/' -e 's/^server.*:636$/:3636/' config/ldap.ini | ||
if [ ! -d "/var/tmp/slapd" ]; then mkdir /var/tmp/slapd; fi | ||
rm -r /var/tmp/slapd/* || exit | ||
|
||
/opt/local/sbin/slapadd -n 0 -F /var/tmp/slapd -l test/fixtures/macosx/slapd.ldif || exit | ||
|
||
/opt/local/libexec/slapd -f test/fixtures/macosx/slapd.conf -h "ldap://localhost:3389 ldaps://localhost:3636" & | ||
sleep 3 | ||
|
||
/opt/local/bin/ldapadd -x -D "cn=admin,dc=example,dc=com" -w "rAR84,NZ=F" -H ldap://localhost:3389 -f test/fixtures/testdata.ldif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
include /opt/local/etc/openldap/schema/core.schema | ||
include /opt/local/etc/openldap/schema/cosine.schema | ||
include /opt/local/etc/openldap/schema/misc.schema | ||
include /opt/local/etc/openldap/schema/inetorgperson.schema | ||
|
||
pidfile /var/run/slapd/slapd.pid | ||
|
||
#modulepath /usr/lib/openldap | ||
|
||
database ldif | ||
directory /var/tmp/slapd | ||
|
||
suffix "dc=example,dc=com" | ||
rootdn "cn=admin,dc=example,dc=com" | ||
rootpw {SSHA}bPf32h0ItVUKLlVzsR6od+Ub5GDZRBIr | ||
|
||
TLSCertificateFile test/config/slapdcert.pem | ||
TLSCertificateKeyFile test/config/slapdkey.pem |
Oops, something went wrong.