Upgrading pre-26.06.1 API tokens
Migrate API tokens created before 26.06.1 to the replicated auth path: inventory and re-issue each token cluster-wide, then remove the legacy rows locally with the node stopped.
Applies to Arc Enterprise clusters that carry API-created tokens from before 26.06.1. Before that release, every node kept its own SQLite auth database, so a token created through the API existed only on the node that issued it. 26.06.1 moved token creation and revocation onto the replicated Raft path, but pre-existing tokens were not migrated. They keep working on their home node until an operator replaces them.
Plan a maintenance window and preserve administrative access throughout. Bootstrap tokens configured via ARC_AUTH_BOOTSTRAP_TOKEN with the same value on every node are unaffected.
Never revoke a legacy token through the API
The cluster revoke endpoint (POST /api/v1/auth/tokens/:id/revoke) resolves the ID in the replicated FSM, which never held pre-26.06.1 tokens. Two failure modes follow: an unknown ID is an idempotent no-op even though the API reports success, so the legacy token keeps working on its home node; and if a legacy AUTOINCREMENT ID collides with a replicated token ID, the same request revokes the replacement token cluster-wide instead. Legacy tokens are removed locally, with the node stopped, as described below.
Maintenance procedure
- Inventory active tokens on every node before upgrading: record node, local token identity, name, permissions, owner, and consumers. Preserve enough non-secret identity to distinguish legacy rows from their replacements; a numeric ID alone is insufficient. Do not export hashes or plaintext into the inventory.
- Back up each node's auth database with the node stopped: the file configured by
auth.db_path, including SQLite-waland-shmsidecars when present. Keep the backup access-restricted. Never copy or delete the live database while the node is writing. - Upgrade all nodes to 26.06.1 or later. Restore stable leadership and full membership before issuing replicated tokens.
- Validate the replicated path with a short-lived token created through
POST /api/v1/auth/tokens. Confirm it authenticates on every node and thatarc_cluster_auth_apply_create_totalincrements to match on every node. Revoke this new token throughPOST /api/v1/auth/tokens/:id/revokeand verify it is rejected everywhere. - Re-issue each inventoried token through
POST /api/v1/auth/tokenson any node, preserving its scope and permissions. Capture the returned plaintext once into the approved secret store. Verify it on every node before rotating any consumer. If an ID collision prevents materialisation, stop and resolve the divergence (see below) before proceeding. - Rotate downstream consumers (CI secrets, SDKs, dashboards) to the replacement. Verify each consumer against multiple nodes.
- Remove the old token locally on every node that holds it. Stop the node, take a fresh backup, and remove only the positively identified legacy rows from its local auth database, or use the supported rebuild from replicated FSM state. Do not select rows by ID alone, and do not remove a replicated replacement. If identity cannot be established, stop and seek support rather than guessing. Restart and verify that replacement tokens still authenticate and legacy tokens do not. Keep quorum available during node maintenance, or use a planned full-cluster outage. Repeat steps 5 through 7 one token at a time.
- Verify completion: every active consumer uses a replacement, apply counters converge across nodes,
arc_cluster_auth_rejected_totalis stable, and every legacy token is rejected on every node.
Divergence and rollback
On a collision or a growing arc_cluster_auth_rejected_total, stop the affected node and preserve its backup. Reconcile only the conflicting legacy rows, or rebuild the node's local auth database from authoritative FSM state before it rejoins. Never remove Raft state to repair the SQLite cache, and do not invent SQL cleanup by token ID.
Restoring a pre-upgrade database can re-enable legacy credentials and diverge from replicated state. Treat rollback as a coordinated maintenance operation: keep the affected node out of client traffic until its state and credentials have been reconciled and verified. Retain backups until the completed migration is accepted.
Background
The 26.06.1 release notes cover the auth replication design, ID-collision detection, and the related metrics. The source issue is #457; its original suggestion to revoke legacy tokens through the API does not apply to unmigrated rows.
Profiling with pprof
Enable Go pprof on an Arc Enterprise node with ARC_DEBUG_PPROF to capture heap, goroutine, and CPU profiles, and the loopback and firewall gates required to expose it.
Query
Arc Enterprise query controls: per-token rate limits, quotas, and row caps under governance, plus live query inspection and cancellation under query management.