@ionite/core 0.0.23 → 0.0.24-beta.20260907.2
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 +555 -314
- package/dist/index.js +1 -1
- package/dist/server.d.ts +539 -331
- package/dist/server.js +1 -1
- package/dist/shared/core-ys2a23v0.js +4 -0
- package/package.json +1 -1
- package/dist/shared/core-fm0d5w83.js +0 -4
package/dist/index.d.ts
CHANGED
|
@@ -37,6 +37,12 @@ interface ListResult<T> {
|
|
|
37
37
|
interface ListFilter {
|
|
38
38
|
/** Restrict catalog entries to those whose `requestable` flag equals this value. */
|
|
39
39
|
requestable?: boolean;
|
|
40
|
+
/** Exact match on the principal's login/userName (or workload `clientId` projected as userName). */
|
|
41
|
+
userName?: string;
|
|
42
|
+
/** Exact match on the store `externalId`. */
|
|
43
|
+
externalId?: string;
|
|
44
|
+
/** Exclusive lower bound on `updatedAt` (SCIM `meta.lastModified gt`; ISO string or Date). */
|
|
45
|
+
updatedAfter?: Date | string;
|
|
40
46
|
}
|
|
41
47
|
/** Shared options for paginated list operations. */
|
|
42
48
|
interface ListOptions {
|
|
@@ -537,7 +543,8 @@ type CatalogEntityKind = "group" | "role" | "permission";
|
|
|
537
543
|
* entity declared in the catalog arrays, and every role -> permission reference likewise
|
|
538
544
|
* (`resources` refs are NOT validated here — resources live in the app's `ResourceProvider`);
|
|
539
545
|
* - nested group composition is acyclic;
|
|
540
|
-
* -
|
|
546
|
+
* - every entitlement declares a required non-empty `assignableSubjectTypes` within the platform
|
|
547
|
+
* ceiling, and `recommendedSubjectTypes` is a subset of it.
|
|
541
548
|
*
|
|
542
549
|
* Side effects: every entity (and its arrays/metadata) is frozen.
|
|
543
550
|
*/
|
|
@@ -573,84 +580,19 @@ declare function deprecateRetiredCodeCatalogRows(code: CodeCatalog | undefined,
|
|
|
573
580
|
declare function unionCatalogRead(code: CodeCatalog | undefined, store: AccessCatalogStore | undefined): AccessCatalogStore | undefined;
|
|
574
581
|
import { StandardSchemaV1 as StandardSchemaV15 } from "@standard-schema/spec";
|
|
575
582
|
/**
|
|
576
|
-
*
|
|
577
|
-
*
|
|
578
|
-
*
|
|
579
|
-
*
|
|
580
|
-
*
|
|
581
|
-
* definitions, and access change in the app. See the README "IAM delta egress" section.
|
|
582
|
-
*
|
|
583
|
-
* Origin/trust: every push is authenticated with the app's outgoing workload client (OAuth bearer);
|
|
584
|
-
* the receiver treats the authenticated workload identity as the verified origin. Audit
|
|
585
|
-
* accountability lives with the IdP that authenticated the workload and the IAM tool that granted
|
|
586
|
-
* it access. The SDK only surfaces the signal; it never dictates the enterprise's workflow or
|
|
587
|
-
* policy (flag, auto-revoke + notify, or simply audit).
|
|
588
|
-
*/
|
|
589
|
-
type IamDeltaMode = "patch";
|
|
590
|
-
/** SCIM resource types the delta patch adapter addresses. */
|
|
591
|
-
type IamDeltaResourceType = "user" | "group";
|
|
592
|
-
/** Destination-owned reference captured from a SCIM User/Group response. */
|
|
593
|
-
type DestinationReference = {
|
|
594
|
-
/** Service-provider-assigned SCIM resource id. */
|
|
595
|
-
providerId: string;
|
|
596
|
-
/** IAM-owned deep link where access to an entitlement can be requested, when supplied. */
|
|
597
|
-
requestUrl?: string;
|
|
598
|
-
};
|
|
599
|
-
/**
|
|
600
|
-
* Full IAM delta snapshot supplied by the app's maintenance/reconcile path. It mirrors the entities
|
|
601
|
-
* visible through IAM aggregation: users, durable entitlement definitions, and active access roots.
|
|
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.
|
|
602
588
|
*/
|
|
603
|
-
|
|
604
|
-
users?: Iterable<BaseUser> | AsyncIterable<BaseUser>;
|
|
605
|
-
groups?: Iterable<Group> | AsyncIterable<Group>;
|
|
606
|
-
roles?: Iterable<Role> | AsyncIterable<Role>;
|
|
607
|
-
permissions?: Iterable<Permission> | AsyncIterable<Permission>;
|
|
608
|
-
access?: Iterable<AccessChange> | AsyncIterable<AccessChange>;
|
|
609
|
-
};
|
|
610
|
-
/** Result of an app-driven full reconcile (re-push of definitions, users, and active roots). */
|
|
611
|
-
type IamDeltaReconcileResult = {
|
|
612
|
-
pushed: number;
|
|
613
|
-
skipped: number;
|
|
614
|
-
errors: string[];
|
|
615
|
-
};
|
|
589
|
+
declare function accessRefId(value: unknown): string;
|
|
616
590
|
/**
|
|
617
|
-
*
|
|
618
|
-
*
|
|
619
|
-
*
|
|
620
|
-
* roots. Code templates are not pushed during config apply.
|
|
621
|
-
*
|
|
622
|
-
* Request-triggered methods resolve when projection completes (or immediately when not ready). They
|
|
623
|
-
* are best-effort egress: the SCIM mutation path awaits them inside the request, but a rejection is
|
|
624
|
-
* caught and reported as degraded egress — it never turns a committed store mutation into a SCIM
|
|
625
|
-
* error. Reactive catalog/resource events use the same methods outside a request and warn on failure.
|
|
626
|
-
*
|
|
627
|
-
* Readiness follows the shared contract: `isReady()` is a synchronous check; `ready(timeout?)`
|
|
628
|
-
* resolves once the emitter first becomes usable.
|
|
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.
|
|
629
594
|
*/
|
|
630
|
-
|
|
631
|
-
/** Upsert a full SCIM User representation at the destination. */
|
|
632
|
-
onUserUpsert(user: BaseUser): Promise<void>;
|
|
633
|
-
/** Delete a destination User identified strictly by externalId. */
|
|
634
|
-
onUserDelete(externalId: string): Promise<void>;
|
|
635
|
-
/** Upsert a full SCIM Group representation for a group, role, or permission definition. */
|
|
636
|
-
onEntitlementUpsert(entity: Entitlement, type: EntitlementType): Promise<void>;
|
|
637
|
-
/** Delete a destination entitlement Group identified by the App-owned catalog id. */
|
|
638
|
-
onEntitlementDelete(type: EntitlementType, id: string): Promise<void>;
|
|
639
|
-
/** Project a granted root; resolves on completion (or immediately when not ready), rejects on push failure. */
|
|
640
|
-
onGrant(change: AccessChange): Promise<void>;
|
|
641
|
-
/** Project a revoked root; resolves on completion (or immediately when not ready), rejects on push failure. */
|
|
642
|
-
onRevoke(change: AccessChange): Promise<void>;
|
|
643
|
-
/** Re-push the complete IAM-visible snapshot to the destination (app-driven full reconcile). */
|
|
644
|
-
reconcile(input: IamDeltaReconcileInput): Promise<IamDeltaReconcileResult>;
|
|
645
|
-
/**
|
|
646
|
-
* Read a previously captured destination reference without making a network request. Returns
|
|
647
|
-
* undefined until the resource has been resolved or pushed to the configured IAM destination.
|
|
648
|
-
* `correlationId` is a User's `externalId` or an entitlement's App-owned catalog `id`.
|
|
649
|
-
*/
|
|
650
|
-
getDestinationRef(resourceType: IamDeltaResourceType, correlationId: string): Promise<DestinationReference | undefined>;
|
|
651
|
-
isReady(): boolean;
|
|
652
|
-
ready(timeout?: number): Promise<void>;
|
|
653
|
-
}
|
|
595
|
+
declare function accessRootId(change: AccessChange): string;
|
|
654
596
|
import { StandardSchemaV1 as StandardSchemaV13 } from "@standard-schema/spec";
|
|
655
597
|
/**
|
|
656
598
|
* SCIM 2.0 User Resource
|
|
@@ -820,10 +762,10 @@ interface GroupMember {
|
|
|
820
762
|
display?: string;
|
|
821
763
|
/**
|
|
822
764
|
* The type of the member. `"Workload"` labels a service-account/workload principal (including
|
|
823
|
-
* config-declared trusted provisioning clients)
|
|
824
|
-
* `"User"` or a nested `"Group"`.
|
|
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"`.
|
|
825
767
|
*/
|
|
826
|
-
type?: "User" | "Group" | "Workload";
|
|
768
|
+
type?: "User" | "Group" | "Workload" | "Customer";
|
|
827
769
|
}
|
|
828
770
|
/**
|
|
829
771
|
* SCIM 2.0 Group Resource
|
|
@@ -861,6 +803,45 @@ interface GroupResource {
|
|
|
861
803
|
*/
|
|
862
804
|
members?: GroupMember[];
|
|
863
805
|
}
|
|
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
|
+
};
|
|
825
|
+
}
|
|
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
|
+
};
|
|
844
|
+
}
|
|
864
845
|
/**
|
|
865
846
|
* SCIM Role
|
|
866
847
|
*/
|
|
@@ -952,6 +933,10 @@ interface EnterpriseExtension {
|
|
|
952
933
|
* https://ionite.com/schemas/ion-scim-user-extension.json
|
|
953
934
|
*/
|
|
954
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";
|
|
955
940
|
/**
|
|
956
941
|
* ionite SCIM User extension. See https://ionite.com/docs/llms-ecid.txt.
|
|
957
942
|
*/
|
|
@@ -1109,6 +1094,311 @@ declare function userSchema(vendor: string): StandardSchemaV13<Record<string, un
|
|
|
1109
1094
|
* @returns A StandardSchemaV1 instance for SCIM Group resources
|
|
1110
1095
|
*/
|
|
1111
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.
|
|
1139
|
+
*/
|
|
1140
|
+
phoneNumbers?: PhoneNumber[];
|
|
1141
|
+
/**
|
|
1142
|
+
* Optional account state.
|
|
1143
|
+
*/
|
|
1144
|
+
active?: boolean;
|
|
1145
|
+
/**
|
|
1146
|
+
* Timestamp when the customer was first stored.
|
|
1147
|
+
*/
|
|
1148
|
+
createdAt?: Date;
|
|
1149
|
+
/**
|
|
1150
|
+
* Timestamp when the customer was last updated (e.g., on re-login).
|
|
1151
|
+
*/
|
|
1152
|
+
updatedAt?: Date;
|
|
1153
|
+
/**
|
|
1154
|
+
* Optional CIAM envelope for stores that persist customer session profile data.
|
|
1155
|
+
* Simple app stores MAY omit this field.
|
|
1156
|
+
*/
|
|
1157
|
+
ciam?: Customer["ciam"];
|
|
1158
|
+
} & TExtended;
|
|
1159
|
+
type CustomerStoreOptions = {
|
|
1160
|
+
tenantId: string;
|
|
1161
|
+
tenants: TenantStore;
|
|
1162
|
+
};
|
|
1163
|
+
/**
|
|
1164
|
+
* Abstract interface for customer storage backends.
|
|
1165
|
+
*
|
|
1166
|
+
* Mirrors `UserStore` but for the CIAM customer domain. Consumers can
|
|
1167
|
+
* implement this for in-memory, Redis, or database-backed persistence.
|
|
1168
|
+
*
|
|
1169
|
+
* @template TExtended - Type-safe custom data that consumers can add to customers
|
|
1170
|
+
*/
|
|
1171
|
+
interface CustomerStore<TExtended = object> {
|
|
1172
|
+
/**
|
|
1173
|
+
* Retrieve a customer by their unique identifier.
|
|
1174
|
+
*
|
|
1175
|
+
* @param id - The customer's unique identifier as defined by the store implementation
|
|
1176
|
+
* @returns The customer if found, undefined otherwise
|
|
1177
|
+
*/
|
|
1178
|
+
get(id: string): Promise<BaseCustomer<TExtended> | undefined>;
|
|
1179
|
+
/**
|
|
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
|
|
1184
|
+
*/
|
|
1185
|
+
lookup(customer: BaseCustomer<TExtended>): Promise<BaseCustomer<TExtended> | undefined>;
|
|
1186
|
+
/**
|
|
1187
|
+
* Optional indexed lookup by `externalId`. When omitted, callers fall back to `lookup` or a list scan.
|
|
1188
|
+
*/
|
|
1189
|
+
getByExternalId?(externalId: string): Promise<BaseCustomer<TExtended> | undefined>;
|
|
1190
|
+
/**
|
|
1191
|
+
* Create or update a customer in the store.
|
|
1192
|
+
*
|
|
1193
|
+
* @param customer - The customer data to store
|
|
1194
|
+
*/
|
|
1195
|
+
upsert(customer: BaseCustomer<TExtended>): Promise<BaseCustomer<TExtended>>;
|
|
1196
|
+
/**
|
|
1197
|
+
* Delete a customer by their unique identifier.
|
|
1198
|
+
*
|
|
1199
|
+
* @param id - The customer's unique identifier as defined by the store implementation
|
|
1200
|
+
* @returns The number of customers deleted (0 or 1)
|
|
1201
|
+
*/
|
|
1202
|
+
delete(id: string): Promise<number>;
|
|
1203
|
+
/**
|
|
1204
|
+
* List customers in the store with optional pagination and sort.
|
|
1205
|
+
*
|
|
1206
|
+
* @param options - Optional start (0-based), limit (page size), and sort
|
|
1207
|
+
* @returns ListResult with total, count, items, size, page, pages
|
|
1208
|
+
*/
|
|
1209
|
+
list(options?: ListOptions): Promise<ListResult<BaseCustomer<TExtended>>>;
|
|
1210
|
+
}
|
|
1211
|
+
/**
|
|
1212
|
+
* Persisted workload principal record. Mirrors the registry/enrichment shape of `BaseUser`, scoped
|
|
1213
|
+
* to the small set of attributes meaningful for non-human identities.
|
|
1214
|
+
*
|
|
1215
|
+
* @template TExtended - Type-safe custom data that consumers can add to workload identities.
|
|
1216
|
+
*/
|
|
1217
|
+
type BaseWorkloadIdentity<TExtended = object> = {
|
|
1218
|
+
/**
|
|
1219
|
+
* Stable subject id for this workload. Used as the AccessIndex subject for
|
|
1220
|
+
* `subjectType: 'workload'` checks. Typically `clientId`, a workload id, or the token `sub`.
|
|
1221
|
+
*/
|
|
1222
|
+
id: string;
|
|
1223
|
+
/** OAuth client identifier, when the workload authenticates via client credentials. */
|
|
1224
|
+
clientId?: string;
|
|
1225
|
+
/** Human-friendly display name for the service account / machine identity. */
|
|
1226
|
+
displayName?: string;
|
|
1227
|
+
/** Free-form description of the workload's purpose. */
|
|
1228
|
+
description?: string;
|
|
1229
|
+
/** External identifier from the provisioning client (e.g. SCIM). */
|
|
1230
|
+
externalId?: string;
|
|
1231
|
+
/**
|
|
1232
|
+
* Optional destination service-provider id captured after IAM materializes this workload.
|
|
1233
|
+
*/
|
|
1234
|
+
providerId?: string;
|
|
1235
|
+
/**
|
|
1236
|
+
* Optional IAM-owned deep link associated with this workload receipt.
|
|
1237
|
+
*/
|
|
1238
|
+
requestUrl?: string;
|
|
1239
|
+
/**
|
|
1240
|
+
* Optional Enterprise Controlled ID for this workload: `ecid:<realm>:<opaque>`. A workload is its
|
|
1241
|
+
* own governance root, never folded into a human's ECID. See https://ionite.com/docs/llms-ecid.txt.
|
|
1242
|
+
*/
|
|
1243
|
+
ecid?: string;
|
|
1244
|
+
/** Whether the workload is active. Set `false` to disable it without deleting the record. */
|
|
1245
|
+
active?: boolean;
|
|
1246
|
+
/** Default OAuth scopes associated with this workload (space-delimited tokens, normalized list). */
|
|
1247
|
+
scopes?: string[];
|
|
1248
|
+
/** Timestamp when the workload identity was first stored. */
|
|
1249
|
+
createdAt?: Date;
|
|
1250
|
+
/** Timestamp when the workload identity was last updated. */
|
|
1251
|
+
updatedAt?: Date;
|
|
1252
|
+
/** Optional free-form metadata bag. */
|
|
1253
|
+
metadata?: Record<string, unknown>;
|
|
1254
|
+
} & TExtended;
|
|
1255
|
+
/**
|
|
1256
|
+
* Abstract interface for workload identity storage backends. Implement to back the registry with
|
|
1257
|
+
* in-memory, Redis, or a database. Mirrors {@link UserStore}.
|
|
1258
|
+
*
|
|
1259
|
+
* @template TExtended - Type-safe custom data that consumers can add to workload identities.
|
|
1260
|
+
*/
|
|
1261
|
+
interface WorkloadIdentityStore<TExtended = object> {
|
|
1262
|
+
/**
|
|
1263
|
+
* Retrieve a workload identity by its unique id.
|
|
1264
|
+
*
|
|
1265
|
+
* @param id - The workload's unique identifier.
|
|
1266
|
+
* @returns The workload identity if found, undefined otherwise.
|
|
1267
|
+
*/
|
|
1268
|
+
get(id: string): Promise<BaseWorkloadIdentity<TExtended> | undefined>;
|
|
1269
|
+
/**
|
|
1270
|
+
* Retrieve a workload identity by matching identifying attributes (e.g. `clientId`, `externalId`).
|
|
1271
|
+
*
|
|
1272
|
+
* @param identity - The workload identity to look up.
|
|
1273
|
+
* @returns The workload identity if found, undefined otherwise.
|
|
1274
|
+
*/
|
|
1275
|
+
lookup(identity: BaseWorkloadIdentity<TExtended>): Promise<BaseWorkloadIdentity<TExtended> | undefined>;
|
|
1276
|
+
/**
|
|
1277
|
+
* Optional indexed lookup by `externalId`. When omitted, callers fall back to `lookup` or a list scan.
|
|
1278
|
+
*/
|
|
1279
|
+
getByExternalId?(externalId: string): Promise<BaseWorkloadIdentity<TExtended> | undefined>;
|
|
1280
|
+
/**
|
|
1281
|
+
* Create or update a workload identity. If a record with the same `id` exists it is updated,
|
|
1282
|
+
* otherwise a new record is created.
|
|
1283
|
+
*
|
|
1284
|
+
* @param identity - The workload identity to store.
|
|
1285
|
+
*/
|
|
1286
|
+
upsert(identity: BaseWorkloadIdentity<TExtended>): Promise<BaseWorkloadIdentity<TExtended>>;
|
|
1287
|
+
/**
|
|
1288
|
+
* Delete a workload identity by id.
|
|
1289
|
+
*
|
|
1290
|
+
* @param id - The workload's unique identifier.
|
|
1291
|
+
* @returns The number of records deleted (0 or 1).
|
|
1292
|
+
*/
|
|
1293
|
+
delete(id: string): Promise<number>;
|
|
1294
|
+
/**
|
|
1295
|
+
* List workload identities with optional pagination and sort.
|
|
1296
|
+
*
|
|
1297
|
+
* @param options - Optional start (0-based), limit (page size), and sort.
|
|
1298
|
+
* @returns ListResult with total, count, items, size, page, pages.
|
|
1299
|
+
*/
|
|
1300
|
+
list(options?: ListOptions): Promise<ListResult<BaseWorkloadIdentity<TExtended>>>;
|
|
1301
|
+
}
|
|
1302
|
+
/**
|
|
1303
|
+
* IAM delta egress mode (RemoteConfig/ECI intent). Selects how IAM-visible runtime changes that
|
|
1304
|
+
* occur inside the application are surfaced to the enterprise's IAM/governance layer:
|
|
1305
|
+
*
|
|
1306
|
+
* - `'patch'`: outbound SCIM into the IAM tool (per-resource POST/PUT/PATCH/DELETE,
|
|
1307
|
+
* correlated by the App-owned id carried as SCIM `externalId`). The IAM tool's view stays fresh as users, materialized entitlement
|
|
1308
|
+
* definitions, and access change in the app. See the README "IAM delta egress" section.
|
|
1309
|
+
*
|
|
1310
|
+
* Origin/trust: every push is authenticated with the app's outgoing workload client (OAuth bearer);
|
|
1311
|
+
* the receiver treats the authenticated workload identity as the verified origin. Audit
|
|
1312
|
+
* accountability lives with the IdP that authenticated the workload and the IAM tool that granted
|
|
1313
|
+
* it access. The SDK only surfaces the signal; it never dictates the enterprise's workflow or
|
|
1314
|
+
* policy (flag, auto-revoke + notify, or simply audit).
|
|
1315
|
+
*/
|
|
1316
|
+
type IamDeltaMode = "patch";
|
|
1317
|
+
type AccessRequestCreate = {
|
|
1318
|
+
subject: string;
|
|
1319
|
+
subjectType: SubjectType;
|
|
1320
|
+
targetType: EntitlementType;
|
|
1321
|
+
target: string;
|
|
1322
|
+
justification?: string;
|
|
1323
|
+
};
|
|
1324
|
+
type AccessRequestResult = {
|
|
1325
|
+
id: string;
|
|
1326
|
+
status: "pending" | "approved" | "denied";
|
|
1327
|
+
trackingUrl: string;
|
|
1328
|
+
};
|
|
1329
|
+
/** SCIM resource types the delta patch adapter addresses. */
|
|
1330
|
+
type IamDeltaResourceType = "user" | "group" | "workload" | "customer";
|
|
1331
|
+
/** Destination-owned reference captured from a SCIM User/Group response. */
|
|
1332
|
+
type DestinationReference = {
|
|
1333
|
+
/** Service-provider-assigned SCIM resource id. */
|
|
1334
|
+
providerId: string;
|
|
1335
|
+
/** IAM-owned deep link where access to an entitlement can be requested, when supplied. */
|
|
1336
|
+
requestUrl?: string;
|
|
1337
|
+
};
|
|
1338
|
+
/**
|
|
1339
|
+
* Full IAM delta snapshot supplied by the app's maintenance/reconcile path. It mirrors the entities
|
|
1340
|
+
* visible through IAM aggregation: users, durable entitlement definitions, and active access roots.
|
|
1341
|
+
*/
|
|
1342
|
+
type IamDeltaReconcileInput = {
|
|
1343
|
+
users?: Iterable<BaseUser> | AsyncIterable<BaseUser>;
|
|
1344
|
+
workloads?: Iterable<BaseWorkloadIdentity> | AsyncIterable<BaseWorkloadIdentity>;
|
|
1345
|
+
customers?: Iterable<BaseCustomer> | AsyncIterable<BaseCustomer>;
|
|
1346
|
+
groups?: Iterable<Group> | AsyncIterable<Group>;
|
|
1347
|
+
roles?: Iterable<Role> | AsyncIterable<Role>;
|
|
1348
|
+
permissions?: Iterable<Permission> | AsyncIterable<Permission>;
|
|
1349
|
+
access?: Iterable<AccessChange> | AsyncIterable<AccessChange>;
|
|
1350
|
+
};
|
|
1351
|
+
/** Result of an app-driven full reconcile (re-push of definitions, users, and active roots). */
|
|
1352
|
+
type IamDeltaReconcileResult = {
|
|
1353
|
+
pushed: number;
|
|
1354
|
+
skipped: number;
|
|
1355
|
+
errors: string[];
|
|
1356
|
+
};
|
|
1357
|
+
/**
|
|
1358
|
+
* Projects observed runtime mutations to the configured IAM delta destination. The invariant is:
|
|
1359
|
+
* every runtime mutation the SDK observes that would change what IAM full sync shows must also
|
|
1360
|
+
* egress through this handle. That includes users, materialized entitlement definitions, and access
|
|
1361
|
+
* roots. Code templates are not pushed during config apply.
|
|
1362
|
+
*
|
|
1363
|
+
* Request-triggered methods resolve when projection completes (or immediately when not ready). They
|
|
1364
|
+
* are best-effort egress: the SCIM mutation path awaits them inside the request, but a rejection is
|
|
1365
|
+
* caught and reported as degraded egress — it never turns a committed store mutation into a SCIM
|
|
1366
|
+
* error. Reactive catalog/resource events use the same methods outside a request and warn on failure.
|
|
1367
|
+
*
|
|
1368
|
+
* Readiness follows the shared contract: `isReady()` is a synchronous check; `ready(timeout?)`
|
|
1369
|
+
* resolves once the emitter first becomes usable.
|
|
1370
|
+
*/
|
|
1371
|
+
interface IamDeltaEmitter {
|
|
1372
|
+
/** Upsert a full SCIM User representation at the destination. */
|
|
1373
|
+
onUserUpsert(user: BaseUser): Promise<void>;
|
|
1374
|
+
/** Delete a destination User identified strictly by externalId. */
|
|
1375
|
+
onUserDelete(externalId: string): Promise<void>;
|
|
1376
|
+
/** Upsert a full SCIM Group representation for a group, role, or permission definition. */
|
|
1377
|
+
onEntitlementUpsert(entity: Entitlement, type: EntitlementType): Promise<void>;
|
|
1378
|
+
/** Delete a destination entitlement Group identified by the App-owned catalog id. */
|
|
1379
|
+
onEntitlementDelete(type: EntitlementType, id: string): Promise<void>;
|
|
1380
|
+
/** Project a granted root; resolves on completion (or immediately when not ready), rejects on push failure. */
|
|
1381
|
+
onGrant(change: AccessChange): Promise<void>;
|
|
1382
|
+
/** Project a revoked root; resolves on completion (or immediately when not ready), rejects on push failure. */
|
|
1383
|
+
onRevoke(change: AccessChange): Promise<void>;
|
|
1384
|
+
/** Re-push the complete IAM-visible snapshot to the destination (app-driven full reconcile). */
|
|
1385
|
+
reconcile(input: IamDeltaReconcileInput): Promise<IamDeltaReconcileResult>;
|
|
1386
|
+
/**
|
|
1387
|
+
* Submit an on-behalf access request at `${iam.url}/AccessRequests`. Requires only the
|
|
1388
|
+
* destination channel (`url` plus the `deltaAudience` workload client) — not `isReady()`, which
|
|
1389
|
+
* additionally demands delta egress (a per-kind `'patch'` mode and its receipt stores). A tenant
|
|
1390
|
+
* whose IAM aggregates by pull alone may still submit requests.
|
|
1391
|
+
*/
|
|
1392
|
+
requestAccess(input: AccessRequestCreate): Promise<AccessRequestResult>;
|
|
1393
|
+
/**
|
|
1394
|
+
* Read a previously captured destination reference without making a network request. Returns
|
|
1395
|
+
* undefined until the resource has been resolved or pushed to the configured IAM destination.
|
|
1396
|
+
* `correlationId` is a User's `externalId` or an entitlement's App-owned catalog `id`.
|
|
1397
|
+
*/
|
|
1398
|
+
getDestinationRef(resourceType: IamDeltaResourceType, correlationId: string): Promise<DestinationReference | undefined>;
|
|
1399
|
+
isReady(): boolean;
|
|
1400
|
+
ready(timeout?: number): Promise<void>;
|
|
1401
|
+
}
|
|
1112
1402
|
import { StandardSchemaV1 as StandardSchemaV14 } from "@standard-schema/spec";
|
|
1113
1403
|
type ChangeListener = () => void;
|
|
1114
1404
|
/**
|
|
@@ -1188,85 +1478,6 @@ type RequireReadyResult = {
|
|
|
1188
1478
|
}>;
|
|
1189
1479
|
};
|
|
1190
1480
|
/**
|
|
1191
|
-
* Persisted workload principal record. Mirrors the registry/enrichment shape of `BaseUser`, scoped
|
|
1192
|
-
* to the small set of attributes meaningful for non-human identities.
|
|
1193
|
-
*
|
|
1194
|
-
* @template TExtended - Type-safe custom data that consumers can add to workload identities.
|
|
1195
|
-
*/
|
|
1196
|
-
type BaseWorkloadIdentity<TExtended = object> = {
|
|
1197
|
-
/**
|
|
1198
|
-
* Stable subject id for this workload. Used as the AccessIndex subject for
|
|
1199
|
-
* `subjectType: 'workload'` checks. Typically `clientId`, a workload id, or the token `sub`.
|
|
1200
|
-
*/
|
|
1201
|
-
id: string;
|
|
1202
|
-
/** OAuth client identifier, when the workload authenticates via client credentials. */
|
|
1203
|
-
clientId?: string;
|
|
1204
|
-
/** Human-friendly display name for the service account / machine identity. */
|
|
1205
|
-
displayName?: string;
|
|
1206
|
-
/** Free-form description of the workload's purpose. */
|
|
1207
|
-
description?: string;
|
|
1208
|
-
/** External identifier from the provisioning client (e.g. SCIM). */
|
|
1209
|
-
externalId?: string;
|
|
1210
|
-
/**
|
|
1211
|
-
* Optional Enterprise Controlled ID for this workload: `ecid:<realm>:<opaque>`. A workload is its
|
|
1212
|
-
* own governance root, never folded into a human's ECID. See https://ionite.com/docs/llms-ecid.txt.
|
|
1213
|
-
*/
|
|
1214
|
-
ecid?: string;
|
|
1215
|
-
/** Whether the workload is active. Set `false` to disable it without deleting the record. */
|
|
1216
|
-
active?: boolean;
|
|
1217
|
-
/** Default OAuth scopes associated with this workload (space-delimited tokens, normalized list). */
|
|
1218
|
-
scopes?: string[];
|
|
1219
|
-
/** Timestamp when the workload identity was first stored. */
|
|
1220
|
-
createdAt?: Date;
|
|
1221
|
-
/** Timestamp when the workload identity was last updated. */
|
|
1222
|
-
updatedAt?: Date;
|
|
1223
|
-
/** Optional free-form metadata bag. */
|
|
1224
|
-
metadata?: Record<string, unknown>;
|
|
1225
|
-
} & TExtended;
|
|
1226
|
-
/**
|
|
1227
|
-
* Abstract interface for workload identity storage backends. Implement to back the registry with
|
|
1228
|
-
* in-memory, Redis, or a database. Mirrors {@link UserStore}.
|
|
1229
|
-
*
|
|
1230
|
-
* @template TExtended - Type-safe custom data that consumers can add to workload identities.
|
|
1231
|
-
*/
|
|
1232
|
-
interface WorkloadIdentityStore<TExtended = object> {
|
|
1233
|
-
/**
|
|
1234
|
-
* Retrieve a workload identity by its unique id.
|
|
1235
|
-
*
|
|
1236
|
-
* @param id - The workload's unique identifier.
|
|
1237
|
-
* @returns The workload identity if found, undefined otherwise.
|
|
1238
|
-
*/
|
|
1239
|
-
get(id: string): Promise<BaseWorkloadIdentity<TExtended> | undefined>;
|
|
1240
|
-
/**
|
|
1241
|
-
* Retrieve a workload identity by matching identifying attributes (e.g. `clientId`, `externalId`).
|
|
1242
|
-
*
|
|
1243
|
-
* @param identity - The workload identity to look up.
|
|
1244
|
-
* @returns The workload identity if found, undefined otherwise.
|
|
1245
|
-
*/
|
|
1246
|
-
lookup(identity: BaseWorkloadIdentity<TExtended>): Promise<BaseWorkloadIdentity<TExtended> | undefined>;
|
|
1247
|
-
/**
|
|
1248
|
-
* Create or update a workload identity. If a record with the same `id` exists it is updated,
|
|
1249
|
-
* otherwise a new record is created.
|
|
1250
|
-
*
|
|
1251
|
-
* @param identity - The workload identity to store.
|
|
1252
|
-
*/
|
|
1253
|
-
upsert(identity: BaseWorkloadIdentity<TExtended>): Promise<BaseWorkloadIdentity<TExtended>>;
|
|
1254
|
-
/**
|
|
1255
|
-
* Delete a workload identity by id.
|
|
1256
|
-
*
|
|
1257
|
-
* @param id - The workload's unique identifier.
|
|
1258
|
-
* @returns The number of records deleted (0 or 1).
|
|
1259
|
-
*/
|
|
1260
|
-
delete(id: string): Promise<number>;
|
|
1261
|
-
/**
|
|
1262
|
-
* List workload identities with optional pagination and sort.
|
|
1263
|
-
*
|
|
1264
|
-
* @param options - Optional start (0-based), limit (page size), and sort.
|
|
1265
|
-
* @returns ListResult with total, count, items, size, page, pages.
|
|
1266
|
-
*/
|
|
1267
|
-
list(options?: ListOptions): Promise<ListResult<BaseWorkloadIdentity<TExtended>>>;
|
|
1268
|
-
}
|
|
1269
|
-
/**
|
|
1270
1481
|
* Token caching for workload identity authentication.
|
|
1271
1482
|
*
|
|
1272
1483
|
* Token stores are optional but recommended for performance - they enable:
|
|
@@ -1737,6 +1948,14 @@ interface IAMHandlerConfig {
|
|
|
1737
1948
|
*/
|
|
1738
1949
|
groupsUrl?: string;
|
|
1739
1950
|
/**
|
|
1951
|
+
* Base path for the SCIM Workloads endpoints (e.g., '/api/iam/Workloads')
|
|
1952
|
+
*/
|
|
1953
|
+
workloadsUrl?: string;
|
|
1954
|
+
/**
|
|
1955
|
+
* Base path for the SCIM Customers endpoints (e.g., '/api/iam/Customers')
|
|
1956
|
+
*/
|
|
1957
|
+
customersUrl?: string;
|
|
1958
|
+
/**
|
|
1740
1959
|
* Handler overrides for SCIM discovery endpoints (e.g., '/api/iam/ServiceProviderConfig')
|
|
1741
1960
|
*/
|
|
1742
1961
|
discovery?: IAMDiscoveryHandlerConfig;
|
|
@@ -1760,6 +1979,19 @@ type IAMConfig = {
|
|
|
1760
1979
|
*/
|
|
1761
1980
|
userStore?: UserStore;
|
|
1762
1981
|
/**
|
|
1982
|
+
* Store for inbound workload provisioning. When configured, `/Workloads` is served.
|
|
1983
|
+
*/
|
|
1984
|
+
workloadIdentityStore?: WorkloadIdentityStore;
|
|
1985
|
+
/**
|
|
1986
|
+
* Store for inbound customer provisioning. When configured, `/Customers` is served.
|
|
1987
|
+
*/
|
|
1988
|
+
customerStore?: CustomerStore;
|
|
1989
|
+
/**
|
|
1990
|
+
* Destination-only hook for `POST /AccessRequests`. Apps that are not IAM destinations omit this
|
|
1991
|
+
* and the endpoint returns 404.
|
|
1992
|
+
*/
|
|
1993
|
+
accessRequests?: IAMAccessRequestsConfig;
|
|
1994
|
+
/**
|
|
1763
1995
|
* Optional inbound user mapping hooks for SCIM provisioning.
|
|
1764
1996
|
* Use these when the default BaseUser <-> SCIM mapping is not a direct fit
|
|
1765
1997
|
* for your application's database model.
|
|
@@ -1776,13 +2008,28 @@ type IAMConfig = {
|
|
|
1776
2008
|
*/
|
|
1777
2009
|
usersUrl?: string;
|
|
1778
2010
|
groupsUrl?: string;
|
|
2011
|
+
workloadsUrl?: string;
|
|
2012
|
+
customersUrl?: string;
|
|
1779
2013
|
discovery?: IAMDiscoveryConfig;
|
|
1780
2014
|
/**
|
|
1781
|
-
* RemoteConfig intent
|
|
1782
|
-
*
|
|
1783
|
-
* IAM module is present.
|
|
2015
|
+
* RemoteConfig intent for workforce principals. Set by Ops/ECI via the ConfigSource; not
|
|
2016
|
+
* configurable from application code. `enabled` gates the inbound SCIM Users endpoint (default
|
|
2017
|
+
* on when the IAM module is present). `assignment` is the Ops-owned in-app grant policy
|
|
2018
|
+
* (default `'app'`). Effective Users availability also requires a `userStore` capability.
|
|
2019
|
+
*/
|
|
2020
|
+
users?: IamPrincipalKindFlag;
|
|
2021
|
+
/**
|
|
2022
|
+
* RemoteConfig intent for workload principals. Set by Ops/ECI via the ConfigSource; not
|
|
2023
|
+
* configurable from application code. `enabled` gates `/Workloads` (default on). `assignment` is
|
|
2024
|
+
* consumed by {@link Authz.grant}. `delta` is the Ops-owned per-kind egress mode.
|
|
2025
|
+
*/
|
|
2026
|
+
workloads?: IamPrincipalKindFlag;
|
|
2027
|
+
/**
|
|
2028
|
+
* RemoteConfig intent for CIAM customer principals. Set by Ops/ECI via the ConfigSource; not
|
|
2029
|
+
* configurable from application code. `enabled` gates `/Customers` (default on). `assignment` is
|
|
2030
|
+
* consumed by {@link Authz.grant}. `delta` is the Ops-owned per-kind egress mode.
|
|
1784
2031
|
*/
|
|
1785
|
-
|
|
2032
|
+
customers?: IamPrincipalKindFlag;
|
|
1786
2033
|
/**
|
|
1787
2034
|
* RemoteConfig intent flag for the inbound SCIM Groups endpoint. Set by Ops/ECI via the
|
|
1788
2035
|
* ConfigSource; not configurable from application code. Effective availability also requires an
|
|
@@ -1790,21 +2037,9 @@ type IAMConfig = {
|
|
|
1790
2037
|
*/
|
|
1791
2038
|
groups?: IAMEndpointFlag;
|
|
1792
2039
|
/**
|
|
1793
|
-
* RemoteConfig/ECI intent:
|
|
1794
|
-
*
|
|
1795
|
-
*
|
|
1796
|
-
* `'patch'`: outbound SCIM into the IAM tool keyed by the App-owned catalog id carried as SCIM
|
|
1797
|
-
* `externalId` (uses `url` as the destination base and `deltaAudience` for the outgoing workload client). Every observed runtime
|
|
1798
|
-
* mutation that changes the IAM full-sync view egresses: user and entitlement upsert/delete, and
|
|
1799
|
-
* access grant/revoke. See the README "IAM delta egress" section.
|
|
1800
|
-
*
|
|
1801
|
-
* When omitted, delta egress is disabled. The SDK only emits the signal; the enterprise's IAM
|
|
1802
|
-
* tooling owns the response (flag, auto-revoke + notify, or audit). See `IamDeltaMode`.
|
|
1803
|
-
*/
|
|
1804
|
-
delta?: IamDeltaMode;
|
|
1805
|
-
/**
|
|
1806
|
-
* RemoteConfig/ECI intent: name of the outgoing workload client used to authenticate `delta:'patch'`
|
|
1807
|
-
* pushes to the destination (`url`). When omitted, the default workload server token is used.
|
|
2040
|
+
* RemoteConfig/ECI intent: name of the outgoing workload client used to authenticate per-kind
|
|
2041
|
+
* `delta:'patch'` pushes to the destination (`url`). When omitted, the default workload server
|
|
2042
|
+
* token is used. Module-wide; per-kind enablement lives on `users`/`workloads`/`customers`.
|
|
1808
2043
|
*/
|
|
1809
2044
|
deltaAudience?: string;
|
|
1810
2045
|
};
|
|
@@ -1814,6 +2049,32 @@ type IAMConfig = {
|
|
|
1814
2049
|
type IAMEndpointFlag = {
|
|
1815
2050
|
enabled?: boolean;
|
|
1816
2051
|
};
|
|
2052
|
+
/**
|
|
2053
|
+
* RemoteConfig intent for one principal kind: endpoint enablement plus the Ops-owned assignment
|
|
2054
|
+
* policy. `assignment` defaults to `'app'` (today's notify-via-delta semantics).
|
|
2055
|
+
*/
|
|
2056
|
+
type IamPrincipalKindFlag = {
|
|
2057
|
+
enabled?: boolean;
|
|
2058
|
+
assignment?: IamAssignmentPolicy;
|
|
2059
|
+
/** Per-kind IAM delta egress. `'patch'` enables outbound SCIM for this principal kind. */
|
|
2060
|
+
delta?: IamDeltaMode;
|
|
2061
|
+
};
|
|
2062
|
+
/** Normalized, always-present principal-kind intent exposed on `ion.iam`. */
|
|
2063
|
+
type IamPrincipalKind = {
|
|
2064
|
+
enabled: boolean;
|
|
2065
|
+
assignment: IamAssignmentPolicy;
|
|
2066
|
+
delta?: IamDeltaMode;
|
|
2067
|
+
};
|
|
2068
|
+
type IAMAccessRequestsConfig = {
|
|
2069
|
+
create: (request: AccessRequestCreate) => Promise<AccessRequestResult>;
|
|
2070
|
+
};
|
|
2071
|
+
type AccessRequestSubmit = {
|
|
2072
|
+
subject: AccessChange["subject"];
|
|
2073
|
+
subjectType: SubjectType;
|
|
2074
|
+
targetType: EntitlementType;
|
|
2075
|
+
target: AccessChange["target"];
|
|
2076
|
+
justification?: string;
|
|
2077
|
+
};
|
|
1817
2078
|
type IAMEntitlementRequestUrlContext = {
|
|
1818
2079
|
request: Request;
|
|
1819
2080
|
tenantId?: string;
|
|
@@ -1821,6 +2082,8 @@ type IAMEntitlementRequestUrlContext = {
|
|
|
1821
2082
|
type IAMValidators = {
|
|
1822
2083
|
user: StandardSchemaV15<unknown, User>;
|
|
1823
2084
|
group: StandardSchemaV15<unknown, GroupResource>;
|
|
2085
|
+
workload?: StandardSchemaV15<unknown, ScimWorkload>;
|
|
2086
|
+
customer?: StandardSchemaV15<unknown, ScimCustomer>;
|
|
1824
2087
|
};
|
|
1825
2088
|
interface IAMInboundUserContext {
|
|
1826
2089
|
/**
|
|
@@ -1928,8 +2191,12 @@ interface IAMDiscoveryContext {
|
|
|
1928
2191
|
basePath: string;
|
|
1929
2192
|
usersUrl: string;
|
|
1930
2193
|
groupsUrl: string;
|
|
2194
|
+
workloadsUrl: string;
|
|
2195
|
+
customersUrl: string;
|
|
1931
2196
|
supportsUsers: boolean;
|
|
1932
2197
|
supportsGroups: boolean;
|
|
2198
|
+
supportsWorkloads: boolean;
|
|
2199
|
+
supportsCustomers: boolean;
|
|
1933
2200
|
}
|
|
1934
2201
|
interface IAMDiscoveryConfig {
|
|
1935
2202
|
/**
|
|
@@ -1994,6 +2261,12 @@ interface UsersInboundHandlerConfig {
|
|
|
1994
2261
|
*/
|
|
1995
2262
|
basePath?: string;
|
|
1996
2263
|
}
|
|
2264
|
+
interface PrincipalInboundHandlerConfig {
|
|
2265
|
+
basePath?: string;
|
|
2266
|
+
}
|
|
2267
|
+
type IAMPrincipalsInbound = {
|
|
2268
|
+
handler: (request: Request, config?: PrincipalInboundHandlerConfig) => Promise<Response>;
|
|
2269
|
+
};
|
|
1997
2270
|
interface IAMDiscoveryHandlerConfig {
|
|
1998
2271
|
/**
|
|
1999
2272
|
* Base path for the IAM discovery endpoints (e.g., '/api/iam')
|
|
@@ -2043,7 +2316,13 @@ type IAMUsersInbound = {
|
|
|
2043
2316
|
* - `groups_inbound` is available when a `catalogStore` is configured
|
|
2044
2317
|
* - `users_inbound` is available when `userStore` is configured
|
|
2045
2318
|
*/
|
|
2046
|
-
type IAM = IAMConfig & {
|
|
2319
|
+
type IAM = Omit<IAMConfig, "users" | "workloads" | "customers" | "groups"> & {
|
|
2320
|
+
users: IamPrincipalKind;
|
|
2321
|
+
workloads: IamPrincipalKind;
|
|
2322
|
+
customers: IamPrincipalKind;
|
|
2323
|
+
groups: {
|
|
2324
|
+
enabled: boolean;
|
|
2325
|
+
};
|
|
2047
2326
|
/**
|
|
2048
2327
|
* Create a new user/account in the external IAM provider
|
|
2049
2328
|
* Only available when `url` is configured.
|
|
@@ -2068,9 +2347,11 @@ type IAM = IAMConfig & {
|
|
|
2068
2347
|
* Available when `userStore` is configured in IAMConfig.
|
|
2069
2348
|
*/
|
|
2070
2349
|
users_inbound?: IAMUsersInbound;
|
|
2350
|
+
workloads_inbound?: IAMPrincipalsInbound;
|
|
2351
|
+
customers_inbound?: IAMPrincipalsInbound;
|
|
2071
2352
|
/**
|
|
2072
2353
|
* Framework-agnostic request handler for the IAM module.
|
|
2073
|
-
* Routes to discovery, users_inbound, or
|
|
2354
|
+
* Routes to discovery, users_inbound, groups_inbound, or principal-kind inbound based on path.
|
|
2074
2355
|
*/
|
|
2075
2356
|
handler: (request: Request, config?: IAMHandlerConfig) => Promise<Response>;
|
|
2076
2357
|
/** Synchronous readiness: true once this IAM handle is configured and usable. */
|
|
@@ -2795,104 +3076,6 @@ type SSO<
|
|
|
2795
3076
|
ready?: (timeout?: number) => Promise<void>;
|
|
2796
3077
|
};
|
|
2797
3078
|
/**
|
|
2798
|
-
* Persisted CIAM customer record with identity fields and tracking metadata.
|
|
2799
|
-
*
|
|
2800
|
-
* Builds on the shared minimal identity fields with a lightweight set of
|
|
2801
|
-
* consumer-oriented attributes and an optional CIAM (`ciam`) session envelope.
|
|
2802
|
-
* This is the type returned by `CustomerStore`. Apps typically extend the
|
|
2803
|
-
* `BaseCustomer` Zod/Valibot schema to add custom attributes.
|
|
2804
|
-
*
|
|
2805
|
-
* @template TExtended - Type-safe custom data that consumers can add to customers
|
|
2806
|
-
*/
|
|
2807
|
-
type BaseCustomer<TExtended = object> = BaseUserFields & {
|
|
2808
|
-
/**
|
|
2809
|
-
* Optional ionite tenant identifier for tenant-aware apps.
|
|
2810
|
-
*/
|
|
2811
|
-
tenantId?: string;
|
|
2812
|
-
/**
|
|
2813
|
-
* Optional external identifier from a provisioning client.
|
|
2814
|
-
*/
|
|
2815
|
-
externalId?: string;
|
|
2816
|
-
/**
|
|
2817
|
-
* Optional display name distinct from the simple `name` field.
|
|
2818
|
-
*/
|
|
2819
|
-
displayName?: string;
|
|
2820
|
-
/**
|
|
2821
|
-
* Optional email collection.
|
|
2822
|
-
* The simple `email` field still stores the primary email for convenience.
|
|
2823
|
-
*/
|
|
2824
|
-
emails?: Email[];
|
|
2825
|
-
/**
|
|
2826
|
-
* Optional phone numbers.
|
|
2827
|
-
*/
|
|
2828
|
-
phoneNumbers?: PhoneNumber[];
|
|
2829
|
-
/**
|
|
2830
|
-
* Optional account state.
|
|
2831
|
-
*/
|
|
2832
|
-
active?: boolean;
|
|
2833
|
-
/**
|
|
2834
|
-
* Timestamp when the customer was first stored.
|
|
2835
|
-
*/
|
|
2836
|
-
createdAt?: Date;
|
|
2837
|
-
/**
|
|
2838
|
-
* Timestamp when the customer was last updated (e.g., on re-login).
|
|
2839
|
-
*/
|
|
2840
|
-
updatedAt?: Date;
|
|
2841
|
-
/**
|
|
2842
|
-
* Optional CIAM envelope for stores that persist customer session profile data.
|
|
2843
|
-
* Simple app stores MAY omit this field.
|
|
2844
|
-
*/
|
|
2845
|
-
ciam?: Customer["ciam"];
|
|
2846
|
-
} & TExtended;
|
|
2847
|
-
type CustomerStoreOptions = {
|
|
2848
|
-
tenantId: string;
|
|
2849
|
-
tenants: TenantStore;
|
|
2850
|
-
};
|
|
2851
|
-
/**
|
|
2852
|
-
* Abstract interface for customer storage backends.
|
|
2853
|
-
*
|
|
2854
|
-
* Mirrors `UserStore` but for the CIAM customer domain. Consumers can
|
|
2855
|
-
* implement this for in-memory, Redis, or database-backed persistence.
|
|
2856
|
-
*
|
|
2857
|
-
* @template TExtended - Type-safe custom data that consumers can add to customers
|
|
2858
|
-
*/
|
|
2859
|
-
interface CustomerStore<TExtended = object> {
|
|
2860
|
-
/**
|
|
2861
|
-
* Retrieve a customer by their unique identifier.
|
|
2862
|
-
*
|
|
2863
|
-
* @param id - The customer's unique identifier as defined by the store implementation
|
|
2864
|
-
* @returns The customer if found, undefined otherwise
|
|
2865
|
-
*/
|
|
2866
|
-
get(id: string): Promise<BaseCustomer<TExtended> | undefined>;
|
|
2867
|
-
/**
|
|
2868
|
-
* Retrieve a customer based on their identity attributes or CIAM claims.
|
|
2869
|
-
*
|
|
2870
|
-
* @param customer - The customer to lookup
|
|
2871
|
-
* @returns The customer if found, undefined otherwise
|
|
2872
|
-
*/
|
|
2873
|
-
lookup(customer: BaseCustomer<TExtended>): Promise<BaseCustomer<TExtended> | undefined>;
|
|
2874
|
-
/**
|
|
2875
|
-
* Create or update a customer in the store.
|
|
2876
|
-
*
|
|
2877
|
-
* @param customer - The customer data to store
|
|
2878
|
-
*/
|
|
2879
|
-
upsert(customer: BaseCustomer<TExtended>): Promise<BaseCustomer<TExtended>>;
|
|
2880
|
-
/**
|
|
2881
|
-
* Delete a customer by their unique identifier.
|
|
2882
|
-
*
|
|
2883
|
-
* @param id - The customer's unique identifier as defined by the store implementation
|
|
2884
|
-
* @returns The number of customers deleted (0 or 1)
|
|
2885
|
-
*/
|
|
2886
|
-
delete(id: string): Promise<number>;
|
|
2887
|
-
/**
|
|
2888
|
-
* List customers in the store with optional pagination and sort.
|
|
2889
|
-
*
|
|
2890
|
-
* @param options - Optional start (0-based), limit (page size), and sort
|
|
2891
|
-
* @returns ListResult with total, count, items, size, page, pages
|
|
2892
|
-
*/
|
|
2893
|
-
list(options?: ListOptions): Promise<ListResult<BaseCustomer<TExtended>>>;
|
|
2894
|
-
}
|
|
2895
|
-
/**
|
|
2896
3079
|
* Magic link data stored in the store.
|
|
2897
3080
|
*
|
|
2898
3081
|
* @template TExtended - Type-safe custom data that consumers can add to magic links
|
|
@@ -3760,7 +3943,7 @@ type FrameworkConfig = {
|
|
|
3760
3943
|
* enablement) are also stripped from code.
|
|
3761
3944
|
*/
|
|
3762
3945
|
type SSOConfigFromCode = Omit<SSOConfig, "loginUrl" | "userUrl" | "logoutUrl" | "logoutBackChannelUrl" | "refreshUrl" | "redirectUri">;
|
|
3763
|
-
type IAMConfigFromCode = Omit<IAMConfig, "usersUrl" | "groupsUrl" | "users" | "
|
|
3946
|
+
type IAMConfigFromCode = Omit<IAMConfig, "usersUrl" | "groupsUrl" | "workloadsUrl" | "customersUrl" | "users" | "workloads" | "customers" | "groups" | "discovery" | "deltaAudience"> & {
|
|
3764
3947
|
discovery?: Omit<IAMDiscoveryConfig, "basePath">;
|
|
3765
3948
|
};
|
|
3766
3949
|
type WorkloadServerConfigFromCode = Omit<Partial<WorkloadConfig>, "tokenUrl" | "validateUrl" | "jwksUrl" | "refreshUrl">;
|
|
@@ -4180,7 +4363,7 @@ type CIAMConfigFromCode<
|
|
|
4180
4363
|
TMagicLinkData = Record<string, never>,
|
|
4181
4364
|
TCustomerData = Record<string, never>
|
|
4182
4365
|
> = Omit<CIAMConfig<TMagicLinkData, TCustomerData>, "providers" | "customerLoginUrl" | "customerCallbackUrl" | "customerProvidersUrl">;
|
|
4183
|
-
/** Read Users and
|
|
4366
|
+
/** Read Users, Groups, Workloads, and Customers via the SCIM endpoints. */
|
|
4184
4367
|
declare const ION_IAM_READ: Permission;
|
|
4185
4368
|
/**
|
|
4186
4369
|
* Create, replace, modify (attribute changes), and delete Users via SCIM. Includes the access-root
|
|
@@ -4193,6 +4376,18 @@ declare const ION_IAM_USERS_WRITE: Permission;
|
|
|
4193
4376
|
* `/iam/Groups`.
|
|
4194
4377
|
*/
|
|
4195
4378
|
declare const ION_IAM_GROUPS_WRITE: Permission;
|
|
4379
|
+
/**
|
|
4380
|
+
* Create, replace, modify, and delete Workloads via SCIM. Gates write methods on `/iam/Workloads`.
|
|
4381
|
+
*/
|
|
4382
|
+
declare const ION_IAM_WORKLOADS_WRITE: Permission;
|
|
4383
|
+
/**
|
|
4384
|
+
* Create, replace, modify, and delete Customers via SCIM. Gates write methods on `/iam/Customers`.
|
|
4385
|
+
*/
|
|
4386
|
+
declare const ION_IAM_CUSTOMERS_WRITE: Permission;
|
|
4387
|
+
/**
|
|
4388
|
+
* Submit an on-behalf access request via `POST /iam/AccessRequests`. Gates the iam-request protocol.
|
|
4389
|
+
*/
|
|
4390
|
+
declare const ION_IAM_ACCESS_REQUESTS_WRITE: Permission;
|
|
4196
4391
|
/** Read the capability manifest at `${basePath}/capabilitiez` (diagnostic; dev/ECV only). */
|
|
4197
4392
|
declare const ION_CAPABILITIEZ_READ: Permission;
|
|
4198
4393
|
/** Mint customer magic-link login credentials via `POST ${basePath}/magic-link`. Grant narrowly. */
|
|
@@ -4210,10 +4405,11 @@ declare const ION_SDK_PERMISSIONS: readonly Permission[];
|
|
|
4210
4405
|
* The logical SDK endpoint operations that require authorization, mapped to the Permission and the
|
|
4211
4406
|
* principal scope to check. This is the single source of truth the router/guards consult so the
|
|
4212
4407
|
* enforcement contract lives in one place rather than scattered per route (AUDIT_HISTORY.md §1.32). The IAM
|
|
4213
|
-
* permission for a SCIM request is chosen from `iam.read` / `iam.users.write` / `iam.groups.write`
|
|
4214
|
-
*
|
|
4408
|
+
* permission for a SCIM request is chosen from `iam.read` / `iam.users.write` / `iam.groups.write` /
|
|
4409
|
+
* `iam.workloads.write` / `iam.customers.write` / `iam.access-requests.write` by resource + HTTP
|
|
4410
|
+
* method (no request-body introspection).
|
|
4215
4411
|
*/
|
|
4216
|
-
type EndpointOperation = "iam.read" | "iam.users.write" | "iam.groups.write" | "capabilitiez.read" | "ciam.magic-link.create" | "authz.oaa.sync" | "tenant.manage";
|
|
4412
|
+
type EndpointOperation = "iam.read" | "iam.users.write" | "iam.groups.write" | "iam.workloads.write" | "iam.customers.write" | "iam.access-requests.write" | "capabilitiez.read" | "ciam.magic-link.create" | "authz.oaa.sync" | "tenant.manage";
|
|
4217
4413
|
type EndpointPermission = {
|
|
4218
4414
|
permission: Permission;
|
|
4219
4415
|
subjectType: SubjectScope;
|
|
@@ -4783,19 +4979,19 @@ type Resource = AuthzEntityBase & {
|
|
|
4783
4979
|
/**
|
|
4784
4980
|
* AppDev-owned subject-type scoping shared by every catalog entitlement (group/role/permission).
|
|
4785
4981
|
*
|
|
4786
|
-
* - `assignableSubjectTypes` is the AppDev **veto**: the hard ceiling of
|
|
4787
|
-
* ever hold this entitlement. It is authored in application code and is
|
|
4788
|
-
* tool (projected through SCIM as a `readOnly` attribute).
|
|
4789
|
-
*
|
|
4790
|
-
*
|
|
4982
|
+
* - `assignableSubjectTypes` is the AppDev **veto**: the hard, required, non-empty ceiling of
|
|
4983
|
+
* principal kinds that may ever hold this entitlement. It is authored in application code and is
|
|
4984
|
+
* **read-only** to the IAM tool (projected through SCIM as a `readOnly` attribute). There is no
|
|
4985
|
+
* default-to-workforce and no unset-means-unrestricted: every entitlement declares its audience
|
|
4986
|
+
* explicitly. A grant whose `subjectType` is outside this set is rejected.
|
|
4791
4987
|
* - `recommendedSubjectTypes` is the AppDev **advisory default**: a (non-binding) subset of
|
|
4792
4988
|
* `assignableSubjectTypes` the IAM tool should default to. It is also read-only to IAM; the IAM
|
|
4793
4989
|
* tool is responsible for tracking changes to it over time. It MUST be a subset of
|
|
4794
4990
|
* `assignableSubjectTypes` (validated when the entitlement is authored).
|
|
4795
4991
|
*/
|
|
4796
4992
|
type SubjectTypeScoping = {
|
|
4797
|
-
/** AppDev veto:
|
|
4798
|
-
assignableSubjectTypes
|
|
4993
|
+
/** AppDev veto: required non-empty ceiling of principal kinds that may hold this entitlement (read-only to IAM). */
|
|
4994
|
+
assignableSubjectTypes: SubjectType[];
|
|
4799
4995
|
/** AppDev advisory default principal kinds; must be a subset of `assignableSubjectTypes` (read-only to IAM). */
|
|
4800
4996
|
recommendedSubjectTypes?: SubjectType[];
|
|
4801
4997
|
};
|
|
@@ -5020,20 +5216,21 @@ type SubjectType = "user" | "customer" | "workload";
|
|
|
5020
5216
|
*/
|
|
5021
5217
|
type SubjectScope = SubjectType | SubjectType[] | "any";
|
|
5022
5218
|
/**
|
|
5023
|
-
* Platform-wide ceiling of principal kinds the SDK
|
|
5024
|
-
*
|
|
5025
|
-
*
|
|
5026
|
-
*
|
|
5219
|
+
* Platform-wide ceiling of principal kinds the SDK allows to hold an entitlement. This is the
|
|
5220
|
+
* upper bound on {@link SubjectTypeScoping.assignableSubjectTypes}: every entitlement must declare
|
|
5221
|
+
* a non-empty audience that is a subset of these kinds. `customer` is grantable (AUDIT_HISTORY.md
|
|
5222
|
+
* §1.30 resolved); Apps still opt each entitlement in via an explicit audience.
|
|
5027
5223
|
*/
|
|
5028
5224
|
declare const PLATFORM_ASSIGNABLE_SUBJECT_TYPES: SubjectType[];
|
|
5029
5225
|
/**
|
|
5030
5226
|
* Validate an entitlement's {@link SubjectTypeScoping} at authoring time (fail closed):
|
|
5031
|
-
* -
|
|
5032
|
-
* -
|
|
5227
|
+
* - `assignableSubjectTypes` is required and non-empty,
|
|
5228
|
+
* - every entry must be within the platform ceiling, and
|
|
5229
|
+
* - `recommendedSubjectTypes` must be a subset of `assignableSubjectTypes` when set.
|
|
5033
5230
|
*
|
|
5034
|
-
* Throws an `Error` describing the first violation; returns void when valid
|
|
5035
|
-
*
|
|
5036
|
-
*
|
|
5231
|
+
* Throws an `Error` describing the first violation; returns void when valid. Used by the SDK's
|
|
5232
|
+
* catalog store wrapper and exported so custom stores can enforce the same contract before
|
|
5233
|
+
* persisting an app-authored catalog entry.
|
|
5037
5234
|
*/
|
|
5038
5235
|
declare function assertValidSubjectTypeScoping(entity: SubjectTypeScoping & {
|
|
5039
5236
|
id?: string;
|
|
@@ -5378,7 +5575,52 @@ type Authz = {
|
|
|
5378
5575
|
* is wired. Always run it off the request path.
|
|
5379
5576
|
*/
|
|
5380
5577
|
reconcile(): Promise<ReconcileReport>;
|
|
5578
|
+
/**
|
|
5579
|
+
* App-facing grant: audience + assignment-policy checks, then write the root and materialize the
|
|
5580
|
+
* index. IAM SCIM ingress does **not** use this path (it stays policy-exempt). Throws
|
|
5581
|
+
* {@link AssignmentPolicyError} when Ops forbids in-app assignment for the principal kind.
|
|
5582
|
+
*/
|
|
5583
|
+
grant(change: AccessChange): Promise<AccessChange>;
|
|
5584
|
+
/**
|
|
5585
|
+
* Submit an access request on a principal's behalf. Allowed only when that kind's assignment
|
|
5586
|
+
* policy is `'iam-request'`. Authenticated with the module-wide `deltaAudience` workload client.
|
|
5587
|
+
*/
|
|
5588
|
+
requestAccess(change: {
|
|
5589
|
+
subject: AccessChange["subject"];
|
|
5590
|
+
subjectType: SubjectType;
|
|
5591
|
+
targetType: EntitlementType;
|
|
5592
|
+
target: AccessChange["target"];
|
|
5593
|
+
justification?: string;
|
|
5594
|
+
}): Promise<{
|
|
5595
|
+
id: string;
|
|
5596
|
+
status: "pending" | "approved" | "denied";
|
|
5597
|
+
trackingUrl: string;
|
|
5598
|
+
}>;
|
|
5599
|
+
/**
|
|
5600
|
+
* App-facing revoke of a granted root. Does not re-check assignment policy (removing access is
|
|
5601
|
+
* always allowed from the app once the root exists).
|
|
5602
|
+
*/
|
|
5603
|
+
revoke(change: AccessChange): Promise<void>;
|
|
5381
5604
|
};
|
|
5605
|
+
/**
|
|
5606
|
+
* Ops-owned assignment policy for one principal kind (`RemoteConfig.iam.{users,workloads,customers}.assignment`).
|
|
5607
|
+
*
|
|
5608
|
+
* - `'app'` — the application may assign access; delta notifies IAM.
|
|
5609
|
+
* - `'iam'` — never assign in-app; show a request link (or a read-only entitlement table).
|
|
5610
|
+
* - `'iam-request'` — never assign in-app; the app submits a request on the principal's behalf via
|
|
5611
|
+
* {@link Authz.requestAccess}.
|
|
5612
|
+
*/
|
|
5613
|
+
type IamAssignmentPolicy = "app" | "iam" | "iam-request";
|
|
5614
|
+
/**
|
|
5615
|
+
* Thrown by {@link Authz.grant} when the Ops-owned assignment policy forbids in-app assignment.
|
|
5616
|
+
* `requestUrl` is the IAM-written entitlement receipt when one exists, so the app can send the
|
|
5617
|
+
* caller to the request page without catching a generic error.
|
|
5618
|
+
*/
|
|
5619
|
+
declare class AssignmentPolicyError extends Error {
|
|
5620
|
+
readonly policy: IamAssignmentPolicy;
|
|
5621
|
+
readonly requestUrl?: string;
|
|
5622
|
+
constructor(message: string, policy: IamAssignmentPolicy, requestUrl?: string);
|
|
5623
|
+
}
|
|
5382
5624
|
/** Why an {@link AccessCheckResult} resolved the way it did. */
|
|
5383
5625
|
type AccessCheckReason = "ok" | "unauthenticated" | "forbidden" | "not_configured";
|
|
5384
5626
|
/**
|
|
@@ -5419,21 +5661,7 @@ declare function trustedClientPermissionsForPrincipal(authz: AuthzConfig | null
|
|
|
5419
5661
|
* OAA full sync — they are NEVER written to a store or materialized into the AccessIndex.
|
|
5420
5662
|
*/
|
|
5421
5663
|
declare function configTrustedClientGrants(authz: AuthzConfig | null | undefined): AccessChange[];
|
|
5422
|
-
|
|
5423
|
-
* Resolve an access subject/target/resource reference (a string id or an object carrying one) to its
|
|
5424
|
-
* canonical, trimmed string id. This is the single id-resolution rule shared across the authz stack
|
|
5425
|
-
* (AUDIT_HISTORY.md §8.4): `accessRootId`, the access stores, the access index, and SCIM diff keys all key off
|
|
5426
|
-
* the same normalization so distinct roots never collapse and identical references never diverge.
|
|
5427
|
-
* Returns `''` when no id can be resolved.
|
|
5428
|
-
*/
|
|
5429
|
-
declare function accessRefId(value: unknown): string;
|
|
5430
|
-
/**
|
|
5431
|
-
* Deterministic id for a granted root. Includes the resource scope so that two grants of the same
|
|
5432
|
-
* subject/target with different scopes are tracked as distinct roots. Application-wide scope (the
|
|
5433
|
-
* default, or `applyToApplication`) collapses to the `app` scope key.
|
|
5434
|
-
*/
|
|
5435
|
-
declare function accessRootId(change: AccessChange): string;
|
|
5436
|
-
type CapabilityKey = "sso.login" | "sso.jit" | "sso.logout" | "sso.back_channel_logout" | "ciam.magic_link" | "ciam.oidc_login" | "ciam.customer" | "ciam.logout" | "iam.users" | "iam.groups" | "workload.incoming" | "workload.outgoing" | "authz.oaa";
|
|
5664
|
+
type CapabilityKey = "sso.login" | "sso.jit" | "sso.logout" | "sso.back_channel_logout" | "ciam.magic_link" | "ciam.oidc_login" | "ciam.customer" | "ciam.logout" | "iam.users" | "iam.groups" | "iam.workloads" | "iam.customers" | "workload.incoming" | "workload.outgoing" | "authz.oaa";
|
|
5437
5665
|
type CapabilityEndpointUrls = {
|
|
5438
5666
|
readyzUrl: string;
|
|
5439
5667
|
capabilitiezUrl: string;
|
|
@@ -5453,6 +5681,8 @@ type CapabilityEndpointUrls = {
|
|
|
5453
5681
|
basePath: string;
|
|
5454
5682
|
usersUrl: string;
|
|
5455
5683
|
groupsUrl: string;
|
|
5684
|
+
workloadsUrl: string;
|
|
5685
|
+
customersUrl: string;
|
|
5456
5686
|
};
|
|
5457
5687
|
ciam: {
|
|
5458
5688
|
magicLinkUrl: string;
|
|
@@ -5633,6 +5863,17 @@ declare function list<T>(total: number, items: T[], start: number, limit: number
|
|
|
5633
5863
|
*/
|
|
5634
5864
|
declare function listGenerator<T>(listFn: (start: number, limit: number) => Promise<ListResult<T>>, processItem?: (item: T) => Promise<T | void>, pageSize?: number): AsyncGenerator<T>;
|
|
5635
5865
|
/**
|
|
5866
|
+
* Apply the shared principal-list filter fields. Unknown fields are ignored by callers that
|
|
5867
|
+
* only pass a subset. `userName` matches `userName` or, for workloads, `clientId`.
|
|
5868
|
+
*/
|
|
5869
|
+
declare function matchesListFilter(item: {
|
|
5870
|
+
requestable?: boolean;
|
|
5871
|
+
userName?: string;
|
|
5872
|
+
clientId?: string;
|
|
5873
|
+
externalId?: string;
|
|
5874
|
+
updatedAt?: Date;
|
|
5875
|
+
}, filter: ListFilter | undefined): boolean;
|
|
5876
|
+
/**
|
|
5636
5877
|
* Wrap an authored catalog entity with non-enumerable readiness observers tied to a background
|
|
5637
5878
|
* persistence write. The returned object is the entity itself (same reference), so it can be used
|
|
5638
5879
|
* synchronously and embedded as an {@link AccessRef} while persistence proceeds.
|
|
@@ -5824,4 +6065,4 @@ type LfvErrorResponse = {
|
|
|
5824
6065
|
};
|
|
5825
6066
|
/** Generates a ULID */
|
|
5826
6067
|
declare function generateULID(prefix?: string): string;
|
|
5827
|
-
export { workloadTokenResponseSchema, 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, matchTenantPath, listGenerator, list, jwtAssertionClaimsSchema, isStoreConflictError, isEcid, isConfigSourceError, isConfigLocator, isCodeCatalog, infoLogger, idTokenClaimsSchema, groupResourceSchema, getCodeCatalogEntity, generateULID, formatEcid, deprecateRetiredCodeCatalogRows, defineSecretType, defineCatalog, defaultSecretContentType, defaultLogger, deepEqualPlain, decodeUser, debugLogger, 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, User as ScimUser, ScimServiceProviderConfig, ScimSchemaDefinition, ScimSchemaAttributeDefinition, Role2 as ScimRole, ScimResult, ScimResourceTypeSchemaExtension, ScimResourceType, ScimMutationSummary, ScimListResponse, Group2 as ScimGroup, ScimError, 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, 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, IamDeltaResourceType, IamDeltaReconcileResult, IamDeltaReconcileInput, IamDeltaMode, IamDeltaEmitter, ION_TENANT_MANAGE, ION_SDK_PERMISSIONS, ION_SCIM_USER_EXTENSION_URN, ION_IAM_USERS_WRITE, ION_IAM_READ, ION_IAM_GROUPS_WRITE, ION_ENDPOINT_PERMISSIONS, ION_CIAM_MAGIC_LINK_CREATE, ION_CAPABILITIEZ_READ, ION_AUTHZ_OAA_SYNC, ION_AUTHZ_GROUP_SCHEMA, IAMValidators, IAMUsersInbound, IAMInboundUsersConfig, IAMInboundUserContext, IAMHandlerConfig, IAMGroupsOutbound, IAMGroupsInbound, IAMDiscoveryHandlerConfig, IAMDiscoveryContext, IAMDiscoveryConfig, IAMConfigFromCode, IAMConfig, IAMAppValidators, IAMAppRegistry, 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, ApplicationValidators, Address, AccessStatus, AccessRef, AccessProvenance, AccessMutationStatus, AccessMutationResult, AccessIndex, AccessCheckTarget, AccessCheckResult, AccessCheckReason, AccessChange, AccessCatalogStore, AccessAssignmentStore };
|
|
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 };
|