@idp.global/interfaces 20.0.1 → 22.0.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 +27 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/request/admin.d.ts +72 -16
- package/dist_ts/request/login.d.ts +14 -6
- package/package.json +1 -1
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/request/admin.ts +87 -16
- package/ts/request/login.ts +17 -6
package/changelog.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026-07-18 - 22.0.0
|
|
4
|
+
|
|
5
|
+
### Breaking Changes
|
|
6
|
+
|
|
7
|
+
- require encrypted delivery envelopes for confidential app secrets (admin)
|
|
8
|
+
- Require confidential global app creation and credential regeneration to provide an operationId and RSA-OAEP-256 public key.
|
|
9
|
+
- Replace plaintext clientSecret responses with durable encrypted secretDelivery envelopes.
|
|
10
|
+
- Add acknowledgeAppSecretDelivery request to close pending deliveries after ciphertext verification.
|
|
11
|
+
|
|
12
|
+
## 2026-07-18 - 21.0.0
|
|
13
|
+
|
|
14
|
+
### Breaking Changes
|
|
15
|
+
|
|
16
|
+
- require jwt in authenticated setNewPassword requests (request/login)
|
|
17
|
+
- Model setNewPassword as mutually exclusive authenticated password-change and recovery-token reset request variants.
|
|
18
|
+
- Authenticated password changes now require both jwt and oldPassword; recovery-token resets continue to use tokenArg.
|
|
19
|
+
|
|
3
20
|
## 2026-07-18 - 20.0.1
|
|
4
21
|
|
|
5
22
|
### Fixes
|
|
@@ -10,6 +27,16 @@
|
|
|
10
27
|
|
|
11
28
|
## 2026-07-18 - next
|
|
12
29
|
|
|
30
|
+
### Breaking Changes
|
|
31
|
+
|
|
32
|
+
- require operation-bound encrypted delivery for confidential OIDC client secrets
|
|
33
|
+
- Confidential global-App creation and client-secret rotation now require a caller-stable operation ID plus a canonical RSA-OAEP-256 delivery public key.
|
|
34
|
+
- Responses return a durable encrypted delivery envelope instead of plaintext secret material.
|
|
35
|
+
- Add an explicit acknowledgement request that irreversibly closes delivery after the caller verifies the ciphertext hash.
|
|
36
|
+
- require an authenticated password change to carry the caller's JWT in
|
|
37
|
+
addition to the current password; recovery-token password resets remain a
|
|
38
|
+
separate mutually exclusive request shape
|
|
39
|
+
|
|
13
40
|
### Fixes
|
|
14
41
|
|
|
15
42
|
- include global-administrator grant/removal events in the closed browser-safe
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@idp.global/interfaces',
|
|
6
|
-
version: '
|
|
6
|
+
version: '22.0.0',
|
|
7
7
|
description: 'Shared TypeScript interfaces and TypedRequest contracts for the idp.global ecosystem.'
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx3QkFBd0I7SUFDOUIsT0FBTyxFQUFFLFFBQVE7SUFDakIsV0FBVyxFQUFFLHVGQUF1RjtDQUNyRyxDQUFBIn0=
|
|
@@ -1,5 +1,54 @@
|
|
|
1
1
|
import * as plugins from '../plugins.js';
|
|
2
2
|
import * as dto from '../dto/index.js';
|
|
3
|
+
export type TSecretDeliveryAlgorithm = 'RSA-OAEP-256';
|
|
4
|
+
/** Caller-held RSA public key used to seal one-time secret material. */
|
|
5
|
+
export interface ISecretDeliveryRequest {
|
|
6
|
+
algorithm: TSecretDeliveryAlgorithm;
|
|
7
|
+
/** Canonical DER SubjectPublicKeyInfo encoded as standard padded base64. */
|
|
8
|
+
publicKeySpkiBase64: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Durable delivery receipt. Pending envelopes can be retried byte-for-byte
|
|
12
|
+
* until the caller acknowledges their ciphertext hash.
|
|
13
|
+
*/
|
|
14
|
+
export type TSecretDeliveryEnvelope = {
|
|
15
|
+
operationId: string;
|
|
16
|
+
algorithm: TSecretDeliveryAlgorithm;
|
|
17
|
+
publicKeySha256: string;
|
|
18
|
+
ciphertextSha256: string;
|
|
19
|
+
createdAt: number;
|
|
20
|
+
} & ({
|
|
21
|
+
status: 'pending';
|
|
22
|
+
ciphertextBase64: string;
|
|
23
|
+
acknowledgedAt?: never;
|
|
24
|
+
} | {
|
|
25
|
+
status: 'acknowledged';
|
|
26
|
+
ciphertextBase64?: never;
|
|
27
|
+
acknowledgedAt: number;
|
|
28
|
+
});
|
|
29
|
+
type TCreateGlobalAppBaseRequest = {
|
|
30
|
+
jwt: string;
|
|
31
|
+
name: string;
|
|
32
|
+
description: string;
|
|
33
|
+
logoUrl: string;
|
|
34
|
+
appUrl: string;
|
|
35
|
+
category: string;
|
|
36
|
+
redirectUris: string[];
|
|
37
|
+
postLogoutRedirectUris: string[];
|
|
38
|
+
allowedScopes: string[];
|
|
39
|
+
grantTypes: dto.IGlobalAppDto['data']['oauthCredentials']['grantTypes'];
|
|
40
|
+
oidcSettings: dto.IGlobalAppDto['data']['oidcSettings'];
|
|
41
|
+
};
|
|
42
|
+
export type TCreateGlobalAppRequest = TCreateGlobalAppBaseRequest & ({
|
|
43
|
+
clientType: 'public';
|
|
44
|
+
operationId?: never;
|
|
45
|
+
secretDelivery?: never;
|
|
46
|
+
} | {
|
|
47
|
+
clientType: 'confidential';
|
|
48
|
+
/** Caller-stable idempotency key for creation and secret delivery. */
|
|
49
|
+
operationId: string;
|
|
50
|
+
secretDelivery: ISecretDeliveryRequest;
|
|
51
|
+
});
|
|
3
52
|
/**
|
|
4
53
|
* Check if the current user is a global admin
|
|
5
54
|
*/
|
|
@@ -32,23 +81,10 @@ export interface IReq_GetGlobalAppStats extends plugins.typedRequestInterfaces.i
|
|
|
32
81
|
*/
|
|
33
82
|
export interface IReq_CreateGlobalApp extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_CreateGlobalApp> {
|
|
34
83
|
method: 'createGlobalApp';
|
|
35
|
-
request:
|
|
36
|
-
jwt: string;
|
|
37
|
-
name: string;
|
|
38
|
-
description: string;
|
|
39
|
-
logoUrl: string;
|
|
40
|
-
appUrl: string;
|
|
41
|
-
category: string;
|
|
42
|
-
clientType: dto.IGlobalAppDto['data']['oauthCredentials']['clientType'];
|
|
43
|
-
redirectUris: string[];
|
|
44
|
-
postLogoutRedirectUris: string[];
|
|
45
|
-
allowedScopes: string[];
|
|
46
|
-
grantTypes: dto.IGlobalAppDto['data']['oauthCredentials']['grantTypes'];
|
|
47
|
-
oidcSettings: dto.IGlobalAppDto['data']['oidcSettings'];
|
|
48
|
-
};
|
|
84
|
+
request: TCreateGlobalAppRequest;
|
|
49
85
|
response: {
|
|
50
86
|
app: dto.IGlobalAppDto;
|
|
51
|
-
|
|
87
|
+
secretDelivery?: TSecretDeliveryEnvelope;
|
|
52
88
|
};
|
|
53
89
|
}
|
|
54
90
|
/**
|
|
@@ -100,14 +136,33 @@ export interface IReq_RegenerateAppCredentials extends plugins.typedRequestInter
|
|
|
100
136
|
request: {
|
|
101
137
|
jwt: string;
|
|
102
138
|
appId: string;
|
|
139
|
+
/** Caller-stable idempotency key for this exact rotation request. */
|
|
140
|
+
operationId: string;
|
|
141
|
+
secretDelivery: ISecretDeliveryRequest;
|
|
103
142
|
gracePeriodSeconds?: number;
|
|
104
143
|
};
|
|
105
144
|
response: {
|
|
106
145
|
clientId: string;
|
|
107
|
-
|
|
146
|
+
secretDelivery: TSecretDeliveryEnvelope;
|
|
108
147
|
retiringSecretsValidUntil?: number;
|
|
109
148
|
};
|
|
110
149
|
}
|
|
150
|
+
/**
|
|
151
|
+
* Irreversibly closes a pending encrypted delivery after the caller has
|
|
152
|
+
* decrypted and stored the secret.
|
|
153
|
+
*/
|
|
154
|
+
export interface IReq_AcknowledgeAppSecretDelivery extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_AcknowledgeAppSecretDelivery> {
|
|
155
|
+
method: 'acknowledgeAppSecretDelivery';
|
|
156
|
+
request: {
|
|
157
|
+
jwt: string;
|
|
158
|
+
appId: string;
|
|
159
|
+
operationId: string;
|
|
160
|
+
ciphertextSha256: string;
|
|
161
|
+
};
|
|
162
|
+
response: {
|
|
163
|
+
acknowledgedAt: number;
|
|
164
|
+
};
|
|
165
|
+
}
|
|
111
166
|
export interface IReq_RotateOidcSigningKey extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_RotateOidcSigningKey> {
|
|
112
167
|
method: 'rotateOidcSigningKey';
|
|
113
168
|
request: {
|
|
@@ -204,3 +259,4 @@ export interface IReq_GetGlobalOrgStats extends plugins.typedRequestInterfaces.i
|
|
|
204
259
|
total: number;
|
|
205
260
|
};
|
|
206
261
|
}
|
|
262
|
+
export {};
|
|
@@ -84,14 +84,22 @@ export interface IReq_ResetPassword extends plugins.typedRequestInterfaces.imple
|
|
|
84
84
|
/**
|
|
85
85
|
* Completes an authenticated password change or recovery-token reset.
|
|
86
86
|
*/
|
|
87
|
+
export type TSetNewPasswordRequest = {
|
|
88
|
+
email: string;
|
|
89
|
+
jwt: string;
|
|
90
|
+
oldPassword: string;
|
|
91
|
+
tokenArg?: never;
|
|
92
|
+
newPassword: string;
|
|
93
|
+
} | {
|
|
94
|
+
email: string;
|
|
95
|
+
jwt?: never;
|
|
96
|
+
oldPassword?: never;
|
|
97
|
+
tokenArg: string;
|
|
98
|
+
newPassword: string;
|
|
99
|
+
};
|
|
87
100
|
export interface IReq_SetNewPassword extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_SetNewPassword> {
|
|
88
101
|
method: 'setNewPassword';
|
|
89
|
-
request:
|
|
90
|
-
email: string;
|
|
91
|
-
oldPassword?: string;
|
|
92
|
-
tokenArg?: string;
|
|
93
|
-
newPassword: string;
|
|
94
|
-
};
|
|
102
|
+
request: TSetNewPasswordRequest;
|
|
95
103
|
response: {
|
|
96
104
|
status: 'ok' | 'not ok';
|
|
97
105
|
};
|
package/package.json
CHANGED
package/ts/00_commitinfo_data.ts
CHANGED
package/ts/request/admin.ts
CHANGED
|
@@ -1,6 +1,66 @@
|
|
|
1
1
|
import * as plugins from '../plugins.js';
|
|
2
2
|
import * as dto from '../dto/index.js';
|
|
3
3
|
|
|
4
|
+
export type TSecretDeliveryAlgorithm = 'RSA-OAEP-256';
|
|
5
|
+
|
|
6
|
+
/** Caller-held RSA public key used to seal one-time secret material. */
|
|
7
|
+
export interface ISecretDeliveryRequest {
|
|
8
|
+
algorithm: TSecretDeliveryAlgorithm;
|
|
9
|
+
/** Canonical DER SubjectPublicKeyInfo encoded as standard padded base64. */
|
|
10
|
+
publicKeySpkiBase64: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Durable delivery receipt. Pending envelopes can be retried byte-for-byte
|
|
15
|
+
* until the caller acknowledges their ciphertext hash.
|
|
16
|
+
*/
|
|
17
|
+
export type TSecretDeliveryEnvelope = {
|
|
18
|
+
operationId: string;
|
|
19
|
+
algorithm: TSecretDeliveryAlgorithm;
|
|
20
|
+
publicKeySha256: string;
|
|
21
|
+
ciphertextSha256: string;
|
|
22
|
+
createdAt: number;
|
|
23
|
+
} & (
|
|
24
|
+
| {
|
|
25
|
+
status: 'pending';
|
|
26
|
+
ciphertextBase64: string;
|
|
27
|
+
acknowledgedAt?: never;
|
|
28
|
+
}
|
|
29
|
+
| {
|
|
30
|
+
status: 'acknowledged';
|
|
31
|
+
ciphertextBase64?: never;
|
|
32
|
+
acknowledgedAt: number;
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
type TCreateGlobalAppBaseRequest = {
|
|
37
|
+
jwt: string;
|
|
38
|
+
name: string;
|
|
39
|
+
description: string;
|
|
40
|
+
logoUrl: string;
|
|
41
|
+
appUrl: string;
|
|
42
|
+
category: string;
|
|
43
|
+
redirectUris: string[];
|
|
44
|
+
postLogoutRedirectUris: string[];
|
|
45
|
+
allowedScopes: string[];
|
|
46
|
+
grantTypes: dto.IGlobalAppDto['data']['oauthCredentials']['grantTypes'];
|
|
47
|
+
oidcSettings: dto.IGlobalAppDto['data']['oidcSettings'];
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export type TCreateGlobalAppRequest = TCreateGlobalAppBaseRequest & (
|
|
51
|
+
| {
|
|
52
|
+
clientType: 'public';
|
|
53
|
+
operationId?: never;
|
|
54
|
+
secretDelivery?: never;
|
|
55
|
+
}
|
|
56
|
+
| {
|
|
57
|
+
clientType: 'confidential';
|
|
58
|
+
/** Caller-stable idempotency key for creation and secret delivery. */
|
|
59
|
+
operationId: string;
|
|
60
|
+
secretDelivery: ISecretDeliveryRequest;
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
|
|
4
64
|
/**
|
|
5
65
|
* Check if the current user is a global admin
|
|
6
66
|
*/
|
|
@@ -47,23 +107,10 @@ export interface IReq_CreateGlobalApp
|
|
|
47
107
|
IReq_CreateGlobalApp
|
|
48
108
|
> {
|
|
49
109
|
method: 'createGlobalApp';
|
|
50
|
-
request:
|
|
51
|
-
jwt: string;
|
|
52
|
-
name: string;
|
|
53
|
-
description: string;
|
|
54
|
-
logoUrl: string;
|
|
55
|
-
appUrl: string;
|
|
56
|
-
category: string;
|
|
57
|
-
clientType: dto.IGlobalAppDto['data']['oauthCredentials']['clientType'];
|
|
58
|
-
redirectUris: string[];
|
|
59
|
-
postLogoutRedirectUris: string[];
|
|
60
|
-
allowedScopes: string[];
|
|
61
|
-
grantTypes: dto.IGlobalAppDto['data']['oauthCredentials']['grantTypes'];
|
|
62
|
-
oidcSettings: dto.IGlobalAppDto['data']['oidcSettings'];
|
|
63
|
-
};
|
|
110
|
+
request: TCreateGlobalAppRequest;
|
|
64
111
|
response: {
|
|
65
112
|
app: dto.IGlobalAppDto;
|
|
66
|
-
|
|
113
|
+
secretDelivery?: TSecretDeliveryEnvelope;
|
|
67
114
|
};
|
|
68
115
|
}
|
|
69
116
|
|
|
@@ -130,15 +177,39 @@ export interface IReq_RegenerateAppCredentials
|
|
|
130
177
|
request: {
|
|
131
178
|
jwt: string;
|
|
132
179
|
appId: string;
|
|
180
|
+
/** Caller-stable idempotency key for this exact rotation request. */
|
|
181
|
+
operationId: string;
|
|
182
|
+
secretDelivery: ISecretDeliveryRequest;
|
|
133
183
|
gracePeriodSeconds?: number;
|
|
134
184
|
};
|
|
135
185
|
response: {
|
|
136
186
|
clientId: string;
|
|
137
|
-
|
|
187
|
+
secretDelivery: TSecretDeliveryEnvelope;
|
|
138
188
|
retiringSecretsValidUntil?: number;
|
|
139
189
|
};
|
|
140
190
|
}
|
|
141
191
|
|
|
192
|
+
/**
|
|
193
|
+
* Irreversibly closes a pending encrypted delivery after the caller has
|
|
194
|
+
* decrypted and stored the secret.
|
|
195
|
+
*/
|
|
196
|
+
export interface IReq_AcknowledgeAppSecretDelivery
|
|
197
|
+
extends plugins.typedRequestInterfaces.implementsTR<
|
|
198
|
+
plugins.typedRequestInterfaces.ITypedRequest,
|
|
199
|
+
IReq_AcknowledgeAppSecretDelivery
|
|
200
|
+
> {
|
|
201
|
+
method: 'acknowledgeAppSecretDelivery';
|
|
202
|
+
request: {
|
|
203
|
+
jwt: string;
|
|
204
|
+
appId: string;
|
|
205
|
+
operationId: string;
|
|
206
|
+
ciphertextSha256: string;
|
|
207
|
+
};
|
|
208
|
+
response: {
|
|
209
|
+
acknowledgedAt: number;
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
|
|
142
213
|
export interface IReq_RotateOidcSigningKey
|
|
143
214
|
extends plugins.typedRequestInterfaces.implementsTR<
|
|
144
215
|
plugins.typedRequestInterfaces.ITypedRequest,
|
package/ts/request/login.ts
CHANGED
|
@@ -120,18 +120,29 @@ export interface IReq_ResetPassword
|
|
|
120
120
|
/**
|
|
121
121
|
* Completes an authenticated password change or recovery-token reset.
|
|
122
122
|
*/
|
|
123
|
+
export type TSetNewPasswordRequest =
|
|
124
|
+
| {
|
|
125
|
+
email: string;
|
|
126
|
+
jwt: string;
|
|
127
|
+
oldPassword: string;
|
|
128
|
+
tokenArg?: never;
|
|
129
|
+
newPassword: string;
|
|
130
|
+
}
|
|
131
|
+
| {
|
|
132
|
+
email: string;
|
|
133
|
+
jwt?: never;
|
|
134
|
+
oldPassword?: never;
|
|
135
|
+
tokenArg: string;
|
|
136
|
+
newPassword: string;
|
|
137
|
+
};
|
|
138
|
+
|
|
123
139
|
export interface IReq_SetNewPassword
|
|
124
140
|
extends plugins.typedRequestInterfaces.implementsTR<
|
|
125
141
|
plugins.typedRequestInterfaces.ITypedRequest,
|
|
126
142
|
IReq_SetNewPassword
|
|
127
143
|
> {
|
|
128
144
|
method: 'setNewPassword';
|
|
129
|
-
request:
|
|
130
|
-
email: string;
|
|
131
|
-
oldPassword?: string;
|
|
132
|
-
tokenArg?: string;
|
|
133
|
-
newPassword: string;
|
|
134
|
-
};
|
|
145
|
+
request: TSetNewPasswordRequest;
|
|
135
146
|
response: {
|
|
136
147
|
status: 'ok' | 'not ok';
|
|
137
148
|
};
|