Skip to content
Historical revision — this record as it stood on 1 July 2026, not the current version. View the current record →

How to rotate keys and capability tokens

Key rotation replaces an Ed25519 keypair and its associated capability token before the old credentials expire or after a suspected compromise. Rotation is a planned operation with a brief transition window during which both the old and new tokens are valid. This guide covers the full rotation sequence: generating a new keypair, issuing a new token, transitioning the recipient, and revoking the old token.

For the authorization model, see machine-based-auth. For issuing a token from scratch, see issue-capability-token.

Prerequisites

  • Access to the token issuance service at administrator scope
  • The identity of the credential holder (the public key of the old keypair, or the device identifier)
  • A coordination window: both the holder and the issuance service must be available

Step 1: Generate a new keypair on the recipient device

The credential holder generates a new Ed25519 keypair on their device. The private key never leaves the device; only the public key is shared with the issuer.

For a console session:

os-console --generate-keypair --out new-key

For a PPN node:

service-vm-host --generate-keypair --out /etc/ppn/new-key

Both commands write a new-key.pub (public key, base64) and a new-key (private key, local only). Record the public key value for step 2.

Step 2: Issue a new token against the new keypair

Using the new public key, request a new capability token at the same scope as the old one:

curl -X POST http://<issuance-service-host>:<port>/v1/tokens \
  -H "Authorization: Bearer <admin-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "subject_pubkey": "<new-base64-pubkey>",
    "scope": "<same-scope-as-old-token>",
    "expires_in_seconds": 86400
  }'

The response is a new signed token payload. Do not deliver it yet.

Step 3: Deliver and load the new token

Deliver the new token to the credential holder through a trusted channel. The holder loads it alongside the old token — during the transition window, both are valid:

os-console --load-token <new-token-payload>

For a service:

export PLATFORM_TOKEN=<new-token-payload>

Verify the new token is accepted by the API before proceeding. If the new token is rejected, do not revoke the old token — investigate the rejection reason first.

Step 4: Revoke the old token

Once the holder confirms the new token is working, revoke the old token:

curl -X DELETE http://<issuance-service-host>:<port>/v1/tokens/<old-token-id> \
  -H "Authorization: Bearer <admin-token>"

The old token ID is the jti (JWT ID) field from the original token payload, or the subject public key if the issuance service uses public key as the lookup key. After revocation, the old token returns 401 on any API call.

Step 5: Remove the old keypair from the device

After confirming the old token is revoked and the new token is working, remove the old keypair:

rm -f /etc/ppn/old-key /etc/ppn/old-key.pub

For a console session, the old keypair is removed via:

os-console --remove-keypair <old-key-fingerprint>

Do not remove the old keypair before revoking the old token — if the new token fails and you need to fall back, the old keypair must still be present.

Key takeaways

  • Rotation is a three-phase process: new token issued → new token verified → old token revoked
  • Never remove the old keypair before the old token is revoked and the new token is confirmed working
  • Both tokens are valid during the transition window — keep the window short (minutes, not days)
  • A rotation caused by suspected compromise should skip the transition window: revoke the old token immediately before the new one is loaded

See also

Important Information

Important Information

Corporate structure. PointSav Digital Systems ("PointSav") is a trade name of Woodfine Capital Projects Inc. ("Woodfine"). PointSav does not itself offer, sell, or solicit any security. Any securities offering associated with Woodfine's real-property direct-hold solutions is made exclusively by Woodfine, and only by means of the applicable Private Placement Memorandum.

No investment advice. This wiki's content is provided for engineering, operational, research, and development purposes. Nothing on this wiki constitutes investment advice or a solicitation to invest in any Woodfine partnership or direct-hold solution.

Intellectual property. The PointSav name, trade name, wordmark, and marks, together with all current and future PointSav- and Totebox-branded products, services, and offerings — and the software, source code, documentation, design system, and all related materials — are proprietary to Woodfine and its affiliates, except for components identified as open source. No rights are granted except as expressly set out in a written license or agreement. See TRADEMARK.md in this repository for the full trademark notice.

Open source components. Portions of the platform are made available under permissive open-source licenses identified in the accompanying repository. Use of those components is governed by their respective license terms.

No warranty; informational use. Content on this wiki is provided for general informational purposes only and does not constitute a representation, warranty, or commitment with respect to product functionality, availability, pricing, or roadmap. Some articles describe planned or intended features, capabilities, and milestones — language such as "planned," "intended," "targeted," "may," and "expected" marks this forward-looking content, which is subject to change and does not constitute a commitment regarding future performance.

Confidentiality. Where an article describes an operational or deployment detail that is not intended for public disclosure, that article is not published on this wiki. Content here is general-purpose engineering documentation, not customer-specific configuration.

Jurisdiction. Woodfine Capital Projects Inc. is organized in British Columbia, Canada. References to the Sovereign Data Foundation on this wiki describe a planned or intended initiative only, not a current equity holder or active governance body.

Changes to this notice. PointSav may update this notice from time to time; the version posted on this page governs.

Not a filing system. This wiki is not a securities filing system, an electronic disclosure repository, or a substitute for SEDAR+ or any other regulatory filing system. Formal securities filings are made through the applicable regulatory filing system, not through this wiki.

Full disclaimer. This notice supplements, and does not replace, the full Disclaimers article. In the event of any conflict, the full Disclaimers article governs.

Read the full disclaimer →