Bind a worker's name and labels into its token; list and revoke tokens by jti

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013GAeg4Jo6xjZzjwy9QDWMQ
This commit is contained in:
2026-10-07 08:42:14 +02:00
co-authored by Claude Opus 5.5
parent 71b0f986e9
commit 21537e2eb6
16 changed files with 470 additions and 38 deletions
+69 -1
View File
@@ -3860,6 +3860,17 @@ export const TokenIssuedSchema = {
type: 'string',
title: 'Token'
},
jti: {
type: 'string',
title: 'Jti'
},
labels: {
items: {
type: 'string'
},
type: 'array',
title: 'Labels'
},
expires_days: {
type: 'integer',
title: 'Expires Days',
@@ -3867,7 +3878,7 @@ export const TokenIssuedSchema = {
}
},
type: 'object',
required: ['name', 'token'],
required: ['name', 'token', 'jti'],
title: 'TokenIssued'
} as const;
@@ -3875,7 +3886,16 @@ export const TokenRequestSchema = {
properties: {
name: {
type: 'string',
maxLength: 255,
minLength: 1,
title: 'Name'
},
labels: {
items: {
type: 'string'
},
type: 'array',
title: 'Labels'
}
},
type: 'object',
@@ -4520,6 +4540,54 @@ export const WorkerInfoSchema = {
title: 'WorkerInfo'
} as const;
export const WorkerTokenSchema = {
properties: {
jti: {
type: 'string',
maxLength: 32,
title: 'Jti'
},
name: {
type: 'string',
maxLength: 255,
title: 'Name'
},
labels: {
items: {
type: 'string'
},
type: 'array',
title: 'Labels'
},
created_at: {
type: 'string',
format: 'date-time',
title: 'Created At'
},
expires_at: {
type: 'string',
format: 'date-time',
title: 'Expires At'
},
revoked_at: {
anyOf: [
{
type: 'string',
format: 'date-time'
},
{
type: 'null'
}
],
title: 'Revoked At'
}
},
type: 'object',
required: ['jti', 'name', 'expires_at'],
title: 'WorkerToken',
description: 'One worker credential, by the id it carries as `jti`.'
} as const;
export const fluksio__api__routes__dashboards__PublishRequestSchema = {
properties: {
version: {
File diff suppressed because one or more lines are too long
+23
View File
@@ -1291,11 +1291,14 @@ export type Token = {
export type TokenIssued = {
name: string;
token: string;
jti: string;
labels?: Array<(string)>;
expires_days?: number;
};
export type TokenRequest = {
name: string;
labels?: Array<(string)>;
};
export type TriggerRequest = {
@@ -1474,6 +1477,18 @@ export type WorkerInfo = {
ram_mb?: (number | null);
};
/**
* One worker credential, by the id it carries as `jti`.
*/
export type WorkerToken = {
jti: string;
name: string;
labels?: Array<(string)>;
created_at?: string;
expires_at: string;
revoked_at?: (string | null);
};
export type AiReadAiConfigResponse = (AIConfigPublic);
export type AiUpdateAiConfigData = {
@@ -2207,10 +2222,18 @@ export type WorkersReadWorkersResponse = (Array<WorkerInfo>);
export type WorkersReadResourcesResponse = (ResourcesSnapshot);
export type WorkersReadTokensResponse = (Array<WorkerToken>);
export type WorkersIssueTokenData = {
requestBody: TokenRequest;
};
export type WorkersIssueTokenResponse = (TokenIssued);
export type WorkersRevokeTokenData = {
jti: string;
};
export type WorkersRevokeTokenResponse = (WorkerToken);
export type WorkersReadRuntimeResponse = (string);