/security-tooling-skills:vault-operations-and-pki-engine-configurationfrom security-tooling-skills
Guides operating a HashiCorp Vault cluster: initialization, unsealing (Shamir or auto-unseal), PKI engine configuration for internal certificate issuance, and HA/DR cluster topology.
Ships in security-tooling-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
HashiCorp Vault is itself a piece of critical infrastructure that has to be initialized, kept unsealed, made highly available, and operated with its own upgrade and disaster-recovery discipline — separate from the question of how applications consume secrets from it, which is covered in secrets-management and, for the Kubernetes-native sync pattern, in sealed-secrets-and-external-secrets-operator. This skill covers running Vault as the platform team operating it: initialization and the seal/unseal lifecycle (Shamir key shares versus auto-unseal against a cloud KMS or HSM), configuring the PKI secrets engine to stand up an internal certificate authority hierarchy and issue short-lived leaf certificates for internal mTLS, and designing HA/DR topology with Raft integrated storage and cross-cluster replication. Getting this operational layer wrong doesn't just cause an outage for one team's secret lookups — since Vault is frequently the root of trust for both secrets and internal PKI, a mishandled unseal key, an un-replicated cluster, or a compromised root CA can cascade across every system that depends on it.
pki secrets engine's modern multi-issuer support (Vault ≥ 1.11),
not the older single-CA-per-mount model.vault CLI matching the server version, and network/firewall access
to the cluster's API port (default 8200) and cluster port (8201).Initialize the cluster once, capturing the recovery/unseal material immediately and securely:
vault operator init -key-shares=5 -key-threshold=3
This returns 5 Shamir key shares (any 3 reconstruct the master key)
and an initial root token. Distribute each share to a different
named individual immediately — never store all shares together, and
never leave them only in the terminal scrollback of the machine that
ran init.
Prefer auto-unseal over Shamir shares for any production cluster — a cloud KMS or HSM unseals Vault automatically on restart without requiring key-holders to be paged and to type in shares manually:
# vault config: auto-unseal via AWS KMS
seal "awskms" {
region = "us-east-1"
kms_key_id = "<KMS_KEY_ID>"
}
With auto-unseal configured, vault operator init still returns
recovery keys (used for vault operator generate-root and
emergency operations) rather than Shamir unseal shares — these still
need the same careful, distributed storage discipline as Shamir
shares would.
If using Shamir (no auto-unseal), unseal each server after every restart with the threshold number of distinct key-holders each supplying their share:
vault operator unseal <key-share-1>
vault operator unseal <key-share-2>
vault operator unseal <key-share-3>
Every server in the cluster must be individually unsealed after a restart under Shamir — this operational burden, multiplied across every node and every restart, is the main practical reason to prefer auto-unseal in production.
Verify cluster health and Raft peer status after any restart or topology change:
vault operator raft list-peers
vault status
Confirm the expected number of voters is present and one node holds
leader status before considering a restart/failover complete.
Enable and configure a root CA, ideally offline/rarely-used, with a long validity, and an intermediate CA that actually signs leaf certificates day to day — never issue leaf certificates directly from the root:
vault secrets enable -path=pki_root pki
vault secrets tune -max-lease-ttl=87600h pki_root # 10 years
vault write -field=certificate pki_root/root/generate/internal \
common_name="Example Internal Root CA" \
ttl=87600h > root_ca.crt
Generate an intermediate CA and get it signed by the root:
vault secrets enable -path=pki_int pki
vault secrets tune -max-lease-ttl=43800h pki_int # 5 years
vault write -field=csr pki_int/intermediate/generate/internal \
common_name="Example Internal Intermediate CA" > pki_intermediate.csr
vault write -field=certificate pki_root/root/sign-intermediate \
csr=@pki_intermediate.csr format=pem_bundle ttl=43800h \
> intermediate.cert.pem
vault write pki_int/intermediate/set-signed \
[email protected]
Define a role constraining what a given application can request — allowed domains, max leaf TTL, key type — rather than a role that can issue a certificate for any name:
vault write pki_int/roles/payments-svc \
allowed_domains="payments.svc.internal" \
allow_subdomains=true \
max_ttl="72h" \
key_type="rsa" key_bits=2048
Short max TTLs (hours to a few days, not months) are the point of running an internal PKI engine — a leaf cert that expires in 72 hours and is re-issued automatically by the workload has a small blast radius if ever exfiltrated, unlike a long-lived cert that would need explicit revocation.
Issue a leaf certificate, either via direct API call from a workload's Vault-authenticated identity, or via the Vault Agent / the PKI issuance pattern most Vault client libraries support:
vault write pki_int/issue/payments-svc \
common_name="payments.svc.internal" ttl="24h"
Automate renewal (a sidecar or Vault Agent template re-requesting before the short TTL expires) rather than treating internal PKI issuance as a one-time manual step — this only works operationally at scale with automation, which is the focus of certificate-lifecycle-management-at-scale.
Configure CRL/OCSP distribution so revocation is actually enforceable, not just theoretically possible:
vault write pki_int/config/urls \
issuing_certificates="https://vault.example.internal:8200/v1/pki_int/ca" \
crl_distribution_points="https://vault.example.internal:8200/v1/pki_int/crl"
Run Raft integrated storage across an odd number of voter nodes (3 or 5) spread across separate availability zones:
storage "raft" {
path = "/vault/data"
node_id = "vault-1"
}
cluster_addr = "https://vault-1.internal:8201"
api_addr = "https://vault-1.internal:8200"
A 2-node or single-node "HA" setup provides no real quorum tolerance — a single node failure either has no failover (1 node) or creates a split-brain risk (2 nodes, no majority possible).
Take regular Raft snapshots as the backup mechanism, independent of any replication setup:
vault operator raft snapshot save vault-snapshot-$(date +%Y%m%d).snap
Store snapshots in a separate, access-controlled location (not on the same storage volume as the live cluster) and test restoring from one periodically — an untested backup is not a real recovery plan.
For cross-region/cross-environment DR, use Vault Enterprise's DR Replication (a passive, promotable secondary cluster) rather than relying on Raft snapshots alone for a full-region-loss scenario — snapshots give point-in-time recovery; DR replication gives a warm-standby cluster that can be promoted with minimal data loss. Performance Replication (also Enterprise) is a separate feature for reducing latency to geographically distributed clients, not a substitute for DR replication's failover purpose.
allowed_domains, max_ttl, key
constraints) per application/service, not one broad role usable to
request a certificate for any name.Symptom: A Vault cluster restarts (node reboot, upgrade, incident)
and comes back up sealed, and no on-call runbook exists for who
holds the unseal shares.
Fix: This is the exact failure mode auto-unseal exists to
eliminate — migrate to cloud KMS/HSM-based auto-unseal for production
clusters. If Shamir must be retained (e.g. a hard compliance
requirement against auto-unseal), maintain a tested, on-call-visible
runbook naming which individuals hold shares and how to reach them
under incident pressure.
Symptom: A "highly available" Vault cluster is actually 2 nodes, and a single node failure leaves the surviving node unable to reach Raft quorum, taking the whole cluster down. Fix: Run 3 or 5 voter nodes, never an even number — Raft quorum requires a strict majority, and a 2-node cluster has no way to achieve one if either node is unreachable.
Symptom: Leaf certificates are issued from the PKI engine with a 90-day or longer TTL "to reduce operational overhead," defeating much of the point of running an internal CA over just using long-lived static certificates. Fix: Set short max TTLs (hours to a few days) at the role level and invest in renewal automation (Vault Agent templating, a sidecar, or application-level renewal logic) instead — the operational cost of automating short-lived renewal is paid once; the security benefit compounds on every subsequent issuance.
Symptom: A root CA's private key is routinely used to sign leaf certificates directly because setting up an intermediate "felt like extra steps," and a compromised application role now has a path back toward root-level trust. Fix: Always interpose an intermediate CA; keep the root accessible only for the rare intermediate-signing or rotation operation, ideally requiring a distinct, more tightly controlled access path than day-to-day PKI operations use.
Symptom: Vault snapshots are taken but have never been restored in a drill, and during an actual incident the restore procedure turns out to be broken (wrong storage path, missing unseal material for the restored cluster). Fix: Schedule periodic restore drills against a non-production cluster as a standing operational practice — an untested backup procedure carries the same risk as no backup at all, just with false confidence attached.
Scenario: Stand up a new production Vault cluster on Raft integrated
storage with AWS KMS auto-unseal, then configure a two-tier internal PKI
hierarchy issuing short-lived mTLS certificates for a payments-svc
workload.
Server config (vault-1.internal, repeated per node with a unique
node_id):
storage "raft" {
path = "/vault/data"
node_id = "vault-1"
}
listener "tcp" {
address = "0.0.0.0:8200"
tls_cert_file = "/etc/vault/tls/vault.crt"
tls_key_file = "/etc/vault/tls/vault.key"
}
seal "awskms" {
region = "us-east-1"
kms_key_id = "<KMS_KEY_ID>"
}
cluster_addr = "https://vault-1.internal:8201"
api_addr = "https://vault-1.internal:8200"
Initialize (auto-unseal means this returns recovery keys, not Shamir shares needed on every restart):
vault operator init -recovery-shares=5 -recovery-threshold=3
vault status # confirm Sealed: false — auto-unseal engaged immediately
vault operator raft list-peers # confirm 3 voters, one leader
PKI hierarchy:
vault secrets enable -path=pki_root pki
vault secrets tune -max-lease-ttl=87600h pki_root
vault write -field=certificate pki_root/root/generate/internal \
common_name="Example Internal Root CA" ttl=87600h > root_ca.crt
vault secrets enable -path=pki_int pki
vault secrets tune -max-lease-ttl=43800h pki_int
vault write -field=csr pki_int/intermediate/generate/internal \
common_name="Example Internal Intermediate CA" > pki_intermediate.csr
vault write -field=certificate pki_root/root/sign-intermediate \
csr=@pki_intermediate.csr format=pem_bundle ttl=43800h > intermediate.cert.pem
vault write pki_int/intermediate/set-signed [email protected]
vault write pki_int/roles/payments-svc \
allowed_domains="payments.svc.internal" \
allow_subdomains=true max_ttl="72h" key_type="rsa" key_bits=2048
Leaf issuance (24h TTL, renewed automatically by a Vault Agent template well before expiry):
vault write pki_int/issue/payments-svc \
common_name="payments.svc.internal" ttl="24h"
Result: payments-svc receives a fresh leaf certificate at least daily
via automated renewal, signed by an intermediate that is itself signed
by an offline-most-of-the-time root, on a 3-node Raft cluster that
auto-unseals via AWS KMS on any restart with no manual key-share
handling required.
Secret objects via External Secrets Operator.Issuer backend for Kubernetes-native
automated issuance.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
vault-operations, pki-engine, certificate-authority, ha-dr, unsealing
15 skills in this plugin
/certificate-lifecycle-management-at-scaleGuides managing TLS/mTLS certificate lifecycle across many services and environments beyond a single Kubernetes cluster — enterprise CA integration (ACME private CA, Microsoft AD CS, cloud-managed private CAs), cross-service rotation automation, expiry monitoring/alerting, and CA hierarchy/trust-chain management for a mixed fleet of VMs, on-prem servers, and multiple clusters. Use when the user asks to "automate cert rotation across our whole fleet," "integrate with our enterprise CA," "why do we keep having certificate expiry outages," "design a CA hierarchy for the org," "track every certificate's expiry date across environments," or "cert-manager only covers our Kubernetes clusters, what about everything else." Distinct from cert-manager's Kubernetes-native scope — see `../../../kubernetes-platform/skills/cert-manager-tls-automation/SKILL.md`.
/enterprise-sso-and-idp-federation-configurationGuides configuring enterprise workforce single sign-on — SAML 2.0 and OIDC federation between an identity provider (Okta, Azure AD/Entra ID, Keycloak) and downstream applications, including metadata exchange, attribute/claim mapping, group-to-role provisioning (SCIM), and multi-IdP federation trust. Use when the user asks to "set up SAML SSO with Okta," "configure Azure AD/Entra ID as our OIDC provider," "stand up Keycloak as an internal IdP," "map IdP groups to application roles," "debug a SAML assertion that won't validate," or "federate a second IdP for an acquired company's users." Distinct from cloud-iam-hardening (workload/service IAM in a cloud provider) — this skill is about federating *human workforce* identity into applications for SSO.
/falco-configuration-validationValidates Falco runtime detection rules for false-positive rate and actual firing correctness before trusting them in a channel that pages a human — running new/changed rules in log-only mode against real traffic, measuring alert volume and content, and confirming a rule fires on a deliberate positive-control trigger before promoting it to a higher-severity, paging-routed configuration. Use when the user asks to "validate this Falco rule before enabling it," "why is Falco so noisy," "test our Falco rules don't false-positive on real traffic," "review this rule set before it pages on-call," or "make sure Falco rules aren't about to be enabled in enforce/blocking mode without an audit period." Pairs with falco-runtime-threat-detection-configuration.
/falco-runtime-threat-detection-configurationGuides authoring and deploying Falco runtime threat detection rules — the eBPF/kernel-module-based syscall event stream, Falco's rule syntax (condition/output/priority), writing custom rules for a specific workload's known-good behavior, tuning noisy default rules, and wiring alerts to Falcosidekick outputs. Use when the user asks to "write a Falco rule to detect X," "why is Falco alerting on normal behavior," "detect a shell spawned inside a container at runtime," "set up Falco with eBPF instead of the kernel module," "send Falco alerts to Slack/PagerDuty," or "what's the difference between Falco and admission-control policy engines like OPA/Kyverno." Pairs with falco-configuration-validation for pre-enforcement false-positive testing.
/fortify-static-analysisGuides deep, tool-specific use of OpenText (formerly Micro Focus) Fortify Static Code Analyzer (SCA) and Fortify Audit Workbench for enterprise, on-premises static analysis — the translate/scan build workflow, Fortify Security Rulepacks, audit workbench triage (Not an Issue / Reliability / Suspicious), and how Fortify's on-prem, build-integrated model differs operationally from cloud-native SAST. Use when the user asks to "run a Fortify scan", "configure sourceanalyzer for a build", "triage findings in Fortify Audit Workbench", "integrate Fortify with Jenkins/Azure DevOps", "reduce Fortify SCA false positives", or "compare Fortify against SonarQube/Semgrep for enterprise compliance". Fortify-specific depth on the translate/scan model and enterprise workflow; for the general SAST concept see sast-integration in the devsecops domain.
/kubewarden-admission-policy-configurationGuides configuring Kubewarden as a WASM-based Kubernetes admission policy engine — installing the policy-server and controller, writing or reusing WebAssembly policies from the Kubewarden Policy Hub, ClusterAdmissionPolicy/AdmissionPolicy resources, monitor-mode rollout before enforce, and multi-language policy authoring (Rego, Rust, Go via the SDKs) as an alternative to OPA/Gatekeeper or Kyverno. Use when the user asks to "set up Kubewarden," "write a WASM admission policy," "why use Kubewarden instead of OPA/Kyverno," "reuse a policy from the Kubewarden Policy Hub," "run an admission policy in monitor mode before enforcing it," or "author a Kubernetes admission policy without writing Rego."
npx claudepluginhub selvarajmurugesan90/ops-engineering-skills --plugin security-tooling-skillsOther plugins' skills for the same job