Running Hyperledger Besu validator keys in AWS CloudHSM: when it fits
If you run Besu validators on AWS and need the node keys protected by hardware rather than a key file, the cloudhsm-jce provider in the Besu HSM plugin is the production path for AWS CloudHSM. It uses the AWS CloudHSM JCE provider directly, so you do not write a PKCS#11 configuration file for this target. The node key is the private key a Besu node uses to identify itself on the peer-to-peer network. On a QBFT network, that same key is also used to sign the blocks a validator proposes and seals, which makes it the identity that other validators and auditors will ask about first. Besu's node key documentation describes the key file as unencrypted by default, which is the gap a hardware-backed option is meant to close.
CloudHSM fits when your organization already runs workloads in AWS, wants dedicated single-tenant HSM capacity under its own control, and has a compliance or security review that expects keys to be generated and kept inside tamper-resistant hardware. Compared with an on-premises HSM such as those reached through PKCS#11, CloudHSM keeps the operational footprint inside your AWS accounts and VPC, which can simplify networking for validators that already run there. It is a poor fit if your validators sit outside AWS, if your security team has already standardized on another HSM vendor, or if you need a provider path the plugin does not document for CloudHSM. Confirm those points before you commit to the design.
Before you choose CloudHSM, confirm with AWS and with the plugin's current README which CloudHSM cluster types, client versions and JCE provider releases your Besu version supports, and ask your HSM team how HSM_USER and HSM_PASSWORD will be supplied to the node without appearing in shell history, unit files or container images. Also plan for the cost components: the CloudHSM cluster and its HSM instances are billed by AWS, while the client software, plugin build, key ceremony, monitoring and the work to rehearse failover are effort your team or a partner carries. Ask any quote to separate those items and to state who runs the key ceremony and who owns recovery if an HSM fails.
Why the cloudhsm-jce provider replaces PKCS#11 for CloudHSM
The Besu HSM plugin offers two provider paths. Native PKCS#11 is the route for on-premises or appliance HSMs such as Thales Luna or Utimaco, where the plugin loads a vendor PKCS#11 library and a configuration file that points to it. The cloudhsm-jce provider is the production path for AWS CloudHSM. It calls the AWS CloudHSM JCE provider directly, so there is no PKCS#11 library or configuration file in the chain. For review purposes, the trust boundary is the same in both cases: the private key material is generated and used inside the HSM, and the node does not hold it in a file. What changes is the set of components an auditor must examine and the credential path that the node uses to reach the HSM.
- Provider path: Confirm which provider the deployment uses. A PKCS#11 configuration on a CloudHSM deployment indicates a mismatch with the documented production path.
- Credential source: The cloudhsm-jce provider authenticates through the
HSM_USERandHSM_PASSWORDenvironment variables. Review how these are injected, who can read the process environment, and whether they appear in logs or shell history. - Key location: Ask for evidence that the validator node key is created in and remains inside CloudHSM, not exported to a file on the node.
- Component inventory: Record the plugin version, the AWS CloudHSM JCE provider version and the Besu release in the change record, since each changes the review scope.
- Fallback: Check whether any unencrypted node key file remains on disk after the switch.
Before sign-off, confirm the provider path and credential handling against the Besu HSM plugin README and your own environment.
For the engineer installing the plugin, the difference shows up in the files and the start-up sequence. The PKCS#11 path needs a vendor library, a PKCS#11 configuration file and the plugin placed in the Besu plugins directory, with the key created on the HSM before the node starts. The cloudhsm-jce path does not need a PKCS#11 configuration file, so there is no library path or slot configuration to maintain. The engineer instead ensures the AWS CloudHSM JCE provider is available to the Besu process, sets the credential environment variables and starts the node with the security module option enabled.
- No PKCS#11 file: Do not create or copy a PKCS#11 configuration file for this path. Remove any leftover file from a prior attempt so it cannot be picked up by mistake.
- Credentials at start-up: Set
HSM_USERandHSM_PASSWORDin the service environment through your secret store or service manager, not in a unit file committed to source control. - Plugin wiring: Enable the HSM plugin through the
--security-moduleoption and confirm the node reports the cloudhsm-jce provider in its startup log. - Dependency pinning: Pin the AWS CloudHSM JCE provider and plugin versions together, and retest after each Besu upgrade.
- Container images: If Besu runs in containers, the provider and client configuration must be present in the image or mounted at run time.
Before go-live, check that the node starts with the HSM path active and that no node key file is created in the data directory.
The provider choice changes how keys are created, located and recovered. On the PKCS#11 path, the operator typically creates the key on the HSM through the vendor tooling before the node starts, then points the plugin at that key. On the cloudhsm-jce path, the key lifecycle is governed by CloudHSM users, quorum settings and backup behavior in AWS, so the team must plan key creation and recovery against AWS CloudHSM documentation rather than vendor PKCS#11 procedures. The HSM plugin still handles the node identity, but the operator's runbook must reflect the CloudHSM model.
- Key creation: Agree in advance who creates the validator key, in which CloudHSM cluster and under which CloudHSM user, and record the resulting public identity for the genesis or validator set.
- Recovery: Confirm how a replacement HSM or cluster would receive the same key, since a lost key changes the node identity.
- Operator access: Separate the CloudHSM user that the node uses from administrative users who manage the cluster.
- Rotation: Treat a node key change as a validator set change that needs coordination with other operators.
- Evidence: Keep records of key creation, user assignment and provider versions for the compliance file.
Confirm the CloudHSM user model, backup and recovery behavior with AWS documentation and your own cluster configuration before relying on the design.
Configuration options and when each fits
This table compares the provider, credential and wiring choices for running Besu node keys with CloudHSM. Read each row as a decision: the left column names the choice, and the right columns show what it changes and when it suits a team. The main takeaway is that the HSM path moves the node key out of an unencrypted file, but it adds a credential that must be protected in its own right.
| Choice | What it means | When it fits |
|---|---|---|
| cloudhsm-jce provider | The Besu HSM plugin calls the AWS CloudHSM JCE provider directly, with no PKCS#11 configuration file to maintain | The production path for AWS CloudHSM, and the option to choose when the HSM is an AWS CloudHSM cluster |
| Native PKCS#11 provider | The plugin loads a PKCS#11 library and configuration file, which is the route for other HSM families | Suited to on-premises or non-AWS HSMs, not to CloudHSM, so do not select it for this design |
| HSM_USER and HSM_PASSWORD environment variables | The provider reads the CloudHSM crypto user credentials from the process environment at start-up | A simple wiring path, but the values can appear in process listings, container specs or shell history if not handled with care |
| Runtime secret injection | A secret store or orchestrator supplies the credentials to the process at start-up, without writing them to images or config files | Fits teams that already run a secret store and want credentials kept out of deployment manifests, with rotation handled outside Besu |
| --security-module option | Points Besu at the security module plugin so the node key is loaded from the HSM instead of the key file | Set when the node should use the HSM for its identity key, and verified with a test start before any validator role is enabled |
| Default unencrypted node key file | The Besu docs state the local node private key file is not encrypted, so anyone who reads it gets the node identity | Acceptable only as a documented exception, since moving the key into CloudHSM changes this exposure and should be recorded |
Setting up the HSM plugin with cloudhsm-jce
This sequence takes a Besu node from an unconfigured host to a validator that signs with a key held in AWS CloudHSM, with each step confirmed before the next begins. The result is a node whose identity can be checked against the enode you expect before it joins the network.
Confirm the Besu version and JDK 25
The platform or network engineer picks the Besu release the network will run and confirms the host has JDK 25, which the 26.6.0 release notes list as required to build and run Besu. Check the HSM plugin README for the Besu versions it supports, because the plugin and the client must be matched. Record the Besu version, the plugin version and the Java runtime in your change record. The step is done when
java -versionreports JDK 25 on the exact host image that will run the node.Install the HSM plugin into the plugins directory
The engineer downloads the matching Besu HSM plugin build and copies it into the Besu plugins directory on the node, using the release artifacts listed in the plugin repository. Confirm in the README which plugin artifact includes the cloudhsm-jce provider, since that provider is the production path for AWS CloudHSM and does not use a PKCS#11 configuration file. Verify the file checksum against the value published with the release and keep the file owned by the Besu service account with read-only permissions. The step is done when Besu lists the plugin during start-up without errors.
Create or confirm the CloudHSM cluster and crypto user
The cloud or security team confirms that an AWS CloudHSM cluster exists in the intended region and VPC, with the client software installed on the Besu host and network access from the host to the cluster's HSM endpoints. A crypto user is created or confirmed for this node only, with rights limited to the key operations it needs. Check the crypto user's credentials and key ownership in the CloudHSM console or CLI, following AWS CloudHSM documentation for your cluster version. The step is done when the crypto user can log in from the Besu host and see the expected key object, and when the user is not shared with other applications.
Create the validator key inside the HSM
The validator key pair is generated inside CloudHSM so the private key never exists as a file on the Besu host. The engineer records the key label and public key, then derives the node identity from the public key using the node key documentation, since that identity is what peers and the QBFT validator set will recognize. Store the expected enode string in your change record before the node is started. The step is done when the key object exists in the cluster, the public key is exported for review, and the expected enode is written down by two people.
Supply HSM_USER and HSM_PASSWORD through the runtime environment
The service owner sets HSM_USER and HSM_PASSWORD in the environment of the Besu process, using your secrets manager or the service manager's protected environment file, not in the Besu command line, a shell profile or a configuration file in the repository. The README documents these variables for the cloudhsm-jce provider. Restrict read access to the service account and confirm the variables do not appear in process listings, logs or shell history. The step is done when the service starts with the variables present and the password is absent from every log and file on the host.
Start Besu with the security module option
The engineer starts Besu with the --security-module option pointing to the CloudHSM provider configuration named in the plugin README, and keeps the other node flags unchanged from the approved configuration. Watch the start-up log for the provider load, the HSM login and the key lookup, and stop the node if it falls back to a file-based key. Confirm the node does not attempt to read a local node private key file. The step is done when the log shows a successful HSM login and the node starts without key errors.
Verify the node identity matches the expected enode
The engineer queries the running node for its enode, using the admin or node information method available in your Besu configuration, and compares it character by character with the value recorded during key creation. A mismatch means the node is using a different key than planned, so the node should be stopped and the key label, crypto user and provider settings reviewed before it joins the network. Repeat the check after any restart and after each Besu upgrade. The step is done when the enode matches the recorded value and the result is filed with the change record.
What CloudHSM signs for a Besu validator and what it does not
The first thing to settle is which key sits inside CloudHSM. In a Besu validator, the node key is the key that identifies the node on the peer network and the key used to sign QBFT blocks. Moving that key into an HSM through the HSM plugin's cloudhsm-jce provider protects the identity and block-signing material of the validator. It does not move the rest of the node into the HSM. The node still runs its own JSON-RPC server, peer connections, transaction pool and state database on the host, and those components are outside the HSM boundary. Treat the HSM as protecting one key with a defined purpose, not as a general signing service for the node.
Account keys are a separate concern. An account key signs transactions submitted by a wallet, an application or an operator, and those signatures are what an auditor will trace to an individual or a system. This page does not claim that CloudHSM holds account keys or signs application transactions in a Besu network. If your design needs account keys protected in hardware, plan that as its own control, with its own key owner, rotation process and evidence, and confirm the approach against the signing setup covered elsewhere in this group.
Before go-live, confirm the exact signing operations the plugin performs for your version. Read the Besu HSM plugin documentation for the release you deploy, and ask the vendor or your implementation partner to show which operations are routed to CloudHSM and which still use software keys. Record the answer in the design documents, because an auditor will ask where each signature is produced. The plugin behavior can change between releases, so repeat this check during every upgrade of Besu or the plugin.
Credential handling and security considerations for CloudHSM-backed nodes
The cloudhsm-jce provider takes its HSM login from environment variables, so the security of the whole node depends on how that login is supplied, who can read it and how the HSM itself is administered. The cards below cover the credential path, the people and roles around it, and the recovery plan for the key material inside the HSM. Work through them together before go-live, because a weakness in one usually undermines the others.
Where the HSM credentials come from
The cloudhsm-jce provider reads HSM_USER and HSM_PASSWORD from the environment of the Besu process, so the first question is where those values are stored before they reach it. Options include a secrets manager read at service start, a systemd credential or an orchestrator secret mounted as a file and exported at launch. Confirm that the values never appear in unit files, shell history, container image layers or deployment manifests committed to source control.
HSM plugin READMEWho can read the process environment
On a Linux host, any process running as the same user, and in many setups any administrator with debug rights, can often read another process's environment. Check who can run ptrace-style debugging, read /proc entries for the Besu process, dump container inspect output or view orchestrator pod specs. Restrict the Besu service account, disable core dumps for the process and confirm that the environment is not echoed by monitoring agents.
Rotation and the crypto user
Define who owns the crypto user account inside CloudHSM, how often its password changes and what happens to running nodes when it does. A rotation needs a planned restart window because the provider authenticates at start-up, so a changed value only takes effect after Besu reloads it. Ask the vendor and your own runbook how a password change is coordinated across all validator hosts so that no node is left holding an old value.
Separating the HSM user from node operators
Keep the crypto user that Besu authenticates as separate from the people who operate the node and from the people who administer the HSM cluster. Node operators should not be able to read the crypto user password, and HSM administrators should not need the password to run validators. Illustrative example: an operator restarts the service, but only a named security role can create or change the crypto user. Document this split in the access matrix that an auditor will ask to see.
Audit of HSM access
Decide which HSM-side events you need to retain, such as logins, key use, key creation and user changes, and where those logs are sent. Compare them with Besu's own logs and host logs so that a login from an unexpected host can be traced. Confirm with your provider which audit records CloudHSM exposes and how long you must keep them to meet your internal retention policy. Test that an alert fires when the crypto user logs in from outside the validator fleet.
Keeping credentials out of host logs
Besu logs, container logs, process dumps and support bundles can all carry environment values or stack traces that include them. Review logging configuration, debug flags and any exception handler that prints the provider configuration. Set log collectors to drop or mask values that match the credential names, and check that your metric and trace exporters do not capture environment variables. Ask your support team to verify the same before sharing a log with a vendor.
Backup and recovery of key material
Keys generated inside CloudHSM are protected by the cluster and cannot be read back in plain form, so a backup plan has to cover the HSM cluster itself, its users and the node's configuration, not just a copy of a key file. Confirm how CloudHSM backups and cross-zone replication work in your account, who can restore them and how long a restore takes in a tested drill. Plan what happens to a validator's identity and enode if a key is lost, because the network must accept a replacement node.
Questions teams ask before hiring help with CloudHSM-backed Besu keys
What drives the cost of running Besu node keys in AWS CloudHSM?
The cost depends mostly on how much work sits around the HSM rather than on the HSM itself. The main drivers are the number of validator and boot nodes that need keys, how many environments (test, staging, production) must be built and kept consistent, the state of your existing AWS account and networking, and how much evidence your compliance team expects. A written scope should list each node, each environment, each CloudHSM cluster and user, and each handover item. Ask for a quote that separates one-time build work (design, provisioning, key creation, testing, runbooks) from recurring work (patching Besu, rotating credentials, retesting after upgrades). CloudHSM billing is set by AWS, so confirm those charges with AWS and your account team rather than expecting them in a DeployOpen quote.
How long does a CloudHSM-backed Besu key setup usually take?
Duration depends on the number of nodes, the readiness of your AWS environment, and how quickly approvals and change windows are granted. No duration figure is given here because the work varies widely between organizations. The biggest schedule drivers are cluster provisioning and network path setup, the time to create and verify keys on each node, testing of a full restart and recovery, and any dependency on security review or change advisory boards. Ask for a timeline in the written scope that ties each milestone to a named prerequisite, such as account access, a completed network path, or an approved change window.
What must our team provide before an engagement starts?
Expect to provide the items below, and confirm each one in the written scope:
- AWS accounts and IAM access with the permissions needed to create or manage CloudHSM clusters and related networking
- Network paths between the CloudHSM cluster and the hosts running Besu, including security group and route decisions your network team approves
- Change windows for each environment and each node restart
- A validator and node inventory listing node names, roles, hosts, Besu versions and where each node runs
- A named owner for credentials, approvals and sign-off on test results
Missing any of these typically moves work into later phases and changes the schedule, so ask for a dependency list as part of the quote.
Can our internal team set up CloudHSM-backed Besu keys without a partner?
Yes, a team with AWS, Linux and Besu operations experience can build this internally, and the Besu HSM plugin's cloudhsm-jce provider is documented for that purpose. The work that usually stretches internal teams is the first pass: confirming the plugin version against your Besu release, setting HSM_USER and HSM_PASSWORD through a managed secret path, testing node start-up and block production after key creation, and writing recovery steps before go-live. Decide honestly how many people can carry on-call responsibility for this path and whether they have done a full node restart and restore test. A partner is most useful when you need an outside review of the design or a repeatable build across many nodes.
How are validator key changes handled during a Besu upgrade?
The key rule is that an upgrade should not change the node identity unless you plan that change on purpose. Before upgrading Besu, confirm that the HSM plugin version matches the Besu release you are moving to, and read the Besu release notes for the target version. The Besu 26.10.0 release notes state that the Bonsai database auto-upgrades on first start and that older Besu versions cannot open an upgraded database, so take a backup before the upgrade and test rollback in a non-production environment. Test that each node still starts, loads its key from CloudHSM, and reaches the expected peers and block production on the new version. Keep the key handle, key label and node address records in the inventory so any change is visible during review.
What does CloudHSM sign, and what does it not sign?
In this setup, the HSM holds the node private key used for node identity and for signing QBFT blocks where the validator role applies. It does not hold account keys used to sign ordinary transactions, and it does not replace permissioning, TLS on the JSON-RPC API or access controls on the host. Keep that boundary clear in your design so an auditor can see which key protects which action. Confirm the exact signing behavior for your Besu version with the documentation and the plugin README before you write the control description.
How do HSM_USER and HSM_PASSWORD get handled safely?
The cloudhsm-jce provider reads the CloudHSM crypto user name and password from the HSM_USER and HSM_PASSWORD environment variables. Environment variables are visible to anyone who can inspect the process or its configuration, so avoid placing them in shell history, unit files readable by other users, or container manifests stored in plain text. Use a managed secret store or an injected secret at start-up, restrict who can read it, and rotate the credential through a documented procedure. Ask the implementation partner to show how the secret reaches the process in your environment and how rotation is tested against a running node.
How the Besu node, cloudhsm-jce provider and CloudHSM cluster connect
The diagram starts with the Besu process on the validator host, which loads the HSM plugin through the --security-module option. The plugin uses the cloudhsm-jce provider directly, without a PKCS#11 configuration file, and reads HSM_USER and HSM_PASSWORD from the environment. Signing requests for QBFT blocks and peer identity leave the host over the network path to the CloudHSM cluster, and only the signature returns. Check that the trust boundary matches your own host, network and secret handling.
Signing path for QBFT blocks and peer identity from the validator host to CloudHSM.
How DeployOpen scopes and delivers CloudHSM-backed Besu key work
DeployOpen plans, implements, hardens and documents Hyperledger Besu validator key setups inside your own AWS accounts and network. The work is scoped in writing before it starts, so the key path, credential handling and signing responsibilities are agreed with your security and platform teams first.
How we scope
- Confirm which Besu nodes hold validator keys and which hold only node identity keys
- Map the CloudHSM cluster, key material location, and who administers the HSM
- Record how HSM_USER and HSM_PASSWORD will be supplied and rotated in your environment
- Agree the written scope, deliverables and timeline before any build work begins
How we build
- Configure the Besu HSM plugin with the cloudhsm-jce provider on your nodes
- Install and verify the AWS CloudHSM JCE client against your cluster version
- Test node startup, peer connection and block production signing on a non-production network
- Confirm the node private key is not left as an unprotected file on disk after cutover
How we hand over
- Deliver a written runbook covering key creation, startup order and credential rotation steps
- Document what CloudHSM signs for the node and what remains outside the HSM
- Provide evidence for your auditors: configuration records, access settings and test results
- Walk your operators through recovery steps for a failed node or lost HSM connection
How we support
- Offer ongoing support, upgrades and continuous testing as a retainer after handover
- Plan plugin and Besu client upgrades against the release notes before each change window
- Retest the key path after Besu version changes, HSM client updates or credential rotations
- Ask any provider to confirm support terms, response expectations and fees in the written quote

