Offline/Private License Registration Fails with "JOSEException: unable to decrypt block" in VCF Operations 9.1
search cancel

Offline/Private License Registration Fails with "JOSEException: unable to decrypt block" in VCF Operations 9.1

book

Article ID: 460007

calendar_today

Updated On:

Products

VCF Operations

Issue/Introduction

When attempting to register a private (offline) license in VCF Operations 9.1 via Manage > Licenses & Registration, the UI becomes stuck in an "In Progress" state.

Uploading the Response File from the Broadcom Business Services Console (BSC) fails immediately.

Inspecting the licensing logs (/var/log/vmware/vmsp/license-usage.log or /storage/log/vcops/log/license-usage-plugin*.log) reveals the following cryptographic exceptions:

Caused by: org.bouncycastle.jcajce.provider.BaseSingleBlockCipher$BadBlockException: unable to decrypt block
...
ERROR Failed to upload registration response. com.nimbusds.jose.JOSEException: unable to decrypt block
at com.nimbusds.jose.crypto.impl.RSA_OAEP_SHA2.decryptCEK(RSA_OAEP_SHA2.java:199)

When importing the license. Add UI error string shows:

"The license file in invalid. Generate a new license file in the VCF Business Services console and upload it here" (noting the UI's spelling of "in invalid").

Add Proxy Log Indicators: Add log snippets from license-server-proxy.log showing connection timeouts:

ConnectTimeoutException / Connection refused

Gateway/proxy timeout entries when vCF Operations attempts to communicate with the dark-site Licensing Server during file import.

Environment

VCF Operations 9.1x

Cause

This issue occurs due to a cryptographic key mismatch between the local VCF Operations database (license_server_proxy_entity) and the Response File generated by the Broadcom BSC portal.

During the private licensing workflow, VCF Operations generates a local RSA key pair to encrypt the payload. If the registration flow is interrupted, browser cache serves an old payload, or an administrator re-uses a previously generated Request File (.req) after the local appliance state has changed, the RSA private key stored on the appliance will no longer match the public key used by the BSC portal to encrypt the Response File.

Consequently, the Nimbus JOSE library fails to decrypt the AES Content Encryption Key (CEK), resulting in a permanent block.

Additionally If vCF Operations is converted to private mode but is configured with an incorrect License Server IP (or if the License Server has not yet been converted/imported with the critical infrastructure keypair), the license-server-proxy service times out on all outbound validation requests.

Because the handshake fails, the UI throws the same generic "license file is invalid" rejection, even if the license file and keypair were properly matched in the portal.

Resolution

To resolve this issue and bypass the corrupted UI state, administrators must manually generate and inject a fresh set of 4096-bit RSA keypairs to synchronize the Operations node, the License Server, and the BSC portal.

Step 1: Generate New 4096-bit RSA Keypairs
Establish an SSH session to the VCF Operations primary node as root and generate the necessary keys:

# Operations Keypair
openssl genpkey -algorithm RSA -out ops_private_key.pem -pkeyopt rsa_keygen_bits:4096
openssl rsa -pubout -in ops_private_key.pem -out ops_public_key.pem
cat ops_private_key.pem ops_public_key.pem > ops_keypair.pem

# License Server Keypair
openssl genpkey -algorithm RSA -out ls_private_key.pem -pkeyopt rsa_keygen_bits:4096
openssl rsa -pubout -in ls_private_key.pem -out ls_public_key.pem
cat ls_private_key.pem ls_public_key.pem > ls_keypair.pem

Step 2: Inject the VCF Operations Keypair
Copy ops_keypair.pem to a workstation with access to the VCF Operations UI and import it via the internal Swagger API:

Navigate to https://<Ops_FQDN>/suite-api/.

Execute a POST request to /internal/license-manager/identity/keypair using the contents of ops_keypair.pem.

Verify the upload by executing a GET request to /internal/license-manager/registration/status.

Step 3: Inject the License Server Keypair
Retrieve the License Server API "secret" from the License Server VM vApp Options page (ensure the VM has been rebooted to apply the configuration). From a jump box or the Ops node, execute the following API call to upload the License Server private key (ls_private_key.pem):

LS_IP="<LS_IP_OR_FQDN>"
API_KEY="<API_KEY_SECRET>"
KEY_PATH="/root/ls_private_key.pem"
curl -ki -X POST "https://$LS_IP/lss/external/api/v1/identity/key" -H "X-API-Key: $API_KEY" -F "file=@$KEY_PATH"

Step 4: Generate a Fresh Private License
Log into the Broadcom Business Services Console (BSC).

Navigate to your tenant/site to create a private license file.

Paste the contents of ls_public_key.pem and ops_public_key.pem into their respective text boxes to generate a new private license file.

Download the newly generated license file.

Step 5: Import the License
In the VCF Operations UI, navigate to Manage > Licenses & Registration.

Click Import License File and upload the new response file.

The UI will update to display Status: Licensed in green.

Additional Information

For complete architectural details on private licensing key management, refer to the official Broadcom documentation:

VCF 9.1 Licensing - Private License Files: VCF-9.1-Licenng-Private-License-Files.pdf

 

to differentiate between a cryptographic key mismatch and an IP/connectivity failure:

1. If the failure is purely a keypair mismatch, the logs will display:

com.nimbusds.jose.JOSEException: unable to decrypt block in the primary application/analytics logs.  

2. If the failure is caused by an incorrect IP or unconfigured License Server, license-server-proxy.log will show "socket timeouts" or "connection aborts" when routing requests to the local licensing daemon.