Create or rotate an application key
Issues a new application key named keyId and returns it this once. An application key of that name is replaced: the old one stops authenticating at once. A management key, studio and bootstrap are refused.
managementKeyAuthorizationBearer <token>A management key of the Tenant (role management): it reaches the Management API (/v1/tenant/*) and /v1/me, as itself, never for a subject. Issued only on the Tenant's machine (nylorun-operate keys put <id> --role management) or from NYLORUN_MANAGEMENT_KEY_FILE. Never accepted from a browser (Origin).
keyId*stringThe key's name: ^[a-z][a-z0-9-]{0,31}$, never studio or bootstrap
Nylorun-Protocol*stringThe protocol version, 8
The new key, shown once
application/json- response
id*string1 <= lengthrole*string1 <= lengthcreatedAt*string1 <= lengthkey*string^[0-9a-f]{64}$rotated*booleanimport { createAdmin } from "@nylorun/admin";const admin = createAdmin();const { key } = await admin.keys.put("backend"); // shown once{ "id": "string", "role": "string", "createdAt": "string", "key": "string", "rotated": true}List the Tenant's keys GET
Every key of the Tenant by name, with its role (`application`, `management` or `studio`) and when it was issued. Keys themselves are never shown again.
Delete an application key DELETE
The key stops authenticating at once. A management key, `studio` and `bootstrap` are refused.