Admin pages
/admin lists environments with their grants, secrets (names, versions, who last changed them and
their details, never values) and federations. It sets and deletes secrets, records details and
federations, shows the audit log, re-encrypts secrets after a master key rotation, and backfills
data keys once a wrapping key is set (Wrapping key escrow). With a wrapping key, /admin/api/verify checks every
secret row by row by digest, never by value (Checking every row).
Turning them on
Section titled “Turning them on”- Create a Cloudflare Access application covering
/adminand every path under it, including/admin/api/*. Check that an unauthenticated request to/admin/api/bundlesgets Access’s login, not a response from the Worker. Access covers only/admin, so/v1/exchangeneeds no bypass. If your Access application covers the whole hostname, add bypasses for/v1/exchangeand/healthz. - Add the
PORTONA_ADMINbinding: the Access team domain (https://<team>.cloudflareaccess.com), the application’s audience (AUD) tag, and the lowercase emails allowed in.
Without PORTONA_ADMIN the admin pages are off, and an invalid value fails closed.
Two locks, not one
Section titled “Two locks, not one”The Worker doesn’t rely on Access alone:
- Only
/,/healthzand/v1/exchangeare public. Every other request, the admin page included, must carry an Access token that verifies against the team’s keys, for that application, with an allowed email. - Paths containing
%or//are refused, so the router can’t read a path differently from that check. - Requests that change anything must also send
X-Broker-Request: 1and a same-originOrigin. - There are no TanStack server functions:
/_serverFnis refused.
Setting secrets
Section titled “Setting secrets”A secret needs a configured environment, a name shaped like an environment variable, and a value of at most 16 KB. Values are typed into password fields and never sent back. Each change is a compare-and-swap on the secret’s version, and its audit row, with your email as the actor, commits in the same batch.
An environment whose ID disagrees with the environment ledger is marked ID conflict, with the reason and the way out. Its exchanges and changes are refused until the configuration or the ledger is fixed.
Inventory
Section titled “Inventory”- Details. Each secret can carry an owner, a date to rotate it by and notes, such as where it was issued. The page flags a rotation date within 30 days or past; it’s only a reminder, and an overdue secret is still fetched. Details are never the value: don’t paste values into notes.
- Federations. Where a provider trusts a workload’s OIDC token directly (an Entra federated credential, an AWS role trust policy, a Google workload identity pool), record it instead of storing a secret: the provider, the issuer and subject it trusts, and where it’s configured. Mark it verified whenever you check the provider side; saving it again without that clears the mark. Portona keeps the record; the provider enforces it.
Every change is audited. Environments and grants can’t be changed from the admin page. They change only through a commit and a deploy.