Skip to content

Signing Key Generation

AgentCube uses an RSA key pair to sign JWT assertions for Oracle token exchange. The private key stays with AgentCube; the public certificate is imported into OCI. The signing happens in the connector, which performs the Oracle token exchange (Layer 2) on behalf of the identity the Context Engine validated at its inbound edge.

You need OpenSSL. Windows does not include it by default: install it with winget install ShiningLight.OpenSSL.Light, or use the openssl.exe that ships with Git for Windows.

Terminal window
# Generate RSA private key (2048-bit)
openssl genrsa -out agentcube-signing.pem 2048
# Generate self-signed X.509 certificate (5-year validity)
openssl req -new -x509 -key agentcube-signing.pem -out agentcube-signing.cer -days 1825 -subj "/CN=AgentCube MCP/O={organization_name}"
Terminal window
# Generate RSA private key (2048-bit)
openssl genrsa -out agentcube-signing.pem 2048
# Generate self-signed X.509 certificate (5-year validity)
openssl req -new -x509 \
-key agentcube-signing.pem \
-out agentcube-signing.cer \
-days 1825 \
-subj "/CN=AgentCube MCP/O={organization_name}"

This produces two files:

FilePurposeWhere It Goes
agentcube-signing.pemPrivate key — signs JWT assertionsEach EPM connector container (AGENTCUBE_SIGNING_KEY_BASE64 or AGENTCUBE_SIGNING_KEY_PATH)
agentcube-signing.cerPublic certificate — verifies signaturesOCI Identity Domain trusted partner certificates

The private key is required on each EPM connector (Planning, FCCS, Essbase) that runs in oidc or internal auth mode. It is not set on the Context Engine. The Context Engine has its own, separate signing key for federated SSO, AGENTCUBE_CE_INTERNAL_SIGNING_KEY, generated the same way (openssl genrsa with 2048 bits); see Certificate Rotation. See Auth Modes and Environment Variables.

For container deployments, base64-encode the private key as a single line:

Terminal window
[Convert]::ToBase64String([IO.File]::ReadAllBytes("agentcube-signing.pem")) | Set-Content agentcube-signing.b64 -NoNewline
Terminal window
base64 < agentcube-signing.pem | tr -d '\n' > agentcube-signing.b64

Set the contents of agentcube-signing.b64 as the AGENTCUBE_SIGNING_KEY_BASE64 environment variable.

Also set AGENTCUBE_SIGNING_KID to the alias you give the certificate in OCI (default agentcube-mcp). The two must match exactly, or the Oracle token exchange fails.

See OCI Identity Domain Setup — Step 4.

  • Protect the private key — treat it like a password. Store it in your platform’s secret management (Azure Key Vault, environment secrets, etc.)
  • Never commit the private key or the .b64 file to source control
  • Certificate expiry — the certificate expires after 5 years (1825 days). See Certificate Rotation for renewal procedures.