HYBRID-CHAINDEVELOPERS
DOCUMENTATIONv2
POST

Identity login policy

Rotate workload client

/api/v2/admin/identity/workload-clients/{client_id}/rotations
AUTHENTICATIONBearer token · admin:identity:writeAUTHORITATIVE OWNERidentity-serviceCONTRACT AUTHORITYGenerated Rust OpenAPISTATUSSource ready · production listed

PURPOSE + BUSINESS CONTEXT

Rotate a workload client's public request-signing key using old-key authorization and new-key proof of possession.

WHEN THIS CALL IS USEFUL

Rotate a workload request-signing key when planned key hygiene, suspected exposure, or custody migration requires a replacement without changing client identity or allowed scopes.

OUTCOME · Create or advance

What changes

Activates the replacement public key, changes the derived request-signing key ID, records a rotation commitment, and immediately revokes every active workload bearer.

WHY IT MATTERS

  • Gives people and agents a contract-backed way to advance workload client.
  • Separates subject identity, consent, evidence, provider output, review, issuer credentials, and relying-party acceptance instead of collapsing them into a universal trust score.

ISOLATION + AUTHORITY

Bearer subject, tenant, purpose, policy version, role, issuer, reviewer, provider, and relying-party boundaries remain distinct. The response or transition grants no payment, custody, settlement, publisher, matching, or trading authority and must not expose regulated evidence beyond the live schema.

BEFORE YOU CALL

  • Authenticate at the documented boundary: bearer+scope.
  • Supply the required client_id (path), public_key_jwk (body), proof (body), step_up_token (body) exactly as defined by the live contract.
  • Resolve the applicable purpose, policy version, consent or role basis, and required assurance before relying on this result.

WHAT TO DO NEXT

  • Re-read workload client using the canonical identifier returned by this operation.
  • Reconcile an ambiguous response with the same idempotency key before attempting another mutation.
  • Use the returned lifecycle state and policy version to choose the next least-privilege trust action; do not infer a missing stage.

AGENT GUIDANCE

  • Use workload client only for the purpose and lifecycle stage described by this operation; do not treat it as authority for an adjacent action.
  • Supply the required client_id (path), public_key_jwk (body), proof (body), step_up_token (body) exactly as defined by the live contract.
  • Treat policy availability, consent, evidence capture, completed checks, review, decision, credential issuance, validity, and relying-party acceptance as separate facts.
  • After a timeout or conflict, read authoritative state before deciding whether an equivalent retry is safe.
MACHINE CONTRACT

The exact deployed parameters, schemas, responses, security requirements, and Hybrid-Chain agent metadata are authoritative at this operation's production OpenAPI JSON Pointer. The readable tables below add integration guidance; the deployed OpenAPI controls if guidance and the machine contract ever differ.

Open the authoritative production contract

EXTENDED INTEGRATION GUIDANCE

Readable request and response reference

Examples illustrate integration intent; the referenced OpenAPI operation and component schemas define the executable shape.

PARAMETERS

Headers, path, query, and body

NAMELOCATIONPRESENCETYPE / RULES / PURPOSE
AuthorizationheaderRequired

Bearer tokenCredential containing the admin:identity:write scope.EXAMPLEBearer hc_live_…

client_idpathRequired

hcwc_ identifierActive tenant-scoped workload client whose key is being replaced.

public_key_jwkbodyRequired

OKP Ed25519 public JWKReplacement public request-signing key. Private key material is forbidden.

proofbodyRequired

base64url Ed25519 signatureReplacement-key signature over hybrid-chain/workload-client-key-rotation/v1, a NUL byte, and canonical key-sorted JSON containing algorithm, client_id, new_public_key_jwk, and tenant_uuid.

step_up_tokenbodyRequired

one-use hcsu_ tokenFresh WORKLOAD_CLIENT_KEY_ROTATION authorization from the current administrator session.

REQUEST

JSON body example

{
  "public_key_jwk": {
    "kty": "OKP",
    "crv": "Ed25519",
    "x": "base64url-32-byte-public-key"
  },
  "proof": "base64url-ed25519-signature",
  "step_up_token": "hcsu_…"
}

STABLE ERROR CODES

Branch on the code, then follow the recovery action

These codes are published by the authoritative gateway contract for this endpoint. Treat message as safe diagnostic text; integrations should branch on code and HTTP status.

STATUSCODEMEANING
400invalid_jsonThe JSON body is malformed or fails the published identity-security schema.
400invalid_security_requestThe session, scope, public key, proof, or purpose-bound security request is invalid.
401invalid_credentialsThe bearer, client assertion, or proof-of-possession credential is invalid.
403step_up_requiredFresh purpose-bound authenticator verification or stronger authority is required.
404signing_key_not_foundThe requested signing-key or workload-client resource was not found.
409security_conflictThe requested identity-security transition conflicts with current state.
503identity_security_unavailableThe authoritative Identity security service is temporarily unavailable.

RESPONSES

Status and payload examples

200Replacement key activated; existing workload bearers revoked.Mutation completed · JSON RESPONSE+
{
  "client_id": "hcwc_…",
  "status": "ACTIVE",
  "previous_request_signing_key_id": "hck_old…",
  "request_signing_key_id": "hck_new…",
  "rotation_commitment": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "active_access_tokens_revoked": true
}
INTEGRATION DECISION
CALLER ACTION
Accept the returned representation or receipt, then re-read workload client using the canonical identifier returned by this operation.
RETRY SAFETY
Do not repeat a successful mutation merely to confirm it. This mutation has no documented idempotent replay contract. Reconcile state before considering another attempt.
STATE RECONCILIATION
Persist returned identifiers, versions, commitments, and receipts. Refresh the subject, claim or credential version, issuer and reviewer authority, evidence commitment, decision, expiry, and revocation status.
400The replacement JWK or proof is malformed.Request must change · JSON RESPONSE+
{
  "code": "invalid_security_request",
  "message": "The replacement JWK or proof is malformed."
}
INTEGRATION DECISIONinvalid_security_request
CALLER ACTION
Rebuild the request from the live OpenAPI operation and correct the rejected method, media type, header, parameter, or body field.
RETRY SAFETY
Do not retry the same invalid request. This mutation has no documented idempotent replay contract. Reconcile state before considering another attempt.
STATE RECONCILIATION
Compare the submitted values with the documented constraints before another call. Refresh the subject, claim or credential version, issuer and reviewer authority, evidence commitment, decision, expiry, and revocation status.
ESCALATE WHEN
Escalate when subject binding, evidence minimization, issuer or reviewer authority, decision lineage, expiry, or revocation cannot be established.
401The administrator bearer is invalid.Authentication required · JSON RESPONSE+
{
  "code": "invalid_credentials",
  "message": "The administrator bearer is invalid."
}
INTEGRATION DECISIONinvalid_credentials
CALLER ACTION
Discard the rejected credential, complete the documented authentication or reassertion flow, and rebuild any request signature with fresh timestamps and nonces.
RETRY SAFETY
Retry only with a newly valid credential and fresh replay-protection values. This mutation has no documented idempotent replay contract. Reconcile state before considering another attempt.
STATE RECONCILIATION
Assume the outcome is unknown only when the connection failed after transmission; otherwise authentication failed before domain work. Refresh the subject, claim or credential version, issuer and reviewer authority, evidence commitment, decision, expiry, and revocation status.
ESCALATE WHEN
Escalate when subject binding, evidence minimization, issuer or reviewer authority, decision lineage, expiry, or revocation cannot be established.
403Tenant authority, replacement-key possession, or matching step-up is missing.Authority or policy denied · JSON RESPONSE+
{
  "code": "step_up_required",
  "message": "Tenant authority, replacement-key possession, or matching step-up is missing."
}
INTEGRATION DECISIONstep_up_required
CALLER ACTION
Verify the exact scope, tenant or workspace membership, owner boundary, step-up purpose, feature policy, and resource eligibility. Never broaden authority automatically.
RETRY SAFETY
Do not retry until the missing authority or policy condition has been deliberately resolved with least privilege.
STATE RECONCILIATION
Confirm the caller and resource resolve to the same authority boundary for subject-scoped trust claims, evidence, credentials, reviews, decisions, presentations, and revocations.
ESCALATE WHEN
Escalate when subject binding, evidence minimization, issuer or reviewer authority, decision lineage, expiry, or revocation cannot be established.
404The active workload client was not found.Resource not visible · JSON RESPONSE+
{
  "code": "signing_key_not_found",
  "message": "The active workload client was not found."
}
INTEGRATION DECISIONsigning_key_not_found
CALLER ACTION
Verify the canonical identifier and authenticated owner boundary. A 404 may intentionally conceal a resource outside the caller's authority.
RETRY SAFETY
Do not retry the unchanged identifier repeatedly. Refresh the relevant collection or lookup before choosing another identifier.
STATE RECONCILIATION
Refresh the subject, claim or credential version, issuer and reviewer authority, evidence commitment, decision, expiry, and revocation status.
ESCALATE WHEN
Escalate when subject binding, evidence minimization, issuer or reviewer authority, decision lineage, expiry, or revocation cannot be established.
503Workload identity administration is unavailable.Dependency unavailable or outcome uncertain · JSON RESPONSE+
{
  "code": "identity_security_unavailable",
  "message": "Workload identity administration is unavailable."
}
INTEGRATION DECISIONidentity_security_unavailable
CALLER ACTION
Preserve the exact request and treat the outcome as uncertain until authoritative state proves whether it committed.
RETRY SAFETY
Reconcile before retrying. This mutation has no documented idempotent replay contract. Reconcile state before considering another attempt. Use bounded backoff with jitter.
STATE RECONCILIATION
Refresh the subject, claim or credential version, issuer and reviewer authority, evidence commitment, decision, expiry, and revocation status.
ESCALATE WHEN
Escalate when subject binding, evidence minimization, issuer or reviewer authority, decision lineage, expiry, or revocation cannot be established.

OPERATIONAL NOTES

Security and lifecycle guarantees

  • The old private key is never submitted. Successful rotation changes the derived request-signing key ID without changing client_id, tenant, label, or allowed scopes.
  • All hcw_ bearers issued before rotation are invalid immediately. Exchange a fresh one-time assertion signed by the replacement key before resuming work.
  • Retain rotation_commitment with the administrative audit record and update any verifier pinned to previous_request_signing_key_id.
DOCUMENTATION STATUS

This route is implemented in canonical gateway source and appears in the production OpenAPI snapshot observed 2026-09-11T06:35:11.572Z. Authentication, tenant, feature, venue, and market policy still apply.

Verify the exact production OpenAPI operation Return to the V2 directory