Skip to content

AgentCube uses RSA signing keys when a connector runs with AGENTCUBE_AUTH_MODE=internal or oidc (see Auth Modes). There are two keys to look after:

  • The connector signing key signs the JWT assertions for Oracle token exchange. It lives on each EPM connector that performs the exchange, and its certificate is imported into OCI.
  • The Context Engine internal signing key (internal mode only) signs the short-lived identity tokens the Context Engine sends to internal-mode connectors.

Both require periodic rotation.

The signing key is used to create JWT assertions for Oracle token exchange. The certificate has a finite validity period (default 5 years / 1825 days).

  • Before the certificate expires
  • If the private key is compromised
  • Per your organization’s security policy
  1. Generate a new key pair (on Windows, install OpenSSL first, as described in Signing Key Generation):

    Terminal window
    openssl genrsa -out agentcube-signing-new.pem 2048
    openssl req -new -x509 -key agentcube-signing-new.pem -out agentcube-signing-new.cer -days 1825 -subj "/CN=AgentCube MCP/O={organization_name}"
    Terminal window
    openssl genrsa -out agentcube-signing-new.pem 2048
    openssl req -new -x509 \
    -key agentcube-signing-new.pem \
    -out agentcube-signing-new.cer \
    -days 1825 \
    -subj "/CN=AgentCube MCP/O={organization_name}"
  2. Import the new certificate to OCI Identity Domain:

    • Go to Security → Trusted partner certificates → Import certificate
    • Upload the new certificate with a new alias (e.g., agentcube-mcp-2)
  3. Update environment variables on every connector (Planning, FCCS, Essbase) that does Oracle token exchange with this key:

    • Set AGENTCUBE_SIGNING_KEY_BASE64 to the base64-encoded new private key. Encode it as a single line:

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

      If you mount the key file instead, point AGENTCUBE_SIGNING_KEY_PATH at the new PEM. It takes precedence over AGENTCUBE_SIGNING_KEY_BASE64.

    • Set AGENTCUBE_SIGNING_KID to the new certificate alias. If it is unset, the connector falls back to agentcube-mcp, so a rotation that skips this step keeps presenting the old alias and the token exchange fails.

  4. Restart the connector containers to pick up the new configuration

  5. Verify — test an SSO login and tool call to confirm the new key works

  6. Remove the old certificate from OCI trusted partner certificates (after confirming the new key works)

If any connected system is registered with auth mode internal, the Context Engine holds its own RSA private key in AGENTCUBE_CE_INTERNAL_SIGNING_KEY. It signs a short-lived token for every call to an internal-mode connector and publishes the public key at {ce_url}/.well-known/jwks.json, which connectors read through AGENTCUBE_INTERNAL_JWKS_URL. The Context Engine refuses to start while an internal connected system exists and this key is unset. This key is not imported into OCI.

  1. Generate a new private key (same command on Windows and macOS/Linux):

    Terminal window
    openssl genrsa -out ce-internal-new.pem 2048
  2. Set AGENTCUBE_CE_INTERNAL_SIGNING_KEY on the Context Engine to the full PEM contents of ce-internal-new.pem, in your platform’s secret store. Every Context Engine replica must use the same key.

  3. Restart the Context Engine.

  4. Verify with a tool call through each internal-mode connector. No connector changes are needed.

If your identity provider (Entra, Okta, etc.) rotates its signing keys, AgentCube typically handles this automatically through OIDC discovery. No manual action is required unless your IdP requires it.