admin

command
v0.55.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2026 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Overview

Command admin administers the API key store (ADR 0004).

admin migrate [-listen <address>]
admin key create -label <holder> [-env live|test]
admin key list
admin key revoke -id <id>

migrate applies the embedded SQL migrations not yet applied, under an advisory lock: run it with a role that may change the schema, distinct from the role of the API, before deploying a version that needs them. The API never migrates on start. With -listen, migrate serves /healthz and /readyz on that address until it is stopped, /readyz answering 200 once the migrations are applied and 503 before or after a failure: the form a Serverless Container inside the private network runs (#259).

key create draws a key, "ark_live_…" or "ark_test_…", stores its keyed digest and prints the key once on standard output: it is never stored and cannot be shown again. key list prints every key, its hint (the last four characters), its dates and its label, never the key. key revoke revokes a key in the store at once; revoking it again keeps the first date. A running API is notified of the revocation and refuses the key at once.

The database is ARNAKOFF_DATABASE_URL, which must use sslmode=verify-full beyond the local machine, verified against the PEM certificates of ARNAKOFF_DATABASE_CA when it is set; keys are digested with ARNAKOFF_API_KEY_SECRET, which must differ from ARNAKOFF_LOG_KEY, and issued for ARNAKOFF_API_KEY_ENV ("live" by default) unless -env says otherwise. Logs go to standard error.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL