Node-RED plugin for authenticating users with Keycloak.
This modules lets you restrict access to the Node-RED editor to specific Keycloak users.
Note: this requires Node-RED 0.17 or later
In your Node-RED user directory, typically ~/.node-red
:
$ npm install node-red/node-red-auth-keycloaksteve
To enable access control with Keycloak, you must first register a new client.
Once created, you will be provided a Client ID and Client Secret that you will need to use to configure the authentication plugin.
Access control for the Node-RED editor is configured in your settings.js
file
using the adminAuth
property.
adminAuth: require('node-red-auth-keycloaksteve')({
clientID: KEYCLOAK_CLIENT_ID,
clientSecret: KEYCLOAK_CLIENT_SECRET,
baseURL: "http://localhost:1880/",
users: [
{ username: "[email protected]",permissions: ["*"]}
]
})
The baseURL
property is the URL used to access the Node-RED editor.
The users
property is the list of GitHub users who are allowed to access the
editor. It is the same as used by adminAuth
as described in the security documentation, but without the password
property.
A default user can be specified by adding a default
property to the options object:
users: [
...
],
default: {
permissions: "read"
}
Copyright JS Foundation and other contributors, http://js.foundation under the Apache 2.0 license.