@ionite/core 0.0.24-beta.20260907.2 → 0.0.24-beta.20260910.1

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/dist/index.d.ts CHANGED
@@ -1,4 +1,238 @@
1
1
  import { version } from "../package.json";
2
+ import { StandardSchemaV1 as StandardSchemaV19 } from "@standard-schema/spec";
3
+ import { StandardSchemaV1 as StandardSchemaV18 } from "@standard-schema/spec";
4
+ /**
5
+ * Third-party CIAM provider presets and claim mapping.
6
+ *
7
+ * Defines the built-in provider adapters used by the CIAM module for customer
8
+ * login. Each preset supplies default OIDC/OAuth2 endpoints, scope, branding,
9
+ * and a claim mapper that normalizes provider claims into a candidate customer.
10
+ * The application's `CustomerStore` remains the system of record: the SDK only
11
+ * extracts standard claims and hands a candidate to `lookup`/`upsert`.
12
+ */
13
+ /** Built-in provider types. `oidc` is a generic OIDC provider; `magic-link` is the passwordless flow. */
14
+ type CIAMProviderType = "oidc" | "google" | "github" | "microsoft" | "apple" | "magic-link";
15
+ /** Branding colors for rendering a provider button in light and dark themes. */
16
+ type CIAMProviderColors = {
17
+ /** Background/brand color for light theme (hex or CSS color). */
18
+ light: string;
19
+ /** Background/brand color for dark theme (hex or CSS color). */
20
+ dark: string;
21
+ /** Optional secondary/accent color. */
22
+ secondary?: string;
23
+ };
24
+ /** Operator-supplied branding so the UI can render a provider list without hardcoding. */
25
+ type CIAMProviderBranding = {
26
+ /** Human-readable name shown on the login button (e.g. "Google"). */
27
+ displayName: string;
28
+ /** External icon URL (typically an SVG/PNG hosted on a CDN). */
29
+ iconUrl?: string;
30
+ /** Light/dark brand colors. */
31
+ colors?: CIAMProviderColors;
32
+ /** Optional provider info/marketing URL. */
33
+ url?: string;
34
+ };
35
+ /**
36
+ * A single CIAM provider declaration. OIDC/OAuth2 endpoint and credential
37
+ * fields come from the ConfigSource (never application code).
38
+ */
39
+ type CIAMProviderConfig = {
40
+ /** Provider adapter type. Selects defaults and claim mapping. */
41
+ type: CIAMProviderType;
42
+ /** Whether this provider is enabled. Defaults to true when omitted. */
43
+ enabled?: boolean;
44
+ /** Recommended display order (ascending). Ties broken by declaration order. */
45
+ order?: number;
46
+ /** UI branding metadata. */
47
+ branding?: CIAMProviderBranding;
48
+ /** OIDC issuer/authority (used for discovery when explicit endpoints are omitted). */
49
+ authority?: string;
50
+ /** Authorization endpoint (overrides preset). */
51
+ authorizationUrl?: string;
52
+ /** Token endpoint (overrides preset). */
53
+ tokenUrl?: string;
54
+ /** JWKS endpoint for ID token verification (overrides preset). */
55
+ jwksUri?: string;
56
+ /** OAuth2 UserInfo endpoint for providers without an ID token (e.g. GitHub). */
57
+ userInfoUrl?: string;
58
+ /** OAuth2 client id (ConfigSource-only). */
59
+ clientId?: string;
60
+ /** OAuth2 client secret (ConfigSource-only). */
61
+ clientSecret?: string;
62
+ /** Requested scope (overrides preset). */
63
+ scope?: string;
64
+ /** Apple: team id for client-secret generation. */
65
+ teamId?: string;
66
+ /** Apple: key id for client-secret generation. */
67
+ keyId?: string;
68
+ /** Apple: PKCS#8 PEM private key for client-secret generation. */
69
+ privateKey?: string;
70
+ };
71
+ /** Sanitized provider entry returned by the discovery endpoint for the UI. */
72
+ type CIAMProviderDescriptor = {
73
+ /** Provider key (matches the RemoteConfig map key); used as `?provider=`. */
74
+ name: string;
75
+ type: CIAMProviderType;
76
+ displayName: string;
77
+ /** SDK-derived login URL to navigate to (begins the flow). */
78
+ loginUrl: string;
79
+ iconUrl?: string;
80
+ colors?: CIAMProviderColors;
81
+ url?: string;
82
+ };
83
+ /**
84
+ * Minimal logger interface compatible with common structured logging patterns.
85
+ */
86
+ interface Logger {
87
+ trace(message?: unknown, ...optionalParams: unknown[]): void;
88
+ debug(message?: unknown, ...optionalParams: unknown[]): void;
89
+ info(message?: unknown, ...optionalParams: unknown[]): void;
90
+ warn(message?: unknown, ...optionalParams: unknown[]): void;
91
+ error(message?: unknown, ...optionalParams: unknown[]): void;
92
+ }
93
+ /**
94
+ * No-op implementation — does nothing for any log level
95
+ */
96
+ declare const silentLogger: Logger;
97
+ /**
98
+ * Default logger used until an ionite instance is configured with
99
+ * an OpenTelemetry-backed logger or an application-provided logger.
100
+ */
101
+ declare const defaultLogger: Logger;
102
+ /**
103
+ * Logger that logs messages debug, info, warn, and error to the console.
104
+ */
105
+ declare const debugLogger: Logger;
106
+ /**
107
+ * Logger that logs messages info, warn, and error to the console.
108
+ */
109
+ declare const infoLogger: Logger;
110
+ /**
111
+ * Logger that logs messages warn and error to the console.
112
+ */
113
+ declare const warnLogger: Logger;
114
+ /** Synchronous, in-memory read surface for one code catalog entity kind. */
115
+ type CodeCatalogNamespace<TEntity> = {
116
+ get(id: string): TEntity | undefined;
117
+ list(): readonly TEntity[];
118
+ };
119
+ /**
120
+ * Normalized, frozen code-declared catalog produced by {@link defineCatalog}. All entities are
121
+ * deep-frozen and id-indexed.
122
+ */
123
+ type CodeCatalog = {
124
+ groups: CodeCatalogNamespace<Group>;
125
+ roles: CodeCatalogNamespace<Role>;
126
+ permissions: CodeCatalogNamespace<Permission>;
127
+ };
128
+ /** Declarative input for {@link defineCatalog} (plain arrays authored in app code). */
129
+ type CodeCatalogInput = {
130
+ groups?: readonly Group[];
131
+ roles?: readonly Role[];
132
+ permissions?: readonly Permission[];
133
+ };
134
+ /** True when the value is already a normalized {@link CodeCatalog} (vs a declarative input). */
135
+ declare function isCodeCatalog(value: CodeCatalog | CodeCatalogInput): value is CodeCatalog;
136
+ /** Normalize an `authz.catalog` config value: pass through a {@link CodeCatalog}, build one from input. */
137
+ declare function toCodeCatalog(value: CodeCatalog | CodeCatalogInput): CodeCatalog;
138
+ type CatalogEntityKind = "group" | "role" | "permission";
139
+ /**
140
+ * Build a validated, frozen {@link CodeCatalog} from declarative arrays. Call it once at module
141
+ * scope in a pure authz module (no store imports) and wire the result via
142
+ * `FrameworkConfig.authz.catalog`.
143
+ *
144
+ * Validation (throws {@link Error} at module evaluation on the first violation):
145
+ * - ids are globally unique across groups, roles, AND permissions (one SCIM Groups id space);
146
+ * - every group -> group/role/permission reference (string id or embedded object) resolves to an
147
+ * entity declared in the catalog arrays, and every role -> permission reference likewise
148
+ * (`resources` refs are NOT validated here — resources live in the app's `ResourceProvider`);
149
+ * - nested group composition is acyclic;
150
+ * - every entitlement declares a required non-empty `assignableSubjectTypes` within the platform
151
+ * ceiling, and `recommendedSubjectTypes` is a subset of it.
152
+ *
153
+ * Side effects: every entity (and its arrays/metadata) is frozen.
154
+ */
155
+ declare function defineCatalog(input: CodeCatalogInput): CodeCatalog;
156
+ /** Resolve one code entity and its kind from the shared id space. */
157
+ declare function getCodeCatalogEntity(code: CodeCatalog | undefined, id: string): {
158
+ entity: Group | Role | Permission;
159
+ kind: CatalogEntityKind;
160
+ } | undefined;
161
+ /** Return the entity namespace for one catalog kind. */
162
+ declare function catalogEntityStore<TEntity extends Group | Role | Permission>(catalog: AccessCatalogStore, kind: CatalogEntityKind): EntityStore<TEntity>;
163
+ /**
164
+ * Merge a materialized row with its code template. The row owns presentation, receipts, lifecycle,
165
+ * and other runtime metadata; code owns ids, subject scoping, and graph/resource structure.
166
+ */
167
+ declare function mergeCodeCatalogEntity<TEntity extends Group | Role | Permission>(kind: CatalogEntityKind, code: TEntity, stored: TEntity): TEntity;
168
+ /**
169
+ * Insert a code template into the runtime catalog only when no row exists. Existing rows are never
170
+ * rewritten, preserving IAM-renamed presentation and receipts. `insertIfAbsent` closes the race
171
+ * between the initial read and insert.
172
+ */
173
+ declare function materializeCodeCatalogEntity<TEntity extends Group | Role | Permission>(kind: CatalogEntityKind, code: TEntity, store: EntityStore<TEntity>): Promise<TEntity>;
174
+ /**
175
+ * Mark materialized code rows as deprecated when their template no longer exists. Callers choose
176
+ * when to run this lifecycle sweep; it never runs during config apply.
177
+ */
178
+ declare function deprecateRetiredCodeCatalogRows(code: CodeCatalog | undefined, store: AccessCatalogStore, onlyId?: string): Promise<void>;
179
+ /**
180
+ * {@link AccessCatalogStore}-shaped read union over code templates and the runtime store. Store rows
181
+ * win presentation for code ids, code owns their structure, and unmaterialized code entities remain
182
+ * visible. Returns undefined when neither source is wired.
183
+ */
184
+ declare function unionCatalogRead(code: CodeCatalog | undefined, store: AccessCatalogStore | undefined): AccessCatalogStore | undefined;
185
+ import { StandardSchemaV1 as StandardSchemaV15 } from "@standard-schema/spec";
186
+ /**
187
+ * Resolve an access subject/target/resource reference (a string id or an object carrying one) to its
188
+ * canonical, trimmed string id. This is the single id-resolution rule shared across the authz stack
189
+ * (AUDIT_HISTORY.md §8.4): `accessRootId`, the access stores, the access index, and SCIM diff keys all key off
190
+ * the same normalization so distinct roots never collapse and identical references never diverge.
191
+ * Returns `''` when no id can be resolved.
192
+ */
193
+ declare function accessRefId(value: unknown): string;
194
+ /**
195
+ * Deterministic id for a granted root. Includes the resource scope so that two grants of the same
196
+ * subject/target with different scopes are tracked as distinct roots. Application-wide scope (the
197
+ * default, or `applyToApplication`) collapses to the `app` scope key.
198
+ */
199
+ declare function accessRootId(change: AccessChange): string;
200
+ /**
201
+ * Shared minimal identity fields used to build both the workforce user
202
+ * record (`BaseUser`) and the CIAM customer record (`BaseCustomer`), as well
203
+ * as the authenticated session types (`WorkforceUser`, `Customer`).
204
+ *
205
+ * This is an internal structural base and is intentionally not part of the
206
+ * public API surface; consumers extend the `BaseUser` Zod/Valibot schema
207
+ * instead.
208
+ */
209
+ interface BaseUserFields {
210
+ /**
211
+ * Unique identifier for the user
212
+ */
213
+ id?: string;
214
+ /**
215
+ * REQUIRED. Unique identifier for login
216
+ */
217
+ userName: string;
218
+ /**
219
+ * REQUIRED. Simple display name
220
+ */
221
+ name: string;
222
+ /**
223
+ * REQUIRED. Primary email address
224
+ */
225
+ email: string;
226
+ /**
227
+ * URL to user's avatar/profile picture
228
+ */
229
+ avatar?: string;
230
+ /**
231
+ * User type (e.g., "employee", "contractor", "customer").
232
+ * Shared by SSO/CIAM and enterprise/SCIM user representations.
233
+ */
234
+ userType?: string;
235
+ }
2
236
  /**
3
237
  * Shared types for paginated list operations across stores.
4
238
  *
@@ -53,981 +287,921 @@ interface ListOptions {
53
287
  /** Optional server-side filter applied before pagination. */
54
288
  filter?: ListFilter;
55
289
  }
290
+ import { StandardSchemaV1 } from "@standard-schema/spec";
56
291
  /**
57
- * Shared minimal identity fields used to build both the workforce user
58
- * record (`BaseUser`) and the CIAM customer record (`BaseCustomer`), as well
59
- * as the authenticated session types (`WorkforceUser`, `Customer`).
60
- *
61
- * This is an internal structural base and is intentionally not part of the
62
- * public API surface; consumers extend the `BaseUser` Zod/Valibot schema
63
- * instead.
292
+ * SCIM 2.0 User Resource
293
+ * @see https://datatracker.ietf.org/doc/html/rfc7643#section-4.1
64
294
  */
65
- interface BaseUserFields {
295
+ /**
296
+ * SCIM Name sub-attribute
297
+ */
298
+ interface Name {
66
299
  /**
67
- * Unique identifier for the user
300
+ * The full name, including all middle names, titles, and suffixes as appropriate
68
301
  */
69
- id?: string;
302
+ formatted?: string;
70
303
  /**
71
- * REQUIRED. Unique identifier for login
304
+ * The family name of the User, or last name
72
305
  */
73
- userName: string;
306
+ familyName?: string;
74
307
  /**
75
- * REQUIRED. Simple display name
308
+ * The given name of the User, or first name
76
309
  */
77
- name: string;
310
+ givenName?: string;
78
311
  /**
79
- * REQUIRED. Primary email address
312
+ * The middle name(s) of the User
80
313
  */
81
- email: string;
314
+ middleName?: string;
82
315
  /**
83
- * URL to user's avatar/profile picture
316
+ * The honorific prefix(es) of the User, or title
84
317
  */
85
- avatar?: string;
318
+ honorificPrefix?: string;
86
319
  /**
87
- * User type (e.g., "employee", "contractor", "customer").
88
- * Shared by SSO/CIAM and enterprise/SCIM user representations.
320
+ * The honorific suffix(es) of the User, or suffix
89
321
  */
90
- userType?: string;
322
+ honorificSuffix?: string;
91
323
  }
92
- import { StandardSchemaV1 } from "@standard-schema/spec";
93
324
  /**
94
- * OIDC Code Flow Callback URL Parameters
95
- * @see https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth
325
+ * SCIM Photo sub-attribute
96
326
  */
97
- interface OidcCallbackParams {
327
+ interface Photo {
98
328
  /**
99
- * REQUIRED. The authorization code returned from the authorization server.
329
+ * The photo url
100
330
  */
101
- code: string;
331
+ value: string;
102
332
  /**
103
- * REQUIRED if the "state" parameter was present in the client authorization request.
104
- * The exact value received from the client.
333
+ * The type of the photo
105
334
  */
106
- state?: string;
335
+ type?: "photo" | "thumbnail";
107
336
  /**
108
- * RECOMMENDED. The session state value. Clients should use this to verify the session state.
337
+ * A Boolean value indicating the 'primary' or preferred attribute value
109
338
  */
110
- session_state?: string;
339
+ primary?: boolean;
340
+ }
341
+ /**
342
+ * SCIM Email sub-attribute
343
+ */
344
+ interface Email {
111
345
  /**
112
- * OAuth 2.0 error code if the authorization request failed.
346
+ * The email address value
113
347
  */
114
- error?: string;
348
+ value: string;
115
349
  /**
116
- * Human-readable ASCII text providing additional information for the error.
350
+ * A human-readable name, primarily used for display purposes
117
351
  */
118
- error_description?: string;
352
+ display?: string;
119
353
  /**
120
- * A URI identifying a human-readable web page with information about the error.
354
+ * A label indicating the attribute's function (e.g., "work" or "home")
121
355
  */
122
- error_uri?: string;
356
+ type?: string;
123
357
  /**
124
- * The "iss" (issuer) parameter identifies the principal that issued the response.
125
- * This is typically used in the implicit flow.
358
+ * A Boolean value indicating the 'primary' or preferred attribute value
126
359
  */
127
- iss?: string;
128
- }
129
- /**
130
- * Creates a StandardSchemaV1 for validating OIDC callback URL parameters.
131
- * @param vendor - The name of the vendor creating this schema
132
- * @returns A StandardSchemaV1 instance for OIDC callback parameters
133
- */
134
- declare function oidcCallbackSchema(vendor: string): StandardSchemaV1<Record<string, unknown>, OidcCallbackParams>;
135
- /**
136
- * Token Response from IdP
137
- */
138
- interface TokenResponse {
139
- access_token: string;
140
- id_token: string;
141
- refresh_token?: string;
142
- token_type: string;
143
- expires_in?: number;
144
- scope?: string;
145
- refresh_expires_in?: number;
146
- session_state?: string;
147
- expires?: string;
360
+ primary?: boolean;
148
361
  }
149
362
  /**
150
- * Creates a StandardSchemaV1 for validating OIDC Token Responses.
151
- * @param vendor - The name of the vendor creating this schema
152
- * @returns A StandardSchemaV1 instance for Token Response validation
153
- */
154
- declare function tokenResponseSchema(vendor: string): StandardSchemaV1<Record<string, unknown>, TokenResponse>;
155
- /**
156
- * ID Token Claims
363
+ * SCIM Phone Number sub-attribute
157
364
  */
158
- interface IdTokenClaims {
159
- iss?: string;
160
- aud?: string | string[];
161
- exp?: number;
162
- iat?: number;
163
- sub?: string;
164
- sid?: string;
165
- name?: string;
166
- email?: string;
167
- preferred_username?: string;
168
- picture?: string;
365
+ interface PhoneNumber {
169
366
  /**
170
- * Enterprise Controlled ID claim (`ecid:<realm>:<opaque>`). When present it correlates this
171
- * account to a single identity across systems. See https://ionite.com/docs/llms-ecid.txt.
367
+ * The phone number value
172
368
  */
173
- ecid?: string;
174
- [key: string]: unknown;
369
+ value: string;
370
+ /**
371
+ * A human-readable name, primarily used for display purposes
372
+ */
373
+ display?: string;
374
+ /**
375
+ * A label indicating the attribute's function (e.g., "work", "home", "mobile")
376
+ */
377
+ type?: string;
378
+ /**
379
+ * A Boolean value indicating the 'primary' or preferred attribute value
380
+ */
381
+ primary?: boolean;
175
382
  }
176
383
  /**
177
- * Creates a StandardSchemaV1 for validating ID Token Claims.
178
- * @param vendor - The name of the vendor creating this schema
179
- * @returns A StandardSchemaV1 instance for ID Token Claims validation
180
- */
181
- declare function idTokenClaimsSchema(vendor: string): StandardSchemaV1<Record<string, unknown>, IdTokenClaims>;
182
- import { StandardSchemaV1 as StandardSchemaV12 } from "@standard-schema/spec";
183
- /**
184
- * JWT Assertion Claims for OAuth2 JWT Bearer Grant (RFC 7523) and OAuth2 Access Tokens
185
- * @see https://datatracker.ietf.org/doc/html/rfc7523
186
- * @see https://datatracker.ietf.org/doc/html/rfc9068
384
+ * SCIM Address sub-attribute
187
385
  */
188
- interface JWTAssertionClaims {
386
+ interface Address {
189
387
  /**
190
- * REQUIRED. Issuer - the workload identity (e.g., SPIFFE ID) or authorization server
388
+ * The full mailing address, formatted for display
191
389
  */
192
- iss: string;
390
+ formatted?: string;
193
391
  /**
194
- * REQUIRED. Subject - the workload identity or service account
392
+ * The full street address component
195
393
  */
196
- sub: string;
394
+ streetAddress?: string;
197
395
  /**
198
- * OPTIONAL. Audience - may be a string or array of strings
199
- * Note: Required for JWT assertions, but may be absent in OAuth2 access tokens
396
+ * The city or locality component
200
397
  */
201
- aud?: string | string[];
398
+ locality?: string;
202
399
  /**
203
- * REQUIRED. Expiration time (Unix timestamp)
400
+ * The state or region component
204
401
  */
205
- exp: number;
402
+ region?: string;
206
403
  /**
207
- * REQUIRED. Issued at time (Unix timestamp)
404
+ * The zip code or postal code component
208
405
  */
209
- iat: number;
406
+ postalCode?: string;
210
407
  /**
211
- * OPTIONAL. JWT ID - unique identifier for this token
212
- * Note: Required for JWT assertions, optional for access tokens
408
+ * The country name component
213
409
  */
214
- jti?: string;
410
+ country?: string;
215
411
  /**
216
- * OPTIONAL. Requested OAuth scopes (space-delimited)
412
+ * A label indicating the attribute's function (e.g., "work" or "home")
217
413
  */
218
- scope?: string;
414
+ type?: string;
219
415
  /**
220
- * Allow additional claims for extensibility
416
+ * A Boolean value indicating the 'primary' or preferred attribute value
221
417
  */
222
- [key: string]: unknown;
418
+ primary?: boolean;
223
419
  }
224
420
  /**
225
- * Creates a StandardSchemaV1 for validating JWT Assertion Claims.
226
- * @param vendor - The name of the vendor creating this schema
227
- * @returns A StandardSchemaV1 instance for JWT Assertion Claims validation
228
- */
229
- declare function jwtAssertionClaimsSchema(vendor: string): StandardSchemaV12<Record<string, unknown>, JWTAssertionClaims>;
230
- /**
231
- * Workload Token Response from OAuth2 token endpoint
232
- * @see https://datatracker.ietf.org/doc/html/rfc6749#section-5.1
421
+ * SCIM Group reference (used within User resources)
233
422
  */
234
- interface WorkloadTokenResponse {
235
- /**
236
- * REQUIRED. The access token issued by the authorization server.
237
- */
238
- access_token: string;
239
- /**
240
- * REQUIRED. The type of the token (typically "Bearer").
241
- */
242
- token_type: string;
423
+ interface Group2 {
243
424
  /**
244
- * RECOMMENDED. The lifetime in seconds of the access token.
425
+ * The identifier of the User's group
245
426
  */
246
- expires_in?: number;
427
+ value: string;
247
428
  /**
248
- * OPTIONAL. The scope of the access token.
429
+ * The URI of the corresponding 'Group' resource
249
430
  */
250
- scope?: string;
431
+ $ref?: string;
251
432
  /**
252
- * OPTIONAL. The refresh token (rarely used for workload identities).
433
+ * A human-readable name, primarily used for display purposes
253
434
  */
254
- refresh_token?: string;
435
+ display?: string;
255
436
  /**
256
- * OPTIONAL. The expiration time as an ISO 8601 string.
437
+ * A label indicating the attribute's function (e.g., "direct" or "indirect")
257
438
  */
258
- expires?: string;
439
+ type?: string;
259
440
  }
260
441
  /**
261
- * Creates a StandardSchemaV1 for validating Workload Token Responses.
262
- * @param vendor - The name of the vendor creating this schema
263
- * @returns A StandardSchemaV1 instance for Workload Token Response validation
264
- */
265
- declare function workloadTokenResponseSchema(vendor: string): StandardSchemaV12<Record<string, unknown>, WorkloadTokenResponse>;
266
- /**
267
- * Token Validation Result
442
+ * SCIM Group Member reference
268
443
  */
269
- interface TokenValidationResult {
444
+ interface GroupMember {
270
445
  /**
271
- * Whether the token is valid
446
+ * The identifier of the member (User or Group)
272
447
  */
273
- valid: boolean;
448
+ value: string;
274
449
  /**
275
- * The decoded and validated claims (if valid)
450
+ * The URI of the corresponding member resource
276
451
  */
277
- claims?: JWTAssertionClaims;
452
+ $ref?: string;
278
453
  /**
279
- * Error message (if invalid)
454
+ * A human-readable name of the member
280
455
  */
281
- error?: string;
456
+ display?: string;
282
457
  /**
283
- * Token expiration time (if valid)
458
+ * The type of the member. `"Workload"` labels a service-account/workload principal (including
459
+ * config-declared trusted provisioning clients) and `"Customer"` a CIAM customer so SCIM consumers
460
+ * can distinguish them from a workforce `"User"` or a nested `"Group"`.
284
461
  */
285
- expiresAt?: Date;
462
+ type?: "User" | "Group" | "Workload" | "Customer";
286
463
  }
287
464
  /**
288
- * Workload Identity extracted from a validated token.
289
- *
290
- * This is the raw, token-derived view of a calling workload. For authorization it is normalized
291
- * into a {@link WorkloadPrincipal} (which adds a stable `id`).
465
+ * SCIM 2.0 Group Resource
466
+ * @see https://datatracker.ietf.org/doc/html/rfc7643#section-4.2
292
467
  */
293
- type WorkloadIdentity = {
294
- /** Workload identifier (for JWT Bearer Grant tokens). */
295
- workloadId?: string;
296
- /** Client identifier (for OAuth2 Client Credentials tokens). */
297
- clientId?: string;
298
- /** Granted OAuth scopes (space-delimited). */
299
- scope?: string;
468
+ interface GroupResource {
300
469
  /**
301
- * Whether the trusted IdP that validated this token opts into honoring its OAuth `scope` claim as
302
- * entitlements (per-IdP intent, resolved at validation time). Consumed by the request-level `has*`
303
- * helpers; `undefined` falls back to the global `RemoteConfig.authz.scopesAsEntitlements`.
470
+ * REQUIRED. The schemas attribute
304
471
  */
305
- scopesAsEntitlements?: boolean;
472
+ schemas?: string[];
306
473
  /**
307
- * Enterprise Controlled ID for this workload (`ecid:<realm>:<opaque>`), when carried on the token
308
- * `ecid` claim or enriched from a wired `WorkloadIdentityStore`. A workload is its own governance
309
- * root. See https://ionite.com/docs/llms-ecid.txt.
474
+ * Unique identifier for the Group, assigned by the service provider
310
475
  */
311
- ecid?: string;
312
- /** Full JWT claims from the token. */
313
- claims: JWTAssertionClaims;
314
- };
315
- /**
316
- * A workload resolved as an authorization subject. It is a {@link WorkloadIdentity} with a stable
317
- * `id` (chosen as `clientId ?? workloadId ?? claims.sub`) used as the AccessIndex subject for
318
- * `subjectType: 'workload'` checks. When a `WorkloadIdentityStore` is wired, the identity may also
319
- * carry stored enrichment fields (merged in by `getWorkloadIdentity`).
320
- */
321
- type WorkloadPrincipal = WorkloadIdentity & {
322
- /** Stable subject id used for entitlement checks (`clientId ?? workloadId ?? claims.sub`). */
323
- id: string;
324
- };
325
- /**
326
- * Workforce user type for SSO/OIDC and IAM-backed applications.
327
- * Carries the SSO/OIDC context used by server helpers and user stores.
328
- */
329
- interface WorkforceUser extends BaseUserFields {
476
+ id?: string;
330
477
  /**
331
- * SSO/OIDC authentication data
478
+ * External identifier from the provisioning client
332
479
  */
333
- sso: {
334
- /**
335
- * ID Token claims from the identity provider
336
- */
337
- profile: IdTokenClaims;
338
- /**
339
- * Tenant/organization information
340
- */
341
- tenant: {
342
- id: string;
343
- name: string;
344
- };
345
- /**
346
- * OAuth scopes granted
347
- */
348
- scope?: string;
349
- /**
350
- * Token type (typically "Bearer")
351
- */
352
- tokenType: string;
353
- /**
354
- * Session state from the identity provider
355
- */
356
- sessionState?: string;
357
- /**
358
- * Token expiration time
359
- */
360
- expires: Date;
480
+ externalId?: string;
481
+ /**
482
+ * Resource metadata
483
+ */
484
+ meta?: {
485
+ resourceType?: string;
486
+ created?: string;
487
+ lastModified?: string;
488
+ location?: string;
489
+ version?: string;
361
490
  };
491
+ /**
492
+ * REQUIRED. A human-readable name for the Group
493
+ */
494
+ displayName: string;
495
+ /**
496
+ * A list of members of the Group
497
+ */
498
+ members?: GroupMember[];
362
499
  }
363
- /**
364
- * Customer session type for CIAM-backed applications.
365
- * The persisted customer record is `BaseCustomer` (see customer-store.types).
366
- */
367
- interface Customer extends BaseUserFields {
368
- ciam: {
369
- /**
370
- * ID token-like claims for CIAM sessions.
371
- */
372
- profile: IdTokenClaims;
373
- /**
374
- * OAuth scopes granted for this customer session.
375
- */
376
- scope?: string;
377
- /**
378
- * Token type (typically "Bearer").
379
- */
380
- tokenType: string;
381
- /**
382
- * Session expiration time.
383
- */
384
- expires: Date;
500
+ /** SCIM Workload resource — machine/service principal, not a User. */
501
+ interface ScimWorkload {
502
+ [key: string]: unknown;
503
+ schemas?: string[];
504
+ id?: string;
505
+ externalId?: string;
506
+ /** Login identifier; typically the OAuth `clientId`. */
507
+ userName?: string;
508
+ displayName?: string;
509
+ description?: string;
510
+ active?: boolean;
511
+ providerId?: string;
512
+ requestUrl?: string;
513
+ /** Enterprise Controlled ID for workload correlation across datasources. */
514
+ ecid?: string;
515
+ meta?: {
516
+ resourceType?: string;
517
+ created?: string;
518
+ lastModified?: string;
519
+ location?: string;
520
+ version?: string;
385
521
  };
386
522
  }
387
- /**
388
- * Union of currently authenticated user domains.
389
- */
390
- type AuthenticatedUser = WorkforceUser | Customer;
391
- /**
392
- * Union of every principal kind that can be resolved as an authorization subject: human-facing
393
- * users (workforce/customer) plus non-human {@link WorkloadPrincipal}s. Use this where a resolved
394
- * subject may be any authenticated principal; keep {@link AuthenticatedUser} for browser/tenant-HRD
395
- * flows that are inherently human.
396
- */
397
- type AuthenticatedPrincipal = AuthenticatedUser | WorkloadPrincipal;
398
- import { StandardSchemaV1 as StandardSchemaV19 } from "@standard-schema/spec";
399
- import { StandardSchemaV1 as StandardSchemaV18 } from "@standard-schema/spec";
400
- /**
401
- * Third-party CIAM provider presets and claim mapping.
402
- *
403
- * Defines the built-in provider adapters used by the CIAM module for customer
404
- * login. Each preset supplies default OIDC/OAuth2 endpoints, scope, branding,
405
- * and a claim mapper that normalizes provider claims into a candidate customer.
406
- * The application's `CustomerStore` remains the system of record: the SDK only
407
- * extracts standard claims and hands a candidate to `lookup`/`upsert`.
408
- */
409
- /** Built-in provider types. `oidc` is a generic OIDC provider; `magic-link` is the passwordless flow. */
410
- type CIAMProviderType = "oidc" | "google" | "github" | "microsoft" | "apple" | "magic-link";
411
- /** Branding colors for rendering a provider button in light and dark themes. */
412
- type CIAMProviderColors = {
413
- /** Background/brand color for light theme (hex or CSS color). */
414
- light: string;
415
- /** Background/brand color for dark theme (hex or CSS color). */
416
- dark: string;
417
- /** Optional secondary/accent color. */
418
- secondary?: string;
419
- };
420
- /** Operator-supplied branding so the UI can render a provider list without hardcoding. */
421
- type CIAMProviderBranding = {
422
- /** Human-readable name shown on the login button (e.g. "Google"). */
423
- displayName: string;
424
- /** External icon URL (typically an SVG/PNG hosted on a CDN). */
425
- iconUrl?: string;
426
- /** Light/dark brand colors. */
427
- colors?: CIAMProviderColors;
428
- /** Optional provider info/marketing URL. */
429
- url?: string;
430
- };
431
- /**
432
- * A single CIAM provider declaration. OIDC/OAuth2 endpoint and credential
433
- * fields come from the ConfigSource (never application code).
434
- */
435
- type CIAMProviderConfig = {
436
- /** Provider adapter type. Selects defaults and claim mapping. */
437
- type: CIAMProviderType;
438
- /** Whether this provider is enabled. Defaults to true when omitted. */
439
- enabled?: boolean;
440
- /** Recommended display order (ascending). Ties broken by declaration order. */
441
- order?: number;
442
- /** UI branding metadata. */
443
- branding?: CIAMProviderBranding;
444
- /** OIDC issuer/authority (used for discovery when explicit endpoints are omitted). */
445
- authority?: string;
446
- /** Authorization endpoint (overrides preset). */
447
- authorizationUrl?: string;
448
- /** Token endpoint (overrides preset). */
449
- tokenUrl?: string;
450
- /** JWKS endpoint for ID token verification (overrides preset). */
451
- jwksUri?: string;
452
- /** OAuth2 UserInfo endpoint for providers without an ID token (e.g. GitHub). */
453
- userInfoUrl?: string;
454
- /** OAuth2 client id (ConfigSource-only). */
455
- clientId?: string;
456
- /** OAuth2 client secret (ConfigSource-only). */
457
- clientSecret?: string;
458
- /** Requested scope (overrides preset). */
459
- scope?: string;
460
- /** Apple: team id for client-secret generation. */
461
- teamId?: string;
462
- /** Apple: key id for client-secret generation. */
463
- keyId?: string;
464
- /** Apple: PKCS#8 PEM private key for client-secret generation. */
465
- privateKey?: string;
466
- };
467
- /** Sanitized provider entry returned by the discovery endpoint for the UI. */
468
- type CIAMProviderDescriptor = {
469
- /** Provider key (matches the RemoteConfig map key); used as `?provider=`. */
470
- name: string;
471
- type: CIAMProviderType;
472
- displayName: string;
473
- /** SDK-derived login URL to navigate to (begins the flow). */
474
- loginUrl: string;
475
- iconUrl?: string;
476
- colors?: CIAMProviderColors;
477
- url?: string;
478
- };
479
- /**
480
- * Minimal logger interface compatible with common structured logging patterns.
481
- */
482
- interface Logger {
483
- trace(message?: unknown, ...optionalParams: unknown[]): void;
484
- debug(message?: unknown, ...optionalParams: unknown[]): void;
485
- info(message?: unknown, ...optionalParams: unknown[]): void;
486
- warn(message?: unknown, ...optionalParams: unknown[]): void;
487
- error(message?: unknown, ...optionalParams: unknown[]): void;
523
+ /** SCIM Customer resource — CIAM consumer principal, not a workforce User. */
524
+ interface ScimCustomer {
525
+ [key: string]: unknown;
526
+ schemas?: string[];
527
+ id?: string;
528
+ externalId?: string;
529
+ userName?: string;
530
+ displayName?: string;
531
+ active?: boolean;
532
+ emails?: Email[];
533
+ providerId?: string;
534
+ requestUrl?: string;
535
+ meta?: {
536
+ resourceType?: string;
537
+ created?: string;
538
+ lastModified?: string;
539
+ location?: string;
540
+ version?: string;
541
+ };
488
542
  }
489
543
  /**
490
- * No-op implementation — does nothing for any log level
491
- */
492
- declare const silentLogger: Logger;
493
- /**
494
- * Default logger used until an ionite instance is configured with
495
- * an OpenTelemetry-backed logger or an application-provided logger.
496
- */
497
- declare const defaultLogger: Logger;
498
- /**
499
- * Logger that logs messages debug, info, warn, and error to the console.
500
- */
501
- declare const debugLogger: Logger;
502
- /**
503
- * Logger that logs messages info, warn, and error to the console.
504
- */
505
- declare const infoLogger: Logger;
506
- /**
507
- * Logger that logs messages warn and error to the console.
508
- */
509
- declare const warnLogger: Logger;
510
- /** Synchronous, in-memory read surface for one code catalog entity kind. */
511
- type CodeCatalogNamespace<TEntity> = {
512
- get(id: string): TEntity | undefined;
513
- list(): readonly TEntity[];
514
- };
515
- /**
516
- * Normalized, frozen code-declared catalog produced by {@link defineCatalog}. All entities are
517
- * deep-frozen and id-indexed.
518
- */
519
- type CodeCatalog = {
520
- groups: CodeCatalogNamespace<Group>;
521
- roles: CodeCatalogNamespace<Role>;
522
- permissions: CodeCatalogNamespace<Permission>;
523
- };
524
- /** Declarative input for {@link defineCatalog} (plain arrays authored in app code). */
525
- type CodeCatalogInput = {
526
- groups?: readonly Group[];
527
- roles?: readonly Role[];
528
- permissions?: readonly Permission[];
529
- };
530
- /** True when the value is already a normalized {@link CodeCatalog} (vs a declarative input). */
531
- declare function isCodeCatalog(value: CodeCatalog | CodeCatalogInput): value is CodeCatalog;
532
- /** Normalize an `authz.catalog` config value: pass through a {@link CodeCatalog}, build one from input. */
533
- declare function toCodeCatalog(value: CodeCatalog | CodeCatalogInput): CodeCatalog;
534
- type CatalogEntityKind = "group" | "role" | "permission";
535
- /**
536
- * Build a validated, frozen {@link CodeCatalog} from declarative arrays. Call it once at module
537
- * scope in a pure authz module (no store imports) and wire the result via
538
- * `FrameworkConfig.authz.catalog`.
539
- *
540
- * Validation (throws {@link Error} at module evaluation on the first violation):
541
- * - ids are globally unique across groups, roles, AND permissions (one SCIM Groups id space);
542
- * - every group -> group/role/permission reference (string id or embedded object) resolves to an
543
- * entity declared in the catalog arrays, and every role -> permission reference likewise
544
- * (`resources` refs are NOT validated here — resources live in the app's `ResourceProvider`);
545
- * - nested group composition is acyclic;
546
- * - every entitlement declares a required non-empty `assignableSubjectTypes` within the platform
547
- * ceiling, and `recommendedSubjectTypes` is a subset of it.
548
- *
549
- * Side effects: every entity (and its arrays/metadata) is frozen.
550
- */
551
- declare function defineCatalog(input: CodeCatalogInput): CodeCatalog;
552
- /** Resolve one code entity and its kind from the shared id space. */
553
- declare function getCodeCatalogEntity(code: CodeCatalog | undefined, id: string): {
554
- entity: Group | Role | Permission;
555
- kind: CatalogEntityKind;
556
- } | undefined;
557
- /** Return the entity namespace for one catalog kind. */
558
- declare function catalogEntityStore<TEntity extends Group | Role | Permission>(catalog: AccessCatalogStore, kind: CatalogEntityKind): EntityStore<TEntity>;
559
- /**
560
- * Merge a materialized row with its code template. The row owns presentation, receipts, lifecycle,
561
- * and other runtime metadata; code owns ids, subject scoping, and graph/resource structure.
562
- */
563
- declare function mergeCodeCatalogEntity<TEntity extends Group | Role | Permission>(kind: CatalogEntityKind, code: TEntity, stored: TEntity): TEntity;
564
- /**
565
- * Insert a code template into the runtime catalog only when no row exists. Existing rows are never
566
- * rewritten, preserving IAM-renamed presentation and receipts. `insertIfAbsent` closes the race
567
- * between the initial read and insert.
568
- */
569
- declare function materializeCodeCatalogEntity<TEntity extends Group | Role | Permission>(kind: CatalogEntityKind, code: TEntity, store: EntityStore<TEntity>): Promise<TEntity>;
570
- /**
571
- * Mark materialized code rows as deprecated when their template no longer exists. Callers choose
572
- * when to run this lifecycle sweep; it never runs during config apply.
573
- */
574
- declare function deprecateRetiredCodeCatalogRows(code: CodeCatalog | undefined, store: AccessCatalogStore, onlyId?: string): Promise<void>;
575
- /**
576
- * {@link AccessCatalogStore}-shaped read union over code templates and the runtime store. Store rows
577
- * win presentation for code ids, code owns their structure, and unmaterialized code entities remain
578
- * visible. Returns undefined when neither source is wired.
579
- */
580
- declare function unionCatalogRead(code: CodeCatalog | undefined, store: AccessCatalogStore | undefined): AccessCatalogStore | undefined;
581
- import { StandardSchemaV1 as StandardSchemaV15 } from "@standard-schema/spec";
582
- /**
583
- * Resolve an access subject/target/resource reference (a string id or an object carrying one) to its
584
- * canonical, trimmed string id. This is the single id-resolution rule shared across the authz stack
585
- * (AUDIT_HISTORY.md §8.4): `accessRootId`, the access stores, the access index, and SCIM diff keys all key off
586
- * the same normalization so distinct roots never collapse and identical references never diverge.
587
- * Returns `''` when no id can be resolved.
588
- */
589
- declare function accessRefId(value: unknown): string;
590
- /**
591
- * Deterministic id for a granted root. Includes the resource scope so that two grants of the same
592
- * subject/target with different scopes are tracked as distinct roots. Application-wide scope (the
593
- * default, or `applyToApplication`) collapses to the `app` scope key.
544
+ * SCIM Role
594
545
  */
595
- declare function accessRootId(change: AccessChange): string;
596
- import { StandardSchemaV1 as StandardSchemaV13 } from "@standard-schema/spec";
546
+ interface Role2 {
547
+ /**
548
+ * The value of the role
549
+ */
550
+ value: string;
551
+ /**
552
+ * A human-readable name, primarily used for display purposes
553
+ */
554
+ display?: string;
555
+ /**
556
+ * A label indicating the attribute's function
557
+ */
558
+ type?: string;
559
+ /**
560
+ * A Boolean value indicating the 'primary' or preferred attribute value
561
+ */
562
+ primary?: boolean;
563
+ }
597
564
  /**
598
- * SCIM 2.0 User Resource
599
- * @see https://datatracker.ietf.org/doc/html/rfc7643#section-4.1
565
+ * SCIM X509 Certificate
600
566
  */
567
+ interface X509Certificate {
568
+ /**
569
+ * The value of the X.509 certificate
570
+ */
571
+ value: string;
572
+ /**
573
+ * A human-readable name, primarily used for display purposes
574
+ */
575
+ display?: string;
576
+ /**
577
+ * A label indicating the attribute's function
578
+ */
579
+ type?: string;
580
+ /**
581
+ * A Boolean value indicating the 'primary' or preferred attribute value
582
+ */
583
+ primary?: boolean;
584
+ }
601
585
  /**
602
- * SCIM Name sub-attribute
586
+ * SCIM Enterprise User Extension
587
+ * @see https://datatracker.ietf.org/doc/html/rfc7643#section-4.3
603
588
  */
604
- interface Name {
589
+ interface EnterpriseExtension {
605
590
  /**
606
- * The full name, including all middle names, titles, and suffixes as appropriate
591
+ * Numeric or alphanumeric identifier assigned to a person
607
592
  */
608
- formatted?: string;
593
+ employeeNumber?: string;
609
594
  /**
610
- * The family name of the User, or last name
595
+ * Identifies the name of a cost center
611
596
  */
612
- familyName?: string;
597
+ costCenter?: string;
613
598
  /**
614
- * The given name of the User, or first name
599
+ * Identifies the name of an organization
615
600
  */
616
- givenName?: string;
601
+ organization?: string;
617
602
  /**
618
- * The middle name(s) of the User
603
+ * Identifies the name of a division
619
604
  */
620
- middleName?: string;
605
+ division?: string;
621
606
  /**
622
- * The honorific prefix(es) of the User, or title
607
+ * Identifies the name of a department
623
608
  */
624
- honorificPrefix?: string;
609
+ department?: string;
625
610
  /**
626
- * The honorific suffix(es) of the User, or suffix
611
+ * The user's manager
627
612
  */
628
- honorificSuffix?: string;
613
+ manager?: {
614
+ /**
615
+ * The "id" of the SCIM resource representing the User's manager
616
+ */
617
+ value?: string;
618
+ /**
619
+ * The URI of the SCIM resource representing the User's manager
620
+ */
621
+ $ref?: string;
622
+ /**
623
+ * The displayName of the User's manager
624
+ */
625
+ displayName?: string;
626
+ };
629
627
  }
630
628
  /**
631
- * SCIM Photo sub-attribute
629
+ * SCIM URN for the ionite User extension, carrying the ECID identity correlator and
630
+ * the account purpose (`accountClass`). Hosted schema:
631
+ * https://ionite.com/schemas/ion-scim-user-extension.json
632
632
  */
633
- interface Photo {
634
- /**
635
- * The photo url
636
- */
637
- value: string;
633
+ declare const ION_SCIM_USER_EXTENSION_URN = "urn:ionite:scim:schemas:extension:ion:2.0:User";
634
+ /** SCIM core schema for a Workload principal (distinct ResourceType from User). */
635
+ declare const ION_SCIM_WORKLOAD_SCHEMA = "urn:ionite:scim:schemas:core:2.0:Workload";
636
+ /** SCIM core schema for a Customer principal (distinct ResourceType from User). */
637
+ declare const ION_SCIM_CUSTOMER_SCHEMA = "urn:ionite:scim:schemas:core:2.0:Customer";
638
+ /**
639
+ * ionite SCIM User extension. See https://ionite.com/docs/llms-ecid.txt.
640
+ */
641
+ interface IoniteUserExtension {
638
642
  /**
639
- * The type of the photo
643
+ * Enterprise Controlled ID: `ecid:<realm>:<opaque>` (realm = the minting authority's id).
644
+ * Correlates multiple accounts to one identity across systems.
640
645
  */
641
- type?: "photo" | "thumbnail";
646
+ ecid?: string;
642
647
  /**
643
- * A Boolean value indicating the 'primary' or preferred attribute value
648
+ * Account purpose (distinct from `userType` persona). Open value set:
649
+ * `daily`, `privileged`, `break_glass`, `service`.
644
650
  */
645
- primary?: boolean;
651
+ accountClass?: string;
646
652
  }
647
653
  /**
648
- * SCIM Email sub-attribute
654
+ * SCIM User Resource
649
655
  */
650
- interface Email {
656
+ interface User {
657
+ [key: string]: unknown;
658
+ /**
659
+ * REQUIRED. Unique identifier for the User, typically from the provider
660
+ */
661
+ id?: string;
662
+ /**
663
+ * REQUIRED. A unique identifier for a SCIM resource as defined by the service provider
664
+ */
665
+ externalId?: string;
651
666
  /**
652
- * The email address value
667
+ * Resource metadata
653
668
  */
654
- value: string;
669
+ meta?: {
670
+ resourceType?: string;
671
+ created?: string;
672
+ lastModified?: string;
673
+ location?: string;
674
+ version?: string;
675
+ };
655
676
  /**
656
- * A human-readable name, primarily used for display purposes
677
+ * REQUIRED. Unique identifier for the User, typically used for login
657
678
  */
658
- display?: string;
679
+ userName: string;
659
680
  /**
660
- * A label indicating the attribute's function (e.g., "work" or "home")
681
+ * The components of the user's name
661
682
  */
662
- type?: string;
683
+ name?: Name;
663
684
  /**
664
- * A Boolean value indicating the 'primary' or preferred attribute value
685
+ * The name of the User, suitable for display to end-users
665
686
  */
666
- primary?: boolean;
667
- }
668
- /**
669
- * SCIM Phone Number sub-attribute
670
- */
671
- interface PhoneNumber {
687
+ displayName?: string;
672
688
  /**
673
- * The phone number value
689
+ * The casual way to address the user
674
690
  */
675
- value: string;
691
+ nickName?: string;
676
692
  /**
677
- * A human-readable name, primarily used for display purposes
693
+ * A fully qualified URL pointing to a page representing the User's online profile
678
694
  */
679
- display?: string;
695
+ profileUrl?: string;
680
696
  /**
681
- * A label indicating the attribute's function (e.g., "work", "home", "mobile")
697
+ * The user's title, such as "Vice President"
682
698
  */
683
- type?: string;
699
+ title?: string;
684
700
  /**
685
- * A Boolean value indicating the 'primary' or preferred attribute value
701
+ * Used to identify the relationship between the organization and the user
686
702
  */
687
- primary?: boolean;
688
- }
689
- /**
690
- * SCIM Address sub-attribute
691
- */
692
- interface Address {
703
+ userType?: string;
693
704
  /**
694
- * The full mailing address, formatted for display
705
+ * Indicates the User's preferred written or spoken language
695
706
  */
696
- formatted?: string;
707
+ preferredLanguage?: string;
697
708
  /**
698
- * The full street address component
709
+ * Used to indicate the User's default location for purposes of localizing items such as currency
699
710
  */
700
- streetAddress?: string;
711
+ locale?: string;
701
712
  /**
702
- * The city or locality component
713
+ * The User's time zone in the "Olson" time zone database format
703
714
  */
704
- locality?: string;
715
+ timezone?: string;
705
716
  /**
706
- * The state or region component
717
+ * A Boolean value indicating the User's administrative status
707
718
  */
708
- region?: string;
719
+ active?: boolean;
709
720
  /**
710
- * The zip code or postal code component
721
+ * Email addresses for the user
711
722
  */
712
- postalCode?: string;
723
+ emails?: Email[];
713
724
  /**
714
- * The country name component
725
+ * Phone numbers for the User
715
726
  */
716
- country?: string;
727
+ phoneNumbers?: PhoneNumber[];
717
728
  /**
718
- * A label indicating the attribute's function (e.g., "work" or "home")
729
+ * Instant messaging addresses for the User
719
730
  */
720
- type?: string;
731
+ ims?: Array<{
732
+ value: string;
733
+ display?: string;
734
+ type?: string;
735
+ primary?: boolean;
736
+ }>;
721
737
  /**
722
- * A Boolean value indicating the 'primary' or preferred attribute value
738
+ * URLs of photos of the User
723
739
  */
724
- primary?: boolean;
725
- }
726
- /**
727
- * SCIM Group reference (used within User resources)
728
- */
729
- interface Group2 {
740
+ photos?: Array<{
741
+ value: string;
742
+ display?: string;
743
+ type?: string;
744
+ primary?: boolean;
745
+ }>;
730
746
  /**
731
- * The identifier of the User's group
747
+ * Physical mailing addresses for this User
732
748
  */
733
- value: string;
749
+ addresses?: Address[];
734
750
  /**
735
- * The URI of the corresponding 'Group' resource
751
+ * A list of groups to which the user belongs
736
752
  */
737
- $ref?: string;
753
+ groups?: Group2[];
738
754
  /**
739
- * A human-readable name, primarily used for display purposes
755
+ * A list of entitlements for the User
740
756
  */
741
- display?: string;
757
+ entitlements?: Array<{
758
+ value: string;
759
+ display?: string;
760
+ type?: string;
761
+ primary?: boolean;
762
+ }>;
742
763
  /**
743
- * A label indicating the attribute's function (e.g., "direct" or "indirect")
764
+ * A list of roles for the User
744
765
  */
745
- type?: string;
746
- }
747
- /**
748
- * SCIM Group Member reference
749
- */
750
- interface GroupMember {
766
+ roles?: Role2[];
751
767
  /**
752
- * The identifier of the member (User or Group)
768
+ * A list of certificates issued to the User
753
769
  */
754
- value: string;
770
+ x509Certificates?: X509Certificate[];
755
771
  /**
756
- * The URI of the corresponding member resource
772
+ * Enterprise User Extension
757
773
  */
758
- $ref?: string;
774
+ "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"?: EnterpriseExtension;
759
775
  /**
760
- * A human-readable name of the member
776
+ * ionite User Extension (ECID + accountClass).
761
777
  */
762
- display?: string;
778
+ "urn:ionite:scim:schemas:extension:ion:2.0:User"?: IoniteUserExtension;
763
779
  /**
764
- * The type of the member. `"Workload"` labels a service-account/workload principal (including
765
- * config-declared trusted provisioning clients) and `"Customer"` a CIAM customer so SCIM consumers
766
- * can distinguish them from a workforce `"User"` or a nested `"Group"`.
780
+ * REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version
767
781
  */
768
- type?: "User" | "Group" | "Workload" | "Customer";
782
+ schemas?: string[];
769
783
  }
770
784
  /**
771
- * SCIM 2.0 Group Resource
772
- * @see https://datatracker.ietf.org/doc/html/rfc7643#section-4.2
785
+ * Creates a StandardSchemaV1 for validating SCIM User resources.
786
+ * @param vendor - The name of the vendor creating this schema
787
+ * @returns A StandardSchemaV1 instance for SCIM User resources
773
788
  */
774
- interface GroupResource {
789
+ declare function userSchema(vendor: string): StandardSchemaV1<Record<string, unknown>, User>;
790
+ /**
791
+ * Creates a StandardSchemaV1 for validating SCIM Group resources.
792
+ * @param vendor - The name of the vendor creating this schema
793
+ * @returns A StandardSchemaV1 instance for SCIM Group resources
794
+ */
795
+ declare function groupResourceSchema(vendor: string): StandardSchemaV1<Record<string, unknown>, GroupResource>;
796
+ /** Validates a SCIM Workload resource. */
797
+ declare const workloadResourceSchema: StandardSchemaV1<unknown, ScimWorkload>;
798
+ /** Validates a SCIM Customer resource. */
799
+ declare const customerResourceSchema: StandardSchemaV1<unknown, ScimCustomer>;
800
+ import { StandardSchemaV1 as StandardSchemaV12 } from "@standard-schema/spec";
801
+ /**
802
+ * OIDC Code Flow Callback URL Parameters
803
+ * @see https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth
804
+ */
805
+ interface OidcCallbackParams {
775
806
  /**
776
- * REQUIRED. The schemas attribute
807
+ * REQUIRED. The authorization code returned from the authorization server.
777
808
  */
778
- schemas?: string[];
809
+ code: string;
779
810
  /**
780
- * Unique identifier for the Group, assigned by the service provider
811
+ * REQUIRED if the "state" parameter was present in the client authorization request.
812
+ * The exact value received from the client.
781
813
  */
782
- id?: string;
814
+ state?: string;
783
815
  /**
784
- * External identifier from the provisioning client
816
+ * RECOMMENDED. The session state value. Clients should use this to verify the session state.
785
817
  */
786
- externalId?: string;
818
+ session_state?: string;
787
819
  /**
788
- * Resource metadata
820
+ * OAuth 2.0 error code if the authorization request failed.
789
821
  */
790
- meta?: {
791
- resourceType?: string;
792
- created?: string;
793
- lastModified?: string;
794
- location?: string;
795
- version?: string;
796
- };
822
+ error?: string;
797
823
  /**
798
- * REQUIRED. A human-readable name for the Group
824
+ * Human-readable ASCII text providing additional information for the error.
799
825
  */
800
- displayName: string;
826
+ error_description?: string;
801
827
  /**
802
- * A list of members of the Group
828
+ * A URI identifying a human-readable web page with information about the error.
803
829
  */
804
- members?: GroupMember[];
830
+ error_uri?: string;
831
+ /**
832
+ * The "iss" (issuer) parameter identifies the principal that issued the response.
833
+ * This is typically used in the implicit flow.
834
+ */
835
+ iss?: string;
805
836
  }
806
- /** SCIM Workload resource — machine/service principal, not a User. */
807
- interface ScimWorkload {
808
- schemas?: string[];
809
- id?: string;
810
- externalId?: string;
811
- /** Login identifier; typically the OAuth `clientId`. */
812
- userName?: string;
813
- displayName?: string;
814
- description?: string;
815
- active?: boolean;
816
- providerId?: string;
817
- requestUrl?: string;
818
- meta?: {
819
- resourceType?: string;
820
- created?: string;
821
- lastModified?: string;
822
- location?: string;
823
- version?: string;
824
- };
837
+ /**
838
+ * Creates a StandardSchemaV1 for validating OIDC callback URL parameters.
839
+ * @param vendor - The name of the vendor creating this schema
840
+ * @returns A StandardSchemaV1 instance for OIDC callback parameters
841
+ */
842
+ declare function oidcCallbackSchema(vendor: string): StandardSchemaV12<Record<string, unknown>, OidcCallbackParams>;
843
+ /**
844
+ * Token Response from IdP
845
+ */
846
+ interface TokenResponse {
847
+ access_token: string;
848
+ id_token: string;
849
+ refresh_token?: string;
850
+ token_type: string;
851
+ expires_in?: number;
852
+ scope?: string;
853
+ refresh_expires_in?: number;
854
+ session_state?: string;
855
+ expires?: string;
825
856
  }
826
- /** SCIM Customer resource — CIAM consumer principal, not a workforce User. */
827
- interface ScimCustomer {
828
- schemas?: string[];
829
- id?: string;
830
- externalId?: string;
831
- userName?: string;
832
- displayName?: string;
833
- active?: boolean;
834
- emails?: Email[];
835
- providerId?: string;
836
- requestUrl?: string;
837
- meta?: {
838
- resourceType?: string;
839
- created?: string;
840
- lastModified?: string;
841
- location?: string;
842
- version?: string;
843
- };
857
+ /**
858
+ * Creates a StandardSchemaV1 for validating OIDC Token Responses.
859
+ * @param vendor - The name of the vendor creating this schema
860
+ * @returns A StandardSchemaV1 instance for Token Response validation
861
+ */
862
+ declare function tokenResponseSchema(vendor: string): StandardSchemaV12<Record<string, unknown>, TokenResponse>;
863
+ /**
864
+ * ID Token Claims
865
+ */
866
+ interface IdTokenClaims {
867
+ iss?: string;
868
+ aud?: string | string[];
869
+ exp?: number;
870
+ iat?: number;
871
+ sub?: string;
872
+ sid?: string;
873
+ name?: string;
874
+ email?: string;
875
+ preferred_username?: string;
876
+ picture?: string;
877
+ /**
878
+ * Enterprise Controlled ID claim (`ecid:<realm>:<opaque>`). When present it correlates this
879
+ * account to a single identity across systems. See https://ionite.com/docs/llms-ecid.txt.
880
+ */
881
+ ecid?: string;
882
+ [key: string]: unknown;
844
883
  }
845
884
  /**
846
- * SCIM Role
885
+ * Creates a StandardSchemaV1 for validating ID Token Claims.
886
+ * @param vendor - The name of the vendor creating this schema
887
+ * @returns A StandardSchemaV1 instance for ID Token Claims validation
847
888
  */
848
- interface Role2 {
889
+ declare function idTokenClaimsSchema(vendor: string): StandardSchemaV12<Record<string, unknown>, IdTokenClaims>;
890
+ import { StandardSchemaV1 as StandardSchemaV13 } from "@standard-schema/spec";
891
+ /**
892
+ * JWT Assertion Claims for OAuth2 JWT Bearer Grant (RFC 7523) and OAuth2 Access Tokens
893
+ * @see https://datatracker.ietf.org/doc/html/rfc7523
894
+ * @see https://datatracker.ietf.org/doc/html/rfc9068
895
+ */
896
+ interface JWTAssertionClaims {
849
897
  /**
850
- * The value of the role
898
+ * REQUIRED. Issuer - the workload identity (e.g., SPIFFE ID) or authorization server
851
899
  */
852
- value: string;
900
+ iss: string;
853
901
  /**
854
- * A human-readable name, primarily used for display purposes
902
+ * REQUIRED. Subject - the workload identity or service account
855
903
  */
856
- display?: string;
904
+ sub: string;
857
905
  /**
858
- * A label indicating the attribute's function
906
+ * OPTIONAL. Audience - may be a string or array of strings
907
+ * Note: Required for JWT assertions, but may be absent in OAuth2 access tokens
859
908
  */
860
- type?: string;
909
+ aud?: string | string[];
861
910
  /**
862
- * A Boolean value indicating the 'primary' or preferred attribute value
911
+ * REQUIRED. Expiration time (Unix timestamp)
863
912
  */
864
- primary?: boolean;
913
+ exp: number;
914
+ /**
915
+ * REQUIRED. Issued at time (Unix timestamp)
916
+ */
917
+ iat: number;
918
+ /**
919
+ * OPTIONAL. JWT ID - unique identifier for this token
920
+ * Note: Required for JWT assertions, optional for access tokens
921
+ */
922
+ jti?: string;
923
+ /**
924
+ * OPTIONAL. Requested OAuth scopes (space-delimited)
925
+ */
926
+ scope?: string;
927
+ /**
928
+ * Allow additional claims for extensibility
929
+ */
930
+ [key: string]: unknown;
865
931
  }
866
932
  /**
867
- * SCIM X509 Certificate
933
+ * Creates a StandardSchemaV1 for validating JWT Assertion Claims.
934
+ * @param vendor - The name of the vendor creating this schema
935
+ * @returns A StandardSchemaV1 instance for JWT Assertion Claims validation
868
936
  */
869
- interface X509Certificate {
937
+ declare function jwtAssertionClaimsSchema(vendor: string): StandardSchemaV13<Record<string, unknown>, JWTAssertionClaims>;
938
+ /**
939
+ * Workload Token Response from OAuth2 token endpoint
940
+ * @see https://datatracker.ietf.org/doc/html/rfc6749#section-5.1
941
+ */
942
+ interface WorkloadTokenResponse {
870
943
  /**
871
- * The value of the X.509 certificate
944
+ * REQUIRED. The access token issued by the authorization server.
872
945
  */
873
- value: string;
946
+ access_token: string;
874
947
  /**
875
- * A human-readable name, primarily used for display purposes
948
+ * REQUIRED. The type of the token (typically "Bearer").
876
949
  */
877
- display?: string;
950
+ token_type: string;
878
951
  /**
879
- * A label indicating the attribute's function
952
+ * RECOMMENDED. The lifetime in seconds of the access token.
880
953
  */
881
- type?: string;
954
+ expires_in?: number;
882
955
  /**
883
- * A Boolean value indicating the 'primary' or preferred attribute value
956
+ * OPTIONAL. The scope of the access token.
884
957
  */
885
- primary?: boolean;
958
+ scope?: string;
959
+ /**
960
+ * OPTIONAL. The refresh token (rarely used for workload identities).
961
+ */
962
+ refresh_token?: string;
963
+ /**
964
+ * OPTIONAL. The expiration time as an ISO 8601 string.
965
+ */
966
+ expires?: string;
886
967
  }
887
968
  /**
888
- * SCIM Enterprise User Extension
889
- * @see https://datatracker.ietf.org/doc/html/rfc7643#section-4.3
969
+ * Creates a StandardSchemaV1 for validating Workload Token Responses.
970
+ * @param vendor - The name of the vendor creating this schema
971
+ * @returns A StandardSchemaV1 instance for Workload Token Response validation
890
972
  */
891
- interface EnterpriseExtension {
973
+ declare function workloadTokenResponseSchema(vendor: string): StandardSchemaV13<Record<string, unknown>, WorkloadTokenResponse>;
974
+ /**
975
+ * Token Validation Result
976
+ */
977
+ interface TokenValidationResult {
892
978
  /**
893
- * Numeric or alphanumeric identifier assigned to a person
979
+ * Whether the token is valid
894
980
  */
895
- employeeNumber?: string;
981
+ valid: boolean;
896
982
  /**
897
- * Identifies the name of a cost center
983
+ * The decoded and validated claims (if valid)
898
984
  */
899
- costCenter?: string;
985
+ claims?: JWTAssertionClaims;
900
986
  /**
901
- * Identifies the name of an organization
987
+ * Error message (if invalid)
902
988
  */
903
- organization?: string;
989
+ error?: string;
904
990
  /**
905
- * Identifies the name of a division
991
+ * Token expiration time (if valid)
906
992
  */
907
- division?: string;
993
+ expiresAt?: Date;
994
+ }
995
+ /**
996
+ * Workload Identity extracted from a validated token.
997
+ *
998
+ * This is the raw, token-derived view of a calling workload. For authorization it is normalized
999
+ * into a {@link WorkloadPrincipal} (which adds a stable `id`).
1000
+ */
1001
+ type WorkloadIdentity = {
1002
+ /** Workload identifier (for JWT Bearer Grant tokens). */
1003
+ workloadId?: string;
1004
+ /** Client identifier (for OAuth2 Client Credentials tokens). */
1005
+ clientId?: string;
1006
+ /** Granted OAuth scopes (space-delimited). */
1007
+ scope?: string;
908
1008
  /**
909
- * Identifies the name of a department
1009
+ * Whether the trusted IdP that validated this token opts into honoring its OAuth `scope` claim as
1010
+ * entitlements (per-IdP intent, resolved at validation time). Consumed by the request-level `has*`
1011
+ * helpers; `undefined` falls back to the global `RemoteConfig.authz.scopesAsEntitlements`.
910
1012
  */
911
- department?: string;
1013
+ scopesAsEntitlements?: boolean;
912
1014
  /**
913
- * The user's manager
1015
+ * Enterprise Controlled ID for this workload (`ecid:<realm>:<opaque>`), when carried on the token
1016
+ * `ecid` claim or enriched from a wired `WorkloadIdentityStore`. A workload is its own governance
1017
+ * root. See https://ionite.com/docs/llms-ecid.txt.
914
1018
  */
915
- manager?: {
1019
+ ecid?: string;
1020
+ /** Full JWT claims from the token. */
1021
+ claims: JWTAssertionClaims;
1022
+ };
1023
+ /**
1024
+ * A workload resolved as an authorization subject. It is a {@link WorkloadIdentity} with a stable
1025
+ * `id` (chosen as `clientId ?? workloadId ?? claims.sub`) used as the AccessIndex subject for
1026
+ * `subjectType: 'workload'` checks. When a `WorkloadIdentityStore` is wired, the identity may also
1027
+ * carry stored enrichment fields (merged in by `getWorkloadIdentity`).
1028
+ */
1029
+ type WorkloadPrincipal = WorkloadIdentity & {
1030
+ /** Stable subject id used for entitlement checks (`clientId ?? workloadId ?? claims.sub`). */
1031
+ id: string;
1032
+ };
1033
+ /**
1034
+ * Workforce user type for SSO/OIDC and IAM-backed applications.
1035
+ * Carries the SSO/OIDC context used by server helpers and user stores.
1036
+ */
1037
+ interface WorkforceUser extends BaseUserFields {
1038
+ /**
1039
+ * SSO/OIDC authentication data
1040
+ */
1041
+ sso: {
916
1042
  /**
917
- * The "id" of the SCIM resource representing the User's manager
1043
+ * ID Token claims from the identity provider
918
1044
  */
919
- value?: string;
1045
+ profile: IdTokenClaims;
920
1046
  /**
921
- * The URI of the SCIM resource representing the User's manager
1047
+ * Tenant/organization information
922
1048
  */
923
- $ref?: string;
1049
+ tenant: {
1050
+ id: string;
1051
+ name: string;
1052
+ };
924
1053
  /**
925
- * The displayName of the User's manager
1054
+ * OAuth scopes granted
926
1055
  */
927
- displayName?: string;
1056
+ scope?: string;
1057
+ /**
1058
+ * Token type (typically "Bearer")
1059
+ */
1060
+ tokenType: string;
1061
+ /**
1062
+ * Session state from the identity provider
1063
+ */
1064
+ sessionState?: string;
1065
+ /**
1066
+ * Token expiration time
1067
+ */
1068
+ expires: Date;
928
1069
  };
929
1070
  }
930
1071
  /**
931
- * SCIM URN for the ionite User extension, carrying the ECID identity correlator and
932
- * the account purpose (`accountClass`). Hosted schema:
933
- * https://ionite.com/schemas/ion-scim-user-extension.json
1072
+ * Customer session type for CIAM-backed applications.
1073
+ * The persisted customer record is `BaseCustomer` (see customer-store.types).
934
1074
  */
935
- declare const ION_SCIM_USER_EXTENSION_URN = "urn:ionite:scim:schemas:extension:ion:2.0:User";
936
- /** SCIM core schema for a Workload principal (distinct ResourceType from User). */
937
- declare const ION_SCIM_WORKLOAD_SCHEMA = "urn:ionite:scim:schemas:core:2.0:Workload";
938
- /** SCIM core schema for a Customer principal (distinct ResourceType from User). */
939
- declare const ION_SCIM_CUSTOMER_SCHEMA = "urn:ionite:scim:schemas:core:2.0:Customer";
1075
+ interface Customer extends BaseUserFields {
1076
+ ciam: {
1077
+ /**
1078
+ * ID token-like claims for CIAM sessions.
1079
+ */
1080
+ profile: IdTokenClaims;
1081
+ /**
1082
+ * OAuth scopes granted for this customer session.
1083
+ */
1084
+ scope?: string;
1085
+ /**
1086
+ * Token type (typically "Bearer").
1087
+ */
1088
+ tokenType: string;
1089
+ /**
1090
+ * Session expiration time.
1091
+ */
1092
+ expires: Date;
1093
+ };
1094
+ }
940
1095
  /**
941
- * ionite SCIM User extension. See https://ionite.com/docs/llms-ecid.txt.
1096
+ * Union of currently authenticated user domains.
942
1097
  */
943
- interface IoniteUserExtension {
1098
+ type AuthenticatedUser = WorkforceUser | Customer;
1099
+ /**
1100
+ * Union of every principal kind that can be resolved as an authorization subject: human-facing
1101
+ * users (workforce/customer) plus non-human {@link WorkloadPrincipal}s. Use this where a resolved
1102
+ * subject may be any authenticated principal; keep {@link AuthenticatedUser} for browser/tenant-HRD
1103
+ * flows that are inherently human.
1104
+ */
1105
+ type AuthenticatedPrincipal = AuthenticatedUser | WorkloadPrincipal;
1106
+ /**
1107
+ * Persisted workforce user record with identity fields and tracking metadata.
1108
+ *
1109
+ * Builds on the shared minimal identity fields with:
1110
+ * - Optional SCIM attributes commonly set by IAM inbound provisioning
1111
+ * - An optional workforce (`sso`) session envelope
1112
+ * - Timestamps for tracking when users were first seen and last updated
1113
+ * - Optional custom extended data
1114
+ *
1115
+ * This is the type returned by `UserStore`. Apps typically extend the
1116
+ * `BaseUser` Zod/Valibot schema and name their extension `User`.
1117
+ *
1118
+ * @template TExtended - Type-safe custom data that consumers can add to users
1119
+ */
1120
+ type BaseUser<TExtended = object> = BaseUserFields & {
1121
+ /**
1122
+ * Optional ionite tenant identifier for tenant-aware apps.
1123
+ * Built-in user stores can use this when registering HRD mappings.
1124
+ */
1125
+ tenantId?: string;
944
1126
  /**
945
- * Enterprise Controlled ID: `ecid:<realm>:<opaque>` (realm = the minting authority's id).
946
- * Correlates multiple accounts to one identity across systems.
1127
+ * Optional external identifier from the provisioning client.
1128
+ * Commonly set by IAM inbound SCIM provisioning flows.
947
1129
  */
948
- ecid?: string;
1130
+ externalId?: string;
949
1131
  /**
950
- * Account purpose (distinct from `userType` persona). Open value set:
951
- * `daily`, `privileged`, `break_glass`, `service`.
1132
+ * Optional destination service-provider id captured after IAM materializes this user.
952
1133
  */
953
- accountClass?: string;
954
- }
955
- /**
956
- * SCIM User Resource
957
- */
958
- interface User {
1134
+ providerId?: string;
959
1135
  /**
960
- * REQUIRED. Unique identifier for the User, typically from the provider
1136
+ * Optional IAM-owned deep link associated with this user receipt.
961
1137
  */
962
- id?: string;
1138
+ requestUrl?: string;
963
1139
  /**
964
- * REQUIRED. A unique identifier for a SCIM resource as defined by the service provider
1140
+ * Optional Enterprise Controlled ID: a system-of-record-owned identity correlator formatted as
1141
+ * `ecid:<realm>:<opaque>` (realm = the minting authority's id). Correlates this account to a
1142
+ * single identity across systems. Minted by the enterprise SOR (via an ECI), never by the app;
1143
+ * received on the SCIM ionite extension or the `ecid` JWT claim. Never an authorization subject.
1144
+ * See https://ionite.com/docs/llms-ecid.txt.
965
1145
  */
966
- externalId?: string;
1146
+ ecid?: string;
967
1147
  /**
968
- * Resource metadata
1148
+ * Optional account purpose (distinct from `userType` persona). Documented open value set:
1149
+ * `daily`, `privileged`, `break_glass`, `service`.
969
1150
  */
970
- meta?: {
971
- resourceType?: string;
972
- created?: string;
973
- lastModified?: string;
974
- location?: string;
975
- version?: string;
976
- };
1151
+ accountClass?: string;
977
1152
  /**
978
- * REQUIRED. Unique identifier for the User, typically used for login
1153
+ * Optional SCIM display name distinct from the simple `name` field.
1154
+ * Commonly set by IAM inbound SCIM provisioning flows.
979
1155
  */
980
- userName: string;
1156
+ displayName?: string;
981
1157
  /**
982
- * The components of the user's name
1158
+ * Optional structured SCIM name.
1159
+ * Commonly set by IAM inbound SCIM provisioning flows.
983
1160
  */
984
- name?: Name;
1161
+ scimName?: Name;
985
1162
  /**
986
- * The name of the User, suitable for display to end-users
1163
+ * Optional SCIM email collection.
1164
+ * The simple `email` field still stores the primary email for convenience.
987
1165
  */
988
- displayName?: string;
1166
+ emails?: Email[];
989
1167
  /**
990
- * The casual way to address the user
1168
+ * Optional SCIM nickname.
1169
+ * Commonly set by IAM inbound SCIM provisioning flows.
991
1170
  */
992
1171
  nickName?: string;
993
1172
  /**
994
- * A fully qualified URL pointing to a page representing the User's online profile
1173
+ * Optional SCIM account state.
1174
+ * Commonly set by IAM inbound SCIM provisioning flows.
995
1175
  */
996
- profileUrl?: string;
1176
+ active?: boolean;
997
1177
  /**
998
- * The user's title, such as "Vice President"
1178
+ * Optional SCIM job title.
1179
+ * Commonly set by IAM inbound SCIM provisioning flows.
999
1180
  */
1000
1181
  title?: string;
1001
1182
  /**
1002
- * Used to identify the relationship between the organization and the user
1003
- */
1004
- userType?: string;
1005
- /**
1006
- * Indicates the User's preferred written or spoken language
1183
+ * Optional SCIM preferred language.
1184
+ * Commonly set by IAM inbound SCIM provisioning flows.
1007
1185
  */
1008
1186
  preferredLanguage?: string;
1009
1187
  /**
1010
- * Used to indicate the User's default location for purposes of localizing items such as currency
1188
+ * Optional SCIM locale.
1189
+ * Commonly set by IAM inbound SCIM provisioning flows.
1011
1190
  */
1012
1191
  locale?: string;
1013
1192
  /**
1014
- * The User's time zone in the "Olson" time zone database format
1193
+ * Optional SCIM timezone.
1194
+ * Commonly set by IAM inbound SCIM provisioning flows.
1015
1195
  */
1016
1196
  timezone?: string;
1017
1197
  /**
1018
- * A Boolean value indicating the User's administrative status
1019
- */
1020
- active?: boolean;
1021
- /**
1022
- * Email addresses for the user
1023
- */
1024
- emails?: Email[];
1025
- /**
1026
- * Phone numbers for the User
1198
+ * Optional SCIM phone numbers.
1199
+ * Commonly set by IAM inbound SCIM provisioning flows.
1027
1200
  */
1028
1201
  phoneNumbers?: PhoneNumber[];
1029
1202
  /**
1030
- * Instant messaging addresses for the User
1203
+ * Optional SCIM instant messaging addresses.
1204
+ * Commonly set by IAM inbound SCIM provisioning flows.
1031
1205
  */
1032
1206
  ims?: Array<{
1033
1207
  value: string;
@@ -1036,24 +1210,28 @@ interface User {
1036
1210
  primary?: boolean;
1037
1211
  }>;
1038
1212
  /**
1039
- * URLs of photos of the User
1213
+ * Optional SCIM photos.
1214
+ * Commonly set by IAM inbound SCIM provisioning flows.
1040
1215
  */
1041
- photos?: Array<{
1042
- value: string;
1043
- display?: string;
1044
- type?: string;
1045
- primary?: boolean;
1046
- }>;
1216
+ photos?: Photo[];
1047
1217
  /**
1048
- * Physical mailing addresses for this User
1218
+ * Optional SCIM addresses.
1219
+ * Commonly set by IAM inbound SCIM provisioning flows.
1049
1220
  */
1050
1221
  addresses?: Address[];
1051
1222
  /**
1052
- * A list of groups to which the user belongs
1223
+ * Optional SCIM roles.
1224
+ * Commonly set by IAM inbound SCIM provisioning flows.
1225
+ */
1226
+ roles?: Role2[];
1227
+ /**
1228
+ * Optional SCIM groups.
1229
+ * Commonly set by IAM inbound SCIM provisioning flows.
1053
1230
  */
1054
1231
  groups?: Group2[];
1055
1232
  /**
1056
- * A list of entitlements for the User
1233
+ * Optional SCIM entitlements.
1234
+ * Commonly set by IAM inbound SCIM provisioning flows.
1057
1235
  */
1058
1236
  entitlements?: Array<{
1059
1237
  value: string;
@@ -1062,151 +1240,111 @@ interface User {
1062
1240
  primary?: boolean;
1063
1241
  }>;
1064
1242
  /**
1065
- * A list of roles for the User
1066
- */
1067
- roles?: Role2[];
1068
- /**
1069
- * A list of certificates issued to the User
1243
+ * Optional SCIM X.509 certificates.
1244
+ * Commonly set by IAM inbound SCIM provisioning flows.
1070
1245
  */
1071
1246
  x509Certificates?: X509Certificate[];
1072
1247
  /**
1073
- * Enterprise User Extension
1074
- */
1075
- "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"?: EnterpriseExtension;
1076
- /**
1077
- * ionite User Extension (ECID + accountClass).
1078
- */
1079
- "urn:ionite:scim:schemas:extension:ion:2.0:User"?: IoniteUserExtension;
1080
- /**
1081
- * REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version
1082
- */
1083
- schemas?: string[];
1084
- }
1085
- /**
1086
- * Creates a StandardSchemaV1 for validating SCIM User resources.
1087
- * @param vendor - The name of the vendor creating this schema
1088
- * @returns A StandardSchemaV1 instance for SCIM User resources
1089
- */
1090
- declare function userSchema(vendor: string): StandardSchemaV13<Record<string, unknown>, User>;
1091
- /**
1092
- * Creates a StandardSchemaV1 for validating SCIM Group resources.
1093
- * @param vendor - The name of the vendor creating this schema
1094
- * @returns A StandardSchemaV1 instance for SCIM Group resources
1095
- */
1096
- declare function groupResourceSchema(vendor: string): StandardSchemaV13<Record<string, unknown>, GroupResource>;
1097
- /** Validates a SCIM Workload resource. */
1098
- declare const workloadResourceSchema: StandardSchemaV13<unknown, ScimWorkload>;
1099
- /** Validates a SCIM Customer resource. */
1100
- declare const customerResourceSchema: StandardSchemaV13<unknown, ScimCustomer>;
1101
- /**
1102
- * Persisted CIAM customer record with identity fields and tracking metadata.
1103
- *
1104
- * Builds on the shared minimal identity fields with a lightweight set of
1105
- * consumer-oriented attributes and an optional CIAM (`ciam`) session envelope.
1106
- * This is the type returned by `CustomerStore`. Apps typically extend the
1107
- * `BaseCustomer` Zod/Valibot schema to add custom attributes.
1108
- *
1109
- * @template TExtended - Type-safe custom data that consumers can add to customers
1110
- */
1111
- type BaseCustomer<TExtended = object> = BaseUserFields & {
1112
- /**
1113
- * Optional ionite tenant identifier for tenant-aware apps.
1114
- */
1115
- tenantId?: string;
1116
- /**
1117
- * Optional external identifier from a provisioning client.
1118
- */
1119
- externalId?: string;
1120
- /**
1121
- * Optional destination service-provider id captured after IAM materializes this customer.
1122
- */
1123
- providerId?: string;
1124
- /**
1125
- * Optional IAM-owned deep link associated with this customer receipt.
1126
- */
1127
- requestUrl?: string;
1128
- /**
1129
- * Optional display name distinct from the simple `name` field.
1130
- */
1131
- displayName?: string;
1132
- /**
1133
- * Optional email collection.
1134
- * The simple `email` field still stores the primary email for convenience.
1135
- */
1136
- emails?: Email[];
1137
- /**
1138
- * Optional phone numbers.
1248
+ * Optional SCIM enterprise extension.
1249
+ * Mirrors `urn:ietf:params:scim:schemas:extension:enterprise:2.0:User`.
1250
+ * Commonly set by IAM inbound SCIM provisioning flows.
1139
1251
  */
1140
- phoneNumbers?: PhoneNumber[];
1252
+ scimEnterprise?: EnterpriseExtension;
1141
1253
  /**
1142
- * Optional account state.
1254
+ * Optional pass-through SCIM schema extensions keyed by full URN.
1255
+ * Use this when your validator accepts custom top-level SCIM extensions and
1256
+ * you want them to round-trip through a `UserStore` implementation.
1143
1257
  */
1144
- active?: boolean;
1258
+ scimSchemaExtensions?: Record<string, unknown>;
1145
1259
  /**
1146
- * Timestamp when the customer was first stored.
1260
+ * Timestamp when the user was first stored.
1147
1261
  */
1148
1262
  createdAt?: Date;
1149
1263
  /**
1150
- * Timestamp when the customer was last updated (e.g., on re-login).
1264
+ * Timestamp when the user was last updated (e.g., on re-login).
1151
1265
  */
1152
1266
  updatedAt?: Date;
1153
1267
  /**
1154
- * Optional CIAM envelope for stores that persist customer session profile data.
1268
+ * Optional SSO envelope for stores that persist full auth profile data.
1155
1269
  * Simple app stores MAY omit this field.
1156
1270
  */
1157
- ciam?: Customer["ciam"];
1271
+ sso?: WorkforceUser["sso"];
1158
1272
  } & TExtended;
1159
- type CustomerStoreOptions = {
1273
+ type UserStoreOptions = {
1160
1274
  tenantId: string;
1161
1275
  tenants: TenantStore;
1162
1276
  };
1163
1277
  /**
1164
- * Abstract interface for customer storage backends.
1278
+ * Abstract interface for user storage backends.
1165
1279
  *
1166
- * Mirrors `UserStore` but for the CIAM customer domain. Consumers can
1167
- * implement this for in-memory, Redis, or database-backed persistence.
1280
+ * Consumers can implement this interface to use different storage backends:
1281
+ * - In-memory (for development/testing)
1282
+ * - Redis (for production with fast lookups)
1283
+ * - Database (PostgreSQL, MySQL, etc.)
1168
1284
  *
1169
- * @template TExtended - Type-safe custom data that consumers can add to customers
1285
+ * @template TExtended - Type-safe custom data that consumers can add to users
1286
+ *
1287
+ * @example
1288
+ * ```typescript
1289
+ * // Custom user data
1290
+ * type MyUserData = {
1291
+ * department: string;
1292
+ * roles: string[];
1293
+ * };
1294
+ *
1295
+ * // Implement custom store
1296
+ * class RedisUserStore implements UserStore<MyUserData> {
1297
+ * async get(sub: string): Promise<BaseUser<MyUserData> | null> {
1298
+ * const data = await redis.get(`user:${sub}`);
1299
+ * return data ? JSON.parse(data) : null;
1300
+ * }
1301
+ * // ... other methods
1302
+ * }
1303
+ * ```
1170
1304
  */
1171
- interface CustomerStore<TExtended = object> {
1305
+ interface UserStore<TExtended = object> {
1172
1306
  /**
1173
- * Retrieve a customer by their unique identifier.
1307
+ * Retrieve a user by their unique identifier.
1174
1308
  *
1175
- * @param id - The customer's unique identifier as defined by the store implementation
1176
- * @returns The customer if found, undefined otherwise
1309
+ * @param id - The user's unique identifier as defined by the store implementation
1310
+ * @returns The user if found, undefined otherwise
1177
1311
  */
1178
- get(id: string): Promise<BaseCustomer<TExtended> | undefined>;
1312
+ get(id: string): Promise<BaseUser<TExtended> | undefined>;
1179
1313
  /**
1180
- * Retrieve a customer based on their identity attributes or CIAM claims.
1181
- *
1182
- * @param customer - The customer to lookup
1183
- * @returns The customer if found, undefined otherwise
1314
+ * Optional secondary-index lookup for the stable enterprise correlation key. Implementations that
1315
+ * omit it remain correct; callers fall back to paged `list()` scans.
1184
1316
  */
1185
- lookup(customer: BaseCustomer<TExtended>): Promise<BaseCustomer<TExtended> | undefined>;
1317
+ getByExternalId?(externalId: string): Promise<BaseUser<TExtended> | undefined>;
1186
1318
  /**
1187
- * Optional indexed lookup by `externalId`. When omitted, callers fall back to `lookup` or a list scan.
1319
+ * Retrieve a user based on their SCIM attributes or SSO JWT Claims.
1320
+ *
1321
+ * @param user - The user to lookup by SCIM attributes or SSO JWT Claims
1322
+ * @returns The user if found, undefined otherwise
1188
1323
  */
1189
- getByExternalId?(externalId: string): Promise<BaseCustomer<TExtended> | undefined>;
1324
+ lookup(user: BaseUser<TExtended>): Promise<BaseUser<TExtended> | undefined>;
1190
1325
  /**
1191
- * Create or update a customer in the store.
1326
+ * Create or update a user in the store.
1192
1327
  *
1193
- * @param customer - The customer data to store
1328
+ * If a user with the same `id` (sub) exists, it will be updated.
1329
+ * Otherwise, a new user will be created.
1330
+ *
1331
+ * @param user - The user data to store
1194
1332
  */
1195
- upsert(customer: BaseCustomer<TExtended>): Promise<BaseCustomer<TExtended>>;
1333
+ upsert(user: BaseUser<TExtended>): Promise<BaseUser<TExtended>>;
1196
1334
  /**
1197
- * Delete a customer by their unique identifier.
1335
+ * Delete a user by their unique identifier.
1198
1336
  *
1199
- * @param id - The customer's unique identifier as defined by the store implementation
1200
- * @returns The number of customers deleted (0 or 1)
1337
+ * @param id - The user's unique identifier as defined by the store implementation
1338
+ * @returns The number of users deleted (0 or 1)
1201
1339
  */
1202
1340
  delete(id: string): Promise<number>;
1203
1341
  /**
1204
- * List customers in the store with optional pagination and sort.
1342
+ * List users in the store with optional pagination and sort.
1205
1343
  *
1206
1344
  * @param options - Optional start (0-based), limit (page size), and sort
1207
1345
  * @returns ListResult with total, count, items, size, page, pages
1208
1346
  */
1209
- list(options?: ListOptions): Promise<ListResult<BaseCustomer<TExtended>>>;
1347
+ list(options?: ListOptions): Promise<ListResult<BaseUser<TExtended>>>;
1210
1348
  }
1211
1349
  /**
1212
1350
  * Persisted workload principal record. Mirrors the registry/enrichment shape of `BaseUser`, scoped
@@ -1373,6 +1511,14 @@ interface IamDeltaEmitter {
1373
1511
  onUserUpsert(user: BaseUser): Promise<void>;
1374
1512
  /** Delete a destination User identified strictly by externalId. */
1375
1513
  onUserDelete(externalId: string): Promise<void>;
1514
+ /** Upsert a full AppDev-projected SCIM Workload representation at the destination. */
1515
+ onWorkloadUpsert(workload: BaseWorkloadIdentity): Promise<void>;
1516
+ /** Delete a destination Workload identified by externalId (falling back to its App-owned id). */
1517
+ onWorkloadDelete(externalId: string): Promise<void>;
1518
+ /** Upsert a full AppDev-projected SCIM Customer representation at the destination. */
1519
+ onCustomerUpsert(customer: BaseCustomer): Promise<void>;
1520
+ /** Delete a destination Customer identified by externalId (falling back to its App-owned id). */
1521
+ onCustomerDelete(externalId: string): Promise<void>;
1376
1522
  /** Upsert a full SCIM Group representation for a group, role, or permission definition. */
1377
1523
  onEntitlementUpsert(entity: Entitlement, type: EntitlementType): Promise<void>;
1378
1524
  /** Delete a destination entitlement Group identified by the App-owned catalog id. */
@@ -1997,6 +2143,10 @@ type IAMConfig = {
1997
2143
  * for your application's database model.
1998
2144
  */
1999
2145
  inboundUsers?: IAMInboundUsersConfig;
2146
+ /** AppDev-owned SCIM projection and persistence hooks for customer principals. */
2147
+ inboundCustomers?: IAMInboundCustomersConfig;
2148
+ /** AppDev-owned SCIM projection and persistence hooks for workload principals. */
2149
+ inboundWorkloads?: IAMInboundWorkloadsConfig;
2000
2150
  /**
2001
2151
  * FrameworkConfig-only fallback that mints an IAM-owned deep link where access to an entitlement
2002
2152
  * can be requested. A `requestUrl` written back into the catalog row by IAM takes precedence.
@@ -2105,6 +2255,20 @@ interface IAMInboundUsersConfig {
2105
2255
  */
2106
2256
  mapBaseUserToScim?: (stored: BaseUser) => User | Promise<User>;
2107
2257
  }
2258
+ interface IAMInboundPrincipalContext<TStored> {
2259
+ /** Current stored principal when replacing or patching an existing resource. */
2260
+ existing?: TStored;
2261
+ /** Operation mode for the inbound mapper. */
2262
+ mode: "create" | "replace" | "patch";
2263
+ }
2264
+ interface IAMInboundCustomersConfig {
2265
+ mapValidatedScimToBaseCustomer?: (validated: ScimCustomer, context: IAMInboundPrincipalContext<BaseCustomer>) => BaseCustomer | Promise<BaseCustomer>;
2266
+ mapBaseCustomerToScim?: (stored: BaseCustomer) => ScimCustomer | Promise<ScimCustomer>;
2267
+ }
2268
+ interface IAMInboundWorkloadsConfig {
2269
+ mapValidatedScimToBaseWorkload?: (validated: ScimWorkload, context: IAMInboundPrincipalContext<BaseWorkloadIdentity>) => BaseWorkloadIdentity | Promise<BaseWorkloadIdentity>;
2270
+ mapBaseWorkloadToScim?: (stored: BaseWorkloadIdentity) => ScimWorkload | Promise<ScimWorkload>;
2271
+ }
2108
2272
  interface ScimAuthenticationScheme {
2109
2273
  type: string;
2110
2274
  name: string;
@@ -3802,6 +3966,14 @@ type IoniteValidators = {
3802
3966
  type ApplicationValidators<TTenantValidators extends TenantValidators = TenantValidators> = IoniteValidators & {
3803
3967
  tenant: TTenantValidators;
3804
3968
  };
3969
+ type AuthzOaaPrincipalConfig = {
3970
+ /**
3971
+ * Principals included in OAA snapshots. `'all'` enumerates the wired store; `'access'` includes
3972
+ * only principals referenced by access roots. Access-root subjects are always projected so OAA
3973
+ * edges remain referentially closed.
3974
+ */
3975
+ population?: OaaPrincipalPopulation;
3976
+ };
3805
3977
  type AuthzOaaConfig = {
3806
3978
  url?: string;
3807
3979
  apiKey?: string;
@@ -3809,6 +3981,12 @@ type AuthzOaaConfig = {
3809
3981
  datasourceId?: string;
3810
3982
  applicationName?: string;
3811
3983
  applicationType?: string;
3984
+ /** Workforce population. Defaults to `'all'` to preserve existing OAA snapshot behavior. */
3985
+ users?: AuthzOaaPrincipalConfig;
3986
+ /** CIAM customer population. Defaults to `'access'`. */
3987
+ customers?: AuthzOaaPrincipalConfig;
3988
+ /** Workload population. Defaults to `'access'`. */
3989
+ workloads?: AuthzOaaPrincipalConfig;
3812
3990
  compression?: "gzip" | "none";
3813
3991
  multipart?: "auto" | "always" | "never";
3814
3992
  maxPayloadBytes?: number;
@@ -4716,247 +4894,114 @@ type InMemoryTenantStoreOptions = {
4716
4894
  ionCache?: TenantIonCache;
4717
4895
  };
4718
4896
  /**
4719
- * Persisted workforce user record with identity fields and tracking metadata.
4720
- *
4721
- * Builds on the shared minimal identity fields with:
4722
- * - Optional SCIM attributes commonly set by IAM inbound provisioning
4723
- * - An optional workforce (`sso`) session envelope
4724
- * - Timestamps for tracking when users were first seen and last updated
4725
- * - Optional custom extended data
4897
+ * Persisted CIAM customer record with identity fields and tracking metadata.
4726
4898
  *
4727
- * This is the type returned by `UserStore`. Apps typically extend the
4728
- * `BaseUser` Zod/Valibot schema and name their extension `User`.
4899
+ * Builds on the shared minimal identity fields with a lightweight set of
4900
+ * consumer-oriented attributes and an optional CIAM (`ciam`) session envelope.
4901
+ * This is the type returned by `CustomerStore`. Apps typically extend the
4902
+ * `BaseCustomer` Zod/Valibot schema to add custom attributes.
4729
4903
  *
4730
- * @template TExtended - Type-safe custom data that consumers can add to users
4904
+ * @template TExtended - Type-safe custom data that consumers can add to customers
4731
4905
  */
4732
- type BaseUser<TExtended = object> = BaseUserFields & {
4906
+ type BaseCustomer<TExtended = object> = BaseUserFields & {
4733
4907
  /**
4734
4908
  * Optional ionite tenant identifier for tenant-aware apps.
4735
- * Built-in user stores can use this when registering HRD mappings.
4736
4909
  */
4737
4910
  tenantId?: string;
4738
4911
  /**
4739
- * Optional external identifier from the provisioning client.
4740
- * Commonly set by IAM inbound SCIM provisioning flows.
4912
+ * Optional external identifier from a provisioning client.
4741
4913
  */
4742
4914
  externalId?: string;
4743
4915
  /**
4744
- * Optional destination service-provider id captured after IAM materializes this user.
4916
+ * Optional destination service-provider id captured after IAM materializes this customer.
4745
4917
  */
4746
4918
  providerId?: string;
4747
4919
  /**
4748
- * Optional IAM-owned deep link associated with this user receipt.
4920
+ * Optional IAM-owned deep link associated with this customer receipt.
4749
4921
  */
4750
4922
  requestUrl?: string;
4751
4923
  /**
4752
- * Optional Enterprise Controlled ID: a system-of-record-owned identity correlator formatted as
4753
- * `ecid:<realm>:<opaque>` (realm = the minting authority's id). Correlates this account to a
4754
- * single identity across systems. Minted by the enterprise SOR (via an ECI), never by the app;
4755
- * received on the SCIM ionite extension or the `ecid` JWT claim. Never an authorization subject.
4756
- * See https://ionite.com/docs/llms-ecid.txt.
4757
- */
4758
- ecid?: string;
4759
- /**
4760
- * Optional account purpose (distinct from `userType` persona). Documented open value set:
4761
- * `daily`, `privileged`, `break_glass`, `service`.
4762
- */
4763
- accountClass?: string;
4764
- /**
4765
- * Optional SCIM display name distinct from the simple `name` field.
4766
- * Commonly set by IAM inbound SCIM provisioning flows.
4924
+ * Optional display name distinct from the simple `name` field.
4767
4925
  */
4768
4926
  displayName?: string;
4769
4927
  /**
4770
- * Optional structured SCIM name.
4771
- * Commonly set by IAM inbound SCIM provisioning flows.
4772
- */
4773
- scimName?: Name;
4774
- /**
4775
- * Optional SCIM email collection.
4928
+ * Optional email collection.
4776
4929
  * The simple `email` field still stores the primary email for convenience.
4777
4930
  */
4778
4931
  emails?: Email[];
4779
4932
  /**
4780
- * Optional SCIM nickname.
4781
- * Commonly set by IAM inbound SCIM provisioning flows.
4782
- */
4783
- nickName?: string;
4784
- /**
4785
- * Optional SCIM account state.
4786
- * Commonly set by IAM inbound SCIM provisioning flows.
4787
- */
4788
- active?: boolean;
4789
- /**
4790
- * Optional SCIM job title.
4791
- * Commonly set by IAM inbound SCIM provisioning flows.
4792
- */
4793
- title?: string;
4794
- /**
4795
- * Optional SCIM preferred language.
4796
- * Commonly set by IAM inbound SCIM provisioning flows.
4797
- */
4798
- preferredLanguage?: string;
4799
- /**
4800
- * Optional SCIM locale.
4801
- * Commonly set by IAM inbound SCIM provisioning flows.
4802
- */
4803
- locale?: string;
4804
- /**
4805
- * Optional SCIM timezone.
4806
- * Commonly set by IAM inbound SCIM provisioning flows.
4807
- */
4808
- timezone?: string;
4809
- /**
4810
- * Optional SCIM phone numbers.
4811
- * Commonly set by IAM inbound SCIM provisioning flows.
4933
+ * Optional phone numbers.
4812
4934
  */
4813
4935
  phoneNumbers?: PhoneNumber[];
4814
4936
  /**
4815
- * Optional SCIM instant messaging addresses.
4816
- * Commonly set by IAM inbound SCIM provisioning flows.
4817
- */
4818
- ims?: Array<{
4819
- value: string;
4820
- display?: string;
4821
- type?: string;
4822
- primary?: boolean;
4823
- }>;
4824
- /**
4825
- * Optional SCIM photos.
4826
- * Commonly set by IAM inbound SCIM provisioning flows.
4827
- */
4828
- photos?: Photo[];
4829
- /**
4830
- * Optional SCIM addresses.
4831
- * Commonly set by IAM inbound SCIM provisioning flows.
4832
- */
4833
- addresses?: Address[];
4834
- /**
4835
- * Optional SCIM roles.
4836
- * Commonly set by IAM inbound SCIM provisioning flows.
4837
- */
4838
- roles?: Role2[];
4839
- /**
4840
- * Optional SCIM groups.
4841
- * Commonly set by IAM inbound SCIM provisioning flows.
4842
- */
4843
- groups?: Group2[];
4844
- /**
4845
- * Optional SCIM entitlements.
4846
- * Commonly set by IAM inbound SCIM provisioning flows.
4847
- */
4848
- entitlements?: Array<{
4849
- value: string;
4850
- display?: string;
4851
- type?: string;
4852
- primary?: boolean;
4853
- }>;
4854
- /**
4855
- * Optional SCIM X.509 certificates.
4856
- * Commonly set by IAM inbound SCIM provisioning flows.
4857
- */
4858
- x509Certificates?: X509Certificate[];
4859
- /**
4860
- * Optional SCIM enterprise extension.
4861
- * Mirrors `urn:ietf:params:scim:schemas:extension:enterprise:2.0:User`.
4862
- * Commonly set by IAM inbound SCIM provisioning flows.
4863
- */
4864
- scimEnterprise?: EnterpriseExtension;
4865
- /**
4866
- * Optional pass-through SCIM schema extensions keyed by full URN.
4867
- * Use this when your validator accepts custom top-level SCIM extensions and
4868
- * you want them to round-trip through a `UserStore` implementation.
4937
+ * Optional account state.
4869
4938
  */
4870
- scimSchemaExtensions?: Record<string, unknown>;
4939
+ active?: boolean;
4871
4940
  /**
4872
- * Timestamp when the user was first stored.
4941
+ * Timestamp when the customer was first stored.
4873
4942
  */
4874
4943
  createdAt?: Date;
4875
4944
  /**
4876
- * Timestamp when the user was last updated (e.g., on re-login).
4945
+ * Timestamp when the customer was last updated (e.g., on re-login).
4877
4946
  */
4878
4947
  updatedAt?: Date;
4879
4948
  /**
4880
- * Optional SSO envelope for stores that persist full auth profile data.
4949
+ * Optional CIAM envelope for stores that persist customer session profile data.
4881
4950
  * Simple app stores MAY omit this field.
4882
4951
  */
4883
- sso?: WorkforceUser["sso"];
4952
+ ciam?: Customer["ciam"];
4884
4953
  } & TExtended;
4885
- type UserStoreOptions = {
4954
+ type CustomerStoreOptions = {
4886
4955
  tenantId: string;
4887
4956
  tenants: TenantStore;
4888
4957
  };
4889
4958
  /**
4890
- * Abstract interface for user storage backends.
4891
- *
4892
- * Consumers can implement this interface to use different storage backends:
4893
- * - In-memory (for development/testing)
4894
- * - Redis (for production with fast lookups)
4895
- * - Database (PostgreSQL, MySQL, etc.)
4896
- *
4897
- * @template TExtended - Type-safe custom data that consumers can add to users
4959
+ * Abstract interface for customer storage backends.
4898
4960
  *
4899
- * @example
4900
- * ```typescript
4901
- * // Custom user data
4902
- * type MyUserData = {
4903
- * department: string;
4904
- * roles: string[];
4905
- * };
4961
+ * Mirrors `UserStore` but for the CIAM customer domain. Consumers can
4962
+ * implement this for in-memory, Redis, or database-backed persistence.
4906
4963
  *
4907
- * // Implement custom store
4908
- * class RedisUserStore implements UserStore<MyUserData> {
4909
- * async get(sub: string): Promise<BaseUser<MyUserData> | null> {
4910
- * const data = await redis.get(`user:${sub}`);
4911
- * return data ? JSON.parse(data) : null;
4912
- * }
4913
- * // ... other methods
4914
- * }
4915
- * ```
4964
+ * @template TExtended - Type-safe custom data that consumers can add to customers
4916
4965
  */
4917
- interface UserStore<TExtended = object> {
4966
+ interface CustomerStore<TExtended = object> {
4918
4967
  /**
4919
- * Retrieve a user by their unique identifier.
4968
+ * Retrieve a customer by their unique identifier.
4920
4969
  *
4921
- * @param id - The user's unique identifier as defined by the store implementation
4922
- * @returns The user if found, undefined otherwise
4970
+ * @param id - The customer's unique identifier as defined by the store implementation
4971
+ * @returns The customer if found, undefined otherwise
4923
4972
  */
4924
- get(id: string): Promise<BaseUser<TExtended> | undefined>;
4973
+ get(id: string): Promise<BaseCustomer<TExtended> | undefined>;
4925
4974
  /**
4926
- * Optional secondary-index lookup for the stable enterprise correlation key. Implementations that
4927
- * omit it remain correct; callers fall back to paged `list()` scans.
4975
+ * Retrieve a customer based on their identity attributes or CIAM claims.
4976
+ *
4977
+ * @param customer - The customer to lookup
4978
+ * @returns The customer if found, undefined otherwise
4928
4979
  */
4929
- getByExternalId?(externalId: string): Promise<BaseUser<TExtended> | undefined>;
4980
+ lookup(customer: BaseCustomer<TExtended>): Promise<BaseCustomer<TExtended> | undefined>;
4930
4981
  /**
4931
- * Retrieve a user based on their SCIM attributes or SSO JWT Claims.
4932
- *
4933
- * @param user - The user to lookup by SCIM attributes or SSO JWT Claims
4934
- * @returns The user if found, undefined otherwise
4982
+ * Optional indexed lookup by `externalId`. When omitted, callers fall back to `lookup` or a list scan.
4935
4983
  */
4936
- lookup(user: BaseUser<TExtended>): Promise<BaseUser<TExtended> | undefined>;
4984
+ getByExternalId?(externalId: string): Promise<BaseCustomer<TExtended> | undefined>;
4937
4985
  /**
4938
- * Create or update a user in the store.
4939
- *
4940
- * If a user with the same `id` (sub) exists, it will be updated.
4941
- * Otherwise, a new user will be created.
4986
+ * Create or update a customer in the store.
4942
4987
  *
4943
- * @param user - The user data to store
4988
+ * @param customer - The customer data to store
4944
4989
  */
4945
- upsert(user: BaseUser<TExtended>): Promise<BaseUser<TExtended>>;
4990
+ upsert(customer: BaseCustomer<TExtended>): Promise<BaseCustomer<TExtended>>;
4946
4991
  /**
4947
- * Delete a user by their unique identifier.
4992
+ * Delete a customer by their unique identifier.
4948
4993
  *
4949
- * @param id - The user's unique identifier as defined by the store implementation
4950
- * @returns The number of users deleted (0 or 1)
4994
+ * @param id - The customer's unique identifier as defined by the store implementation
4995
+ * @returns The number of customers deleted (0 or 1)
4951
4996
  */
4952
4997
  delete(id: string): Promise<number>;
4953
4998
  /**
4954
- * List users in the store with optional pagination and sort.
4999
+ * List customers in the store with optional pagination and sort.
4955
5000
  *
4956
5001
  * @param options - Optional start (0-based), limit (page size), and sort
4957
5002
  * @returns ListResult with total, count, items, size, page, pages
4958
5003
  */
4959
- list(options?: ListOptions): Promise<ListResult<BaseUser<TExtended>>>;
5004
+ list(options?: ListOptions): Promise<ListResult<BaseCustomer<TExtended>>>;
4960
5005
  }
4961
5006
  type AuthzEntityBase = {
4962
5007
  id: string;
@@ -5394,6 +5439,7 @@ type OaaSyncOptions = {
5394
5439
  multipartThresholdBytes?: number;
5395
5440
  partSizeBytes?: number;
5396
5441
  };
5442
+ type OaaPrincipalPopulation = "all" | "access";
5397
5443
  type OaaSyncResult = {
5398
5444
  success: boolean;
5399
5445
  syncToken?: string;
@@ -5405,9 +5451,13 @@ type OaaSyncResult = {
5405
5451
  type OaaSyncInput<
5406
5452
  TUser,
5407
5453
  TGroup,
5408
- TResource
5454
+ TResource,
5455
+ TCustomer = BaseCustomer,
5456
+ TWorkload = BaseWorkloadIdentity
5409
5457
  > = {
5410
5458
  users?: Iterable<TUser> | AsyncIterable<TUser>;
5459
+ customers?: Iterable<TCustomer> | AsyncIterable<TCustomer>;
5460
+ workloads?: Iterable<TWorkload> | AsyncIterable<TWorkload>;
5411
5461
  groups?: Iterable<TGroup | Group> | AsyncIterable<TGroup | Group>;
5412
5462
  roles?: Iterable<Role> | AsyncIterable<Role>;
5413
5463
  permissions?: Iterable<Permission> | AsyncIterable<Permission>;
@@ -5424,9 +5474,13 @@ interface OaaClient<
5424
5474
  TGroup = Group,
5425
5475
  TRole = Role,
5426
5476
  TPermission = Permission,
5427
- TResource = Resource
5477
+ TResource = Resource,
5478
+ TCustomer = BaseCustomer,
5479
+ TWorkload = BaseWorkloadIdentity
5428
5480
  > {
5429
5481
  pushUser(user: TUser): Promise<void>;
5482
+ pushCustomer(customer: TCustomer): Promise<void>;
5483
+ pushWorkload(workload: TWorkload): Promise<void>;
5430
5484
  pushGroup(group: TGroup | Group): Promise<void>;
5431
5485
  pushRole(role: TRole): Promise<void>;
5432
5486
  pushPermission(permission: TPermission): Promise<void>;
@@ -5439,6 +5493,8 @@ interface OaaClient<
5439
5493
  * `sync` remains the safety net for any drift (e.g. an outage between revoke and delete).
5440
5494
  */
5441
5495
  deleteUser(id: string): Promise<void>;
5496
+ deleteCustomer(id: string): Promise<void>;
5497
+ deleteWorkload(id: string): Promise<void>;
5442
5498
  deleteGroup(id: string): Promise<void>;
5443
5499
  deleteRole(id: string): Promise<void>;
5444
5500
  deletePermission(id: string): Promise<void>;
@@ -5454,7 +5510,12 @@ interface OaaClient<
5454
5510
  * response (a later full `sync` reconciles), same contract as the single-change methods.
5455
5511
  */
5456
5512
  pushAccessChanges(items: OaaAccessChangeBatchItem[]): Promise<void>;
5457
- sync(input: OaaSyncInput<TUser, TGroup, TResource>, options?: OaaSyncOptions): Promise<OaaSyncResult>;
5513
+ sync(input: OaaSyncInput<TUser, TGroup, TResource, TCustomer, TWorkload>, options?: OaaSyncOptions): Promise<OaaSyncResult>;
5514
+ /**
5515
+ * Resolved Ops-owned snapshot population for a principal kind. Apps may use this as an
5516
+ * enumeration optimization; the SDK enforces it independently.
5517
+ */
5518
+ population(kind: SubjectType): OaaPrincipalPopulation;
5458
5519
  /**
5459
5520
  * Synchronous readiness check. Returns true once OAA config (url, providerId,
5460
5521
  * datasourceId) is available from RemoteConfig/FrameworkConfig. Use this in request
@@ -6065,4 +6126,4 @@ type LfvErrorResponse = {
6065
6126
  };
6066
6127
  /** Generates a ULID */
6067
6128
  declare function generateULID(prefix?: string): string;
6068
- export { workloadTokenResponseSchema, workloadResourceSchema, withValidate, warnLogger, waitOn, version, validationFailureResponse, userSchema, unionCatalogRead, trustedClientPermissionsForPrincipal, trimTrailingSlash, tokenResponseSchema, toCodeCatalog, stripJsonComments, stableConfigHash, silentLogger, serializeConfig, remoteConfigSecretType, readyCatalogEntry, parseKmsPoolDocument, parseKmsPoolControlDocument, parseJsonc, parseEcid, oidcCallbackSchema, normalizeTenantRoutingStrategy, normalizeTenantPathNamespace, must, mergeConfig, mergeCodeCatalogEntity, materializeCodeCatalogEntity, matchesListFilter, matchTenantPath, listGenerator, list, jwtAssertionClaimsSchema, isStoreConflictError, isEcid, isConfigSourceError, isConfigLocator, isCodeCatalog, infoLogger, idTokenClaimsSchema, groupResourceSchema, getCodeCatalogEntity, generateULID, formatEcid, deprecateRetiredCodeCatalogRows, defineSecretType, defineCatalog, defaultSecretContentType, defaultLogger, deepEqualPlain, decodeUser, debugLogger, customerResourceSchema, configTrustedClientGrants, claimsToUser, catalogEntityStore, buildTenantPath, assertValidSubjectTypeScoping, assertRequiredSubjectType, assertEcid, accessRootId, accessRefId, X509Certificate, WorkloadValidators, WorkloadTokenStore, WorkloadTokenResponse, WorkloadPrincipal, WorkloadIncomingOutgoing, WorkloadIdentityStore, WorkloadIdentity, WorkloadGetToken, WorkloadConfigMap, WorkloadConfig, WorkloadClient, Workload, WorkforceUser, VaultWorkloadAuthConfig, VaultWebSocketSecretsConfig, VaultWebSocketAuthHeader, VaultSecretsConfig, VaultLfvSecretsConfig, VaultConfigLocator, ValidateResult, UsersInboundHandlerConfig, UserStoreOptions, UserStore, UpdateTenantRequest, TrustedProvisioningClient, TrustedIdp, TokenValidationResult, TokenResponse, TenantWebhookPayload, TenantValidators, TenantStore, TenantStatus, TenantRoutingStrategy, TenantResponse, TenantPathRoutingStrategy, TenantPathNamespace, TenantPathMatch, TenantIonCache, SubscriptionMode, SubjectTypeScoping, SubjectType, SubjectScope, SubjectRef, StoreConflictKind, StoreConflictError, StateCookie, StandardSchemaWithValidate, SessionStore, Session, ServerOnlyWorkloadConfig, SecretsWriteOptions, SecretsValidators, SecretsSubscriptionOptions, SecretsSourceType, SecretsSourceMap, SecretsSourceConfig, SecretsSource, SecretsOperationOptions, SecretsModuleConfig, Secrets, SecretTypeRegistryEntry, SecretTypeInput, SecretTypeDescriptor, SecretRequestSeverity, SecretLifecycleRequest, SecretHandle, SecretFormat, SecretEventName, SecretEventListener, SecretEvent, SecretContentTypeMismatchError, SecretContentType, Secret, ScimWorkload, User as ScimUser, ScimServiceProviderConfig, ScimSchemaDefinition, ScimSchemaAttributeDefinition, Role2 as ScimRole, ScimResult, ScimResourceTypeSchemaExtension, ScimResourceType, ScimMutationSummary, ScimListResponse, Group2 as ScimGroup, ScimError, ScimCustomer, ScimAuthenticationScheme, SSOValidators, SSOHandlerConfig, SSOConfigFromCode, SSOConfig, SSOAppValidators, SSOAppRegistry, SSO, RoutingOptions, RouteModule, RouteFilterResult, Role, ResourceProvider, ResourceChangeListener, ResourceChange, Resource, ResolvedVaultLfvSecretsConfig, ResolvedRoute, RequireReadyResult, RemoteConfigRetryOptions, RemoteConfigRetryHook, RemoteConfigRetryContext, RemoteConfigLoadErrorKind, RemoteConfig, RegisterSSOAppResult, RegisterSSOAppPayload, RegisterSSOAppError, RegisterIAMAppResult, RegisterIAMAppPayload, RegisterIAMAppError, ReconcileReport, ReadyzEndpointConfig, ReadyAccessCatalogEntry, ReadinessReport, ReactiveHandle, PrincipalInboundHandlerConfig, Photo, PhoneNumber, Permission, ParsedEcid, PLATFORM_ASSIGNABLE_SUBJECT_TYPES, OtelSignalName, OtelSignalConfig, OtelProviderType, OtelProtocol, OtelOAuthClientCredentialsConfig, OtelMetricsSignalConfig, OtelLogRecord, OtelLogLevel, OtelLevels, OtelConfig, OtelAttributes, OtelAttributeValue, Otel, OidcCallbackParams, OaaSyncResult, OaaSyncOptions, OaaSyncInput, OaaClient, OaaAccessTargetType, OaaAccessChangeBatchItem, Name, ModuleReadinessState, ModuleReadiness, ModuleName, ModifiableFrameworkConfig, MirrorConfigLocator, MetaData, MagicLinkStore, MagicLink, Logger, ListResult, ListOptions, ListFilter, LfvOtpResponse, LfvOtpRequest, LfvJwks, LfvErrorResponse, LfvErrorCode, LfvEd25519PublicJwk, LfvEd25519PrivateJwk, LfvCallbackTransport, LfvCallbackKind, LfvCallbackHeaders, LfvCallbackEnvelope, LfvActionRequestBase, LfvActionName, LfvActionAcceptedResponse, KmsRevokeKeyResult, KmsRevokeKeyRequest, KmsPoolSlot, KmsPoolListener, KmsPoolIssuer, KmsPoolDocument, KmsPoolControlDocument, KmsPoolConfig, KmsPool, KmsParkResult, KmsParkRequest, KmsParkReport, KmsParkDisposition, KmsKeyState, KmsKey, KmsIssuerEventName, KmsIssuerEventListener, KmsIssuerEvent, KmsIssuedKey, KmsConfig, KmsAllocationStrategy, KmsAllocationPolicy, KmsAddKeysResult, KmsAddKeysRequest, Kms, JwtBearerWorkloadConfig, JWTAssertionClaims, IoniteValidators, IoniteUserExtension, IoniteErrorOptions, IoniteError, IoniteBase, Ionite, InferSecretType, InMemoryTenantStoreOptions, IdentityResolution, IdTokenClaims, IamPrincipalKindFlag, IamPrincipalKind, IamDeltaResourceType, IamDeltaReconcileResult, IamDeltaReconcileInput, IamDeltaMode, IamDeltaEmitter, IamAssignmentPolicy, ION_TENANT_MANAGE, ION_SDK_PERMISSIONS, ION_SCIM_WORKLOAD_SCHEMA, ION_SCIM_USER_EXTENSION_URN, ION_SCIM_CUSTOMER_SCHEMA, ION_IAM_WORKLOADS_WRITE, ION_IAM_USERS_WRITE, ION_IAM_READ, ION_IAM_GROUPS_WRITE, ION_IAM_CUSTOMERS_WRITE, ION_IAM_ACCESS_REQUESTS_WRITE, ION_ENDPOINT_PERMISSIONS, ION_CIAM_MAGIC_LINK_CREATE, ION_CAPABILITIEZ_READ, ION_AUTHZ_OAA_SYNC, ION_AUTHZ_GROUP_SCHEMA, IAMValidators, IAMUsersInbound, IAMPrincipalsInbound, IAMInboundUsersConfig, IAMInboundUserContext, IAMHandlerConfig, IAMGroupsOutbound, IAMGroupsInbound, IAMEndpointFlag, IAMDiscoveryHandlerConfig, IAMDiscoveryContext, IAMDiscoveryConfig, IAMConfigFromCode, IAMConfig, IAMAppValidators, IAMAppRegistry, IAMAccessRequestsConfig, IAM, GroupsInboundHandlerConfig, GroupResource, GroupMember, Group, GcpSecretsConfig, GcpConfigLocator, FrameworkWorkloadIncomingOutgoing, FrameworkWorkloadConfigFromCode, FrameworkWorkloadConfig, FrameworkStores, FrameworkSecretsSourceConfig, FrameworkSecretsModuleConfig, FrameworkOtelConfig, FrameworkLfvConfig, FrameworkConfigInput, FrameworkConfig, EnvironmentType, EntityStore, EntitlementType, Entitlement, EnterpriseExtension, EndpointPermission, EndpointOperation, Email, EgressOutcome, EgressChannelOutcome, EffectiveEdge, EcidFormatError, ECID_SCHEME, DevSecretsConfig, DestinationReference, DEFAULT_TENANT_UI_NAMESPACE, DEFAULT_TENANT_API_NAMESPACE, DEFAULT_SECRET_MIME_TYPES, CustomerStoreOptions, CustomerStore, Customer, CreateUserOptions, CreateTenantRequest, CreateGroupOptions, ConfigSubscriptionOptions, ConfigSourceType, ConfigSourceResolver, ConfigSourceErrorInit, ConfigSourceError, ConfigSourceEnv, ConfigSource, ConfigLocator, ConfigErrorKind, ConfigChangeResult, ConfigChangeOptions, ConfigChangeCallback, ConfigApplyStatus, CodeCatalogNamespace, CodeCatalogInput, CodeCatalog, ClientCredentialsWorkloadConfig, ChangeListener, CatalogEntityKind, CatalogChangeListener, CatalogChangeKind, CatalogChange, CapabilityState, CapabilityKey, CapabilityEndpointUrls, CapabilitiezManifest, CachedWorkloadToken, CacheConfig, CIAMValidators, CIAMProviderType, CIAMProviderDescriptor, CIAMProviderConfig, CIAMProviderColors, CIAMProviderBranding, CIAMConfigFromCodeInput, CIAMConfigFromCode, CIAMConfig, CIAM, BaseWorkloadIdentity, BaseUser, BaseTenant, BaseCustomer, AzureSecretsConfig, AzureConfigLocator, AzureAuthMethod, AwsSecretsConfig, AwsConfigLocator, AuthzScimGroupType, AuthzScimGroupExtension, AuthzOaaConfig, AuthzEntityBase, AuthzDecision, AuthzConfig, Authz, AuthenticatedUser, AuthenticatedPrincipal, AssignmentPolicyError, ApplicationValidators, Address, AccessStatus, AccessRequestSubmit, AccessRequestResult, AccessRequestCreate, AccessRef, AccessProvenance, AccessMutationStatus, AccessMutationResult, AccessIndex, AccessCheckTarget, AccessCheckResult, AccessCheckReason, AccessChange, AccessCatalogStore, AccessAssignmentStore };
6129
+ export { workloadTokenResponseSchema, workloadResourceSchema, withValidate, warnLogger, waitOn, version, validationFailureResponse, userSchema, unionCatalogRead, trustedClientPermissionsForPrincipal, trimTrailingSlash, tokenResponseSchema, toCodeCatalog, stripJsonComments, stableConfigHash, silentLogger, serializeConfig, remoteConfigSecretType, readyCatalogEntry, parseKmsPoolDocument, parseKmsPoolControlDocument, parseJsonc, parseEcid, oidcCallbackSchema, normalizeTenantRoutingStrategy, normalizeTenantPathNamespace, must, mergeConfig, mergeCodeCatalogEntity, materializeCodeCatalogEntity, matchesListFilter, matchTenantPath, listGenerator, list, jwtAssertionClaimsSchema, isStoreConflictError, isEcid, isConfigSourceError, isConfigLocator, isCodeCatalog, infoLogger, idTokenClaimsSchema, groupResourceSchema, getCodeCatalogEntity, generateULID, formatEcid, deprecateRetiredCodeCatalogRows, defineSecretType, defineCatalog, defaultSecretContentType, defaultLogger, deepEqualPlain, decodeUser, debugLogger, customerResourceSchema, configTrustedClientGrants, claimsToUser, catalogEntityStore, buildTenantPath, assertValidSubjectTypeScoping, assertRequiredSubjectType, assertEcid, accessRootId, accessRefId, X509Certificate, WorkloadValidators, WorkloadTokenStore, WorkloadTokenResponse, WorkloadPrincipal, WorkloadIncomingOutgoing, WorkloadIdentityStore, WorkloadIdentity, WorkloadGetToken, WorkloadConfigMap, WorkloadConfig, WorkloadClient, Workload, WorkforceUser, VaultWorkloadAuthConfig, VaultWebSocketSecretsConfig, VaultWebSocketAuthHeader, VaultSecretsConfig, VaultLfvSecretsConfig, VaultConfigLocator, ValidateResult, UsersInboundHandlerConfig, UserStoreOptions, UserStore, UpdateTenantRequest, TrustedProvisioningClient, TrustedIdp, TokenValidationResult, TokenResponse, TenantWebhookPayload, TenantValidators, TenantStore, TenantStatus, TenantRoutingStrategy, TenantResponse, TenantPathRoutingStrategy, TenantPathNamespace, TenantPathMatch, TenantIonCache, SubscriptionMode, SubjectTypeScoping, SubjectType, SubjectScope, SubjectRef, StoreConflictKind, StoreConflictError, StateCookie, StandardSchemaWithValidate, SessionStore, Session, ServerOnlyWorkloadConfig, SecretsWriteOptions, SecretsValidators, SecretsSubscriptionOptions, SecretsSourceType, SecretsSourceMap, SecretsSourceConfig, SecretsSource, SecretsOperationOptions, SecretsModuleConfig, Secrets, SecretTypeRegistryEntry, SecretTypeInput, SecretTypeDescriptor, SecretRequestSeverity, SecretLifecycleRequest, SecretHandle, SecretFormat, SecretEventName, SecretEventListener, SecretEvent, SecretContentTypeMismatchError, SecretContentType, Secret, ScimWorkload, User as ScimUser, ScimServiceProviderConfig, ScimSchemaDefinition, ScimSchemaAttributeDefinition, Role2 as ScimRole, ScimResult, ScimResourceTypeSchemaExtension, ScimResourceType, ScimMutationSummary, ScimListResponse, Group2 as ScimGroup, ScimError, ScimCustomer, ScimAuthenticationScheme, SSOValidators, SSOHandlerConfig, SSOConfigFromCode, SSOConfig, SSOAppValidators, SSOAppRegistry, SSO, RoutingOptions, RouteModule, RouteFilterResult, Role, ResourceProvider, ResourceChangeListener, ResourceChange, Resource, ResolvedVaultLfvSecretsConfig, ResolvedRoute, RequireReadyResult, RemoteConfigRetryOptions, RemoteConfigRetryHook, RemoteConfigRetryContext, RemoteConfigLoadErrorKind, RemoteConfig, RegisterSSOAppResult, RegisterSSOAppPayload, RegisterSSOAppError, RegisterIAMAppResult, RegisterIAMAppPayload, RegisterIAMAppError, ReconcileReport, ReadyzEndpointConfig, ReadyAccessCatalogEntry, ReadinessReport, ReactiveHandle, PrincipalInboundHandlerConfig, Photo, PhoneNumber, Permission, ParsedEcid, PLATFORM_ASSIGNABLE_SUBJECT_TYPES, OtelSignalName, OtelSignalConfig, OtelProviderType, OtelProtocol, OtelOAuthClientCredentialsConfig, OtelMetricsSignalConfig, OtelLogRecord, OtelLogLevel, OtelLevels, OtelConfig, OtelAttributes, OtelAttributeValue, Otel, OidcCallbackParams, OaaSyncResult, OaaSyncOptions, OaaSyncInput, OaaPrincipalPopulation, OaaClient, OaaAccessTargetType, OaaAccessChangeBatchItem, Name, ModuleReadinessState, ModuleReadiness, ModuleName, ModifiableFrameworkConfig, MirrorConfigLocator, MetaData, MagicLinkStore, MagicLink, Logger, ListResult, ListOptions, ListFilter, LfvOtpResponse, LfvOtpRequest, LfvJwks, LfvErrorResponse, LfvErrorCode, LfvEd25519PublicJwk, LfvEd25519PrivateJwk, LfvCallbackTransport, LfvCallbackKind, LfvCallbackHeaders, LfvCallbackEnvelope, LfvActionRequestBase, LfvActionName, LfvActionAcceptedResponse, KmsRevokeKeyResult, KmsRevokeKeyRequest, KmsPoolSlot, KmsPoolListener, KmsPoolIssuer, KmsPoolDocument, KmsPoolControlDocument, KmsPoolConfig, KmsPool, KmsParkResult, KmsParkRequest, KmsParkReport, KmsParkDisposition, KmsKeyState, KmsKey, KmsIssuerEventName, KmsIssuerEventListener, KmsIssuerEvent, KmsIssuedKey, KmsConfig, KmsAllocationStrategy, KmsAllocationPolicy, KmsAddKeysResult, KmsAddKeysRequest, Kms, JwtBearerWorkloadConfig, JWTAssertionClaims, IoniteValidators, IoniteUserExtension, IoniteErrorOptions, IoniteError, IoniteBase, Ionite, InferSecretType, InMemoryTenantStoreOptions, IdentityResolution, IdTokenClaims, IamPrincipalKindFlag, IamPrincipalKind, IamDeltaResourceType, IamDeltaReconcileResult, IamDeltaReconcileInput, IamDeltaMode, IamDeltaEmitter, IamAssignmentPolicy, ION_TENANT_MANAGE, ION_SDK_PERMISSIONS, ION_SCIM_WORKLOAD_SCHEMA, ION_SCIM_USER_EXTENSION_URN, ION_SCIM_CUSTOMER_SCHEMA, ION_IAM_WORKLOADS_WRITE, ION_IAM_USERS_WRITE, ION_IAM_READ, ION_IAM_GROUPS_WRITE, ION_IAM_CUSTOMERS_WRITE, ION_IAM_ACCESS_REQUESTS_WRITE, ION_ENDPOINT_PERMISSIONS, ION_CIAM_MAGIC_LINK_CREATE, ION_CAPABILITIEZ_READ, ION_AUTHZ_OAA_SYNC, ION_AUTHZ_GROUP_SCHEMA, IAMValidators, IAMUsersInbound, IAMPrincipalsInbound, IAMInboundWorkloadsConfig, IAMInboundUsersConfig, IAMInboundUserContext, IAMInboundPrincipalContext, IAMInboundCustomersConfig, IAMHandlerConfig, IAMGroupsOutbound, IAMGroupsInbound, IAMEndpointFlag, IAMDiscoveryHandlerConfig, IAMDiscoveryContext, IAMDiscoveryConfig, IAMConfigFromCode, IAMConfig, IAMAppValidators, IAMAppRegistry, IAMAccessRequestsConfig, IAM, GroupsInboundHandlerConfig, GroupResource, GroupMember, Group, GcpSecretsConfig, GcpConfigLocator, FrameworkWorkloadIncomingOutgoing, FrameworkWorkloadConfigFromCode, FrameworkWorkloadConfig, FrameworkStores, FrameworkSecretsSourceConfig, FrameworkSecretsModuleConfig, FrameworkOtelConfig, FrameworkLfvConfig, FrameworkConfigInput, FrameworkConfig, EnvironmentType, EntityStore, EntitlementType, Entitlement, EnterpriseExtension, EndpointPermission, EndpointOperation, Email, EgressOutcome, EgressChannelOutcome, EffectiveEdge, EcidFormatError, ECID_SCHEME, DevSecretsConfig, DestinationReference, DEFAULT_TENANT_UI_NAMESPACE, DEFAULT_TENANT_API_NAMESPACE, DEFAULT_SECRET_MIME_TYPES, CustomerStoreOptions, CustomerStore, Customer, CreateUserOptions, CreateTenantRequest, CreateGroupOptions, ConfigSubscriptionOptions, ConfigSourceType, ConfigSourceResolver, ConfigSourceErrorInit, ConfigSourceError, ConfigSourceEnv, ConfigSource, ConfigLocator, ConfigErrorKind, ConfigChangeResult, ConfigChangeOptions, ConfigChangeCallback, ConfigApplyStatus, CodeCatalogNamespace, CodeCatalogInput, CodeCatalog, ClientCredentialsWorkloadConfig, ChangeListener, CatalogEntityKind, CatalogChangeListener, CatalogChangeKind, CatalogChange, CapabilityState, CapabilityKey, CapabilityEndpointUrls, CapabilitiezManifest, CachedWorkloadToken, CacheConfig, CIAMValidators, CIAMProviderType, CIAMProviderDescriptor, CIAMProviderConfig, CIAMProviderColors, CIAMProviderBranding, CIAMConfigFromCodeInput, CIAMConfigFromCode, CIAMConfig, CIAM, BaseWorkloadIdentity, BaseUser, BaseTenant, BaseCustomer, AzureSecretsConfig, AzureConfigLocator, AzureAuthMethod, AwsSecretsConfig, AwsConfigLocator, AuthzScimGroupType, AuthzScimGroupExtension, AuthzOaaPrincipalConfig, AuthzOaaConfig, AuthzEntityBase, AuthzDecision, AuthzConfig, Authz, AuthenticatedUser, AuthenticatedPrincipal, AssignmentPolicyError, ApplicationValidators, Address, AccessStatus, AccessRequestSubmit, AccessRequestResult, AccessRequestCreate, AccessRef, AccessProvenance, AccessMutationStatus, AccessMutationResult, AccessIndex, AccessCheckTarget, AccessCheckResult, AccessCheckReason, AccessChange, AccessCatalogStore, AccessAssignmentStore };