feat: Add the API token endpoints
Create, list and revoke, with no update: editing what a credential already deployed in CI can do, with no record of what it could do before, is worse than requiring a rotation. Revoking a token that is not yours answers not-found, since a 403 confirms it exists. The audit actor stays the human and names the credential alongside, so a person clicking and their CI job are told apart.
This commit is contained in:
@@ -38,6 +38,7 @@ export const AUDIT_CATEGORIES: { value: string; label: string }[] = [
|
||||
{ value: "updates", label: "OS updates" },
|
||||
{ value: "auth_provider", label: "Single sign-on" },
|
||||
{ value: "settings", label: "Settings" },
|
||||
{ value: "token", label: "API tokens" },
|
||||
{ value: "license", label: "Licence" },
|
||||
{ value: "instance", label: "Instance" },
|
||||
];
|
||||
@@ -98,6 +99,10 @@ const OVERRIDES: Record<string, string> = {
|
||||
"instance.reaped": "Instance deleted",
|
||||
"vuln.rescan": "Rescan requested",
|
||||
"workload.logs_read": "Workload logs read",
|
||||
"token.created": "API token created",
|
||||
"token.revoked": "API token revoked",
|
||||
"token.expired_use": "Expired API token used",
|
||||
"settings.token_policy_updated": "API token policy updated",
|
||||
};
|
||||
|
||||
export interface AuditEventDisplay {
|
||||
|
||||
Reference in New Issue
Block a user