npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-hashicorp-vault

v1.0.0

Published

N8N node for HashiCorp Vault integration with AppRole authentication

Readme

HashiCorp Vault N8N Node

n8n.io - Workflow Automation

A community node for N8N that provides integration with HashiCorp Vault, supporting both AppRole and Token authentication methods.

Features

  • AppRole Authentication - Secure authentication using Role ID and Secret ID
  • Token Authentication - Direct token-based authentication
  • KV Secrets Engine Support - Works with both v1 and v2 KV engines
  • Multiple Operations - Read, Write, Delete, and List secrets
  • Namespace Support - Enterprise namespace support
  • SSL Configuration - Custom SSL certificate support
  • Error Handling - Comprehensive error handling and validation

Installation

Community Nodes Installation

  1. Go to your N8N instance
  2. Navigate to SettingsCommunity Nodes
  3. Click Install a community node
  4. Enter: n8n-nodes-hashicorp-vault
  5. Click Install

Manual Installation

# In your n8n installation directory
npm install n8n-nodes-hashicorp-vault

Docker Installation

If you're using N8N with Docker, you can install the node by building a custom image:

FROM n8nio/n8n
RUN npm install -g n8n-nodes-hashicorp-vault

Configuration

1. Create HashiCorp Vault Credentials

  1. In N8N, go to CredentialsCreate New
  2. Search for "HashiCorp Vault API"
  3. Configure the following:

Basic Settings

  • Vault URL: Your Vault instance URL (e.g., https://vault.example.com:8200)
  • Authentication Method: Choose between AppRole or Token

AppRole Authentication

  • Role ID: Your AppRole Role ID
  • Secret ID: Your AppRole Secret ID

Token Authentication

  • Token: Your Vault token

Optional Settings

  • Namespace: Vault namespace (Enterprise feature)
  • API Version: Choose between v1 or v2 (default: v2)
  • Ignore SSL Issues: Enable for self-signed certificates

2. HashiCorp Vault Setup

AppRole Setup Example

# Enable AppRole auth method
vault auth enable approle

# Create a policy
vault policy write myapp-policy - <<EOF
path "secret/data/myapp/*" {
  capabilities = ["create", "read", "update", "delete", "list"]
}
EOF

# Create an AppRole
vault write auth/approle/role/n8n-role \
    token_policies="myapp-policy" \
    token_ttl=1h \
    token_max_ttl=4h

# Get Role ID
vault read auth/approle/role/n8n-role/role-id

# Generate Secret ID
vault write -f auth/approle/role/n8n-role/secret-id

Usage

Available Operations

1. Read Secret

Retrieve a secret from Vault.

Parameters:

  • Secret Engine: Name of the secrets engine (e.g., secret)
  • Secret Path: Path to the secret (e.g., myapp/database)
  • Version: Specific version to read (0 for latest, KV v2 only)

Example Output:

{
  "data": {
    "username": "admin",
    "password": "secret123"
  },
  "metadata": {
    "version": 1,
    "created_time": "2023-01-01T00:00:00Z"
  }
}

2. Write Secret

Store a secret in Vault.

Parameters:

  • Secret Engine: Name of the secrets engine
  • Secret Path: Path where to store the secret
  • Secret Data: JSON object containing the secret data

Example Secret Data:

{
  "username": "admin",
  "password": "secret123",
  "url": "https://database.example.com"
}

3. Delete Secret

Delete a secret from Vault.

Parameters:

  • Secret Engine: Name of the secrets engine
  • Secret Path: Path to the secret to delete

4. List Secrets

List all secrets at a given path.

Parameters:

  • Secret Engine: Name of the secrets engine
  • List Path: Path to list secrets from

Example Workflows

Example 1: Read Database Credentials

{
  "nodes": [
    {
      "name": "Get DB Credentials",
      "type": "n8n-nodes-hashicorp-vault.hashiCorpVault",
      "parameters": {
        "operation": "readSecret",
        "secretEngine": "secret",
        "secretPath": "myapp/database"
      },
      "credentials": {
        "hashiCorpVaultApi": "vault-credentials"
      }
    }
  ]
}

Example 2: Store API Key

{
  "nodes": [
    {
      "name": "Store API Key",
      "type": "n8n-nodes-hashicorp-vault.hashiCorpVault",
      "parameters": {
        "operation": "writeSecret",
        "secretEngine": "secret",
        "secretPath": "myapp/api-keys",
        "secretData": "{\"api_key\": \"sk-1234567890\", \"environment\": \"production\"}"
      },
      "credentials": {
        "hashiCorpVaultApi": "vault-credentials"
      }
    }
  ]
}

Development

Prerequisites

  • Node.js 18+
  • pnpm 9+
  • N8N development environment

Setup

# Clone the repository
git clone https://github.com/imitruk/hashicorp_n8n_node.git
cd hashicorp_n8n_node

# Install dependencies
pnpm install

# Build the project
pnpm run build

# Link for local development
npm link

# In your n8n directory
npm link n8n-nodes-hashicorp-vault

Scripts

  • pnpm run build - Build the project
  • pnpm run dev - Build in watch mode
  • pnpm run lint - Run ESLint
  • pnpm run lintfix - Fix ESLint issues
  • pnpm run format - Format code with Prettier

Publishing

Automated Publishing (GitHub Actions)

The project includes GitHub Actions for automated publishing:

  1. On Release: Automatically publishes when a new GitHub release is created
  2. Manual Trigger: Use the "Publish to npm" workflow with custom version

Manual Publishing

Use the included script for manual publishing:

./scripts/publish-manual.sh

This script will:

  • Check environment setup
  • Allow version bumping
  • Run linting and formatting
  • Build the project
  • Publish to npm
  • Provide next steps for GitHub release

Publishing Checklist

  1. Update version in package.json
  2. Run tests and linting
  3. Build the project
  4. Publish to npm
  5. Create GitHub release
  6. Update documentation

Troubleshooting

Common Issues

SSL Certificate Issues

If you're using self-signed certificates, enable "Ignore SSL Issues" in the credentials.

AppRole Authentication Fails

  • Verify Role ID and Secret ID are correct
  • Check that the AppRole has necessary policies
  • Ensure the Secret ID hasn't expired

Connection Timeouts

  • Check Vault URL is accessible from N8N
  • Verify network connectivity
  • Increase timeout in Additional Fields

Permission Denied

  • Verify the token/AppRole has necessary permissions
  • Check Vault policies
  • Ensure the secret path exists

Debug Mode

Enable debug logging in N8N to see detailed request/response information:

export N8N_LOG_LEVEL=debug

Security Considerations

  1. Credential Storage: N8N encrypts stored credentials
  2. Network Security: Use HTTPS for Vault communication
  3. Token Lifecycle: Regularly rotate AppRole Secret IDs
  4. Least Privilege: Grant minimal necessary permissions
  5. Audit Logging: Enable Vault audit logging

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Run linting and formatting
  6. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

Changelog

v1.0.0

  • Initial release
  • AppRole and Token authentication support
  • KV v1 and v2 support
  • Read, Write, Delete, List operations
  • Namespace support
  • SSL certificate support