
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@cappern/node-red-ldap
Advanced tools
Another LDAP node for Node-RED built on top of ldapts
. It provides:
cappern-ldap-config
to define server connection (host, port, protocol, TLS options, base DN, and credentials)cappern-ldap
to perform LDAP searches with optional message-based overridesFrom your Node-RED user directory (usually ~/.node-red
):
npm install @cappern/node-red-ldap
Restart Node-RED and look for the nodes under the Function category.
cappern-ldap-config: Shared connection configuration
ldap
and 636 for ldaps
ldap
or ldaps
ldaps
, disables certificate verification (insecure)ldaps
cappern-ldap: Perform LDAP search
base|one|sub
), Attributes (comma separated)msg.payload
as an array of entry objectsmsg.error = { name, code, message }
and sets node statusThe cappern-ldap
node accepts the following fields from the incoming message to override the node/config:
(objectClass=*)
)base
, one
, or sub
(defaults to sub
)When attributes
is empty, the server default attribute set is returned.
Find a user by uid under the node’s Base DN:
{
"filter": "(uid=alice)"
}
Return specific attributes only under a specific OU:
{
"base": "ou=people,dc=example,dc=com",
"filter": "(objectClass=person)",
"attributes": ["cn", "mail", "sn"]
}
Search one level below an OU:
{
"base": "ou=people,dc=example,dc=com",
"filter": "(cn=Alice*)",
"scope": "one"
}
Bind as end-user for this search only:
{
"bindDN": "uid=alice,ou=people,dc=example,dc=com",
"bindCredentials": "user-password",
"base": "dc=example,dc=com",
"filter": "(uid=alice)"
}
On error, the node sets a red status with a concise message (e.g. invalid credentials
, base DN not found
, timeout
, connection error
) and attaches details to msg.error
:
{
"error": { "name": "InvalidCredentialsError", "code": 49, "message": "Invalid credentials" }
}
You can branch on msg.error
using a Switch node.
This repo includes a Mocha test suite using the official Node-RED node test helper. The LDAP client is mocked so tests do not require a live directory server.
node-red-node-test-helper
with embedded Node-RED runtimetest/ldap.spec.js
Install dev dependencies and run tests:
npm install
npm test
What’s covered:
msg.payload
There is an opt-in integration test that connects to a real LDAPS server. It is skipped by default and only runs when LDAP_LIVE=1
is set and connection details are provided.
Env vars:
LDAP_LIVE=1
— enable the live testLDAP_URL=ldaps://host:636
— or provide LDAP_HOST
, LDAP_PORT
, LDAP_PROTOCOL
LDAP_BASE=dc=example,dc=com
— base DN to searchLDAP_BIND_DN
and LDAP_BIND_PW
— optional bind credentialsLDAP_FILTER
— optional search filter (defaults to (objectClass=*)
)LDAP_TLS_INSECURE=1
— optional, disable TLS verification (insecure)LDAP_CA_PATH=/path/to/ca.pem
or LDAP_CA_PEM="...PEM..."
— optional CA bundleRun just the live test:
LDAP_LIVE=1 LDAP_URL=ldaps://ldap.example.com:636 LDAP_BASE=dc=example,dc=com \
LDAP_BIND_DN="cn=admin,dc=example,dc=com" LDAP_BIND_PW="secret" \
npm test -- --grep "live ldaps"
AGPL-3.0-or-later (see LICENSE
)
FAQs
Another ldap node for node-red
We found that @cappern/node-red-ldap demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.