@idp.global/interfaces 21.0.0 → 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 CHANGED
@@ -1,5 +1,14 @@
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
+
3
12
  ## 2026-07-18 - 21.0.0
4
13
 
5
14
  ### Breaking Changes
@@ -20,6 +29,10 @@
20
29
 
21
30
  ### Breaking Changes
22
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.
23
36
  - require an authenticated password change to carry the caller's JWT in
24
37
  addition to the current password; recovery-token password resets remain a
25
38
  separate mutually exclusive request shape
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@idp.global/interfaces',
6
- version: '21.0.0',
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
- clientSecret?: string;
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
- clientSecret: string;
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 {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idp.global/interfaces",
3
- "version": "21.0.0",
3
+ "version": "22.0.0",
4
4
  "private": false,
5
5
  "description": "Shared TypeScript interfaces and TypedRequest contracts for the idp.global ecosystem.",
6
6
  "exports": {
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@idp.global/interfaces',
6
- version: '21.0.0',
6
+ version: '22.0.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the idp.global ecosystem.'
8
8
  }
@@ -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
- clientSecret?: string; // Confidential clients only; shown once on creation
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
- clientSecret: string; // Only shown once
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,