Rotating NIA credentials
Network Identity Attestor: Network Identity Attestor is an Aembit Edge component deployed in VMware vSphere environments that verifies VM identity through the vCenter API and issues signed attestation documents for workload authentication.Learn more (NIA) manages three types of credentials, each with its own rotation procedure:
- Attestation signing certificate: Uses the
rotate-signing-credentialssubcommand; requires a manual service restart after rotation. - TLS certificate: Uses the
rotate-tls-credentialssubcommand; requires a manual service restart after rotation. - vCenter API credentials: Uses the
rotate-vcenter-credentialssubcommand; requires a manual service restart after rotation.
Before you begin
Section titled “Before you begin”- Network Identity Attestor must be deployed and running.
- You need shell access to the NIA host as
rootor a user withsudoaccess. - Stage new credential files on the NIA host before starting rotation.
Rotate attestation signing certificates
Section titled “Rotate attestation signing certificates”The rotate-signing-credentials subcommand validates the new certificate and key pair, updates the encrypted systemd
credential store, and retains the previous credentials as comments for rollback.
You must restart the NIA service manually after running the subcommand.
Certificate requirements
Section titled “Certificate requirements”The new signing certificate must meet all the following requirements. See Network Identity Attestation reference for full details.
- Key type: RSA (ECDSA and Ed25519 aren’t supported)
- Key usage: Must include
digitalSignature - CA constraint: Must not be a Certificate Authority (CA) certificate
- Key match: The certificate and private key must belong to the same key pair
-
Register the new signing certificate in the Aembit Trust Provider before proceeding.
-
Run
rotate-signing-credentialswith the paths to your new signing key and certificate files:Terminal window sudo aembit_netid_attestor rotate-signing-credentials \--signing-key-path /path/to/new-signing-key.pem \--signing-cert-path /path/to/new-signing-cert.pemThe subcommand displays the new certificate’s metadata:
The new signing certificate:Fingerprint: E3:91:F2:2C:38:8D:A6:7C:69:59:A4:C0:AE:A8:3B:FE:CC:A9:D2:89:0C:D2:63:25:1C:AF:77:AC:63:CD:A6:3ESubject: C=US, O=Aembit, OU=Edge, CN=Aembit Customer SigningIssuer: C=US, O=Aembit, OU=Edge, CN=Aembit Customer CA IntermediateValid from: May 11 20:39:25 2026 +00:00Valid until: Sep 25 20:39:25 2053 +00:00Please verify that the fingerprint number displayed here also appears in the configuration of your Trust Provider.Do you want to continue? [yes/no] -
Verify the fingerprint matches the signing certificate you registered in the Trust Provider.
-
Enter
yesat the prompt. The subcommand updates/etc/systemd/system/aembit_netid_attestor.service.d/50-credentials.confand retains the previous credentials as comments. -
Reload the systemd configuration to pick up the updated drop-in file:
Terminal window sudo systemctl daemon-reload -
Restart the NIA service:
Terminal window sudo systemctl restart aembit_netid_attestor.service -
Verify the service is healthy:
Terminal window curl -k 'https://localhost:443/health'Expected response:
{"status":"Healthy","version":"1.29.307"}
Rollback
Section titled “Rollback”If you need to revert to the previous signing certificate:
-
Open the systemd credential file:
Terminal window sudo nano /etc/systemd/system/aembit_netid_attestor.service.d/50-credentials.conf -
Remove the new
attestation_signing_keyandattestation_signing_certificateentries, then uncomment the previous entries with the same names. -
Reload and restart the service:
Terminal window sudo systemctl daemon-reloadsudo systemctl restart aembit_netid_attestor.service
Common errors
Section titled “Common errors”Rotate TLS certificates
Section titled “Rotate TLS certificates”The rotate-tls-credentials subcommand validates the new certificate and key, replaces the installed tls.crt and
tls.key files in place while preserving their original ownership and permissions, and keeps timestamped backups of the
previous files for rollback.
You must restart the NIA service manually after running the subcommand.
Certificate requirements
Section titled “Certificate requirements”The subcommand validates the new certificate and key before making any changes, loading them through the same TLS configuration the NIA uses to serve its API. The subcommand catches common problems up front, before it disturbs the running service:
-
Private key format: The key must be an unencrypted PKCS#8 PEM file. If your key is in PKCS#1 (traditional RSA) format, convert it first:
Terminal window openssl pkey -in your-key.pem -out your-key.pkcs8.pem -
Certificate and key must match: They must belong to the same key pair. The certificate must be a valid PEM file, and may also include intermediate certificates.
-
Files must already exist: The subcommand replaces the existing
tls.crtandtls.keyfiles. For first-time setup, use the installer instead.
-
Copy the new TLS certificate and key files to the NIA host.
-
Run
rotate-tls-credentialswith the paths to your new certificate and key files:Terminal window sudo aembit_netid_attestor rotate-tls-credentials \--tls-cert-path /path/to/new-tls-cert.pem \--tls-key-path /path/to/new-tls-key.pemThe subcommand displays the new certificate’s metadata, lists the files it replaces, and prompts you to confirm before changing anything:
The new TLS certificate:Fingerprint: <SHA-256 fingerprint>Subject: <subject>Issuer: <issuer>Valid from: <date>Valid until: <date>About to replace the installed TLS files with the contents of the new files:/opt/aembit/edge/netid_attestor/tls.crt <- /path/to/new-tls-cert.pem/opt/aembit/edge/netid_attestor/tls.key <- /path/to/new-tls-key.pemDo you want to continue? [yes/no]The subcommand also warns you before the confirmation prompt if the new certificate has expired, isn’t yet valid, or has chain problems such as a missing intermediate certificate. These warnings don’t stop the rotation, but resolve them before you continue. Otherwise, clients such as the Agent Proxy can reject connections after the restart.
-
Verify the certificate metadata, then enter
yesat the prompt. The subcommand replacestls.crtandtls.keyin the NIA install directory (/opt/aembit/edge/netid_attestor/), preserving their original owner, group, and mode, and saves the previous files as timestamped backups (tls.crt.<timestamp>.bakandtls.key.<timestamp>.bak) in the same directory. It then prints the backup paths and the exact commands to apply and to roll back the change. -
Restart the NIA service to load the new certificate:
Terminal window sudo systemctl restart aembit_netid_attestor.service -
Verify the service is healthy:
Terminal window curl -k 'https://localhost:443/health'
Rollback
Section titled “Rollback”If you need to revert to the previous TLS certificate, restore the timestamped backup files the subcommand created.
Use the exact mv commands the subcommand printed when it rotated the credentials. They contain the real timestamped
backup file names:
-
Restore the previous certificate and key by moving the backup files back into place:
Terminal window sudo mv /opt/aembit/edge/netid_attestor/tls.crt.<timestamp>.bak /opt/aembit/edge/netid_attestor/tls.crtsudo mv /opt/aembit/edge/netid_attestor/tls.key.<timestamp>.bak /opt/aembit/edge/netid_attestor/tls.key -
Restart the service:
Terminal window sudo systemctl restart aembit_netid_attestor.service
Rotate vCenter API credentials
Section titled “Rotate vCenter API credentials”The rotate-vcenter-credentials subcommand validates the new credentials by logging in to the vCenter API, encrypts
them with systemd-creds, updates the encrypted systemd credential store, and retains the previous credentials as
comments for rollback.
You must restart the NIA service manually after running the subcommand.
-
Create a new credentials file on the NIA host. The file must contain a single line in the format
username:password:vcenter-service-account@vsphere.local:password -
Run
rotate-vcenter-credentialswith the vCenter URL and the path to your new credentials file:Terminal window sudo aembit_netid_attestor rotate-vcenter-credentials \--vcenter-url https://vcenter.example.com \--vcenter-credentials-file /path/to/new-vcenter-credentialsThe subcommand logs in to the vCenter API with the new credentials to confirm they work before changing anything. If the login fails, it reports the error and leaves the credential store unchanged. On success, it reports the result:
The new vCenter credentials authenticated successfully:URL: https://vcenter.example.com/Username: vcenter-service-account@vsphere.localThe credentials file has been updated to use the new vCenter credentials. The previous credentials are retained as comments in:/etc/systemd/system/aembit_netid_attestor.service.d/50-credentials.confTo make the Aembit Network Identity Attestor use these new credentials, you need to run:systemctl daemon-reloadsystemctl restart aembit_netid_attestor.serviceTo roll back to the previous credentials, manually edit the file to remove the 'vcenter_credentials' credential and uncomment the previous credential with the same name. Then re-run the systemctl commands above.The subcommand encrypts the new credentials with
systemd-credsand retains the previousvcenter_credentialsentry as a comment. -
Reload the systemd configuration to pick up the updated drop-in file:
Terminal window sudo systemctl daemon-reload -
Restart the NIA service:
Terminal window sudo systemctl restart aembit_netid_attestor.service -
Verify the service is healthy:
Terminal window curl -k 'https://localhost:443/health'
Rollback
Section titled “Rollback”If you need to revert to the previous vCenter credentials:
-
Open the systemd credential file:
Terminal window sudo nano /etc/systemd/system/aembit_netid_attestor.service.d/50-credentials.conf -
Remove the new
vcenter_credentialsentry, then uncomment the previousvcenter_credentialsentry. -
Reload and restart the service:
Terminal window sudo systemctl daemon-reloadsudo systemctl restart aembit_netid_attestor.service
High availability considerations
Section titled “High availability considerations”You can deploy multiple NIA instances in the same network segment. When you configure the Agent Proxy with
AEMBIT_NETWORK_ATTESTOR_URLS, you can rotate credentials on each NIA with no impact to workload attestation.
Rotate one NIA at a time. The Agent Proxy distributes requests across all configured NIA instances, shuffling on each refresh cycle. When you restart one NIA for credential rotation, the Agent Proxy continues serving attestation requests through the remaining instances. Workloads experience no attestation interruption during a rolling rotation.
When rotating attestation signing certificates across a pool of NIA instances, coordinate Trust Provider updates with the rotation sequence:
- All NIA instances share one signing certificate: Publish the new certificate to the Trust Provider before restarting any NIA. During the rollout window, the Trust Provider should trust both the old and the new certificate. Rotate one NIA at a time.
- Each NIA has its own signing certificate: Publish each replacement certificate to the Trust Provider before restarting that NIA. Rotate one NIA at a time.
For TLS and vCenter credential rotation, rotate one NIA at a time using the subcommand procedure in the relevant preceding section.