diff --git a/auth/use-ldap-authentication.md b/auth/use-ldap-authentication.md new file mode 100644 index 0000000..713b22c --- /dev/null +++ b/auth/use-ldap-authentication.md @@ -0,0 +1,52 @@ +--- +layout: default +title: Use LDAP authentication +--- + +### Problem + +You want to use LDAP authentication when Node-RED users login to Node-RED editor. + +### Solution + +Install LDAP authentication module, [node-red-auth-contrib-ldap](https://www.npmjs.com/package/node-red-auth-contrib-ldap) and configure LDAP server information in settings.js. + +#### Example + +After the setup, you can use LDAP authentication when you access to Node-RED editor. +![](/images/auth/auth-login.png) + + +#### Configration + +(1) Install LDAP authentication module +``` +sudo npm install -g node-red-auth-contrib-ldap +``` + +(2) Add LDAP server information into settings.js +``` +vi ~/.node-red/settings.js +``` +Add adminAuth block in module.exports block as follows. +``` +module.exports = { +... + adminAuth: require("node-red-auth-contrib-ldap").init({ + url: "ldap://:389", + dn: "uid=%username%,ou=people,o=example,c=jp" + }), +... +} +``` + +(3) Run Node-RED +``` +node-red +``` + +### Discussion + +You can modify dn(distinguished name) which corresponds with your LDAP server. +%username% is reserved word which dn string has as user name. + diff --git a/images/auth/auth-login.png b/images/auth/auth-login.png new file mode 100755 index 0000000..ddb267f Binary files /dev/null and b/images/auth/auth-login.png differ