@ionite/core 0.0.23-beta.20260814.1 → 0.0.23-beta.20260820.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 +202 -174
- package/dist/index.js +1 -1
- package/dist/server.d.ts +248 -205
- package/dist/server.js +1 -1
- package/dist/shared/core-15896f6h.js +4 -0
- package/package.json +1 -1
- package/dist/shared/core-ymmjvtpm.js +0 -4
package/dist/index.d.ts
CHANGED
|
@@ -504,12 +504,11 @@ declare const warnLogger: Logger;
|
|
|
504
504
|
/** Synchronous, in-memory read surface for one code catalog entity kind. */
|
|
505
505
|
type CodeCatalogNamespace<TEntity> = {
|
|
506
506
|
get(id: string): TEntity | undefined;
|
|
507
|
-
getByExternalId(externalId: string): TEntity | undefined;
|
|
508
507
|
list(): readonly TEntity[];
|
|
509
508
|
};
|
|
510
509
|
/**
|
|
511
510
|
* Normalized, frozen code-declared catalog produced by {@link defineCatalog}. All entities are
|
|
512
|
-
* deep-frozen
|
|
511
|
+
* deep-frozen and id-indexed.
|
|
513
512
|
*/
|
|
514
513
|
type CodeCatalog = {
|
|
515
514
|
groups: CodeCatalogNamespace<Group>;
|
|
@@ -526,6 +525,7 @@ type CodeCatalogInput = {
|
|
|
526
525
|
declare function isCodeCatalog(value: CodeCatalog | CodeCatalogInput): value is CodeCatalog;
|
|
527
526
|
/** Normalize an `authz.catalog` config value: pass through a {@link CodeCatalog}, build one from input. */
|
|
528
527
|
declare function toCodeCatalog(value: CodeCatalog | CodeCatalogInput): CodeCatalog;
|
|
528
|
+
type CatalogEntityKind = "group" | "role" | "permission";
|
|
529
529
|
/**
|
|
530
530
|
* Build a validated, frozen {@link CodeCatalog} from declarative arrays. Call it once at module
|
|
531
531
|
* scope in a pure authz module (no store imports) and wire the result via
|
|
@@ -533,33 +533,52 @@ declare function toCodeCatalog(value: CodeCatalog | CodeCatalogInput): CodeCatal
|
|
|
533
533
|
*
|
|
534
534
|
* Validation (throws {@link Error} at module evaluation on the first violation):
|
|
535
535
|
* - ids are globally unique across groups, roles, AND permissions (one SCIM Groups id space);
|
|
536
|
-
* - `externalId`s (after defaulting to `id`) are globally unique (SCIM `externalId eq` contract);
|
|
537
536
|
* - every group -> group/role/permission reference (string id or embedded object) resolves to an
|
|
538
537
|
* entity declared in the catalog arrays, and every role -> permission reference likewise
|
|
539
538
|
* (`resources` refs are NOT validated here — resources live in the app's `ResourceProvider`);
|
|
540
539
|
* - nested group composition is acyclic;
|
|
541
540
|
* - `recommendedSubjectTypes` is a subset of `assignableSubjectTypes`.
|
|
542
541
|
*
|
|
543
|
-
* Side effects:
|
|
544
|
-
* entity (and its arrays/metadata) is frozen.
|
|
542
|
+
* Side effects: every entity (and its arrays/metadata) is frozen.
|
|
545
543
|
*/
|
|
546
544
|
declare function defineCatalog(input: CodeCatalogInput): CodeCatalog;
|
|
545
|
+
/** Resolve one code entity and its kind from the shared id space. */
|
|
546
|
+
declare function getCodeCatalogEntity(code: CodeCatalog | undefined, id: string): {
|
|
547
|
+
entity: Group | Role | Permission;
|
|
548
|
+
kind: CatalogEntityKind;
|
|
549
|
+
} | undefined;
|
|
550
|
+
/** Return the entity namespace for one catalog kind. */
|
|
551
|
+
declare function catalogEntityStore<TEntity extends Group | Role | Permission>(catalog: AccessCatalogStore, kind: CatalogEntityKind): EntityStore<TEntity>;
|
|
552
|
+
/**
|
|
553
|
+
* Merge a materialized row with its code template. The row owns presentation, receipts, lifecycle,
|
|
554
|
+
* and other runtime metadata; code owns ids, subject scoping, and graph/resource structure.
|
|
555
|
+
*/
|
|
556
|
+
declare function mergeCodeCatalogEntity<TEntity extends Group | Role | Permission>(kind: CatalogEntityKind, code: TEntity, stored: TEntity): TEntity;
|
|
557
|
+
/**
|
|
558
|
+
* Insert a code template into the runtime catalog only when no row exists. Existing rows are never
|
|
559
|
+
* rewritten, preserving IAM-renamed presentation and receipts. `insertIfAbsent` closes the race
|
|
560
|
+
* between the initial read and insert.
|
|
561
|
+
*/
|
|
562
|
+
declare function materializeCodeCatalogEntity<TEntity extends Group | Role | Permission>(kind: CatalogEntityKind, code: TEntity, store: EntityStore<TEntity>): Promise<TEntity>;
|
|
563
|
+
/**
|
|
564
|
+
* Mark materialized code rows as deprecated when their template no longer exists. Callers choose
|
|
565
|
+
* when to run this lifecycle sweep; it never runs during config apply.
|
|
566
|
+
*/
|
|
567
|
+
declare function deprecateRetiredCodeCatalogRows(code: CodeCatalog | undefined, store: AccessCatalogStore, onlyId?: string): Promise<void>;
|
|
547
568
|
/**
|
|
548
|
-
* {@link AccessCatalogStore}-shaped
|
|
549
|
-
*
|
|
550
|
-
*
|
|
551
|
-
* without ever being stored. Returns undefined when neither source is wired.
|
|
569
|
+
* {@link AccessCatalogStore}-shaped read union over code templates and the runtime store. Store rows
|
|
570
|
+
* win presentation for code ids, code owns their structure, and unmaterialized code entities remain
|
|
571
|
+
* visible. Returns undefined when neither source is wired.
|
|
552
572
|
*/
|
|
553
573
|
declare function unionCatalogRead(code: CodeCatalog | undefined, store: AccessCatalogStore | undefined): AccessCatalogStore | undefined;
|
|
554
574
|
import { StandardSchemaV1 as StandardSchemaV15 } from "@standard-schema/spec";
|
|
555
575
|
/**
|
|
556
|
-
* IAM delta egress mode (RemoteConfig/ECI intent). Selects how
|
|
557
|
-
* application are surfaced to the enterprise's IAM/governance layer:
|
|
576
|
+
* IAM delta egress mode (RemoteConfig/ECI intent). Selects how IAM-visible runtime changes that
|
|
577
|
+
* occur inside the application are surfaced to the enterprise's IAM/governance layer:
|
|
558
578
|
*
|
|
559
|
-
* - `'patch'`: outbound SCIM into the IAM tool (per-resource PATCH/
|
|
560
|
-
*
|
|
561
|
-
*
|
|
562
|
-
* enterprise's policy to handle). See the README "IAM delta egress" section.
|
|
579
|
+
* - `'patch'`: outbound SCIM into the IAM tool (per-resource POST/PUT/PATCH/DELETE,
|
|
580
|
+
* correlated by the App-owned id carried as SCIM `externalId`). The IAM tool's view stays fresh as users, materialized entitlement
|
|
581
|
+
* definitions, and access change in the app. See the README "IAM delta egress" section.
|
|
563
582
|
*
|
|
564
583
|
* Origin/trust: every push is authenticated with the app's outgoing workload client (OAuth bearer);
|
|
565
584
|
* the receiver treats the authenticated workload identity as the verified origin. Audit
|
|
@@ -570,55 +589,65 @@ import { StandardSchemaV1 as StandardSchemaV15 } from "@standard-schema/spec";
|
|
|
570
589
|
type IamDeltaMode = "patch";
|
|
571
590
|
/** SCIM resource types the delta patch adapter addresses. */
|
|
572
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
|
+
};
|
|
573
599
|
/**
|
|
574
|
-
*
|
|
575
|
-
*
|
|
576
|
-
* `tenantId` for multi-tenant isolation.
|
|
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.
|
|
577
602
|
*/
|
|
578
|
-
type
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
};
|
|
585
|
-
/**
|
|
586
|
-
* Durable cache of `externalId -> destination provider id` so the patch adapter resolves a resource
|
|
587
|
-
* once and reuses the id for subsequent writes (steady state = one write call, no lookup). The cache
|
|
588
|
-
* is self-healing: a stale id (destination 404/410) is re-resolved via an externalId filter and the
|
|
589
|
-
* mapping refreshed. The SDK NEVER resolves a destination resource by any attribute other than
|
|
590
|
-
* `externalId`.
|
|
591
|
-
*/
|
|
592
|
-
interface IamDeltaIdMapStore {
|
|
593
|
-
get(key: IamDeltaIdMapKey): Promise<string | undefined>;
|
|
594
|
-
set(key: IamDeltaIdMapKey, providerId: string): Promise<void>;
|
|
595
|
-
delete(key: IamDeltaIdMapKey): Promise<void>;
|
|
596
|
-
}
|
|
597
|
-
/** Result of an app-driven full reconcile (re-push of all active roots). */
|
|
603
|
+
type IamDeltaReconcileInput = {
|
|
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). */
|
|
598
611
|
type IamDeltaReconcileResult = {
|
|
599
612
|
pushed: number;
|
|
600
613
|
skipped: number;
|
|
601
614
|
errors: string[];
|
|
602
615
|
};
|
|
603
616
|
/**
|
|
604
|
-
* Projects
|
|
605
|
-
*
|
|
606
|
-
*
|
|
607
|
-
*
|
|
608
|
-
*
|
|
609
|
-
*
|
|
610
|
-
*
|
|
617
|
+
* Projects observed runtime mutations to the configured IAM delta destination. The invariant is:
|
|
618
|
+
* every runtime mutation the SDK observes that would change what IAM full sync shows must also
|
|
619
|
+
* egress through this handle. That includes users, materialized entitlement definitions, and access
|
|
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.
|
|
611
626
|
*
|
|
612
627
|
* Readiness follows the shared contract: `isReady()` is a synchronous check; `ready(timeout?)`
|
|
613
628
|
* resolves once the emitter first becomes usable.
|
|
614
629
|
*/
|
|
615
630
|
interface IamDeltaEmitter {
|
|
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>;
|
|
616
639
|
/** Project a granted root; resolves on completion (or immediately when not ready), rejects on push failure. */
|
|
617
640
|
onGrant(change: AccessChange): Promise<void>;
|
|
618
641
|
/** Project a revoked root; resolves on completion (or immediately when not ready), rejects on push failure. */
|
|
619
642
|
onRevoke(change: AccessChange): Promise<void>;
|
|
620
|
-
/** Re-push
|
|
621
|
-
reconcile(
|
|
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>;
|
|
622
651
|
isReady(): boolean;
|
|
623
652
|
ready(timeout?: number): Promise<void>;
|
|
624
653
|
}
|
|
@@ -1651,7 +1680,7 @@ interface WorkloadGetToken {
|
|
|
1651
1680
|
/**
|
|
1652
1681
|
* Workload Identity Authentication Interface
|
|
1653
1682
|
*/
|
|
1654
|
-
type Workload = WorkloadConfig & ModuleReadiness & {
|
|
1683
|
+
type Workload = WorkloadConfig & ModuleReadiness & Required<Pick<ModuleReadiness, "isReady" | "ready">> & {
|
|
1655
1684
|
/**
|
|
1656
1685
|
* Returns a token for this workload configuration.
|
|
1657
1686
|
* The optional argument overrides the configured default scope.
|
|
@@ -1737,6 +1766,11 @@ type IAMConfig = {
|
|
|
1737
1766
|
*/
|
|
1738
1767
|
inboundUsers?: IAMInboundUsersConfig;
|
|
1739
1768
|
/**
|
|
1769
|
+
* FrameworkConfig-only fallback that mints an IAM-owned deep link where access to an entitlement
|
|
1770
|
+
* can be requested. A `requestUrl` written back into the catalog row by IAM takes precedence.
|
|
1771
|
+
*/
|
|
1772
|
+
entitlementRequestUrl?: (entitlement: Entitlement, type: EntitlementType, context: IAMEntitlementRequestUrlContext) => string | undefined;
|
|
1773
|
+
/**
|
|
1740
1774
|
* Optional handler defaults. These are merged with per-call overrides in
|
|
1741
1775
|
* `iam.handler`, with per-call values taking precedence.
|
|
1742
1776
|
*/
|
|
@@ -1759,10 +1793,10 @@ type IAMConfig = {
|
|
|
1759
1793
|
* RemoteConfig/ECI intent: how access changes that occur inside the application are surfaced to the
|
|
1760
1794
|
* enterprise IAM/governance layer. Not configurable from application code.
|
|
1761
1795
|
*
|
|
1762
|
-
* `'patch'`: outbound SCIM into the IAM tool keyed
|
|
1763
|
-
* destination base and `deltaAudience` for the outgoing workload client).
|
|
1764
|
-
*
|
|
1765
|
-
*
|
|
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.
|
|
1766
1800
|
*
|
|
1767
1801
|
* When omitted, delta egress is disabled. The SDK only emits the signal; the enterprise's IAM
|
|
1768
1802
|
* tooling owns the response (flag, auto-revoke + notify, or audit). See `IamDeltaMode`.
|
|
@@ -1773,12 +1807,6 @@ type IAMConfig = {
|
|
|
1773
1807
|
* pushes to the destination (`url`). When omitted, the default workload server token is used.
|
|
1774
1808
|
*/
|
|
1775
1809
|
deltaAudience?: string;
|
|
1776
|
-
/**
|
|
1777
|
-
* Durable externalId -> destination provider-id mapping store for `delta:'patch'`. Wired by the
|
|
1778
|
-
* application via `FrameworkStores.deltaIdMapStore` (a code/runtime capability, not a secret), so
|
|
1779
|
-
* the patch adapter resolves each resource once and reuses the id thereafter.
|
|
1780
|
-
*/
|
|
1781
|
-
deltaIdMapStore?: IamDeltaIdMapStore;
|
|
1782
1810
|
};
|
|
1783
1811
|
/**
|
|
1784
1812
|
* Per-endpoint enablement flag carried in RemoteConfig (Ops/ECI intent).
|
|
@@ -1786,6 +1814,10 @@ type IAMConfig = {
|
|
|
1786
1814
|
type IAMEndpointFlag = {
|
|
1787
1815
|
enabled?: boolean;
|
|
1788
1816
|
};
|
|
1817
|
+
type IAMEntitlementRequestUrlContext = {
|
|
1818
|
+
request: Request;
|
|
1819
|
+
tenantId?: string;
|
|
1820
|
+
};
|
|
1789
1821
|
type IAMValidators = {
|
|
1790
1822
|
user: StandardSchemaV15<unknown, User>;
|
|
1791
1823
|
group: StandardSchemaV15<unknown, GroupResource>;
|
|
@@ -1936,9 +1968,9 @@ interface CreateUserOptions {
|
|
|
1936
1968
|
*/
|
|
1937
1969
|
interface CreateGroupOptions {
|
|
1938
1970
|
/**
|
|
1939
|
-
*
|
|
1971
|
+
* App-owned identifier for the group. Sent to the provider as SCIM `externalId`.
|
|
1940
1972
|
*/
|
|
1941
|
-
|
|
1973
|
+
id?: string;
|
|
1942
1974
|
/**
|
|
1943
1975
|
* Initial members to add to the group
|
|
1944
1976
|
*/
|
|
@@ -2082,12 +2114,10 @@ type KmsAllocationPolicy = {
|
|
|
2082
2114
|
/** Grace period during which a gracefully rotated key remains accepted. Defaults to 300 seconds. */
|
|
2083
2115
|
overlapSeconds?: number;
|
|
2084
2116
|
};
|
|
2085
|
-
/**
|
|
2117
|
+
/** Key-material document stored by the vault. Operational assignment and policy state is external. */
|
|
2086
2118
|
type KmsPoolControlDocument = {
|
|
2087
2119
|
kind: "kms";
|
|
2088
2120
|
keys: KmsKey[];
|
|
2089
|
-
assignments: Record<string, string>;
|
|
2090
|
-
policy?: KmsAllocationPolicy;
|
|
2091
2121
|
};
|
|
2092
2122
|
/** ConfigSource-owned pointer to a KMS pool document. */
|
|
2093
2123
|
type KmsPoolConfig = {
|
|
@@ -2125,7 +2155,7 @@ type Kms = ModuleReadiness & {
|
|
|
2125
2155
|
};
|
|
2126
2156
|
/** Parse and fail closed on a personalized KMS pool document. */
|
|
2127
2157
|
declare function parseKmsPoolDocument(value: unknown): KmsPoolDocument;
|
|
2128
|
-
/** Parse and fail closed on a
|
|
2158
|
+
/** Parse and fail closed on a vault-stored KMS key-material document. */
|
|
2129
2159
|
declare function parseKmsPoolControlDocument(value: unknown): KmsPoolControlDocument;
|
|
2130
2160
|
type OtelSignalName = "traces" | "metrics" | "logs";
|
|
2131
2161
|
type OtelProtocol = "http/protobuf" | "http/json";
|
|
@@ -2878,6 +2908,7 @@ type InferSecretType<TType> = TType extends SecretTypeDescriptor<infer T> ? T :
|
|
|
2878
2908
|
declare function defineSecretType<T>(input: SecretTypeInput<T> & {
|
|
2879
2909
|
schema: StandardSchemaV17<unknown, T>;
|
|
2880
2910
|
}): SecretTypeDescriptor<T>;
|
|
2911
|
+
declare function defineSecretType<T>(input: SecretTypeInput<T>): SecretTypeDescriptor<T>;
|
|
2881
2912
|
declare function defineSecretType(input: SecretTypeInput<unknown>): SecretTypeDescriptor<unknown>;
|
|
2882
2913
|
declare function defaultSecretContentType(format?: SecretFormat): SecretContentType;
|
|
2883
2914
|
/** Raised before decoding when a stored secret does not match the requested runtime contract. */
|
|
@@ -2906,7 +2937,7 @@ type MetaData = {
|
|
|
2906
2937
|
path: string;
|
|
2907
2938
|
version: number;
|
|
2908
2939
|
created: Date;
|
|
2909
|
-
/** Absent on
|
|
2940
|
+
/** Persisted write contract. Absent only on records written before type became mandatory. */
|
|
2910
2941
|
contentType?: SecretContentType;
|
|
2911
2942
|
};
|
|
2912
2943
|
type SecretsSourceType = "vault" | "azure" | "aws" | "gcp" | "dev";
|
|
@@ -2930,8 +2961,8 @@ type SecretsOperationOptions = {
|
|
|
2930
2961
|
timeout?: number;
|
|
2931
2962
|
};
|
|
2932
2963
|
type SecretsWriteOptions = SecretsOperationOptions & {
|
|
2933
|
-
/** Content contract stored with the secret and returned by all transports. */
|
|
2934
|
-
contentType
|
|
2964
|
+
/** Content contract stored with the secret and returned by all transports. Required on every write. */
|
|
2965
|
+
contentType: SecretContentType;
|
|
2935
2966
|
};
|
|
2936
2967
|
type SecretHandle = {
|
|
2937
2968
|
/** Reads the canonical textual representation. Binary secrets reject this accessor. */
|
|
@@ -2963,7 +2994,7 @@ type LfvCallbackHeaders = {
|
|
|
2963
2994
|
signature: string;
|
|
2964
2995
|
};
|
|
2965
2996
|
/**
|
|
2966
|
-
* Original LFV callback bytes and signature headers
|
|
2997
|
+
* Original LFV callback bytes and signature headers handed between App processes. Consumers
|
|
2967
2998
|
* MUST independently verify this envelope against their own configured `verifyJwks`; the transport
|
|
2968
2999
|
* is never a signature trust anchor.
|
|
2969
3000
|
*/
|
|
@@ -2971,20 +3002,17 @@ type LfvCallbackEnvelope = {
|
|
|
2971
3002
|
kind: LfvCallbackKind;
|
|
2972
3003
|
/** Normalized `serverUrl|path` routing key. */
|
|
2973
3004
|
key: string;
|
|
2974
|
-
/** Random process/source identity used to suppress transport echo. */
|
|
2975
|
-
originId: string;
|
|
2976
3005
|
rawBody: string;
|
|
2977
3006
|
headers: LfvCallbackHeaders;
|
|
2978
3007
|
};
|
|
2979
|
-
type LfvCallbackEnvelopeListener = (envelope: LfvCallbackEnvelope) => void | Promise<void>;
|
|
2980
3008
|
/**
|
|
2981
|
-
* Cross-process
|
|
2982
|
-
*
|
|
2983
|
-
*
|
|
3009
|
+
* Cross-process, single-consume mailbox for signed LFV OTP callbacks. The process that receives a
|
|
3010
|
+
* callback with no local waiter parks it by request id; the process that initiated the operation
|
|
3011
|
+
* takes it. TTL is mandatory so abandoned OTPs cannot accumulate.
|
|
2984
3012
|
*/
|
|
2985
3013
|
type LfvCallbackTransport = {
|
|
2986
|
-
|
|
2987
|
-
|
|
3014
|
+
put(requestId: string, envelope: LfvCallbackEnvelope, ttlMs: number): Promise<void>;
|
|
3015
|
+
take(requestId: string): Promise<LfvCallbackEnvelope | undefined>;
|
|
2988
3016
|
};
|
|
2989
3017
|
/** Framework-only LFV runtime wiring. Live transports MUST never be supplied by RemoteConfig. */
|
|
2990
3018
|
type FrameworkLfvConfig = {
|
|
@@ -3000,7 +3028,7 @@ type SecretsSource = ReactiveHandle & ModuleReadiness & {
|
|
|
3000
3028
|
* Write a secret at the given path.
|
|
3001
3029
|
* Implementations may throw for read-only or unsupported secret sources.
|
|
3002
3030
|
*/
|
|
3003
|
-
putSecret: (path: string, value: Record<string, unknown>, options
|
|
3031
|
+
putSecret: (path: string, value: Record<string, unknown>, options: SecretsWriteOptions) => Promise<void>;
|
|
3004
3032
|
/**
|
|
3005
3033
|
* When set, the secret source supports change detection, reads the current value first, and calls onChange
|
|
3006
3034
|
* immediately with that value before watching for changes.
|
|
@@ -3069,7 +3097,7 @@ type Secrets = ModuleReadiness & {
|
|
|
3069
3097
|
/** Reads full secret data + metadata from a named secrets source client. */
|
|
3070
3098
|
getFullSecret<T>(sourceName: string, path: string, options?: SecretsOperationOptions): Promise<Secret<T>>;
|
|
3071
3099
|
/** Writes a secret to a named secrets source client. */
|
|
3072
|
-
putSecret(sourceName: string, path: string, value: Record<string, unknown>, options
|
|
3100
|
+
putSecret(sourceName: string, path: string, value: Record<string, unknown>, options: SecretsWriteOptions): Promise<void>;
|
|
3073
3101
|
/** Deletes a secret from a named secrets source client. */
|
|
3074
3102
|
deleteSecret(sourceName: string, path: string, options?: SecretsOperationOptions): Promise<void>;
|
|
3075
3103
|
/** Lists child paths under a base path for a named secrets source client. */
|
|
@@ -3320,7 +3348,7 @@ type AzureSecretsConfig = {
|
|
|
3320
3348
|
*/
|
|
3321
3349
|
ttl?: number;
|
|
3322
3350
|
};
|
|
3323
|
-
type ConfigSourceType = "vault" | "azure" | "aws" | "gcp";
|
|
3351
|
+
type ConfigSourceType = "vault" | "azure" | "aws" | "gcp" | "mirror";
|
|
3324
3352
|
type ConfigSourceEnv = {
|
|
3325
3353
|
ION_CONFIG_TYPE?: ConfigSourceType;
|
|
3326
3354
|
ION_VAULT_URL?: string;
|
|
@@ -3336,6 +3364,7 @@ type ConfigSourceEnv = {
|
|
|
3336
3364
|
ION_VAULT_LFV_DELIVERY_ENDPOINT?: string;
|
|
3337
3365
|
ION_VAULT_LFV_VERIFY_JWKS?: string;
|
|
3338
3366
|
ION_VAULT_LFV_EVENTS_ENDPOINT?: string;
|
|
3367
|
+
ION_VAULT_LFV_PATH?: string;
|
|
3339
3368
|
ION_VAULT_LFV_DELIVERY_TIMEOUT?: string;
|
|
3340
3369
|
ION_VAULT_LFV_RETRY_INTERVAL?: string;
|
|
3341
3370
|
ION_VAULT_LFV_WARN_INTERVAL?: string;
|
|
@@ -3360,6 +3389,8 @@ type ConfigSourceEnv = {
|
|
|
3360
3389
|
ION_AWS_WEBHOOK_URL?: string;
|
|
3361
3390
|
ION_AWS_TTL?: string;
|
|
3362
3391
|
ION_GCP_TTL?: string;
|
|
3392
|
+
/** Complete upstream ConfigLocator for `ION_CONFIG_TYPE=mirror`, using existing names after this prefix. */
|
|
3393
|
+
[key: `ION_FROM_${string}`]: string | undefined;
|
|
3363
3394
|
};
|
|
3364
3395
|
type VaultConfigLocator = {
|
|
3365
3396
|
type: "vault";
|
|
@@ -3411,30 +3442,18 @@ type GcpConfigLocator = {
|
|
|
3411
3442
|
type: "gcp";
|
|
3412
3443
|
gcpTtl?: number;
|
|
3413
3444
|
};
|
|
3414
|
-
type
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
* - `source` (optional): the name of a declared source in `ion.secrets`. When omitted, `ion.secret`
|
|
3421
|
-
* (the default config-source-backed client) is used.
|
|
3422
|
-
* - `path`: the tenant-specific secret path within that source.
|
|
3423
|
-
* - `ttl` (optional): poll interval (ms) for the tenant config subscription.
|
|
3424
|
-
*
|
|
3425
|
-
* This keeps credentials/connection wiring on the root Ionite (ConfigSource-owned) and out of the tenant
|
|
3426
|
-
* store, and forces apps to declare their secrets sources up front rather than spinning them up
|
|
3427
|
-
* ad-hoc per tenant.
|
|
3428
|
-
*/
|
|
3429
|
-
type TenantConfigLocator = {
|
|
3430
|
-
source?: string;
|
|
3431
|
-
path: string;
|
|
3432
|
-
ttl?: number;
|
|
3445
|
+
type MirrorConfigLocator = {
|
|
3446
|
+
type: "mirror";
|
|
3447
|
+
/** Authoritative upstream. Nested mirrors are rejected by runtime validation. */
|
|
3448
|
+
from: ConfigLocator;
|
|
3449
|
+
/** App-owned, write-capable mirror destination. */
|
|
3450
|
+
to: VaultConfigLocator;
|
|
3433
3451
|
};
|
|
3452
|
+
type ConfigLocator = VaultConfigLocator | AwsConfigLocator | AzureConfigLocator | GcpConfigLocator | MirrorConfigLocator;
|
|
3434
3453
|
/**
|
|
3435
|
-
* Minimal handle needed to materialize a
|
|
3436
|
-
* Structurally satisfied by an `Ionite` instance (`ion`): the default `secret` client plus
|
|
3437
|
-
*
|
|
3454
|
+
* Minimal handle needed to materialize a config source from an already-configured secrets source.
|
|
3455
|
+
* Structurally satisfied by an `Ionite` instance (`ion`): the default `secret` client plus optional
|
|
3456
|
+
* named `secrets` sources.
|
|
3438
3457
|
*/
|
|
3439
3458
|
type ConfigSourceResolver = {
|
|
3440
3459
|
secret: SecretsSource;
|
|
@@ -3519,24 +3538,22 @@ type AuthzConfig = {
|
|
|
3519
3538
|
*/
|
|
3520
3539
|
trustedProvisioningClients?: TrustedProvisioningClient[];
|
|
3521
3540
|
/**
|
|
3522
|
-
* Code-declared catalog (Framework-only; a ConfigSource can never supply it).
|
|
3523
|
-
*
|
|
3524
|
-
*
|
|
3525
|
-
*
|
|
3526
|
-
*
|
|
3527
|
-
* `defineCatalog(...)` result; validated/normalized at config apply. See `defineCatalog`.
|
|
3541
|
+
* Code-declared catalog (Framework-only; a ConfigSource can never supply it). Supplies structural
|
|
3542
|
+
* templates for code-authored groups/roles/permissions. Entries remain readable before
|
|
3543
|
+
* materialization, then `catalogStore` rows own runtime presentation and IAM receipts while code
|
|
3544
|
+
* continues to own structure. Accepts declarative arrays or a `defineCatalog(...)` result;
|
|
3545
|
+
* validated/normalized at config apply. See `defineCatalog`.
|
|
3528
3546
|
*/
|
|
3529
3547
|
catalog?: CodeCatalog | CodeCatalogInput;
|
|
3530
|
-
/**
|
|
3548
|
+
/** Runtime authority for grantable entitlement definitions, presentation, lifecycle, and IAM receipts. */
|
|
3531
3549
|
catalogStore?: AccessCatalogStore;
|
|
3532
3550
|
/** Granted roots (source of truth) used by SCIM/IAM orchestration and OAA projection. */
|
|
3533
3551
|
accessStore?: AccessAssignmentStore;
|
|
3534
3552
|
/** Derived closure index for fast `has*` checks; materialized from accessStore + catalogStore. */
|
|
3535
3553
|
accessIndex?: AccessIndex;
|
|
3536
3554
|
/**
|
|
3537
|
-
* Read-through provider over the application's own resource data (teams, projects, ...)
|
|
3538
|
-
*
|
|
3539
|
-
* {@link ResourceProvider}.
|
|
3555
|
+
* Read-through provider over the application's own resource data (teams, projects, ...). The SDK
|
|
3556
|
+
* never stores resources itself; see {@link ResourceProvider}.
|
|
3540
3557
|
*/
|
|
3541
3558
|
resources?: ResourceProvider;
|
|
3542
3559
|
/**
|
|
@@ -3716,7 +3733,7 @@ type FrameworkStores = {
|
|
|
3716
3733
|
customerStore?: CustomerStore<unknown>;
|
|
3717
3734
|
accessStore?: AccessAssignmentStore<unknown>;
|
|
3718
3735
|
accessIndex?: AccessIndex;
|
|
3719
|
-
/** Code-declared catalog
|
|
3736
|
+
/** Code-declared structural catalog templates. See `AuthzConfig.catalog`. */
|
|
3720
3737
|
catalog?: CodeCatalog | CodeCatalogInput;
|
|
3721
3738
|
catalogStore?: AccessCatalogStore;
|
|
3722
3739
|
/** Read-through {@link ResourceProvider} over the app's own resource data (never SDK-stored). */
|
|
@@ -3729,11 +3746,6 @@ type FrameworkStores = {
|
|
|
3729
3746
|
* provisioned/assigned access (`subjectType: 'workload'`). Authorization works without it.
|
|
3730
3747
|
*/
|
|
3731
3748
|
workloadIdentityStore?: WorkloadIdentityStore<unknown>;
|
|
3732
|
-
/**
|
|
3733
|
-
* Durable externalId -> destination provider-id cache for IAM delta `'patch'` egress. Optional; when
|
|
3734
|
-
* absent, `delta:'patch'` reports not-ready (the adapter requires a mapping store).
|
|
3735
|
-
*/
|
|
3736
|
-
deltaIdMapStore?: IamDeltaIdMapStore;
|
|
3737
3749
|
};
|
|
3738
3750
|
type ModifiableFrameworkConfig = FrameworkConfig & {
|
|
3739
3751
|
setStores(stores: FrameworkStores): void;
|
|
@@ -4201,16 +4213,16 @@ type CreateTenantRequestBase = {
|
|
|
4201
4213
|
companyId: string;
|
|
4202
4214
|
companyName: string;
|
|
4203
4215
|
environmentType: EnvironmentType;
|
|
4204
|
-
/**
|
|
4205
|
-
configLocator
|
|
4216
|
+
/** Optional until the tenant's ConfigSource has been provisioned. */
|
|
4217
|
+
configLocator?: ConfigLocator;
|
|
4206
4218
|
email?: string;
|
|
4207
4219
|
webhookUrl?: string;
|
|
4208
4220
|
callbackUrl?: string;
|
|
4209
4221
|
};
|
|
4210
4222
|
/**
|
|
4211
|
-
* Body for creating a tenant (`POST ${basePath}`).
|
|
4212
|
-
*
|
|
4213
|
-
* re-applies the record (safe for provisioning retries).
|
|
4223
|
+
* Body for creating a tenant (`POST ${basePath}`). `configLocator` may be supplied immediately or
|
|
4224
|
+
* patched later after the tenant's ConfigSource has been provisioned. Idempotent by `id`:
|
|
4225
|
+
* re-submitting the same `id` re-applies the record (safe for provisioning retries).
|
|
4214
4226
|
*/
|
|
4215
4227
|
type CreateTenantRequest<TExtended extends object = object> = CreateTenantRequestBase & TExtended;
|
|
4216
4228
|
/**
|
|
@@ -4223,7 +4235,7 @@ type UpdateTenantRequest<TExtended extends object = object> = {
|
|
|
4223
4235
|
companyId?: string;
|
|
4224
4236
|
companyName?: string;
|
|
4225
4237
|
environmentType?: EnvironmentType;
|
|
4226
|
-
configLocator?:
|
|
4238
|
+
configLocator?: ConfigLocator;
|
|
4227
4239
|
email?: string;
|
|
4228
4240
|
webhookUrl?: string;
|
|
4229
4241
|
callbackUrl?: string;
|
|
@@ -4300,14 +4312,12 @@ type BaseTenant = {
|
|
|
4300
4312
|
createdAt: Date;
|
|
4301
4313
|
updatedAt: Date;
|
|
4302
4314
|
/**
|
|
4303
|
-
* Serializable
|
|
4304
|
-
*
|
|
4305
|
-
*
|
|
4306
|
-
* runtime presence guard.
|
|
4315
|
+
* Serializable descriptor used to materialize this tenant's ConfigSource. Tenant-management
|
|
4316
|
+
* payloads must contain only credential-free locator fields. Optional until vault/config-source
|
|
4317
|
+
* integration completes; runtime construction must reject or remain unavailable while absent.
|
|
4307
4318
|
*/
|
|
4308
|
-
configLocator
|
|
4319
|
+
configLocator?: ConfigLocator;
|
|
4309
4320
|
};
|
|
4310
|
-
type TenantFactory<TTenant extends BaseTenant = BaseTenant> = (tenant: TTenant) => Ionite;
|
|
4311
4321
|
/**
|
|
4312
4322
|
* A single-flight cache of per-tenant {@link Ionite} instances, supplied by the app.
|
|
4313
4323
|
*
|
|
@@ -4379,6 +4389,14 @@ type BaseUser<TExtended = object> = BaseUserFields & {
|
|
|
4379
4389
|
*/
|
|
4380
4390
|
externalId?: string;
|
|
4381
4391
|
/**
|
|
4392
|
+
* Optional destination service-provider id captured after IAM materializes this user.
|
|
4393
|
+
*/
|
|
4394
|
+
providerId?: string;
|
|
4395
|
+
/**
|
|
4396
|
+
* Optional IAM-owned deep link associated with this user receipt.
|
|
4397
|
+
*/
|
|
4398
|
+
requestUrl?: string;
|
|
4399
|
+
/**
|
|
4382
4400
|
* Optional Enterprise Controlled ID: a system-of-record-owned identity correlator formatted as
|
|
4383
4401
|
* `ecid:<realm>:<opaque>` (realm = the minting authority's id). Correlates this account to a
|
|
4384
4402
|
* single identity across systems. Minted by the enterprise SOR (via an ECI), never by the app;
|
|
@@ -4553,6 +4571,11 @@ interface UserStore<TExtended = object> {
|
|
|
4553
4571
|
*/
|
|
4554
4572
|
get(id: string): Promise<BaseUser<TExtended> | undefined>;
|
|
4555
4573
|
/**
|
|
4574
|
+
* Optional secondary-index lookup for the stable enterprise correlation key. Implementations that
|
|
4575
|
+
* omit it remain correct; callers fall back to paged `list()` scans.
|
|
4576
|
+
*/
|
|
4577
|
+
getByExternalId?(externalId: string): Promise<BaseUser<TExtended> | undefined>;
|
|
4578
|
+
/**
|
|
4556
4579
|
* Retrieve a user based on their SCIM attributes or SSO JWT Claims.
|
|
4557
4580
|
*
|
|
4558
4581
|
* @param user - The user to lookup by SCIM attributes or SSO JWT Claims
|
|
@@ -4588,7 +4611,12 @@ type AuthzEntityBase = {
|
|
|
4588
4611
|
name: string;
|
|
4589
4612
|
displayName?: string;
|
|
4590
4613
|
description: string;
|
|
4591
|
-
|
|
4614
|
+
/** Destination service-provider id captured after IAM materializes this entitlement. */
|
|
4615
|
+
providerId?: string;
|
|
4616
|
+
/** Provenance of the durable catalog row. Code entries are materialized with `source: 'code'`. */
|
|
4617
|
+
source?: "code" | "app" | "scim";
|
|
4618
|
+
/** A retired entitlement may be deleted by IAM after its grants have been removed. */
|
|
4619
|
+
deprecated?: boolean;
|
|
4592
4620
|
metadata?: Record<string, unknown>;
|
|
4593
4621
|
};
|
|
4594
4622
|
type Resource = AuthzEntityBase & {
|
|
@@ -4618,6 +4646,8 @@ type SubjectTypeScoping = {
|
|
|
4618
4646
|
type Permission = AuthzEntityBase & SubjectTypeScoping & {
|
|
4619
4647
|
/** True when this catalog entry should be exposed as requestable access in IAM tooling. */
|
|
4620
4648
|
requestable?: boolean;
|
|
4649
|
+
/** IAM-owned deep link where a principal can request this entitlement, when the destination provides one. */
|
|
4650
|
+
requestUrl?: string;
|
|
4621
4651
|
action?: string;
|
|
4622
4652
|
/** Canonical OAA permission types (maps to OAA `permission_type`). */
|
|
4623
4653
|
permissionTypes?: string[];
|
|
@@ -4629,12 +4659,16 @@ type Permission = AuthzEntityBase & SubjectTypeScoping & {
|
|
|
4629
4659
|
type Role = AuthzEntityBase & SubjectTypeScoping & {
|
|
4630
4660
|
/** True when this catalog entry should be exposed as requestable access in IAM tooling. */
|
|
4631
4661
|
requestable?: boolean;
|
|
4662
|
+
/** IAM-owned deep link where a principal can request this entitlement, when the destination provides one. */
|
|
4663
|
+
requestUrl?: string;
|
|
4632
4664
|
/** Permissions this role confers (definitional). Roles are flat bundles — OAA has no nested-role edge. */
|
|
4633
4665
|
permissions?: Array<string | Permission>;
|
|
4634
4666
|
};
|
|
4635
4667
|
type Group = AuthzEntityBase & SubjectTypeScoping & {
|
|
4636
4668
|
/** True when this catalog entry should be exposed as requestable access in IAM tooling. */
|
|
4637
4669
|
requestable?: boolean;
|
|
4670
|
+
/** IAM-owned deep link where a principal can request this entitlement, when the destination provides one. */
|
|
4671
|
+
requestUrl?: string;
|
|
4638
4672
|
/** Nested child groups composed into this group (definitional). */
|
|
4639
4673
|
groups?: Array<string | Group>;
|
|
4640
4674
|
/** Roles this group confers (group is the principal). Projected as OAA `local_group` role assignments. */
|
|
@@ -4667,6 +4701,14 @@ type AuthzScimGroupType = OaaAccessTargetType;
|
|
|
4667
4701
|
type AuthzScimGroupExtension = {
|
|
4668
4702
|
type?: AuthzScimGroupType;
|
|
4669
4703
|
requestable?: boolean;
|
|
4704
|
+
/** Destination service-provider id written back by IAM. */
|
|
4705
|
+
providerId?: string;
|
|
4706
|
+
/** IAM-owned deep link for requesting this entitlement. Writable by IAM. */
|
|
4707
|
+
requestUrl?: string;
|
|
4708
|
+
/** Catalog-row provenance. Read-only to IAM. */
|
|
4709
|
+
source?: "code" | "app" | "scim";
|
|
4710
|
+
/** Whether the entitlement has been retired and can be deleted. Read-only to IAM. */
|
|
4711
|
+
deprecated?: boolean;
|
|
4670
4712
|
description?: string;
|
|
4671
4713
|
/** Resource ids this entitlement is scoped to (the catalog `Group.resources` binding, by id). */
|
|
4672
4714
|
resources?: string[];
|
|
@@ -4702,23 +4744,22 @@ interface EntityStore<TEntity> {
|
|
|
4702
4744
|
* durability guarantee is required (e.g. SCIM write-through).
|
|
4703
4745
|
*/
|
|
4704
4746
|
set(entity: TEntity): ReadyAccessCatalogEntry<TEntity>;
|
|
4705
|
-
delete(id: string): Promise<void>;
|
|
4706
|
-
list(options?: ListOptions): Promise<ListResult<TEntity>>;
|
|
4707
4747
|
/**
|
|
4708
|
-
*
|
|
4709
|
-
*
|
|
4710
|
-
*
|
|
4711
|
-
* that omit it fall back to scanning `list()`.
|
|
4748
|
+
* Atomic insert-if-absent operation. Catalog materialization uses this so concurrent IAM
|
|
4749
|
+
* presentation edits can never be overwritten by a late code-template insert. Returns the
|
|
4750
|
+
* existing row when one already exists.
|
|
4712
4751
|
*/
|
|
4713
|
-
|
|
4752
|
+
insertIfAbsent(entity: TEntity): ReadyAccessCatalogEntry<TEntity>;
|
|
4753
|
+
delete(id: string): Promise<void>;
|
|
4754
|
+
list(options?: ListOptions): Promise<ListResult<TEntity>>;
|
|
4714
4755
|
}
|
|
4715
4756
|
/** The catalog entity kind a {@link CatalogChange} refers to. */
|
|
4716
4757
|
type CatalogChangeKind = OaaAccessTargetType;
|
|
4717
4758
|
/**
|
|
4718
4759
|
* A reactive catalog change emitted AFTER a durable `set()`/`delete()` lands on the backing store.
|
|
4719
|
-
* `set` carries the persisted entity
|
|
4720
|
-
*
|
|
4721
|
-
*
|
|
4760
|
+
* `set` carries the persisted entity and prior value (`undefined` on insert); `delete` carries the
|
|
4761
|
+
* removed entity so downstream projections can delete the matching provider resource after the
|
|
4762
|
+
* local row is gone. A later full sync remains the reconciliation safety net.
|
|
4722
4763
|
*
|
|
4723
4764
|
* Resource changes are NOT catalog changes: resources live in the application's own store and are
|
|
4724
4765
|
* signaled through {@link ResourceProvider.changed} instead.
|
|
@@ -4727,10 +4768,11 @@ type CatalogChange = {
|
|
|
4727
4768
|
op: "set";
|
|
4728
4769
|
kind: CatalogChangeKind;
|
|
4729
4770
|
entity: Group | Role | Permission;
|
|
4771
|
+
previous: Group | Role | Permission | undefined;
|
|
4730
4772
|
} | {
|
|
4731
4773
|
op: "delete";
|
|
4732
4774
|
kind: CatalogChangeKind;
|
|
4733
|
-
|
|
4775
|
+
entity: Group | Role | Permission;
|
|
4734
4776
|
};
|
|
4735
4777
|
/** Listener invoked with a {@link CatalogChange} after a durable catalog write lands. */
|
|
4736
4778
|
type CatalogChangeListener = (change: CatalogChange) => void;
|
|
@@ -4740,9 +4782,8 @@ type AccessCatalogStore = {
|
|
|
4740
4782
|
permissions: EntityStore<Permission>;
|
|
4741
4783
|
/**
|
|
4742
4784
|
* Reactive change subscription (the catalog analog of {@link ReactiveHandle}). When implemented,
|
|
4743
|
-
* the SDK subscribes once at wiring time and projects each change to OAA
|
|
4744
|
-
*
|
|
4745
|
-
* unsubscribe function.
|
|
4785
|
+
* the SDK subscribes once at wiring time and projects each change to OAA and ready IAM delta.
|
|
4786
|
+
* Stores that omit it rely on later full sync/reconcile. Returns an unsubscribe function.
|
|
4746
4787
|
*/
|
|
4747
4788
|
afterChange?(listener: CatalogChangeListener): () => void;
|
|
4748
4789
|
};
|
|
@@ -4759,20 +4800,8 @@ type ResourceChangeListener = (change: ResourceChange) => void;
|
|
|
4759
4800
|
* Resources are app-domain rows the application already persists in its own database/ORM — they are
|
|
4760
4801
|
* NOT authorization state, so the SDK never stores a copy. Instead the app wires a `ResourceProvider`
|
|
4761
4802
|
* (via `FrameworkStores.resources` / `AuthzConfig.resources`) and the SDK reads through it for
|
|
4762
|
-
* closure expansion
|
|
4763
|
-
*
|
|
4764
|
-
* signal) is the whole integration.
|
|
4765
|
-
*
|
|
4766
|
-
* **Resource-derived entitlements.** `entitlements(resource)` is an app-authored PURE function that
|
|
4767
|
-
* derives the per-resource requestable entitlement {@link Group}s (e.g. "Team X (member)") on demand.
|
|
4768
|
-
* Unlike catalog entitlements (definitions authored as rows in the {@link AccessCatalogStore}),
|
|
4769
|
-
* resource-derived groups are rules, not rows: their definitions are never stored, they appear in
|
|
4770
|
-
* SCIM Groups list/get and OAA projection automatically, and member grants against their ids expand
|
|
4771
|
-
* with the group's `resources` scope like any catalog group (grants against both kinds are stored
|
|
4772
|
-
* identically as access roots). Keep the function next to your catalog entitlement definitions so the
|
|
4773
|
-
* logic stays grep-able and debuggable — it is plain code the SDK calls, not configuration.
|
|
4774
|
-
* `entitlement(id)` is the deliberate, app-authored reverse resolver (derived group id -> group);
|
|
4775
|
-
* both must be provided together.
|
|
4803
|
+
* resource-scoped closure expansion and OAA projection. Grantable entitlements are durable
|
|
4804
|
+
* {@link AccessCatalogStore} rows; resource providers no longer synthesize entitlement definitions.
|
|
4776
4805
|
*/
|
|
4777
4806
|
type ResourceProvider = {
|
|
4778
4807
|
/** Point lookup by resource id (e.g. `'team:t1'`). */
|
|
@@ -4785,22 +4814,9 @@ type ResourceProvider = {
|
|
|
4785
4814
|
*/
|
|
4786
4815
|
children?(id: string): Promise<Resource[]>;
|
|
4787
4816
|
/**
|
|
4788
|
-
* Pure, synchronous derivation of a resource's requestable entitlement {@link Group}s. Called on
|
|
4789
|
-
* demand (results are memoized alongside catalog adjacency and invalidated by `changed`); must be
|
|
4790
|
-
* deterministic for a given resource. Requires `entitlement` to be provided as well.
|
|
4791
|
-
*/
|
|
4792
|
-
entitlements?(resource: Resource): Group[];
|
|
4793
|
-
/**
|
|
4794
|
-
* Reverse resolution of a resource-derived entitlement id to its {@link Group} (or `undefined`
|
|
4795
|
-
* when the id is not a resource-derived entitlement). App-authored on purpose — the id scheme is
|
|
4796
|
-
* the app's, and an explicit resolver keeps derivation traceable. Required when `entitlements` is
|
|
4797
|
-
* provided.
|
|
4798
|
-
*/
|
|
4799
|
-
entitlement?(id: string): Promise<Group | undefined>;
|
|
4800
|
-
/**
|
|
4801
4817
|
* Change signal invoked after the app's own resource write/delete lands. Drives adjacency-cache
|
|
4802
|
-
* invalidation, targeted index reconciliation, and incremental OAA resource projection. Returns
|
|
4803
|
-
* unsubscribe function. Without it, drift is only repaired by a later full reconcile/sync.
|
|
4818
|
+
* invalidation, targeted index reconciliation, and incremental OAA resource projection. Returns
|
|
4819
|
+
* an unsubscribe function. Without it, drift is only repaired by a later full reconcile/sync.
|
|
4804
4820
|
*/
|
|
4805
4821
|
changed?(listener: ResourceChangeListener): () => void;
|
|
4806
4822
|
};
|
|
@@ -5157,6 +5173,10 @@ type ReconcileReport = {
|
|
|
5157
5173
|
*/
|
|
5158
5174
|
type Authz = {
|
|
5159
5175
|
oaa: OaaClient;
|
|
5176
|
+
/** Read the effective catalog union (materialized rows plus unmaterialized code templates). */
|
|
5177
|
+
entitlements: {
|
|
5178
|
+
list(options?: ListOptions): Promise<ListResult<Entitlement>>;
|
|
5179
|
+
};
|
|
5160
5180
|
/** The wired closure index powering `has*`, when the app provided one via stores. */
|
|
5161
5181
|
accessIndex?: AccessIndex;
|
|
5162
5182
|
has(subject: AccessRef<BaseUser>, targetType: OaaAccessTargetType, target: AccessRef<Group | Role | Permission>, resource?: AccessRef<Resource>, subjectType?: SubjectType): Promise<AuthzDecision>;
|
|
@@ -5452,6 +5472,14 @@ declare function listGenerator<T>(listFn: (start: number, limit: number) => Prom
|
|
|
5452
5472
|
*/
|
|
5453
5473
|
declare function readyCatalogEntry<TEntity extends object>(entity: TEntity, write: Promise<void>): ReadyAccessCatalogEntry<TEntity>;
|
|
5454
5474
|
/**
|
|
5475
|
+
* Persisted content contract for an ionite RemoteConfig document.
|
|
5476
|
+
*
|
|
5477
|
+
* The descriptor intentionally omits a runtime schema because applications may extend validation
|
|
5478
|
+
* through their configured Standard Schema validators. Use `toRegistryEntry()` when writing the
|
|
5479
|
+
* secret so the serializable content metadata travels across Vault, WebSocket, and LFV transports.
|
|
5480
|
+
*/
|
|
5481
|
+
declare const remoteConfigSecretType: SecretTypeDescriptor<RemoteConfig>;
|
|
5482
|
+
/**
|
|
5455
5483
|
* Typed store-layer conflict (§5.9). Persistence stores throw this instead of a generic `Error` when
|
|
5456
5484
|
* a create/uniqueness invariant is violated, so callers (SCIM, iam-delta, app code) can distinguish a
|
|
5457
5485
|
* genuine conflict (map to HTTP 409, do not retry blindly) from a transient store/network failure
|
|
@@ -5609,4 +5637,4 @@ type LfvErrorResponse = {
|
|
|
5609
5637
|
};
|
|
5610
5638
|
/** Generates a ULID */
|
|
5611
5639
|
declare function generateULID(prefix?: string): string;
|
|
5612
|
-
export { workloadTokenResponseSchema, withValidate, warnLogger, waitOn, version, validationFailureResponse, userSchema, unionCatalogRead, trustedClientPermissionsForPrincipal, trimTrailingSlash, tokenResponseSchema, toCodeCatalog, stripJsonComments, stableConfigHash, silentLogger, serializeConfig, readyCatalogEntry, parseKmsPoolDocument, parseKmsPoolControlDocument, parseJsonc, parseEcid, oidcCallbackSchema, normalizeTenantRoutingStrategy, normalizeTenantPathNamespace, must, mergeConfig, matchTenantPath, listGenerator, list, jwtAssertionClaimsSchema, isStoreConflictError, isEcid, isConfigSourceError, isConfigLocator, isCodeCatalog, infoLogger, idTokenClaimsSchema, groupResourceSchema, generateULID, formatEcid, defineSecretType, defineCatalog, defaultSecretContentType, defaultLogger, deepEqualPlain, decodeUser, debugLogger, configTrustedClientGrants, claimsToUser, buildTenantPath, assertValidSubjectTypeScoping, 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,
|
|
5640
|
+
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, 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, KmsPoolListener, KmsPoolDocument, KmsPoolControlDocument, KmsPoolConfig, KmsPool, KmsKeyState, KmsKey, KmsConfig, KmsAllocationStrategy, KmsAllocationPolicy, 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 };
|