HSM integration protects Vault's master key and enables auto-unseal, and it is directly tied to meeting FIPS 140-2/140-3 requirements. That said, vendor-specific PKCS#11 differences, FIPS-mode prerequisites, and TLS cipher suite restrictions create design and operations details you cannot skip.
This article focuses on stable concepts grounded in the official documentation and makes concrete the points Ops teams tend to stumble on. It also covers the comparison angles and pitfalls that come up frequently on the Operations-track exam.
Vault protects data with a seal key (the barrier key). With HSM integration, you delegate the generation, storage, and cryptographic operations on that key material to the HSM, and the HSM automatically unseals Vault at startup (Auto Unseal). Operators no longer need to carry Shamir-split unseal keys.
PKCS#11 is the standard API that connects HSMs and applications, and Vault supports pkcs11 as a seal type. In practice, what matters most is consistency between the vendor's PKCS#11 library, the slot, the PIN, and the key labels.
Claiming FIPS compliance requires a system-wide design: a FIPS-validated cryptographic module (a FIPS-compliant Vault build or HCP offering), a FIPS-validated HSM, and a TLS configuration that uses only FIPS-approved algorithms.
| Component | Role | Ops / Exam takeaways |
|---|---|---|
| Vault barrier key | Core key for data encryption | Protect it in the HSM to enable auto-unseal |
| PKCS#11 library | Interface to the HSM | Keep the path, slot, PIN, and label consistent |
| Recovery Keys | Emergency recovery operations | Still distributed under auto-unseal. Have storage and rotation procedures in place |
Overall view: auto-unseal and FIPS compliance with Vault and an HSM (PKCS#11)
First commands to confirm connectivity and status
vault status
# HSMスロット・トークン確認(ベンダー依存。例: OpenSC)
pkcs11-tool -L
# VaultのTLS疎通確認(FIPS承認スイートのみで接続できるか)
openssl s_client -connect vault.example.com:8200 -tls1_2FIPS compliance is not a single product; it is a system-wide requirement that covers the cryptographic module, the TLS configuration, and the full key lifecycle. Beyond Vault's own settings, design must include the OS and libraries, HSM operational procedures, and audit evidence.
TLS is especially easy to overlook. Pin the minimum version to TLS 1.2 or higher and restrict it to FIPS-approved suites only. Allowing non-FIPS suites on the client side or in intermediate proxies tends to trigger non-compliance findings during assessments.
| Area | Requirement | How to verify |
|---|---|---|
| Crypto module | Use a FIPS-validated build or offering | Evidence of the binary's source and version |
| TLS | TLS 1.2+ and FIPS-approved suites only | Verify both in the listener config and via external scans |
| Key boundary | Keep private key material inside the HSM | Consistency between HSM audit logs and operational procedures |
| Audit | Traceable audit logs | Immutable storage destination and periodic reviews |
Boundary picture from a FIPS perspective
Example FIPS-oriented TLS configuration (listener/tcp)
listener "tcp" {
address = "0.0.0.0:8200"
tls_disable = 0
tls_min_version = "tls12"
# 環境のGo/OS実装に依存。代表的なFIPS承認スイートを列挙
tls_cipher_suites = [
"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"
]
tls_cert_file = "/etc/vault/tls/server.crt"
tls_key_file = "/etc/vault/tls/server.key"
}In Vault you set the seal to pkcs11 and configure the vendor's PKCS#11 library, slot, PIN, and key labels. You choose whether to generate the key inside the HSM at first startup or to reference a key with an existing label (pre-creating keys with vendor tools is also common).
Library paths, slot representations, and PIN policies differ by vendor. For Cloud HSM or network-attached HSMs, the state of the client middleware (login sessions, connection limits) affects whether startup succeeds.
| Parameter | Meaning | Tip |
|---|---|---|
| library | Path to the PKCS#11 library | Point to the vendor-supplied .so/.dylib/.dll |
| slot | Target slot or token | Pre-verify with pkcs11-tool -L or similar |
| pin | Credentials for the HSM token | Define storage and rotation procedures clearly |
| key_label | Label of the wrap/encryption key | Decide whether to use an existing key or generate a new one |
| hmac_key_label | Label of the HMAC key | Watch out for label collisions |
Minimal startup-to-auto-unseal flow
vault.hcl example (PKCS#11 auto-unseal with Raft)
seal "pkcs11" {
library = "/opt/vendor/lib/pkcs11.so" # 例: /opt/cloudhsm/lib/libcloudhsm_pkcs11.so 等
slot = "0" # ベンダー/環境に依存
pin = "file:/etc/vault/hsm.pin" # 外部ファイル参照も可(権限管理必須)
key_label = "vault_wrap_key"
hmac_key_label = "vault_hmac_key"
generate_key = true # 既存鍵を使う場合はfalse
}
storage "raft" {
path = "/var/lib/vault"
node_id = "vault-1"
}
listener "tcp" {
address = "0.0.0.0:8200"
tls_disable = 0
tls_min_version = "tls12"
}
api_addr = "https://vault-1.example.com:8200"
cluster_addr = "https://10.0.0.11:8201"HSM integration failures tend to converge on a handful of causes: PIN mismatches, wrong slot specifications, library inconsistencies, exceeding session limits, and network latency. Align the HSM client to the same version on every node and cross-reference HSM-side audit logs to pinpoint the cause.
If unseal fails immediately after startup, the HSM may be rejecting requests due to concurrent session limits or token policies. Consider retry backoff or serialized node startup.
| Symptom | Primary causes | First response |
|---|---|---|
| Stays sealed at startup | PIN / slot / label mismatch, session limit reached | Re-check the config, reduce sessions, verify on a single node |
| Intermittent failures | Unstable network connection to the HSM | Measure latency, review the network path, configure retries |
| Only specific nodes fail | Different libraries or client versions | Align versions and redeploy |
Quick troubleshooting decision tree
Examples of verification commands used in the field
# HSMスロット/トークン
pkcs11-tool -L
# Vaultステータス
vault status
# Recovery Keysの有無と閾値確認(出力取り扱い注意)
vault operator init -status
# HSMクライアント(例: CloudHSM)のセッション確認はベンダーツールを使用HSMs are clustered by default to tolerate single-unit failures. All Vault nodes must reach the same HSM cluster, so unify the network and client configuration. Replicate or back up the keys using HSM vendor features and pre-stage them on the HSM at the DR site as well.
Vault data is backed up via Raft snapshots and similar mechanisms, but it remains protected by HSM-derived keys through seal wrap. Recovery at the DR site assumes the destination HSM holds a key with the same label.
| Design area | Primary | DR |
|---|---|---|
| HSM | Clustering + key backup | Pre-stage the same keys and verify connectivity |
| Vault | Multiple nodes / health checks | Document startup order and HSM connectivity checks |
| Data | Raft snapshots | Periodic restore verification |
How primary, DR, and the HSM cluster relate
Representative backup / DR commands
# Raftスナップショット保存(権限要)
vault operator raft snapshot save /backup/vault.snap
# リストアはDR環境で停止状態から実施(手順は本番と分離保管)
# HSM側の鍵配備はベンダーツール(例: クローン/バックアップリストア)で実施The right choice depends on regulatory requirements, RTO/RPO, operational load, and cost. Start by checking the FIPS 140 level and whether you have a "keep the key inside the hardware boundary" requirement. Operationally, the keys are your startup SLO and a documented key-lifecycle process.
Cloud KMS often uses FIPS-validated modules, but when the strict requirement is "keep the key inside a dedicated HSM (a clear access boundary)," a dedicated HSM integrated via PKCS#11 is preferred.
| Approach | FIPS / key boundary | Startup SLO / ops load |
|---|---|---|
| HSM (PKCS#11 auto-unseal) | Keys held inside a dedicated HSM, e.g. at FIPS L3 | Fast startup; requires running the HSM |
| Cloud KMS (auto-unseal) | Can use FIPS-validated modules; dedicated HSM boundary depends on vendor design | Fast startup; easy to operate |
| Manual unseal (Shamir) | Relies on Vault's software implementation; humans hold the keys | Startup requires manual work; high ops load |
Rough picture of the key boundary per approach
For comparison: skeleton of an awskms seal config (reference)
seal "awskms" {
region = "us-east-1"
kms_key_id = "arn:aws:kms:...:key/..."
# HSMではなくKMS連携の自動アンシール例(要件に応じ選定)
}Be ready to clearly explain the distinction that "under auto-unseal, Recovery Keys are distributed and manual unseal keys are unnecessary." In FIPS contexts, common topics are "where keys are generated and protected (the key boundary)" and "TLS minimum version and cipher suite restrictions."
On design comparison questions, the standard play is to pick the option that satisfies the regulatory requirements (e.g., FIPS 140-2 L3 hardware key protection, operators never touching key material).
| Theme | How it is asked | Phrase to remember |
|---|---|---|
| Auto-unseal and key types | True/false on term mappings | Auto Unseal → Recovery Keys |
| FIPS/TLS | Minimum version and suite specification | tls_min_version=tls12 |
| Key boundary | Choice in design comparison | Keys never leave the HSM |
Minimal terminology mapping diagram
Audit hardening (often a bonus-point area on the exam)
vault audit enable file file_path=/var/log/vault_audit.log
# 監査先は改ざん耐性を確保(例: WORMストレージや集中ログ基盤)Ops
問題 1
Regulations require that "Vault's seal key be protected within a FIPS 140-2 Level 3-equivalent hardware boundary, and that Vault start at boot without operator intervention (operators must not hold unseal keys)." Which design fits best?
正解: A
The requirements are key protection within a hardware boundary (FIPS L3) and auto-unseal. The fitting design is integrating with a dedicated HSM via PKCS#11, automating Vault startup, and distributing only Recovery Keys. Restricting TLS to FIPS-approved suites also matters from a FIPS perspective. Cloud KMS can work depending on requirements, but here a dedicated HSM hardware boundary is mandatory, so it is not the best answer.
Can I use Vault's FIPS mode with the OSS edition?
To claim FIPS compliance, you must use an officially provided FIPS-compliant build or offering (for example, the FIPS-enabled distributions of Vault Enterprise or HCP). You cannot turn a regular build into a FIPS build through configuration alone. Follow the delivery options described in the official documentation.
Are Unseal Keys still distributed in an auto-unseal configuration?
With auto-unseal you do not get the usual Unseal Keys; Recovery Keys are distributed instead. Because they are used for recovery and certain privileged operations, you need proper storage and rotation procedures. The shares/threshold design at initialization applies to the Recovery Keys.
Can Cloud KMS satisfy FIPS requirements?
Cloud KMS can use FIPS-validated cryptographic modules, but it may not comply when the regulation requires keys to be held inside a dedicated HSM (an explicit hardware boundary). Confirm whether the requirement is satisfied by a "FIPS-validated module" or whether it demands a "dedicated HSM boundary," and choose a PKCS#11-integrated HSM if needed.
Practice with certification-focused question sets
無料で問題を解いてみるNicheeLab Editorial Team
NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.
Vault Core Concepts: Sealed/Unsealed, Auth, Secrets (2026)
Vault fundamentals — sealed/unsealed state, auth methods, se...
Vault Operations Professional (VOP-003): Complete Guide (2026)
Pass the Vault Operations Professional exam — enterprise pat...
Vault Path-Based Routing: API URL Structure (2026)
How Vault's path-based routing works — mount points, sub-pat...
Vault Tokens: Auth Token Mechanics (2026)
Token fundamentals — service vs. batch tokens, accessor, ren...
Vault Token Types: Service, Batch, Periodic (2026)
Service vs. batch tokens compared — performance, ACL behavio...