@serve.zone/interfaces 16.8.0 → 17.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +15 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/data/gateway.d.ts +14 -1
- package/dist_ts/requests/gateway.d.ts +31 -5
- package/package.json +1 -1
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/data/gateway.ts +15 -1
- package/ts/requests/gateway.ts +37 -5
package/changelog.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026-07-21 - 17.1.0
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- expose the server-authoritative candidate, active, or manual lifecycle state in gateway-client auth contexts
|
|
8
|
+
|
|
9
|
+
## 2026-07-21 - 17.0.0
|
|
10
|
+
|
|
11
|
+
### Breaking Changes
|
|
12
|
+
|
|
13
|
+
- make gateway-client credential handover explicitly two-phase (gateway)
|
|
14
|
+
- Provisioning now returns an unfinalized candidate credential without revoking existing credentials.
|
|
15
|
+
- Add candidate-authenticated finalization to activate credentials and revoke superseded client-bound credentials.
|
|
16
|
+
- Remove caller-selected gateway client finalization and provisioning-time revocation counts from the gateway API contract.
|
|
17
|
+
|
|
3
18
|
## 2026-07-21 - 16.8.0
|
|
4
19
|
|
|
5
20
|
### Features
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@serve.zone/interfaces',
|
|
6
|
-
version: '
|
|
6
|
+
version: '17.1.0',
|
|
7
7
|
description: 'Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.'
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx3QkFBd0I7SUFDOUIsT0FBTyxFQUFFLFFBQVE7SUFDakIsV0FBVyxFQUFFLHVGQUF1RjtDQUNyRyxDQUFBIn0=
|
|
@@ -160,11 +160,20 @@ export interface IGatewayClientProvisioningSpec {
|
|
|
160
160
|
capabilities: IGatewayTokenCapabilities;
|
|
161
161
|
enabled?: boolean;
|
|
162
162
|
}
|
|
163
|
-
/**
|
|
163
|
+
/**
|
|
164
|
+
* One-time credential material returned after durable token creation.
|
|
165
|
+
*
|
|
166
|
+
* Provisioning creates a candidate only. Existing client-bound credentials
|
|
167
|
+
* remain active until the candidate authenticates the explicit finalization
|
|
168
|
+
* request, preventing a lost provisioning response from locking out the
|
|
169
|
+
* gateway client.
|
|
170
|
+
*/
|
|
164
171
|
export interface IGatewayClientCredential {
|
|
165
172
|
tokenId: string;
|
|
166
173
|
tokenValue: string;
|
|
167
174
|
issuedAt: number;
|
|
175
|
+
state: 'candidate';
|
|
176
|
+
finalizationRequired: true;
|
|
168
177
|
}
|
|
169
178
|
export type TGatewayClientProvisioningAction = 'created' | 'updated' | 'unchanged';
|
|
170
179
|
/**
|
|
@@ -178,6 +187,8 @@ interface IGatewayClientContextBase {
|
|
|
178
187
|
allowedRouteTargets: IGatewayRouteTargetAllowance[];
|
|
179
188
|
capabilities: IGatewayTokenCapabilities;
|
|
180
189
|
}
|
|
190
|
+
/** Server-authoritative lifecycle of an authenticated gateway-client credential. */
|
|
191
|
+
export type TGatewayCredentialState = 'candidate' | 'active' | 'manual';
|
|
181
192
|
/**
|
|
182
193
|
* Resolved authorization context. A gateway-client role always proves the
|
|
183
194
|
* concrete credential, bound client, and current live policy generation.
|
|
@@ -186,6 +197,8 @@ interface IGatewayClientContextBase {
|
|
|
186
197
|
export type IGatewayClientContext = IGatewayClientContextBase & ({
|
|
187
198
|
role: 'gatewayClient';
|
|
188
199
|
credentialId: string;
|
|
200
|
+
/** Present on lifecycle-aware gateways. Candidates are validation/finalization-only. */
|
|
201
|
+
credentialState?: TGatewayCredentialState;
|
|
189
202
|
gatewayClient: {
|
|
190
203
|
type: TGatewayClientType;
|
|
191
204
|
id: string;
|
|
@@ -33,10 +33,10 @@ export interface IReq_GetGatewayClientContext extends plugins.typedrequestInterf
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
|
-
* Admin-only
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
36
|
+
* Admin-only gateway-client upsert and candidate credential issue.
|
|
37
|
+
* Provisioning never revokes prior client-bound credentials. The returned
|
|
38
|
+
* candidate must prove possession through finalizeGatewayClientCredential
|
|
39
|
+
* before the gateway activates it and revokes superseded siblings.
|
|
40
40
|
*/
|
|
41
41
|
export interface IReq_ProvisionGatewayClientCredential extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_ProvisionGatewayClientCredential> {
|
|
42
42
|
method: 'provisionGatewayClientCredential';
|
|
@@ -52,9 +52,35 @@ export interface IReq_ProvisionGatewayClientCredential extends plugins.typedrequ
|
|
|
52
52
|
success: true;
|
|
53
53
|
action: TGatewayClientProvisioningAction;
|
|
54
54
|
gatewayClient: IGatewayClient;
|
|
55
|
-
/** One-time credential material returned
|
|
55
|
+
/** One-time, unfinalized credential material returned after durable creation. */
|
|
56
56
|
credential: IGatewayClientCredential;
|
|
57
|
+
message?: string;
|
|
58
|
+
} | {
|
|
59
|
+
success: false;
|
|
60
|
+
message: string;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Candidate-authenticated completion of a gateway-client credential handover.
|
|
65
|
+
* The gateway resolves client ownership from the candidate token itself; the
|
|
66
|
+
* caller cannot select a gateway client or finalize another credential.
|
|
67
|
+
*/
|
|
68
|
+
export interface IReq_FinalizeGatewayClientCredential extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_FinalizeGatewayClientCredential> {
|
|
69
|
+
method: 'finalizeGatewayClientCredential';
|
|
70
|
+
request: {
|
|
71
|
+
/** The one-time candidate token value returned by provisioning. */
|
|
72
|
+
apiToken: string;
|
|
73
|
+
/** Must identify the same candidate credential as apiToken. */
|
|
74
|
+
tokenId: string;
|
|
75
|
+
/** Admin/operator identities cannot finalize a candidate by substitution. */
|
|
76
|
+
identity?: never;
|
|
77
|
+
};
|
|
78
|
+
response: {
|
|
79
|
+
success: true;
|
|
80
|
+
gatewayClientId: string;
|
|
81
|
+
tokenId: string;
|
|
57
82
|
revokedCredentialCount: number;
|
|
83
|
+
finalizedAt: number;
|
|
58
84
|
message?: string;
|
|
59
85
|
} | {
|
|
60
86
|
success: false;
|
package/package.json
CHANGED
package/ts/00_commitinfo_data.ts
CHANGED
package/ts/data/gateway.ts
CHANGED
|
@@ -190,11 +190,20 @@ export interface IGatewayClientProvisioningSpec {
|
|
|
190
190
|
enabled?: boolean;
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
/**
|
|
193
|
+
/**
|
|
194
|
+
* One-time credential material returned after durable token creation.
|
|
195
|
+
*
|
|
196
|
+
* Provisioning creates a candidate only. Existing client-bound credentials
|
|
197
|
+
* remain active until the candidate authenticates the explicit finalization
|
|
198
|
+
* request, preventing a lost provisioning response from locking out the
|
|
199
|
+
* gateway client.
|
|
200
|
+
*/
|
|
194
201
|
export interface IGatewayClientCredential {
|
|
195
202
|
tokenId: string;
|
|
196
203
|
tokenValue: string;
|
|
197
204
|
issuedAt: number;
|
|
205
|
+
state: 'candidate';
|
|
206
|
+
finalizationRequired: true;
|
|
198
207
|
}
|
|
199
208
|
|
|
200
209
|
export type TGatewayClientProvisioningAction = 'created' | 'updated' | 'unchanged';
|
|
@@ -211,6 +220,9 @@ interface IGatewayClientContextBase {
|
|
|
211
220
|
capabilities: IGatewayTokenCapabilities;
|
|
212
221
|
}
|
|
213
222
|
|
|
223
|
+
/** Server-authoritative lifecycle of an authenticated gateway-client credential. */
|
|
224
|
+
export type TGatewayCredentialState = 'candidate' | 'active' | 'manual';
|
|
225
|
+
|
|
214
226
|
/**
|
|
215
227
|
* Resolved authorization context. A gateway-client role always proves the
|
|
216
228
|
* concrete credential, bound client, and current live policy generation.
|
|
@@ -220,6 +232,8 @@ export type IGatewayClientContext = IGatewayClientContextBase & (
|
|
|
220
232
|
| {
|
|
221
233
|
role: 'gatewayClient';
|
|
222
234
|
credentialId: string;
|
|
235
|
+
/** Present on lifecycle-aware gateways. Candidates are validation/finalization-only. */
|
|
236
|
+
credentialState?: TGatewayCredentialState;
|
|
223
237
|
gatewayClient: {
|
|
224
238
|
type: TGatewayClientType;
|
|
225
239
|
id: string;
|
package/ts/requests/gateway.ts
CHANGED
|
@@ -58,10 +58,10 @@ export interface IReq_GetGatewayClientContext extends plugins.typedrequestInterf
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
|
-
* Admin-only
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
61
|
+
* Admin-only gateway-client upsert and candidate credential issue.
|
|
62
|
+
* Provisioning never revokes prior client-bound credentials. The returned
|
|
63
|
+
* candidate must prove possession through finalizeGatewayClientCredential
|
|
64
|
+
* before the gateway activates it and revokes superseded siblings.
|
|
65
65
|
*/
|
|
66
66
|
export interface IReq_ProvisionGatewayClientCredential extends plugins.typedrequestInterfaces.implementsTR<
|
|
67
67
|
plugins.typedrequestInterfaces.ITypedRequest,
|
|
@@ -81,9 +81,41 @@ export interface IReq_ProvisionGatewayClientCredential extends plugins.typedrequ
|
|
|
81
81
|
success: true;
|
|
82
82
|
action: TGatewayClientProvisioningAction;
|
|
83
83
|
gatewayClient: IGatewayClient;
|
|
84
|
-
/** One-time credential material returned
|
|
84
|
+
/** One-time, unfinalized credential material returned after durable creation. */
|
|
85
85
|
credential: IGatewayClientCredential;
|
|
86
|
+
message?: string;
|
|
87
|
+
}
|
|
88
|
+
| {
|
|
89
|
+
success: false;
|
|
90
|
+
message: string;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Candidate-authenticated completion of a gateway-client credential handover.
|
|
96
|
+
* The gateway resolves client ownership from the candidate token itself; the
|
|
97
|
+
* caller cannot select a gateway client or finalize another credential.
|
|
98
|
+
*/
|
|
99
|
+
export interface IReq_FinalizeGatewayClientCredential extends plugins.typedrequestInterfaces.implementsTR<
|
|
100
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
101
|
+
IReq_FinalizeGatewayClientCredential
|
|
102
|
+
> {
|
|
103
|
+
method: 'finalizeGatewayClientCredential';
|
|
104
|
+
request: {
|
|
105
|
+
/** The one-time candidate token value returned by provisioning. */
|
|
106
|
+
apiToken: string;
|
|
107
|
+
/** Must identify the same candidate credential as apiToken. */
|
|
108
|
+
tokenId: string;
|
|
109
|
+
/** Admin/operator identities cannot finalize a candidate by substitution. */
|
|
110
|
+
identity?: never;
|
|
111
|
+
};
|
|
112
|
+
response:
|
|
113
|
+
| {
|
|
114
|
+
success: true;
|
|
115
|
+
gatewayClientId: string;
|
|
116
|
+
tokenId: string;
|
|
86
117
|
revokedCredentialCount: number;
|
|
118
|
+
finalizedAt: number;
|
|
87
119
|
message?: string;
|
|
88
120
|
}
|
|
89
121
|
| {
|