Virtual HSM
Home
  • Virtual HSM
  • Documentation
    • What is Virtual HSM?
    • Use Case: Attested Secret Provisioning in the Cloud
    • Setup
      • Install
      • vHSM Server Configuration
        • Parameters
        • vHSM Telemetry Parameters
      • vHSM Agent
        • Agent Configuration
      • vHSM Proxy
        • Proxy Configuration
    • Get Started
      • Start the Vault server
      • MariaDB root admin password provisioning on Azure DCXas_v5 VM
    • Supported Cloud Configurations
  • Tutorials
    • Deploying the vhsm Container on an EC2 Instance
    • CLI quickstart
    • vHSM Agent quickstart
    • vHSM Proxy quickstart
    • Passing vHSM secrets using ConfigMaps
    • Provisioning MariaDB Password on Azure DCXas_v5 VM
    • Registering a buckypaper plugin
    • Monitoring vHSM with Grafana
  • Integration with Utimaco SecurityServer
    • Integrate enclaive vHSM with Utimaco HSM
  • API
    • Auth
    • Default
    • Secrets
    • System
    • Identity
    • Models
  • vHSM CLI
    • Server and Infrastructure Management
      • vhsm server
      • vhsm proxy
      • vhsm monitor
      • vhsm status
      • vhsm agent
    • Secret Management
      • vhsm read
      • vhsm write
      • vhsm delete
      • vhsm list
      • vhsm secrets
        • vhsm secrets enable
        • vhsm secrets disable
        • vhsm secrets list
        • vhsm secrets move
        • vhsm secrets tune
      • vhsm unwrap
    • Configuration and Management
      • vhsm plugin
        • vhsm plugin info
        • vhsm plugin deregister
        • vhsm plugin list
        • vhsm plugin register
        • vhsm plugin reload
        • vhsm plugin reload-status
      • vhsm namespace
      • vhsm operator
      • vhsm print
      • vhsm path-help
      • vhsm lease
    • Auditing and Debugging
      • vhsm audit
      • vhsm debug
    • Attestation
    • Security and Encryption
      • vhsm pki
        • vhsm pki health-check
        • vhsm pki issue
        • vhsm pki list-intermediates
        • vhsm pki reissue
        • vhsm pki verify-sign
      • vhsm transit
      • vhsm ssh
      • vhsm transform
    • Authentication and Authorization
      • vhsm login
      • vhsm auth
      • vhsm token
      • vhsm policy
    • Storage and Data Mangement
      • vhsm kv
      • vhsm patch
    • vhsm version
      • vhsm version-history
  • Troubleshooting
    • CA Validity Period
    • CRL Validity Period
    • Root Certificate Issued Non-CA Leaves
    • Role Allows Implicit Localhost Issuance
    • Role Allows Glob-Based Wildcard Issuance
    • Performance Impact
    • Accessibility of Audit Information
    • Allow If-Modified-Since Requests
    • Auto-Tidy Disabled
    • Tidy Hasn't Run
    • Too Many Certificates
    • Enable ACME Issuance
    • ACME Response Headers Configuration
  • Resources
    • Community
    • GitHub
    • Youtube
    • CCx101 wiki
Powered by GitBook
On this page
  • Examples
  • Usage
  • Command Options

Was this helpful?

  1. vHSM CLI
  2. Storage and Data Mangement

vhsm patch

Learn to update data in a vHSM server at a specified path.

The vhsm patch command updates data in vHSM server at the specified path. It functions as a wrapper for HTTP PATCH, using the JSON Patch format. The data can include credentials, secrets, configuration, or arbitrary key-value pairs.

Unlike write, the patch command only modifies specified data without overwriting other existing values.

Examples

Action
Command

Update a PKI role to modify a single parameter

vhsm patch pki/roles/example allow_localhost=false

Update a PKI role using JSON input

vhsm patch pki/roles/example - < request_payload.json

API versus CLI equivalent

The following vhsm patch command:

vhsm patch pki/roles/example allow_localhost=false

Is equivalent to the following cURL command:

tee request_payload.json -<<EOF
{
   "organization": "enclaive"
}
EOF

curl --header "X-Vault-Token: $VAULT_TOKEN" \
     --request PATCH \
     --header 'Content-Type: application/merge-patch+json' \
     --data @request_payload.json \
     $VAULT_ADDR/v1/pki/roles/example

The CLI vhsm patch simplifies this API call.

Usage

vhsm patch <path> [options] [key=value] [...]
  • The command updates existing values at the given vHSM path.

  • Data can be provided as key-value pairs, from a file (@filename), or via stdin (-).

Command Options

Option
Description
Default

-field=<name>

Print only a specific field in the output

None

-format=<format>

Output format: table, json, or yaml

table

-force or -f

Allow operation with no key=value pairs (useful for paths that don't require data)

false

Previousvhsm kvNextvhsm version

Last updated 2 months ago

Was this helpful?