HashiCorp Vault

Create an integration to manage access to a HashiCorp Vault instance

HashiCorp Vault is a secrets management solution that provides secure storage, dynamic credentials, and cryptographic key management for your applications and infrastructure.

Through this integration, Apono helps you discover Vault secrets and keys, and securely manage just-in-time (JIT) access to them:

  • Securely broker access to secrets through access flows

  • Ensure sensitive information is only accessible to authorized users when it’s needed

  • Prevent exposure of static credentials or reliance on manual sharing

This integration has the following limitations:

  • If you request permissions for a specific key or secret, other items may still appear in the Vault UI but without granted permissions.

  • Only 10,000 secrets and keys are supported.


Prerequisites

Item
Description

Apono connector

On-prem connection serving as a bridge between a HashiCorp instance and Apono:

HashiCorp Vault admin privileges

Admin access on Vault OSS, running in Kubernetes or a virtual machine

Vault CLI

Command-line interface used to interact with and manage HashiCorp Vault

Vault address

Production URL address of your Vault server


Set up Apono in HashiCorp Vault

Follow these steps to set up Apono access in HashiCorp Vault:

  1. At the shell prompt, enable the AppRole and userpass authentication methods.

Apono uses AppRole for its own service access and userpass for just-in-time user accounts.

vault auth enable approle
vault auth enable userpass
  1. Enable the KV v2 and Transit secrets engines.

The KV v2 secrets engine allows Apono to manage stored secrets. The Transit secrets engine lets Apono list and manage cryptographic keys.

vault secrets enable -path=kv kv-v2
vault secrets enable -path=transit transit
  1. Create a management policy for Apono.

This policy allows the Apono plugin to create users, attach policies, and list secrets.

vault policy write apono-management - <<EOF
# Basic system privileges
path "sys/health"             { capabilities = ["read"] }
path "sys/mounts"             { capabilities = ["read"] }
path "sys/capabilities-self"  { capabilities = ["update"] }

# Manage user creation
path "auth/userpass/users"       { capabilities = ["list"] }
path "auth/userpass/users/*"     { capabilities = ["create","update","read","delete"] }

# ACL-policies apono-* management
path "sys/policies/acl/apono-*"  { capabilities = ["create","update","read","delete","list"] }

# KV v2 (for listing resources)
path "kv/metadata/*"             { capabilities = ["read","list"] }

# Transit (for listing resources)
path "transit/keys"              { capabilities = ["list"] }
EOF
  1. Create an AppRole that allows the Apono plugin to log in.

vault write auth/approle/role/apono-plugin \
  token_policies="apono-management" \
  token_ttl=60m \
  token_max_ttl=4h
  1. Fetch and save the role_id value.

vault read auth/approle/role/apono-plugin/role-id
  1. Fetch and save the secret_id value.

vault write -f auth/approle/role/apono-plugin/secret-id
  1. Create a secret with the credentials from steps 5-6. Use the following key-value pair structure when generating the secret. Be sure to replace #ROLE_ID and #SECRET_ID with the actual values.

"role_id":"#ROLE_ID",
"secret_id":"#SECRET_ID"

You can now integrate Hashicorp Vault.


Integrate HashiCorp Vault

HashiCorp Vault tile

Follow these steps to complete the integration:

  1. On the Catalog tab, click HashiCorp Vault. The Connect Integration page appears.

  2. Under Discovery, click one or more resource types to sync with Apono.

Apono automatically discovers and syncs all the instances in the environment. After syncing, you can manage Access Flows to these resources.

  1. Click Next. The Apono connector section expands.

  2. From the dropdown menu, select a connector. Choosing a connector links Apono to all the services available on the account where the connector is located.

If the desired connector is not listed, click + Add new connector and follow the instructions for creating a connector (AWS, Azure, GCP, Kubernetes).

  1. Click Next. The Integration Config page expands.

  2. Define the Integration Config settings.

    Setting
    Description

    Integration Name

    Unique, alphanumeric, user-friendly name used to identify this integration when constructing an access flow

    Vault URL

    Production URL address of your Vault server

    Example: https://vault.company-name.com

  3. Click Next. The Secret Store section expands.

If you select the Apono secret manager, enter the following values:

  1. Click Next. The Get more with Apono section expands.

  2. Define the Get more with Apono settings.

Setting
Description

Custom Access Details

(Optional) Instructions explaining how to access this integration's resources Upon accessing an integration, a message with these instructions will be displayed to end users in the User Portal. The message may include up to 400 characters. To view the message as it appears to end users, click Preview.

Integration Owner

(Optional) Fallback approver if no resource owner is found Follow these steps to define one or several integration owners:

  1. From the Attribute dropdown menu, select User or Group under the relevant identity provider (IdP) platform.

  2. From the Value dropdown menu, select one or multiple users or groups.

NOTE: When Resource Owner is defined, an Integration Owner must be defined.

Resource Owner

(Optional) Group or role responsible for managing access approvals or rejections for the resource Follow these steps to define one or several resource owners:

  1. Enter a Key name. This value is the name of the tag created in your cloud environment.

  2. From the Attribute dropdown menu, select an attribute under the IdP platform to which the key name is associated. Apono will use the value associated with the key (tag) to identify the resource owner. When you update the membership of the group or role in your IdP platform, this change is also reflected in Apono.

NOTE: When this setting is defined, an Integration Owner must also be defined.

  1. Click Confirm.

💡Are you integrating with Apono using Terraform?

If you want to integrate with Apono using Terraform, follow these steps instead of clicking Confirm:

  1. At the top of the screen, click View as Code. A modal appears with the completed Terraform configuration code.

  2. Click to copy the code.

  3. Make any additional edits.

  4. Deploy the code in your Terraform.

Refer to Integration Config Metadata for more details about the schema definition.

Now that you have completed this integration, you can create access flows that grant permission to your HashiCorp Vault secrets and keys.

Last updated

Was this helpful?