Skip to content

TSA Trust Anchor Duplicate

URI: https://docs.ankatech.co/errors/tsa-trust-anchor-duplicate
HTTP Status: 409 Conflict

When you see this

One of the certificates you selected for commit already exists as a TSA trust anchor: its SHA-256 fingerprint is already stored. The check mirrors the table's unique fingerprint constraint at the application layer, so you get a clean conflict rather than a raw database integrity error. The whole upload is refused; the detail never echoes the fingerprint, subject, or issuer.

Common Causes

  • The same certificate was uploaded twice.
  • The certificate is already stored under a different friendly name — the fingerprint is what makes an anchor unique, not the name.
  • The certificate is present as a RETIRED anchor that was never deleted; a retired row still occupies its fingerprint.
  • A PEM upload and a DER upload of the same certificate collide, because both are fingerprinted over the same canonical DER encoding.

Response Example

{
  "type": "https://docs.ankatech.co/errors/tsa-trust-anchor-duplicate",
  "title": "Conflict",
  "status": 409,
  "detail": "A trust anchor with the same certificate fingerprint already exists.",
  "instance": "/api/v3/admin/platform/tsa/trust-anchors",
  "timestamp": 1730000000,
  "extensions": {
    "requestId": "550e8400-e29b-41d4-a716-446655440000"
  }
}

Content-Type: application/problem+json — the response follows RFC 9457 Problem Details.

How to Resolve

  1. Run POST /api/v3/admin/platform/tsa/trust-anchors/analyze on the file: each candidate carries an alreadyPresent flag that tells you which fingerprints are already stored.
  2. Narrow the fingerprints selection to the candidates that are not already present.
  3. If the existing anchor is RETIRED and you want to re-add the same certificate, delete the retired row first with DELETE /api/v3/admin/platform/tsa/trust-anchors/{id}, then upload again.
  4. If the anchor is already ACTIVE, no action is needed — the trust you intended is already in place.

For full schema definitions, examples, and interactive testing, see the Developer Hub Reference.