@wildo-ai/saas-backend-lib 1.1.1 → 1.1.3
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/esm/applications/services/worker-remote-client-factory.backend.service.d.ts.map +1 -1
- package/dist/esm/applications/services/worker-remote-client-factory.backend.service.js +19 -1
- package/dist/esm/applications/services/worker-remote-client-factory.backend.service.js.map +1 -1
- package/dist/esm/base-classes/models/manual-controllers.backend.definition.d.ts.map +1 -1
- package/dist/esm/base-classes/models/manual-controllers.backend.definition.js +4 -0
- package/dist/esm/base-classes/models/manual-controllers.backend.definition.js.map +1 -1
- package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.d.ts +35 -0
- package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.js +111 -0
- package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.d.ts +50 -0
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.js +199 -0
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.d.ts +111 -0
- package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.d.ts.map +1 -1
- package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.js +140 -0
- package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.js.map +1 -1
- package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.d.ts +14 -3
- package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.js +138 -24
- package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.d.ts +3 -1
- package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.js +8 -3
- package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/field-clearing-partition.backend.d.ts +11 -0
- package/dist/esm/base-classes/services/repositories/field-clearing-partition.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/field-clearing-partition.backend.js +11 -2
- package/dist/esm/base-classes/services/repositories/field-clearing-partition.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.d.ts +124 -13
- package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.js +207 -21
- package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.d.ts +60 -8
- package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.js +174 -26
- package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.d.ts +48 -4
- package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.js +102 -30
- package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.d.ts +55 -0
- package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.d.ts.map +1 -0
- package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.js +114 -0
- package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.js.map +1 -0
- package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.d.ts +89 -14
- package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.js +84 -11
- package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/odata-query-compiler.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/odata-query-compiler.backend.js +16 -0
- package/dist/esm/base-classes/services/repositories/http-api/odata-query-compiler.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.d.ts +20 -6
- package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.js +96 -32
- package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-repository.backend.service.d.ts +3 -1
- package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-repository.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-repository.backend.service.js +32 -7
- package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-repository.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-source.backend.port.d.ts +8 -5
- package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-source.backend.port.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-source.backend.port.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.d.ts +80 -0
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.js +298 -23
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.d.ts +71 -1
- package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.js +85 -5
- package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.d.ts +21 -0
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.js +146 -4
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.d.ts +22 -0
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-implementation-coverage.backend.utils.d.ts +3 -26
- package/dist/esm/base-classes/services/services/resource-operation-implementation-coverage.backend.utils.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-implementation-coverage.backend.utils.js +3 -68
- package/dist/esm/base-classes/services/services/resource-operation-implementation-coverage.backend.utils.js.map +1 -1
- package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.js +4 -1
- package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.d.ts +11 -0
- package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.js +39 -5
- package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.js.map +1 -1
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.d.ts +181 -2
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.js +533 -43
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/services/system-access.backend.service.d.ts +36 -3
- package/dist/esm/base-classes/services/services/system-access.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/system-access.backend.service.js +70 -8
- package/dist/esm/base-classes/services/services/system-access.backend.service.js.map +1 -1
- package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.d.ts +28 -0
- package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.js +90 -0
- package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.js.map +1 -0
- package/dist/esm/billing/batches/usage-flush.batch.backend.service.d.ts +44 -0
- package/dist/esm/billing/batches/usage-flush.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/batches/usage-flush.batch.backend.service.js +99 -0
- package/dist/esm/billing/batches/usage-flush.batch.backend.service.js.map +1 -0
- package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.d.ts +91 -0
- package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.d.ts.map +1 -0
- package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.js +152 -0
- package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.js.map +1 -0
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.d.ts +186 -0
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.js +474 -0
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.js.map +1 -0
- package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.d.ts +100 -0
- package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.js +209 -6
- package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.js.map +1 -1
- package/dist/esm/billing/services/back-office/usage-metering.backend.service.d.ts +200 -4
- package/dist/esm/billing/services/back-office/usage-metering.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/back-office/usage-metering.backend.service.js +593 -64
- package/dist/esm/billing/services/back-office/usage-metering.backend.service.js.map +1 -1
- package/dist/esm/billing/services/billing-adapter-registry.backend.d.ts +36 -0
- package/dist/esm/billing/services/billing-adapter-registry.backend.d.ts.map +1 -0
- package/dist/esm/billing/services/billing-adapter-registry.backend.js +83 -0
- package/dist/esm/billing/services/billing-adapter-registry.backend.js.map +1 -0
- package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.d.ts +9 -0
- package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.d.ts.map +1 -1
- package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.js +11 -1
- package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.js +54 -13
- package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.d.ts +38 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.js +67 -2
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.d.ts +30 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.js +43 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.d.ts +11 -3
- package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.js +30 -16
- package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.js +104 -25
- package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.d.ts +18 -1
- package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.js +106 -2
- package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.js.map +1 -1
- package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.d.ts +52 -0
- package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.d.ts.map +1 -0
- package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.js +74 -0
- package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.js.map +1 -0
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.d.ts +104 -11
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.js +260 -26
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.js.map +1 -1
- package/dist/esm/billing/testing/mock-billing-provider.d.ts +30 -1
- package/dist/esm/billing/testing/mock-billing-provider.d.ts.map +1 -1
- package/dist/esm/billing/testing/mock-billing-provider.js +25 -0
- package/dist/esm/billing/testing/mock-billing-provider.js.map +1 -1
- package/dist/esm/compliance/audit-trails/batches/audit-logs-archive.batch.backend.service.js +11 -4
- package/dist/esm/compliance/audit-trails/batches/audit-logs-archive.batch.backend.service.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.d.ts +263 -13
- package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.js +376 -58
- package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.d.ts +264 -7
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.js +414 -5
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/composite-audit-log-sink.backend.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/composite-audit-log-sink.backend.js +7 -1
- package/dist/esm/compliance/audit-trails/services/composite-audit-log-sink.backend.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.d.ts +16 -0
- package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.js +140 -0
- package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.d.ts +42 -0
- package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.js +65 -6
- package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.d.ts +110 -0
- package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.d.ts.map +1 -0
- package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.js +192 -0
- package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.js.map +1 -0
- package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.js +45 -0
- package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.js.map +1 -1
- package/dist/esm/config/bootstrap/application-runtime-profile.backend.d.ts +5 -0
- package/dist/esm/config/bootstrap/application-runtime-profile.backend.d.ts.map +1 -1
- package/dist/esm/config/bootstrap/application-runtime-profile.backend.js +6 -0
- package/dist/esm/config/bootstrap/application-runtime-profile.backend.js.map +1 -1
- package/dist/esm/config/custom/application-config-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/config/custom/application-config-controller.backend.service.js +7 -1
- package/dist/esm/config/custom/application-config-controller.backend.service.js.map +1 -1
- package/dist/esm/config/models/app-config.backend.schemas.d.ts +146 -46
- package/dist/esm/config/models/app-config.backend.schemas.d.ts.map +1 -1
- package/dist/esm/config/models/app-config.backend.schemas.js +121 -12
- package/dist/esm/config/models/app-config.backend.schemas.js.map +1 -1
- package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.d.ts +38 -15
- package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.d.ts.map +1 -1
- package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.js +17 -2
- package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.js.map +1 -1
- package/dist/esm/config/services/app-configuration-loader.backend.service.d.ts +0 -1
- package/dist/esm/config/services/app-configuration-loader.backend.service.d.ts.map +1 -1
- package/dist/esm/config/services/app-configuration-loader.backend.service.js +68 -76
- package/dist/esm/config/services/app-configuration-loader.backend.service.js.map +1 -1
- package/dist/esm/config/services/app-configuration.backend.service.d.ts.map +1 -1
- package/dist/esm/config/services/app-configuration.backend.service.js +23 -1
- package/dist/esm/config/services/app-configuration.backend.service.js.map +1 -1
- package/dist/esm/config/services/app-configuration.backend.utils.d.ts +43 -1
- package/dist/esm/config/services/app-configuration.backend.utils.d.ts.map +1 -1
- package/dist/esm/config/services/app-configuration.backend.utils.js +52 -3
- package/dist/esm/config/services/app-configuration.backend.utils.js.map +1 -1
- package/dist/esm/config/services/application-startup-config-validator.backend.service.d.ts +25 -0
- package/dist/esm/config/services/application-startup-config-validator.backend.service.d.ts.map +1 -1
- package/dist/esm/config/services/application-startup-config-validator.backend.service.js +41 -1
- package/dist/esm/config/services/application-startup-config-validator.backend.service.js.map +1 -1
- package/dist/esm/data-seeding/services/shared/data-seed-scope-iteration.shared.utils.d.ts +2 -2
- package/dist/esm/data-seeding/services/shared/data-seed-scope-iteration.shared.utils.js +2 -2
- package/dist/esm/data-seeding/services/shared/data-seed-scope-iteration.shared.utils.js.map +1 -1
- package/dist/esm/databases/models/filter.backend.schemas.js +2 -2
- package/dist/esm/databases/models/filter.backend.schemas.js.map +1 -1
- package/dist/esm/databases/services/aggregation/aggregation-authorization.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/aggregation/aggregation-authorization.backend.service.js +20 -1
- package/dist/esm/databases/services/aggregation/aggregation-authorization.backend.service.js.map +1 -1
- package/dist/esm/databases/services/postgresql-schema-plan-diff.backend.d.ts.map +1 -1
- package/dist/esm/databases/services/postgresql-schema-plan-diff.backend.js +48 -0
- package/dist/esm/databases/services/postgresql-schema-plan-diff.backend.js.map +1 -1
- package/dist/esm/databases/services/redis.service.d.ts +27 -0
- package/dist/esm/databases/services/redis.service.d.ts.map +1 -1
- package/dist/esm/databases/services/redis.service.js +29 -0
- package/dist/esm/databases/services/redis.service.js.map +1 -1
- package/dist/esm/errors/services/error-builder.backend.service.d.ts +13 -1
- package/dist/esm/errors/services/error-builder.backend.service.d.ts.map +1 -1
- package/dist/esm/errors/services/error-builder.backend.service.js +13 -1
- package/dist/esm/errors/services/error-builder.backend.service.js.map +1 -1
- package/dist/esm/errors/services/error-handler.backend.service.d.ts +70 -7
- package/dist/esm/errors/services/error-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/errors/services/error-handler.backend.service.js +134 -8
- package/dist/esm/errors/services/error-handler.backend.service.js.map +1 -1
- package/dist/esm/errors/services/rate-limit.backend.service.d.ts +66 -0
- package/dist/esm/errors/services/rate-limit.backend.service.d.ts.map +1 -1
- package/dist/esm/errors/services/rate-limit.backend.service.js +102 -25
- package/dist/esm/errors/services/rate-limit.backend.service.js.map +1 -1
- package/dist/esm/errors/utils/error-log-level-classification.backend.utils.d.ts +5 -0
- package/dist/esm/errors/utils/error-log-level-classification.backend.utils.d.ts.map +1 -1
- package/dist/esm/errors/utils/error-log-level-classification.backend.utils.js +25 -0
- package/dist/esm/errors/utils/error-log-level-classification.backend.utils.js.map +1 -1
- package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.d.ts +33 -0
- package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.d.ts.map +1 -1
- package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.js +40 -0
- package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.js.map +1 -1
- package/dist/esm/external-data/controllers/external-data-admin.backend.contracts.d.ts +41 -0
- package/dist/esm/external-data/controllers/external-data-admin.backend.contracts.d.ts.map +1 -0
- package/dist/esm/external-data/controllers/external-data-admin.backend.contracts.js +40 -0
- package/dist/esm/external-data/controllers/external-data-admin.backend.contracts.js.map +1 -0
- package/dist/esm/external-data/controllers/external-data-admin.backend.controller.d.ts +64 -0
- package/dist/esm/external-data/controllers/external-data-admin.backend.controller.d.ts.map +1 -0
- package/dist/esm/external-data/controllers/external-data-admin.backend.controller.js +193 -0
- package/dist/esm/external-data/controllers/external-data-admin.backend.controller.js.map +1 -0
- package/dist/esm/external-data/external-data-pipeline-run.backend.service.d.ts +72 -4
- package/dist/esm/external-data/external-data-pipeline-run.backend.service.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-pipeline-run.backend.service.js +60 -19
- package/dist/esm/external-data/external-data-pipeline-run.backend.service.js.map +1 -1
- package/dist/esm/external-data/external-data-transform.backend.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-transform.backend.js +7 -1
- package/dist/esm/external-data/external-data-transform.backend.js.map +1 -1
- package/dist/esm/external-data/models/external-data-pipeline-state.backend.schemas.d.ts +2 -0
- package/dist/esm/external-data/models/external-data-pipeline-state.backend.schemas.d.ts.map +1 -1
- package/dist/esm/external-data/models/external-data-pipeline-state.backend.schemas.js +13 -0
- package/dist/esm/external-data/models/external-data-pipeline-state.backend.schemas.js.map +1 -1
- package/dist/esm/external-providers/models/provider-selection-resolution-evidence.backend.definitions.d.ts +4 -2
- package/dist/esm/external-providers/models/provider-selection-resolution-evidence.backend.definitions.d.ts.map +1 -1
- package/dist/esm/external-providers/models/provider-selection-resolution-evidence.backend.definitions.js.map +1 -1
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.d.ts +256 -0
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.d.ts.map +1 -0
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.js +333 -0
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.js.map +1 -0
- package/dist/esm/external-providers/operations/provider-operation-request.backend.d.ts +56 -0
- package/dist/esm/external-providers/operations/provider-operation-request.backend.d.ts.map +1 -0
- package/dist/esm/external-providers/operations/provider-operation-request.backend.js +211 -0
- package/dist/esm/external-providers/operations/provider-operation-request.backend.js.map +1 -0
- package/dist/esm/external-providers/operations/provider-request-signing.backend.d.ts +45 -0
- package/dist/esm/external-providers/operations/provider-request-signing.backend.d.ts.map +1 -0
- package/dist/esm/external-providers/operations/provider-request-signing.backend.js +216 -0
- package/dist/esm/external-providers/operations/provider-request-signing.backend.js.map +1 -0
- package/dist/esm/external-providers/operations/provider-rest-call-client.backend.d.ts +56 -0
- package/dist/esm/external-providers/operations/provider-rest-call-client.backend.d.ts.map +1 -0
- package/dist/esm/external-providers/operations/provider-rest-call-client.backend.js +78 -0
- package/dist/esm/external-providers/operations/provider-rest-call-client.backend.js.map +1 -0
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.d.ts +1 -1
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.js +2 -2
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.js.map +1 -1
- package/dist/esm/external-providers/services/backend-provider-loader.backend.service.d.ts +89 -0
- package/dist/esm/external-providers/services/backend-provider-loader.backend.service.d.ts.map +1 -0
- package/dist/esm/external-providers/services/backend-provider-loader.backend.service.js +164 -0
- package/dist/esm/external-providers/services/backend-provider-loader.backend.service.js.map +1 -0
- package/dist/esm/external-providers/services/backend-provider-registry.backend.service.d.ts +26 -27
- package/dist/esm/external-providers/services/backend-provider-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/backend-provider-registry.backend.service.js +50 -64
- package/dist/esm/external-providers/services/backend-provider-registry.backend.service.js.map +1 -1
- package/dist/esm/external-providers/services/document-extraction.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/document-extraction.backend.service.js +3 -3
- package/dist/esm/external-providers/services/document-extraction.backend.service.js.map +1 -1
- package/dist/esm/external-providers/services/embeddings.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/embeddings.backend.service.js +4 -4
- package/dist/esm/external-providers/services/embeddings.backend.service.js.map +1 -1
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts +306 -7
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.js +539 -45
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.js.map +1 -1
- package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.js +25 -2
- package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.js.map +1 -1
- package/dist/esm/files/controllers/file.controller.d.ts +24 -1
- package/dist/esm/files/controllers/file.controller.d.ts.map +1 -1
- package/dist/esm/files/controllers/file.controller.js +83 -11
- package/dist/esm/files/controllers/file.controller.js.map +1 -1
- package/dist/esm/files/handlers/file-upload-route-locals.backend.types.d.ts +17 -0
- package/dist/esm/files/handlers/file-upload-route-locals.backend.types.d.ts.map +1 -0
- package/dist/esm/files/handlers/file-upload-route-locals.backend.types.js +1 -0
- package/dist/esm/files/handlers/file-upload-route-locals.backend.types.js.map +1 -0
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.d.ts +5 -1
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.js +76 -13
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.js.map +1 -1
- package/dist/esm/files/services/file-operation-handler.backend.service.d.ts +18 -0
- package/dist/esm/files/services/file-operation-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-operation-handler.backend.service.js +36 -28
- package/dist/esm/files/services/file-operation-handler.backend.service.js.map +1 -1
- package/dist/esm/files/services/file-scanning.backend.service.d.ts +94 -9
- package/dist/esm/files/services/file-scanning.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-scanning.backend.service.js +197 -17
- package/dist/esm/files/services/file-scanning.backend.service.js.map +1 -1
- package/dist/esm/files/services/file-text-extraction.backend.service.d.ts +60 -1
- package/dist/esm/files/services/file-text-extraction.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-text-extraction.backend.service.js +167 -8
- package/dist/esm/files/services/file-text-extraction.backend.service.js.map +1 -1
- package/dist/esm/files/services/file-upload-grant.backend.service.d.ts +214 -0
- package/dist/esm/files/services/file-upload-grant.backend.service.d.ts.map +1 -0
- package/dist/esm/files/services/file-upload-grant.backend.service.js +566 -0
- package/dist/esm/files/services/file-upload-grant.backend.service.js.map +1 -0
- package/dist/esm/files/services/files.backend.service.d.ts +87 -0
- package/dist/esm/files/services/files.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/files.backend.service.js +252 -19
- package/dist/esm/files/services/files.backend.service.js.map +1 -1
- package/dist/esm/files/storage/application-storage-key.backend.utils.d.ts +109 -0
- package/dist/esm/files/storage/application-storage-key.backend.utils.d.ts.map +1 -0
- package/dist/esm/files/storage/application-storage-key.backend.utils.js +123 -0
- package/dist/esm/files/storage/application-storage-key.backend.utils.js.map +1 -0
- package/dist/esm/files/storage/file-storage-provider.types.d.ts +16 -10
- package/dist/esm/files/storage/file-storage-provider.types.d.ts.map +1 -1
- package/dist/esm/files/storage/file-storage-provider.types.js.map +1 -1
- package/dist/esm/files/storage/local-directory-storage-provider.backend.service.d.ts +67 -8
- package/dist/esm/files/storage/local-directory-storage-provider.backend.service.d.ts.map +1 -1
- package/dist/esm/files/storage/local-directory-storage-provider.backend.service.js +101 -28
- package/dist/esm/files/storage/local-directory-storage-provider.backend.service.js.map +1 -1
- package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.d.ts.map +1 -1
- package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.js +8 -55
- package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.js.map +1 -1
- package/dist/esm/files/utils/file-field-schema-path.backend.utils.d.ts.map +1 -1
- package/dist/esm/files/utils/file-field-schema-path.backend.utils.js +20 -0
- package/dist/esm/files/utils/file-field-schema-path.backend.utils.js.map +1 -1
- package/dist/esm/files/utils/file-uploader.utils.d.ts.map +1 -1
- package/dist/esm/files/utils/file-uploader.utils.js +12 -0
- package/dist/esm/files/utils/file-uploader.utils.js.map +1 -1
- package/dist/esm/files/utils/office-document-text-extraction.backend.utils.d.ts +86 -0
- package/dist/esm/files/utils/office-document-text-extraction.backend.utils.d.ts.map +1 -0
- package/dist/esm/files/utils/office-document-text-extraction.backend.utils.js +288 -0
- package/dist/esm/files/utils/office-document-text-extraction.backend.utils.js.map +1 -0
- package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.d.ts +15 -0
- package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.js +76 -5
- package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/a2a/controllers/a2a.controller.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/controllers/a2a.controller.js +6 -1
- package/dist/esm/flows-actors/a2a/controllers/a2a.controller.js.map +1 -1
- package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.d.ts +60 -0
- package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.js +63 -0
- package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.js.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.d.ts +74 -0
- package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.js +200 -44
- package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.d.ts +7 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.js +53 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.d.ts +18 -0
- package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.js +18 -0
- package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a.backend.service.d.ts +12 -7
- package/dist/esm/flows-actors/a2a/services/a2a.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.d.ts +0 -13
- package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.js +14 -22
- package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.js.map +1 -1
- package/dist/esm/flows-actors/models/core-facets.backend.definitions.d.ts +8 -3
- package/dist/esm/flows-actors/models/core-facets.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/core-facets.backend.definitions.js +25 -15
- package/dist/esm/flows-actors/models/core-facets.backend.definitions.js.map +1 -1
- package/dist/esm/flows-actors/models/flows-actors.backend.schemas.d.ts +13 -1
- package/dist/esm/flows-actors/models/flows-actors.backend.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/flows-actors.backend.schemas.js.map +1 -1
- package/dist/esm/flows-actors/models/function-tools.backend.definitions.d.ts +88 -8
- package/dist/esm/flows-actors/models/function-tools.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/function-tools.backend.definitions.js +333 -31
- package/dist/esm/flows-actors/models/function-tools.backend.definitions.js.map +1 -1
- package/dist/esm/flows-actors/models/market-generation.actors-system.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/market-generation.actors-system.backend.definitions.js +4 -2
- package/dist/esm/flows-actors/models/market-generation.actors-system.backend.definitions.js.map +1 -1
- package/dist/esm/flows-actors/models/mcp-client.backend.definitions.d.ts +113 -0
- package/dist/esm/flows-actors/models/mcp-client.backend.definitions.d.ts.map +1 -0
- package/dist/esm/flows-actors/models/mcp-client.backend.definitions.js +62 -0
- package/dist/esm/flows-actors/models/mcp-client.backend.definitions.js.map +1 -0
- package/dist/esm/flows-actors/services/actors-system.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/actors-system.backend.service.js +0 -2
- package/dist/esm/flows-actors/services/actors-system.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/services/agents.backend.service.d.ts +107 -1
- package/dist/esm/flows-actors/services/agents.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/agents.backend.service.js +519 -56
- package/dist/esm/flows-actors/services/agents.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/services/conversational-execution.backend.service.d.ts +5 -1
- package/dist/esm/flows-actors/services/conversational-execution.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/conversational-execution.backend.service.js +79 -16
- package/dist/esm/flows-actors/services/conversational-execution.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/services/flows-actors-registry.service.d.ts +34 -5
- package/dist/esm/flows-actors/services/flows-actors-registry.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/flows-actors-registry.service.js +154 -20
- package/dist/esm/flows-actors/services/flows-actors-registry.service.js.map +1 -1
- package/dist/esm/flows-actors/services/flows.backend.services.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/flows.backend.services.js +27 -23
- package/dist/esm/flows-actors/services/flows.backend.services.js.map +1 -1
- package/dist/esm/flows-actors/services/llm-observability-agent-call-trace-sink.backend.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/llm-observability-agent-call-trace-sink.backend.js +7 -1
- package/dist/esm/flows-actors/services/llm-observability-agent-call-trace-sink.backend.js.map +1 -1
- package/dist/esm/flows-actors/services/mcp-client.backend.service.d.ts +90 -0
- package/dist/esm/flows-actors/services/mcp-client.backend.service.d.ts.map +1 -0
- package/dist/esm/flows-actors/services/mcp-client.backend.service.js +368 -0
- package/dist/esm/flows-actors/services/mcp-client.backend.service.js.map +1 -0
- package/dist/esm/flows-actors/services/prompt-compiler.backend.service.d.ts +9 -5
- package/dist/esm/flows-actors/services/prompt-compiler.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/prompt-compiler.backend.service.js +12 -17
- package/dist/esm/flows-actors/services/prompt-compiler.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.d.ts +151 -41
- package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.js +308 -143
- package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.js.map +1 -1
- package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.d.ts +0 -207
- package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.js +8 -243
- package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.js.map +1 -1
- package/dist/esm/flows-actors/utils/meta-workflow-structured-generation-plan.backend.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/utils/meta-workflow-structured-generation-plan.backend.utils.js.map +1 -1
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.d.ts +9 -14
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.d.ts.map +1 -1
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.js +18 -89
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.js.map +1 -1
- package/dist/esm/guidance/services/progression-state-store.backend.service.d.ts +86 -0
- package/dist/esm/guidance/services/progression-state-store.backend.service.d.ts.map +1 -0
- package/dist/esm/guidance/services/progression-state-store.backend.service.js +155 -0
- package/dist/esm/guidance/services/progression-state-store.backend.service.js.map +1 -0
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.d.ts +10 -0
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.js +55 -5
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.js.map +1 -1
- package/dist/esm/index.d.ts +15 -5
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +45 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/inject/models/container.d.ts.map +1 -1
- package/dist/esm/inject/models/container.js +82 -10
- package/dist/esm/inject/models/container.js.map +1 -1
- package/dist/esm/inject/models/service-types.d.ts +20 -3
- package/dist/esm/inject/models/service-types.d.ts.map +1 -1
- package/dist/esm/inject/models/service-types.js +21 -3
- package/dist/esm/inject/models/service-types.js.map +1 -1
- package/dist/esm/mcp/controllers/mcp.controller.d.ts.map +1 -1
- package/dist/esm/mcp/controllers/mcp.controller.js +32 -4
- package/dist/esm/mcp/controllers/mcp.controller.js.map +1 -1
- package/dist/esm/mcp/models/mcp-tool.backend.schemas.d.ts +34 -0
- package/dist/esm/mcp/models/mcp-tool.backend.schemas.d.ts.map +1 -1
- package/dist/esm/mcp/models/mcp-tool.backend.schemas.js +42 -0
- package/dist/esm/mcp/models/mcp-tool.backend.schemas.js.map +1 -1
- package/dist/esm/mcp/services/mcp-server.backend.service.d.ts +84 -1
- package/dist/esm/mcp/services/mcp-server.backend.service.d.ts.map +1 -1
- package/dist/esm/mcp/services/mcp-server.backend.service.js +235 -11
- package/dist/esm/mcp/services/mcp-server.backend.service.js.map +1 -1
- package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.d.ts +64 -2
- package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.d.ts.map +1 -1
- package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.js +152 -6
- package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.js.map +1 -1
- package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.d.ts.map +1 -1
- package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.js +49 -4
- package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.js.map +1 -1
- package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.d.ts +66 -0
- package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.d.ts.map +1 -0
- package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.js +199 -0
- package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.js.map +1 -0
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.d.ts +149 -13
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.d.ts.map +1 -1
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.js +411 -19
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.js.map +1 -1
- package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.d.ts +11 -2
- package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.js.map +1 -1
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.d.ts +28 -9
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.d.ts.map +1 -1
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.js +30 -10
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.js.map +1 -1
- package/dist/esm/monitoring/logger/services/logger.service.d.ts +12 -0
- package/dist/esm/monitoring/logger/services/logger.service.d.ts.map +1 -1
- package/dist/esm/monitoring/logger/services/logger.service.js +52 -11
- package/dist/esm/monitoring/logger/services/logger.service.js.map +1 -1
- package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.d.ts +62 -0
- package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.d.ts.map +1 -0
- package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.js +78 -0
- package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.js.map +1 -0
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.d.ts +309 -0
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.d.ts.map +1 -0
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.js +385 -0
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.js.map +1 -0
- package/dist/esm/monitoring/observability/models/observability.backend.schemas.d.ts +1 -0
- package/dist/esm/monitoring/observability/models/observability.backend.schemas.d.ts.map +1 -1
- package/dist/esm/monitoring/observability/models/observability.backend.schemas.js.map +1 -1
- package/dist/esm/monitoring/observability/services/metrics.service.d.ts +21 -0
- package/dist/esm/monitoring/observability/services/metrics.service.d.ts.map +1 -1
- package/dist/esm/monitoring/observability/services/metrics.service.js +38 -0
- package/dist/esm/monitoring/observability/services/metrics.service.js.map +1 -1
- package/dist/esm/notifications/email/models/email-context-provider.interface.d.ts +0 -80
- package/dist/esm/notifications/email/models/email-context-provider.interface.d.ts.map +0 -1
- package/dist/esm/notifications/email/models/email-context-provider.interface.js +0 -25
- package/dist/esm/notifications/email/models/email-context-provider.interface.js.map +0 -1
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.d.ts +0 -49
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.d.ts.map +0 -1
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.js +0 -141
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.js.map +0 -1
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.d.ts +0 -37
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.d.ts.map +0 -1
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.js +0 -121
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.js.map +0 -1
- package/dist/esm/notifications/email/services/email-template-registry.backend.service.d.ts +66 -1
- package/dist/esm/notifications/email/services/email-template-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/email/services/email-template-registry.backend.service.js +105 -10
- package/dist/esm/notifications/email/services/email-template-registry.backend.service.js.map +1 -1
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.d.ts +0 -58
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.d.ts.map +0 -1
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.js +0 -223
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.js.map +0 -1
- package/dist/esm/notifications/email/services/email-template-validator.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/email/services/email-template-validator.backend.service.js +10 -1
- package/dist/esm/notifications/email/services/email-template-validator.backend.service.js.map +1 -1
- package/dist/esm/notifications/email/services/email.backend.service.d.ts +60 -4
- package/dist/esm/notifications/email/services/email.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/email/services/email.backend.service.js +145 -43
- package/dist/esm/notifications/email/services/email.backend.service.js.map +1 -1
- package/dist/esm/notifications/email/utils/color-conversion.utils.d.ts +0 -1
- package/dist/esm/notifications/email/utils/color-conversion.utils.d.ts.map +1 -1
- package/dist/esm/notifications/email/utils/color-conversion.utils.js.map +1 -1
- package/dist/esm/notifications/services/notification-badge.backend.service.d.ts +142 -21
- package/dist/esm/notifications/services/notification-badge.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/services/notification-badge.backend.service.js +283 -58
- package/dist/esm/notifications/services/notification-badge.backend.service.js.map +1 -1
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.d.ts +108 -13
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.js +432 -101
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.js.map +1 -1
- package/dist/esm/notifications/sms/services/sms.backend.service.d.ts +2 -2
- package/dist/esm/notifications/sms/services/sms.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/sms/services/sms.backend.service.js +5 -5
- package/dist/esm/notifications/sms/services/sms.backend.service.js.map +1 -1
- package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.d.ts +117 -5
- package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.js +164 -6
- package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.js.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.d.ts +0 -6
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.js +54 -7
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.js.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.utils.d.ts +5 -5
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.utils.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.utils.js +14 -13
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.utils.js.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.d.ts +2 -1
- package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.js +18 -8
- package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.js.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.js +20 -18
- package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.d.ts +16 -0
- package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.js +18 -0
- package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.js.map +1 -1
- package/dist/esm/organizations/batches/organization-purge.batch.backend.service.d.ts +2 -2
- package/dist/esm/organizations/batches/organization-purge.batch.backend.service.js +2 -2
- package/dist/esm/organizations/batches/organization-purge.batch.backend.service.js.map +1 -1
- package/dist/esm/organizations/services/organization-custom-implementation.backend.service.d.ts.map +1 -1
- package/dist/esm/organizations/services/organization-custom-implementation.backend.service.js +63 -2
- package/dist/esm/organizations/services/organization-custom-implementation.backend.service.js.map +1 -1
- package/dist/esm/organizations/services/organization-unit-custom-implementation.backend.service.d.ts.map +1 -1
- package/dist/esm/organizations/services/organization-unit-custom-implementation.backend.service.js +4 -1
- package/dist/esm/organizations/services/organization-unit-custom-implementation.backend.service.js.map +1 -1
- package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.d.ts +66 -0
- package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.js +257 -0
- package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.js.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.binding.d.ts +12 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.binding.d.ts.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.binding.js +47 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.binding.js.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.interface.d.ts +87 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.interface.d.ts.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.interface.js +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.interface.js.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.options.d.ts +31 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.options.d.ts.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.options.js +13 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.options.js.map +1 -0
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.d.ts +19 -25
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.js +33 -0
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.js.map +1 -1
- package/dist/esm/queue/domain-queue-consumer.backend.service.d.ts +2 -2
- package/dist/esm/queue/domain-queue-consumer.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/domain-queue-consumer.backend.service.js +1 -4
- package/dist/esm/queue/domain-queue-consumer.backend.service.js.map +1 -1
- package/dist/esm/queue/job-consumer.backend.service.d.ts +2 -2
- package/dist/esm/queue/job-consumer.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/job-consumer.backend.service.js +1 -4
- package/dist/esm/queue/job-consumer.backend.service.js.map +1 -1
- package/dist/esm/queue/job-executor.backend.service.d.ts +2 -2
- package/dist/esm/queue/job-executor.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/job-executor.backend.service.js +1 -4
- package/dist/esm/queue/job-executor.backend.service.js.map +1 -1
- package/dist/esm/queue/queue-monitoring.backend.service.d.ts +8 -4
- package/dist/esm/queue/queue-monitoring.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/queue-monitoring.backend.service.js +25 -17
- package/dist/esm/queue/queue-monitoring.backend.service.js.map +1 -1
- package/dist/esm/queue/queue-worker-initializer.backend.service.d.ts +16 -1
- package/dist/esm/queue/queue-worker-initializer.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/queue-worker-initializer.backend.service.js +16 -1
- package/dist/esm/queue/queue-worker-initializer.backend.service.js.map +1 -1
- package/dist/esm/queue/queue.backend.service.d.ts +3 -3
- package/dist/esm/queue/queue.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/queue.backend.service.js +26 -4
- package/dist/esm/queue/queue.backend.service.js.map +1 -1
- package/dist/esm/queue/worker-shutdown-manager.backend.service.d.ts +2 -2
- package/dist/esm/queue/worker-shutdown-manager.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/worker-shutdown-manager.backend.service.js +18 -3
- package/dist/esm/queue/worker-shutdown-manager.backend.service.js.map +1 -1
- package/dist/esm/rag/utils/rag-chunking.backend.utils.d.ts +50 -25
- package/dist/esm/rag/utils/rag-chunking.backend.utils.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-chunking.backend.utils.js +147 -39
- package/dist/esm/rag/utils/rag-chunking.backend.utils.js.map +1 -1
- package/dist/esm/rag/utils/rag-context-assembly.backend.utils.d.ts +12 -3
- package/dist/esm/rag/utils/rag-context-assembly.backend.utils.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-context-assembly.backend.utils.js +12 -3
- package/dist/esm/rag/utils/rag-context-assembly.backend.utils.js.map +1 -1
- package/dist/esm/requests/service/websocket.service.d.ts +9 -0
- package/dist/esm/requests/service/websocket.service.d.ts.map +1 -1
- package/dist/esm/requests/service/websocket.service.js +88 -15
- package/dist/esm/requests/service/websocket.service.js.map +1 -1
- package/dist/esm/resources/models/custom-service-implementations.backend.definition.d.ts.map +1 -1
- package/dist/esm/resources/models/custom-service-implementations.backend.definition.js +16 -2
- package/dist/esm/resources/models/custom-service-implementations.backend.definition.js.map +1 -1
- package/dist/esm/resources/models/resources-operations.backend.definitions.d.ts.map +1 -1
- package/dist/esm/resources/models/resources-operations.backend.definitions.js +2 -0
- package/dist/esm/resources/models/resources-operations.backend.definitions.js.map +1 -1
- package/dist/esm/resources/models/resources-relationships.backend.definitions.d.ts.map +1 -1
- package/dist/esm/resources/models/resources-relationships.backend.definitions.js +14 -0
- package/dist/esm/resources/models/resources-relationships.backend.definitions.js.map +1 -1
- package/dist/esm/resources/models/resources-types.backend.schemas.d.ts +2 -1
- package/dist/esm/resources/models/resources-types.backend.schemas.d.ts.map +1 -1
- package/dist/esm/resources/models/resources-types.backend.schemas.js +8 -0
- package/dist/esm/resources/models/resources-types.backend.schemas.js.map +1 -1
- package/dist/esm/resources/services/resource-id.backend.service.js +3 -3
- package/dist/esm/resources/services/resource-id.backend.service.js.map +1 -1
- package/dist/esm/resources/services/resources-registry.backend.service.d.ts +60 -5
- package/dist/esm/resources/services/resources-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/resources/services/resources-registry.backend.service.js +91 -7
- package/dist/esm/resources/services/resources-registry.backend.service.js.map +1 -1
- package/dist/esm/runtime/controllers/health-controller.backend.service.d.ts +36 -3
- package/dist/esm/runtime/controllers/health-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/runtime/controllers/health-controller.backend.service.js +32 -10
- package/dist/esm/runtime/controllers/health-controller.backend.service.js.map +1 -1
- package/dist/esm/runtime/domain-module.backend.definitions.d.ts +24 -0
- package/dist/esm/runtime/domain-module.backend.definitions.d.ts.map +1 -1
- package/dist/esm/runtime/domain-module.backend.definitions.js +24 -0
- package/dist/esm/runtime/domain-module.backend.definitions.js.map +1 -1
- package/dist/esm/runtime/services/execution-context-creator.backend.service.d.ts.map +1 -1
- package/dist/esm/runtime/services/execution-context-creator.backend.service.js +13 -7
- package/dist/esm/runtime/services/execution-context-creator.backend.service.js.map +1 -1
- package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.d.ts +51 -0
- package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.d.ts.map +1 -1
- package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.js.map +1 -1
- package/dist/esm/runtime/services/http-server.backend.service.d.ts +26 -0
- package/dist/esm/runtime/services/http-server.backend.service.d.ts.map +1 -1
- package/dist/esm/runtime/services/http-server.backend.service.js +181 -1
- package/dist/esm/runtime/services/http-server.backend.service.js.map +1 -1
- package/dist/esm/runtime/services/start-application.backend.service.d.ts +47 -1
- package/dist/esm/runtime/services/start-application.backend.service.d.ts.map +1 -1
- package/dist/esm/runtime/services/start-application.backend.service.js +343 -77
- package/dist/esm/runtime/services/start-application.backend.service.js.map +1 -1
- package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.d.ts +15 -0
- package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.js +28 -0
- package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.d.ts +5 -1
- package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.js +24 -4
- package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.js +29 -4
- package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.d.ts +114 -0
- package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.js +354 -3
- package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/models/cimd.backend.schemas.d.ts +1 -0
- package/dist/esm/security/authentications/models/cimd.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/cimd.backend.schemas.js +22 -0
- package/dist/esm/security/authentications/models/cimd.backend.schemas.js.map +1 -1
- package/dist/esm/security/authentications/models/jwt.backend.schemas.d.ts +3 -23
- package/dist/esm/security/authentications/models/jwt.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/jwt.backend.schemas.js +20 -45
- package/dist/esm/security/authentications/models/jwt.backend.schemas.js.map +1 -1
- package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.d.ts +15 -0
- package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.js.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.d.ts +0 -2
- package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.js +23 -14
- package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.js.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.d.ts +0 -1
- package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.js +15 -12
- package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.d.ts +113 -3
- package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.js +207 -30
- package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.d.ts +95 -2
- package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.js +153 -9
- package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.d.ts +190 -0
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.js +377 -53
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.d.ts +9 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.js +77 -2
- package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-mfa.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-mfa.backend.service.js +5 -3
- package/dist/esm/security/authentications/services/auth-methods/auth-mfa.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.d.ts +41 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.js +202 -23
- package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.js +42 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.js +34 -4
- package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.d.ts +29 -5
- package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.js +77 -5
- package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.d.ts +41 -1
- package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.js +87 -4
- package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.d.ts +43 -1
- package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.js +277 -97
- package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.d.ts +28 -5
- package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.js +72 -12
- package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.js +3 -0
- package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.js.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.d.ts +28 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.js +283 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.d.ts +4 -3
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.js +4 -3
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.d.ts +35 -0
- package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.js +111 -21
- package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.d.ts +14 -1
- package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.js +49 -8
- package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-policy-resolution.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-policy-resolution.backend.utils.js +4 -0
- package/dist/esm/security/authentications/services/utils/auth-policy-resolution.backend.utils.js.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.js +6 -0
- package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.d.ts +37 -1
- package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.js +51 -0
- package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.js.map +1 -1
- package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.d.ts +41 -0
- package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.js +45 -0
- package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.js.map +1 -1
- package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.d.ts +116 -0
- package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.d.ts.map +1 -0
- package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.js +162 -0
- package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.js.map +1 -0
- package/dist/esm/security/authorizations/initiator-organization-confinement.backend.d.ts.map +1 -1
- package/dist/esm/security/authorizations/initiator-organization-confinement.backend.js +24 -1
- package/dist/esm/security/authorizations/initiator-organization-confinement.backend.js.map +1 -1
- package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.d.ts +20 -20
- package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.js +27 -28
- package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.js.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.js +77 -3
- package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.js.map +1 -1
- package/dist/esm/security/authorizations/privileged-access-review.backend.utils.d.ts +117 -0
- package/dist/esm/security/authorizations/privileged-access-review.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/authorizations/privileged-access-review.backend.utils.js +104 -0
- package/dist/esm/security/authorizations/privileged-access-review.backend.utils.js.map +1 -0
- package/dist/esm/security/authorizations/role-ceiling.backend.utils.d.ts +4 -0
- package/dist/esm/security/authorizations/role-ceiling.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/role-ceiling.backend.utils.js +4 -0
- package/dist/esm/security/authorizations/role-ceiling.backend.utils.js.map +1 -1
- package/dist/esm/security/authorizations/role-conferral.backend.utils.d.ts +93 -0
- package/dist/esm/security/authorizations/role-conferral.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/authorizations/role-conferral.backend.utils.js +95 -0
- package/dist/esm/security/authorizations/role-conferral.backend.utils.js.map +1 -0
- package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.d.ts +124 -1
- package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.d.ts.map +1 -1
- package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.js +142 -5
- package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.js.map +1 -1
- package/dist/esm/security/authorizations/services/authorizations.backend.service.d.ts +175 -14
- package/dist/esm/security/authorizations/services/authorizations.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authorizations/services/authorizations.backend.service.js +385 -49
- package/dist/esm/security/authorizations/services/authorizations.backend.service.js.map +1 -1
- package/dist/esm/security/authorizations/super-admin-floor.backend.utils.d.ts +6 -14
- package/dist/esm/security/authorizations/super-admin-floor.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/super-admin-floor.backend.utils.js +13 -22
- package/dist/esm/security/authorizations/super-admin-floor.backend.utils.js.map +1 -1
- package/dist/esm/security/connected-accounts/connection-target-authorization.backend.d.ts +60 -0
- package/dist/esm/security/connected-accounts/connection-target-authorization.backend.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/connection-target-authorization.backend.js +79 -0
- package/dist/esm/security/connected-accounts/connection-target-authorization.backend.js.map +1 -0
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.d.ts +161 -0
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.js +512 -0
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.d.ts +59 -0
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.js +22 -0
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.js.map +1 -0
- package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.d.ts +44 -0
- package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.js +20 -0
- package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.d.ts +191 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.js +385 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.d.ts +41 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.js +358 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.d.ts +160 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.js +266 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.d.ts +111 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.js +107 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.d.ts +54 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.js +153 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.d.ts +195 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.js +387 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.d.ts +45 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.js +291 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.d.ts +62 -0
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.js +29 -0
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.js.map +1 -0
- package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.d.ts +127 -0
- package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.js +277 -0
- package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.js.map +1 -0
- package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.d.ts +66 -0
- package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.js +75 -0
- package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.js.map +1 -0
- package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.d.ts +18 -1
- package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.js +110 -74
- package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.js.map +1 -1
- package/dist/esm/security/consumable-tokens/consumable-token-models.exports.d.ts +22 -0
- package/dist/esm/security/consumable-tokens/consumable-token-models.exports.d.ts.map +1 -0
- package/dist/esm/security/consumable-tokens/consumable-token-models.exports.js +22 -0
- package/dist/esm/security/consumable-tokens/consumable-token-models.exports.js.map +1 -0
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.d.ts +17 -3
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.js +12 -0
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.d.ts +41 -3
- package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.d.ts.map +1 -1
- package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.js +83 -20
- package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.js.map +1 -1
- package/dist/esm/security/credential-rotation-grace.backend.utils.d.ts +9 -4
- package/dist/esm/security/credential-rotation-grace.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/credential-rotation-grace.backend.utils.js +9 -4
- package/dist/esm/security/credential-rotation-grace.backend.utils.js.map +1 -1
- package/dist/esm/security/jwt/services/jwt.backend.service.d.ts.map +1 -1
- package/dist/esm/security/jwt/services/jwt.backend.service.js +1 -18
- package/dist/esm/security/jwt/services/jwt.backend.service.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.d.ts +26 -0
- package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.js +43 -0
- package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.d.ts +8 -1
- package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.js +49 -0
- package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/security/scim/controllers/scim.backend.controller.d.ts.map +1 -1
- package/dist/esm/security/scim/controllers/scim.backend.controller.js +17 -5
- package/dist/esm/security/scim/controllers/scim.backend.controller.js.map +1 -1
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.d.ts +67 -29
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.js +47 -25
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.js.map +1 -1
- package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.d.ts +10 -2
- package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.js +10 -2
- package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.js.map +1 -1
- package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.d.ts +143 -0
- package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.js +258 -0
- package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.js.map +1 -0
- package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.d.ts +39 -0
- package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.js +159 -0
- package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +17 -9
- package/dist/esm/.builder.pid +0 -9
package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.js
ADDED
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sealing an OWNER's provider credential at rest — an organization's, or a person's own.
|
|
3
|
+
*
|
|
4
|
+
* ## What this is for
|
|
5
|
+
*
|
|
6
|
+
* A credential toward a third party is stored in the application's own database, in a row its owner
|
|
7
|
+
* can create over HTTP. A database backup, a snapshot handed to a support engineer, or a read
|
|
8
|
+
* replica reached through an unrelated defect would otherwise expose every stored vendor credential
|
|
9
|
+
* in plaintext. Sealing them does not make the store safe to lose — nothing does — but it means
|
|
10
|
+
* losing the store is not the same event as losing every tenant's and every person's Slack, CRM and
|
|
11
|
+
* SMTP access.
|
|
12
|
+
*
|
|
13
|
+
* ## The key is the platform's existing material, deliberately
|
|
14
|
+
*
|
|
15
|
+
* `secrets.security.session.encryptionKey` is provisioned for every application by the platform
|
|
16
|
+
* (apps-manager mints it, the schema requires at least 32 characters, and readiness refuses an
|
|
17
|
+
* application without one). Introducing a second key here would mean a second thing to provision, a
|
|
18
|
+
* second thing to rotate, and a second way for an application to be half-configured — and the first
|
|
19
|
+
* application to hit that would discover it as "my credentials cannot be decrypted", after the
|
|
20
|
+
* values were already stored.
|
|
21
|
+
*
|
|
22
|
+
* The base key is NOT used directly. It is domain-separated through SHA-256 so this subsystem's key
|
|
23
|
+
* is unrelated to the session subsystem's, and to the SIEM delivery subsystem's, even though all
|
|
24
|
+
* three derive from the same material. Without the separator, a weakness or an oracle in one becomes
|
|
25
|
+
* a weakness in the others.
|
|
26
|
+
*
|
|
27
|
+
* ## AES-256-GCM, and why authentication is the load-bearing half
|
|
28
|
+
*
|
|
29
|
+
* GCM authenticates as well as encrypts, so a modified ciphertext FAILS rather than decrypting to
|
|
30
|
+
* garbage. That matters more than the confidentiality here: an attacker with write access to the
|
|
31
|
+
* store but not the key must not be able to flip a tenant's credential to a value of their choosing,
|
|
32
|
+
* or to swap tenant A's sealed credential into tenant B's row and have it silently work. The
|
|
33
|
+
* associated data below closes the second half of that.
|
|
34
|
+
*
|
|
35
|
+
* ## The envelope BINDS the row's identity
|
|
36
|
+
*
|
|
37
|
+
* The additional authenticated data is the owner, the provider and the slug. Moving a sealed value
|
|
38
|
+
* to a different owner, a different provider or a different slug therefore makes it fail to open —
|
|
39
|
+
* the seal is not merely "this is a secret", it is "this is THIS owner's secret for THIS provider".
|
|
40
|
+
* Cut-and-paste of ciphertext between rows is the attack a plain AES-GCM envelope would let through,
|
|
41
|
+
* and it is exactly the attack a shared multi-tenant table invites.
|
|
42
|
+
*
|
|
43
|
+
* ## The SCOPE separates the KEY, not the associated data
|
|
44
|
+
*
|
|
45
|
+
* An organization's credential and a person's own credential are sealed under DIFFERENT derived
|
|
46
|
+
* keys, selected by `ownerScope`. Two reasons, and the second is why it is the key rather than one
|
|
47
|
+
* more field in the associated data.
|
|
48
|
+
*
|
|
49
|
+
* A key split is strictly stronger: with a scope field in the AAD, one derived key protects both
|
|
50
|
+
* populations, so anything that compromises it compromises both. With separate keys, a user
|
|
51
|
+
* envelope cannot be opened as an organization envelope even by an attacker who controls the AAD.
|
|
52
|
+
*
|
|
53
|
+
* And it PRESERVES what is already stored. Adding a component to the associated data changes the
|
|
54
|
+
* AAD of every organization envelope ever written, so every credential in every live application
|
|
55
|
+
* would stop opening the moment this file changed — the failure would surface as "my Slack
|
|
56
|
+
* integration broke", far from the edit that caused it. Selecting the key domain by scope leaves
|
|
57
|
+
* the organization derivation and the organization AAD byte-identical, so existing rows are
|
|
58
|
+
* untouched by construction rather than by care.
|
|
59
|
+
*
|
|
60
|
+
* ## A second implementation exists, and this is not it
|
|
61
|
+
*
|
|
62
|
+
* `siem-webhook-delivery.backend.service.ts` carries a private AES-256-GCM envelope with the same
|
|
63
|
+
* shape and its own domain separator. It is deliberately NOT reused or refactored here: that file
|
|
64
|
+
* belongs to another workstream's territory, its envelope binds no associated data, and it tolerates
|
|
65
|
+
* plaintext for rows written before it existed — a tolerance this subsystem must not inherit.
|
|
66
|
+
* Converging the two is real work with a real migration, and it is recorded as such rather than done
|
|
67
|
+
* opportunistically inside a security slice.
|
|
68
|
+
*/
|
|
69
|
+
import { createCipheriv, createDecipheriv, createHash, randomBytes, timingSafeEqual } from 'node:crypto';
|
|
70
|
+
import { ExternalProvider_Connection_OwnerScope } from '@wildo-ai/external-connectors-models';
|
|
71
|
+
/**
|
|
72
|
+
* Domain separators, one per owner scope. Changing one of these strings makes every credential
|
|
73
|
+
* stored under it unopenable, so they are versioned constants rather than descriptions: if a
|
|
74
|
+
* derivation ever has to change, the new scheme gets a new prefix and a migration, never an edit
|
|
75
|
+
* here.
|
|
76
|
+
*
|
|
77
|
+
* The ORGANIZATION value predates the USER scope and is reproduced exactly — every organization
|
|
78
|
+
* credential in every live application is sealed under it.
|
|
79
|
+
*
|
|
80
|
+
* Total over the two scopes that reach a store. APPLICATION is deliberately absent rather than
|
|
81
|
+
* mapped to something: the application's own credential lives in the deployment environment and
|
|
82
|
+
* never enters this module, so a call arriving with that scope is a routing defect, and giving it a
|
|
83
|
+
* key would let the defect store a row instead of announcing itself.
|
|
84
|
+
*/
|
|
85
|
+
const PROVIDER_CREDENTIAL_KEY_DOMAINS = {
|
|
86
|
+
[ExternalProvider_Connection_OwnerScope.ORGANIZATION]: 'wildo:organization-provider-credential:v1',
|
|
87
|
+
[ExternalProvider_Connection_OwnerScope.USER]: 'wildo:user-provider-credential:v1',
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Envelope prefix. Present so a stored value can be RECOGNISED as sealed without attempting to
|
|
91
|
+
* decrypt it — which is what lets the write path refuse to persist an unsealed value, rather than
|
|
92
|
+
* discovering the problem at read time when the plaintext is already at rest.
|
|
93
|
+
*/
|
|
94
|
+
export const PROVIDER_CREDENTIAL_ENVELOPE_PREFIX = 'wildo-sealed:aes-256-gcm:';
|
|
95
|
+
/** 96 bits — the GCM nonce size every implementation agrees on. */
|
|
96
|
+
const IV_BYTE_LENGTH = 12;
|
|
97
|
+
const AUTH_TAG_BYTE_LENGTH = 16;
|
|
98
|
+
/**
|
|
99
|
+
* An even-length run of hex digits and nothing else.
|
|
100
|
+
*
|
|
101
|
+
* Even-length because two hex characters encode one byte — an odd-length component cannot have come
|
|
102
|
+
* from `Buffer.toString('hex')`, and `Buffer.from` would drop the trailing nibble without complaint.
|
|
103
|
+
*/
|
|
104
|
+
const STRICT_HEX = /^(?:[0-9a-fA-F]{2})+$/;
|
|
105
|
+
/**
|
|
106
|
+
* The separator inside the associated data.
|
|
107
|
+
*
|
|
108
|
+
* A NUL, not a colon, and that is what makes the encoding injective: with a `:` join,
|
|
109
|
+
* `('org', 'a:b', 'c')` and `('org', 'a', 'b:c')` produce IDENTICAL associated data, so a sealed
|
|
110
|
+
* value could be moved between two rows whose identities differ only in where a colon falls. A NUL
|
|
111
|
+
* cannot appear in any of the three components — they come from an id generator and from
|
|
112
|
+
* schema-validated identifiers — so no two distinct identities can collide.
|
|
113
|
+
*/
|
|
114
|
+
const BINDING_SEPARATOR = '\u0000';
|
|
115
|
+
/** Raised when a sealed value cannot be sealed or opened. Never carries the value or any part of it. */
|
|
116
|
+
export class ProviderCredentialEnvelopeError extends Error {
|
|
117
|
+
constructor(message) {
|
|
118
|
+
super(message);
|
|
119
|
+
this.name = 'ProviderCredentialEnvelopeError';
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Derive this subsystem's 32-byte key for one owner scope from the platform's base key material.
|
|
124
|
+
*
|
|
125
|
+
* The refusal on a short or absent base key is deliberate and loud. The alternative — deriving from
|
|
126
|
+
* whatever is there — would produce a working seal from a misconfigured application, and every
|
|
127
|
+
* credential stored under it would be protected by a key an attacker could guess. A configuration
|
|
128
|
+
* error must not be survivable here.
|
|
129
|
+
*
|
|
130
|
+
* The refusal on an unknown scope is the same posture applied to the routing question: a scope with
|
|
131
|
+
* no domain must not silently fall back to another scope's key, because that would seal a person's
|
|
132
|
+
* credential under the tenant key and make it openable by the wrong half of the system.
|
|
133
|
+
*/
|
|
134
|
+
function deriveProviderCredentialKey(baseEncryptionKey, ownerScope) {
|
|
135
|
+
if (typeof baseEncryptionKey !== 'string' || baseEncryptionKey.length < 32) {
|
|
136
|
+
throw new ProviderCredentialEnvelopeError('Cannot seal or open a provider credential: the application\'s '
|
|
137
|
+
+ 'secrets.security.session.encryptionKey is absent or shorter than the 32 characters the platform '
|
|
138
|
+
+ 'guarantees. This is a provisioning fault, not a runtime condition — an application reaching this '
|
|
139
|
+
+ 'point would store credentials under a guessable key.');
|
|
140
|
+
}
|
|
141
|
+
const domain = PROVIDER_CREDENTIAL_KEY_DOMAINS[ownerScope];
|
|
142
|
+
if (!domain) {
|
|
143
|
+
throw new ProviderCredentialEnvelopeError(`Cannot seal or open a provider credential owned at scope '${ownerScope}': only ORGANIZATION and USER `
|
|
144
|
+
+ 'credentials are stored. An APPLICATION credential lives in the deployment environment and never '
|
|
145
|
+
+ 'reaches this module, so arriving here with one is a resolution defect rather than a missing key.');
|
|
146
|
+
}
|
|
147
|
+
return createHash('sha256').update(`${domain}:${baseEncryptionKey}`).digest();
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* The additional authenticated data — the row identity, unambiguously encoded.
|
|
151
|
+
*
|
|
152
|
+
* The SCOPE is deliberately not a component: it selects the key instead (module JSDoc), which both
|
|
153
|
+
* separates the two populations more strongly and leaves the encoding of an organization row exactly
|
|
154
|
+
* as it was before the USER scope existed.
|
|
155
|
+
*/
|
|
156
|
+
function encodeBinding(binding) {
|
|
157
|
+
return Buffer.from([binding.ownerId, binding.providerRef, binding.secretSlug].join(BINDING_SEPARATOR), 'utf8');
|
|
158
|
+
}
|
|
159
|
+
/** Whether a stored value is a sealed envelope. Cheap, and does not need the key. */
|
|
160
|
+
export function isSealedProviderCredential(value) {
|
|
161
|
+
return typeof value === 'string' && value.startsWith(PROVIDER_CREDENTIAL_ENVELOPE_PREFIX);
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Seal a plaintext credential for storage.
|
|
165
|
+
*
|
|
166
|
+
* Format: `wildo-sealed:aes-256-gcm:<iv hex>:<auth tag hex>:<ciphertext hex>`.
|
|
167
|
+
*/
|
|
168
|
+
export function sealProviderCredential(plaintext, baseEncryptionKey, binding) {
|
|
169
|
+
if (typeof plaintext !== 'string' || plaintext.length === 0) {
|
|
170
|
+
throw new ProviderCredentialEnvelopeError('Refusing to seal an empty provider credential.');
|
|
171
|
+
}
|
|
172
|
+
// Sealing an already-sealed value would double-wrap it, and the second open would return an
|
|
173
|
+
// envelope string that a provider would then receive as its credential. Refuse rather than nest.
|
|
174
|
+
if (isSealedProviderCredential(plaintext)) {
|
|
175
|
+
throw new ProviderCredentialEnvelopeError('Refusing to seal a value that is already a sealed envelope — double-sealing would hand the envelope '
|
|
176
|
+
+ 'itself to the provider on the next open.');
|
|
177
|
+
}
|
|
178
|
+
const key = deriveProviderCredentialKey(baseEncryptionKey, binding.ownerScope);
|
|
179
|
+
const iv = randomBytes(IV_BYTE_LENGTH);
|
|
180
|
+
const cipher = createCipheriv('aes-256-gcm', key, iv);
|
|
181
|
+
cipher.setAAD(encodeBinding(binding));
|
|
182
|
+
const ciphertext = Buffer.concat([cipher.update(plaintext, 'utf8'), cipher.final()]);
|
|
183
|
+
const authTag = cipher.getAuthTag();
|
|
184
|
+
return `${PROVIDER_CREDENTIAL_ENVELOPE_PREFIX}${iv.toString('hex')}:${authTag.toString('hex')}:${ciphertext.toString('hex')}`;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Open a sealed credential.
|
|
188
|
+
*
|
|
189
|
+
* Every failure — a malformed envelope, a wrong key, a tampered ciphertext, a value lifted from
|
|
190
|
+
* another tenant's row — raises the SAME error type with a message that names the row and nothing
|
|
191
|
+
* else. Distinguishing the causes in the message would tell an attacker holding write access which
|
|
192
|
+
* of their manipulations got closer.
|
|
193
|
+
*
|
|
194
|
+
* Plaintext is REFUSED rather than passed through. The SIEM sibling tolerates it because it has rows
|
|
195
|
+
* predating its own encryption; this subsystem shipped sealed, so a plaintext value in the store can
|
|
196
|
+
* only mean the write path was bypassed — a fact worth failing on, not one worth quietly working
|
|
197
|
+
* around.
|
|
198
|
+
*/
|
|
199
|
+
export function openProviderCredential(sealedValue, baseEncryptionKey, binding) {
|
|
200
|
+
const rowDescription = `${binding.ownerScope} '${binding.ownerId}', provider '${binding.providerRef}', slug '${binding.secretSlug}'`;
|
|
201
|
+
if (!isSealedProviderCredential(sealedValue)) {
|
|
202
|
+
throw new ProviderCredentialEnvelopeError(`Stored provider credential for ${rowDescription} is not a sealed envelope. Credentials are sealed on `
|
|
203
|
+
+ 'write, so an unsealed value means the row was written by something other than the credential write '
|
|
204
|
+
+ 'path. Rotate it through the credential resource.');
|
|
205
|
+
}
|
|
206
|
+
const parts = sealedValue.slice(PROVIDER_CREDENTIAL_ENVELOPE_PREFIX.length).split(':');
|
|
207
|
+
if (parts.length !== 3) {
|
|
208
|
+
throw new ProviderCredentialEnvelopeError(`Provider credential for ${rowDescription} cannot be opened.`);
|
|
209
|
+
}
|
|
210
|
+
const [ivHex, authTagHex, ciphertextHex] = parts;
|
|
211
|
+
try {
|
|
212
|
+
// STRICT hex first, before any decoding. `Buffer.from(value, 'hex')` does not throw on invalid
|
|
213
|
+
// input — it silently STOPS at the first non-hex character and returns the prefix it managed to
|
|
214
|
+
// decode. So a stored envelope with trailing garbage would decode to exactly the original bytes
|
|
215
|
+
// and open successfully, and a component with junk in the middle would decode to a short buffer
|
|
216
|
+
// that the length checks below might still accept.
|
|
217
|
+
//
|
|
218
|
+
// That is not a break of the seal (GCM still authenticates the bytes it is given, so nobody can
|
|
219
|
+
// CHANGE the credential this way) but it does mean a value that is not what was written could be
|
|
220
|
+
// accepted as if it were. This module's posture everywhere else is that a stored value which the
|
|
221
|
+
// write path could not have produced is a fault worth failing on, and this is the same rule.
|
|
222
|
+
// Found by a pin whose "tampered" fixture appended non-hex characters and opened anyway.
|
|
223
|
+
if (!STRICT_HEX.test(ivHex) || !STRICT_HEX.test(authTagHex) || !STRICT_HEX.test(ciphertextHex)) {
|
|
224
|
+
throw new Error('malformed envelope components');
|
|
225
|
+
}
|
|
226
|
+
const iv = Buffer.from(ivHex, 'hex');
|
|
227
|
+
const authTag = Buffer.from(authTagHex, 'hex');
|
|
228
|
+
const ciphertext = Buffer.from(ciphertextHex, 'hex');
|
|
229
|
+
// `createDecipheriv` accepts a wrong-length IV for GCM, and a wrong-length tag is rejected only
|
|
230
|
+
// at `final()`. Both are checked here: a truncated tag is the classic GCM forgery attempt, and it
|
|
231
|
+
// should be refused before any decryption work happens.
|
|
232
|
+
if (iv.length !== IV_BYTE_LENGTH || authTag.length !== AUTH_TAG_BYTE_LENGTH || ciphertext.length === 0) {
|
|
233
|
+
throw new Error('malformed envelope components');
|
|
234
|
+
}
|
|
235
|
+
const key = deriveProviderCredentialKey(baseEncryptionKey, binding.ownerScope);
|
|
236
|
+
const decipher = createDecipheriv('aes-256-gcm', key, iv);
|
|
237
|
+
decipher.setAAD(encodeBinding(binding));
|
|
238
|
+
decipher.setAuthTag(authTag);
|
|
239
|
+
const plaintext = Buffer.concat([decipher.update(ciphertext), decipher.final()]).toString('utf8');
|
|
240
|
+
if (plaintext.length === 0) {
|
|
241
|
+
throw new Error('empty plaintext');
|
|
242
|
+
}
|
|
243
|
+
return plaintext;
|
|
244
|
+
}
|
|
245
|
+
catch (error) {
|
|
246
|
+
// The cause is deliberately NOT propagated: a crypto-layer message is uninformative to an
|
|
247
|
+
// operator and informative to an attacker probing the envelope.
|
|
248
|
+
if (error instanceof ProviderCredentialEnvelopeError) {
|
|
249
|
+
throw error;
|
|
250
|
+
}
|
|
251
|
+
throw new ProviderCredentialEnvelopeError(`Provider credential for ${rowDescription} cannot be opened. Either it was sealed under different key `
|
|
252
|
+
+ 'material, or the stored value has been altered. Rotate the credential through the credential resource.');
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Whether two sealed envelopes are byte-identical, WITHOUT opening either.
|
|
257
|
+
*
|
|
258
|
+
* Returns false whenever it cannot tell — which, because the IV is random per seal, is almost always
|
|
259
|
+
* for two independent seals of the same secret. That is the honest answer and the reason this
|
|
260
|
+
* exists: the write path needs to know whether the stored value actually changed so it can emit a
|
|
261
|
+
* rotation event rather than a set event, and the only alternative was to open both and compare
|
|
262
|
+
* plaintexts, which puts two secrets in memory to answer a bookkeeping question. A false negative
|
|
263
|
+
* costs a slightly noisier audit trail; opening the values costs the property this module exists to
|
|
264
|
+
* hold.
|
|
265
|
+
*/
|
|
266
|
+
export function sealedProviderCredentialsAreIdentical(left, right) {
|
|
267
|
+
if (!isSealedProviderCredential(left) || !isSealedProviderCredential(right)) {
|
|
268
|
+
return false;
|
|
269
|
+
}
|
|
270
|
+
const leftBuffer = Buffer.from(left, 'utf8');
|
|
271
|
+
const rightBuffer = Buffer.from(right, 'utf8');
|
|
272
|
+
if (leftBuffer.length !== rightBuffer.length) {
|
|
273
|
+
return false;
|
|
274
|
+
}
|
|
275
|
+
return timingSafeEqual(leftBuffer, rightBuffer);
|
|
276
|
+
}
|
|
277
|
+
//# sourceMappingURL=provider-credential-envelope.backend.utils.js.map
|
package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider-credential-envelope.backend.utils.js","sourceRoot":"","sources":["../../../../../../src/security/connected-accounts/utils/provider-credential-envelope.backend.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AAEH,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEzG,OAAO,EAAE,sCAAsC,EAAE,MAAM,sCAAsC,CAAC;AAE9F;;;;;;;;;;;;;GAaG;AACH,MAAM,+BAA+B,GAGhC;IACH,CAAC,sCAAsC,CAAC,YAAY,CAAC,EAAE,2CAA2C;IAClG,CAAC,sCAAsC,CAAC,IAAI,CAAC,EAAE,mCAAmC;CACnF,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,2BAA2B,CAAC;AAE/E,mEAAmE;AACnE,MAAM,cAAc,GAAG,EAAE,CAAC;AAC1B,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEhC;;;;;GAKG;AACH,MAAM,UAAU,GAAG,uBAAuB,CAAC;AAE3C;;;;;;;;GAQG;AACH,MAAM,iBAAiB,GAAG,QAAQ,CAAC;AAEnC,wGAAwG;AACxG,MAAM,OAAO,+BAAgC,SAAQ,KAAK;IACxD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,iCAAiC,CAAC;IAChD,CAAC;CACF;AAgBD;;;;;;;;;;;GAWG;AACH,SAAS,2BAA2B,CAClC,iBAAyB,EACzB,UAA2D;IAE3D,IAAI,OAAO,iBAAiB,KAAK,QAAQ,IAAI,iBAAiB,CAAC,MAAM,GAAG,EAAE,EAAE,CAAC;QAC3E,MAAM,IAAI,+BAA+B,CACvC,gEAAgE;cAC9D,kGAAkG;cAClG,mGAAmG;cACnG,sDAAsD,CACzD,CAAC;IACJ,CAAC;IACD,MAAM,MAAM,GAAG,+BAA+B,CAAC,UAAU,CAAC,CAAC;IAC3D,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,+BAA+B,CACvC,6DAA6D,UAAU,gCAAgC;cACrG,kGAAkG;cAClG,kGAAkG,CACrG,CAAC;IACJ,CAAC;IACD,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,GAAG,MAAM,IAAI,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AAChF,CAAC;AAED;;;;;;GAMG;AACH,SAAS,aAAa,CAAC,OAA0C;IAC/D,OAAO,MAAM,CAAC,IAAI,CAChB,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,EAClF,MAAM,CACP,CAAC;AACJ,CAAC;AAED,qFAAqF;AACrF,MAAM,UAAU,0BAA0B,CAAC,KAAgC;IACzE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,UAAU,CAAC,mCAAmC,CAAC,CAAC;AAC5F,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CACpC,SAAiB,EACjB,iBAAyB,EACzB,OAA0C;IAE1C,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5D,MAAM,IAAI,+BAA+B,CAAC,gDAAgD,CAAC,CAAC;IAC9F,CAAC;IACD,4FAA4F;IAC5F,iGAAiG;IACjG,IAAI,0BAA0B,CAAC,SAAS,CAAC,EAAE,CAAC;QAC1C,MAAM,IAAI,+BAA+B,CACvC,sGAAsG;cACpG,0CAA0C,CAC7C,CAAC;IACJ,CAAC;IAED,MAAM,GAAG,GAAG,2BAA2B,CAAC,iBAAiB,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IAC/E,MAAM,EAAE,GAAG,WAAW,CAAC,cAAc,CAAC,CAAC;IACvC,MAAM,MAAM,GAAG,cAAc,CAAC,aAAa,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;IACtD,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC;IAEtC,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IACrF,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;IAEpC,OAAO,GAAG,mCAAmC,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;AAChI,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,sBAAsB,CACpC,WAAmB,EACnB,iBAAyB,EACzB,OAA0C;IAE1C,MAAM,cAAc,GAClB,GAAG,OAAO,CAAC,UAAU,KAAK,OAAO,CAAC,OAAO,gBAAgB,OAAO,CAAC,WAAW,YAAY,OAAO,CAAC,UAAU,GAAG,CAAC;IAEhH,IAAI,CAAC,0BAA0B,CAAC,WAAW,CAAC,EAAE,CAAC;QAC7C,MAAM,IAAI,+BAA+B,CACvC,kCAAkC,cAAc,uDAAuD;cACrG,qGAAqG;cACrG,kDAAkD,CACrD,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,mCAAmC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACvF,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,MAAM,IAAI,+BAA+B,CAAC,2BAA2B,cAAc,oBAAoB,CAAC,CAAC;IAC3G,CAAC;IACD,MAAM,CAAC,KAAK,EAAE,UAAU,EAAE,aAAa,CAAC,GAAG,KAAiC,CAAC;IAE7E,IAAI,CAAC;QACH,+FAA+F;QAC/F,gGAAgG;QAChG,gGAAgG;QAChG,gGAAgG;QAChG,mDAAmD;QACnD,EAAE;QACF,gGAAgG;QAChG,iGAAiG;QACjG,iGAAiG;QACjG,6FAA6F;QAC7F,yFAAyF;QACzF,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC;YAC/F,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;QACnD,CAAC;QAED,MAAM,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QACrC,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;QAC/C,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;QAErD,gGAAgG;QAChG,kGAAkG;QAClG,wDAAwD;QACxD,IAAI,EAAE,CAAC,MAAM,KAAK,cAAc,IAAI,OAAO,CAAC,MAAM,KAAK,oBAAoB,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvG,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;QACnD,CAAC;QAED,MAAM,GAAG,GAAG,2BAA2B,CAAC,iBAAiB,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;QAC/E,MAAM,QAAQ,GAAG,gBAAgB,CAAC,aAAa,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;QAC1D,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC;QACxC,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAE7B,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAClG,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;QACrC,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,0FAA0F;QAC1F,gEAAgE;QAChE,IAAI,KAAK,YAAY,+BAA+B,EAAE,CAAC;YACrD,MAAM,KAAK,CAAC;QACd,CAAC;QACD,MAAM,IAAI,+BAA+B,CACvC,2BAA2B,cAAc,8DAA8D;cACrG,wGAAwG,CAC3G,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,qCAAqC,CAAC,IAAY,EAAE,KAAa;IAC/E,IAAI,CAAC,0BAA0B,CAAC,IAAI,CAAC,IAAI,CAAC,0BAA0B,CAAC,KAAK,CAAC,EAAE,CAAC;QAC5E,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC7C,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAC/C,IAAI,UAAU,CAAC,MAAM,KAAK,WAAW,CAAC,MAAM,EAAE,CAAC;QAC7C,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,eAAe,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;AAClD,CAAC","sourcesContent":["/**\n * Sealing an OWNER's provider credential at rest — an organization's, or a person's own.\n *\n * ## What this is for\n *\n * A credential toward a third party is stored in the application's own database, in a row its owner\n * can create over HTTP. A database backup, a snapshot handed to a support engineer, or a read\n * replica reached through an unrelated defect would otherwise expose every stored vendor credential\n * in plaintext. Sealing them does not make the store safe to lose — nothing does — but it means\n * losing the store is not the same event as losing every tenant's and every person's Slack, CRM and\n * SMTP access.\n *\n * ## The key is the platform's existing material, deliberately\n *\n * `secrets.security.session.encryptionKey` is provisioned for every application by the platform\n * (apps-manager mints it, the schema requires at least 32 characters, and readiness refuses an\n * application without one). Introducing a second key here would mean a second thing to provision, a\n * second thing to rotate, and a second way for an application to be half-configured — and the first\n * application to hit that would discover it as \"my credentials cannot be decrypted\", after the\n * values were already stored.\n *\n * The base key is NOT used directly. It is domain-separated through SHA-256 so this subsystem's key\n * is unrelated to the session subsystem's, and to the SIEM delivery subsystem's, even though all\n * three derive from the same material. Without the separator, a weakness or an oracle in one becomes\n * a weakness in the others.\n *\n * ## AES-256-GCM, and why authentication is the load-bearing half\n *\n * GCM authenticates as well as encrypts, so a modified ciphertext FAILS rather than decrypting to\n * garbage. That matters more than the confidentiality here: an attacker with write access to the\n * store but not the key must not be able to flip a tenant's credential to a value of their choosing,\n * or to swap tenant A's sealed credential into tenant B's row and have it silently work. The\n * associated data below closes the second half of that.\n *\n * ## The envelope BINDS the row's identity\n *\n * The additional authenticated data is the owner, the provider and the slug. Moving a sealed value\n * to a different owner, a different provider or a different slug therefore makes it fail to open —\n * the seal is not merely \"this is a secret\", it is \"this is THIS owner's secret for THIS provider\".\n * Cut-and-paste of ciphertext between rows is the attack a plain AES-GCM envelope would let through,\n * and it is exactly the attack a shared multi-tenant table invites.\n *\n * ## The SCOPE separates the KEY, not the associated data\n *\n * An organization's credential and a person's own credential are sealed under DIFFERENT derived\n * keys, selected by `ownerScope`. Two reasons, and the second is why it is the key rather than one\n * more field in the associated data.\n *\n * A key split is strictly stronger: with a scope field in the AAD, one derived key protects both\n * populations, so anything that compromises it compromises both. With separate keys, a user\n * envelope cannot be opened as an organization envelope even by an attacker who controls the AAD.\n *\n * And it PRESERVES what is already stored. Adding a component to the associated data changes the\n * AAD of every organization envelope ever written, so every credential in every live application\n * would stop opening the moment this file changed — the failure would surface as \"my Slack\n * integration broke\", far from the edit that caused it. Selecting the key domain by scope leaves\n * the organization derivation and the organization AAD byte-identical, so existing rows are\n * untouched by construction rather than by care.\n *\n * ## A second implementation exists, and this is not it\n *\n * `siem-webhook-delivery.backend.service.ts` carries a private AES-256-GCM envelope with the same\n * shape and its own domain separator. It is deliberately NOT reused or refactored here: that file\n * belongs to another workstream's territory, its envelope binds no associated data, and it tolerates\n * plaintext for rows written before it existed — a tolerance this subsystem must not inherit.\n * Converging the two is real work with a real migration, and it is recorded as such rather than done\n * opportunistically inside a security slice.\n */\n\nimport { createCipheriv, createDecipheriv, createHash, randomBytes, timingSafeEqual } from 'node:crypto';\n\nimport { ExternalProvider_Connection_OwnerScope } from '@wildo-ai/external-connectors-models';\n\n/**\n * Domain separators, one per owner scope. Changing one of these strings makes every credential\n * stored under it unopenable, so they are versioned constants rather than descriptions: if a\n * derivation ever has to change, the new scheme gets a new prefix and a migration, never an edit\n * here.\n *\n * The ORGANIZATION value predates the USER scope and is reproduced exactly — every organization\n * credential in every live application is sealed under it.\n *\n * Total over the two scopes that reach a store. APPLICATION is deliberately absent rather than\n * mapped to something: the application's own credential lives in the deployment environment and\n * never enters this module, so a call arriving with that scope is a routing defect, and giving it a\n * key would let the defect store a row instead of announcing itself.\n */\nconst PROVIDER_CREDENTIAL_KEY_DOMAINS: Readonly<Record<\n ExternalProvider_Connection_OwnerScope.ORGANIZATION | ExternalProvider_Connection_OwnerScope.USER,\n string\n>> = {\n [ExternalProvider_Connection_OwnerScope.ORGANIZATION]: 'wildo:organization-provider-credential:v1',\n [ExternalProvider_Connection_OwnerScope.USER]: 'wildo:user-provider-credential:v1',\n};\n\n/**\n * Envelope prefix. Present so a stored value can be RECOGNISED as sealed without attempting to\n * decrypt it — which is what lets the write path refuse to persist an unsealed value, rather than\n * discovering the problem at read time when the plaintext is already at rest.\n */\nexport const PROVIDER_CREDENTIAL_ENVELOPE_PREFIX = 'wildo-sealed:aes-256-gcm:';\n\n/** 96 bits — the GCM nonce size every implementation agrees on. */\nconst IV_BYTE_LENGTH = 12;\nconst AUTH_TAG_BYTE_LENGTH = 16;\n\n/**\n * An even-length run of hex digits and nothing else.\n *\n * Even-length because two hex characters encode one byte — an odd-length component cannot have come\n * from `Buffer.toString('hex')`, and `Buffer.from` would drop the trailing nibble without complaint.\n */\nconst STRICT_HEX = /^(?:[0-9a-fA-F]{2})+$/;\n\n/**\n * The separator inside the associated data.\n *\n * A NUL, not a colon, and that is what makes the encoding injective: with a `:` join,\n * `('org', 'a:b', 'c')` and `('org', 'a', 'b:c')` produce IDENTICAL associated data, so a sealed\n * value could be moved between two rows whose identities differ only in where a colon falls. A NUL\n * cannot appear in any of the three components — they come from an id generator and from\n * schema-validated identifiers — so no two distinct identities can collide.\n */\nconst BINDING_SEPARATOR = '\\u0000';\n\n/** Raised when a sealed value cannot be sealed or opened. Never carries the value or any part of it. */\nexport class ProviderCredentialEnvelopeError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'ProviderCredentialEnvelopeError';\n }\n}\n\n/**\n * The row identity a sealed value is bound to. All four are required — see the module JSDoc.\n *\n * `ownerId` is the organization id or the user id, per `ownerScope`. One field rather than two\n * optional ones, because exactly one owner exists per row and a shape with two nullable ids can\n * represent a row with neither — a state the seal would then bind to nothing.\n */\nexport interface ProviderCredentialEnvelopeBinding {\n ownerScope: ExternalProvider_Connection_OwnerScope.ORGANIZATION | ExternalProvider_Connection_OwnerScope.USER;\n ownerId: string;\n providerRef: string;\n secretSlug: string;\n}\n\n/**\n * Derive this subsystem's 32-byte key for one owner scope from the platform's base key material.\n *\n * The refusal on a short or absent base key is deliberate and loud. The alternative — deriving from\n * whatever is there — would produce a working seal from a misconfigured application, and every\n * credential stored under it would be protected by a key an attacker could guess. A configuration\n * error must not be survivable here.\n *\n * The refusal on an unknown scope is the same posture applied to the routing question: a scope with\n * no domain must not silently fall back to another scope's key, because that would seal a person's\n * credential under the tenant key and make it openable by the wrong half of the system.\n */\nfunction deriveProviderCredentialKey(\n baseEncryptionKey: string,\n ownerScope: ProviderCredentialEnvelopeBinding['ownerScope'],\n): Buffer {\n if (typeof baseEncryptionKey !== 'string' || baseEncryptionKey.length < 32) {\n throw new ProviderCredentialEnvelopeError(\n 'Cannot seal or open a provider credential: the application\\'s '\n + 'secrets.security.session.encryptionKey is absent or shorter than the 32 characters the platform '\n + 'guarantees. This is a provisioning fault, not a runtime condition — an application reaching this '\n + 'point would store credentials under a guessable key.',\n );\n }\n const domain = PROVIDER_CREDENTIAL_KEY_DOMAINS[ownerScope];\n if (!domain) {\n throw new ProviderCredentialEnvelopeError(\n `Cannot seal or open a provider credential owned at scope '${ownerScope}': only ORGANIZATION and USER `\n + 'credentials are stored. An APPLICATION credential lives in the deployment environment and never '\n + 'reaches this module, so arriving here with one is a resolution defect rather than a missing key.',\n );\n }\n return createHash('sha256').update(`${domain}:${baseEncryptionKey}`).digest();\n}\n\n/**\n * The additional authenticated data — the row identity, unambiguously encoded.\n *\n * The SCOPE is deliberately not a component: it selects the key instead (module JSDoc), which both\n * separates the two populations more strongly and leaves the encoding of an organization row exactly\n * as it was before the USER scope existed.\n */\nfunction encodeBinding(binding: ProviderCredentialEnvelopeBinding): Buffer {\n return Buffer.from(\n [binding.ownerId, binding.providerRef, binding.secretSlug].join(BINDING_SEPARATOR),\n 'utf8',\n );\n}\n\n/** Whether a stored value is a sealed envelope. Cheap, and does not need the key. */\nexport function isSealedProviderCredential(value: string | undefined | null): boolean {\n return typeof value === 'string' && value.startsWith(PROVIDER_CREDENTIAL_ENVELOPE_PREFIX);\n}\n\n/**\n * Seal a plaintext credential for storage.\n *\n * Format: `wildo-sealed:aes-256-gcm:<iv hex>:<auth tag hex>:<ciphertext hex>`.\n */\nexport function sealProviderCredential(\n plaintext: string,\n baseEncryptionKey: string,\n binding: ProviderCredentialEnvelopeBinding,\n): string {\n if (typeof plaintext !== 'string' || plaintext.length === 0) {\n throw new ProviderCredentialEnvelopeError('Refusing to seal an empty provider credential.');\n }\n // Sealing an already-sealed value would double-wrap it, and the second open would return an\n // envelope string that a provider would then receive as its credential. Refuse rather than nest.\n if (isSealedProviderCredential(plaintext)) {\n throw new ProviderCredentialEnvelopeError(\n 'Refusing to seal a value that is already a sealed envelope — double-sealing would hand the envelope '\n + 'itself to the provider on the next open.',\n );\n }\n\n const key = deriveProviderCredentialKey(baseEncryptionKey, binding.ownerScope);\n const iv = randomBytes(IV_BYTE_LENGTH);\n const cipher = createCipheriv('aes-256-gcm', key, iv);\n cipher.setAAD(encodeBinding(binding));\n\n const ciphertext = Buffer.concat([cipher.update(plaintext, 'utf8'), cipher.final()]);\n const authTag = cipher.getAuthTag();\n\n return `${PROVIDER_CREDENTIAL_ENVELOPE_PREFIX}${iv.toString('hex')}:${authTag.toString('hex')}:${ciphertext.toString('hex')}`;\n}\n\n/**\n * Open a sealed credential.\n *\n * Every failure — a malformed envelope, a wrong key, a tampered ciphertext, a value lifted from\n * another tenant's row — raises the SAME error type with a message that names the row and nothing\n * else. Distinguishing the causes in the message would tell an attacker holding write access which\n * of their manipulations got closer.\n *\n * Plaintext is REFUSED rather than passed through. The SIEM sibling tolerates it because it has rows\n * predating its own encryption; this subsystem shipped sealed, so a plaintext value in the store can\n * only mean the write path was bypassed — a fact worth failing on, not one worth quietly working\n * around.\n */\nexport function openProviderCredential(\n sealedValue: string,\n baseEncryptionKey: string,\n binding: ProviderCredentialEnvelopeBinding,\n): string {\n const rowDescription =\n `${binding.ownerScope} '${binding.ownerId}', provider '${binding.providerRef}', slug '${binding.secretSlug}'`;\n\n if (!isSealedProviderCredential(sealedValue)) {\n throw new ProviderCredentialEnvelopeError(\n `Stored provider credential for ${rowDescription} is not a sealed envelope. Credentials are sealed on `\n + 'write, so an unsealed value means the row was written by something other than the credential write '\n + 'path. Rotate it through the credential resource.',\n );\n }\n\n const parts = sealedValue.slice(PROVIDER_CREDENTIAL_ENVELOPE_PREFIX.length).split(':');\n if (parts.length !== 3) {\n throw new ProviderCredentialEnvelopeError(`Provider credential for ${rowDescription} cannot be opened.`);\n }\n const [ivHex, authTagHex, ciphertextHex] = parts as [string, string, string];\n\n try {\n // STRICT hex first, before any decoding. `Buffer.from(value, 'hex')` does not throw on invalid\n // input — it silently STOPS at the first non-hex character and returns the prefix it managed to\n // decode. So a stored envelope with trailing garbage would decode to exactly the original bytes\n // and open successfully, and a component with junk in the middle would decode to a short buffer\n // that the length checks below might still accept.\n //\n // That is not a break of the seal (GCM still authenticates the bytes it is given, so nobody can\n // CHANGE the credential this way) but it does mean a value that is not what was written could be\n // accepted as if it were. This module's posture everywhere else is that a stored value which the\n // write path could not have produced is a fault worth failing on, and this is the same rule.\n // Found by a pin whose \"tampered\" fixture appended non-hex characters and opened anyway.\n if (!STRICT_HEX.test(ivHex) || !STRICT_HEX.test(authTagHex) || !STRICT_HEX.test(ciphertextHex)) {\n throw new Error('malformed envelope components');\n }\n\n const iv = Buffer.from(ivHex, 'hex');\n const authTag = Buffer.from(authTagHex, 'hex');\n const ciphertext = Buffer.from(ciphertextHex, 'hex');\n\n // `createDecipheriv` accepts a wrong-length IV for GCM, and a wrong-length tag is rejected only\n // at `final()`. Both are checked here: a truncated tag is the classic GCM forgery attempt, and it\n // should be refused before any decryption work happens.\n if (iv.length !== IV_BYTE_LENGTH || authTag.length !== AUTH_TAG_BYTE_LENGTH || ciphertext.length === 0) {\n throw new Error('malformed envelope components');\n }\n\n const key = deriveProviderCredentialKey(baseEncryptionKey, binding.ownerScope);\n const decipher = createDecipheriv('aes-256-gcm', key, iv);\n decipher.setAAD(encodeBinding(binding));\n decipher.setAuthTag(authTag);\n\n const plaintext = Buffer.concat([decipher.update(ciphertext), decipher.final()]).toString('utf8');\n if (plaintext.length === 0) {\n throw new Error('empty plaintext');\n }\n return plaintext;\n } catch (error) {\n // The cause is deliberately NOT propagated: a crypto-layer message is uninformative to an\n // operator and informative to an attacker probing the envelope.\n if (error instanceof ProviderCredentialEnvelopeError) {\n throw error;\n }\n throw new ProviderCredentialEnvelopeError(\n `Provider credential for ${rowDescription} cannot be opened. Either it was sealed under different key `\n + 'material, or the stored value has been altered. Rotate the credential through the credential resource.',\n );\n }\n}\n\n/**\n * Whether two sealed envelopes are byte-identical, WITHOUT opening either.\n *\n * Returns false whenever it cannot tell — which, because the IV is random per seal, is almost always\n * for two independent seals of the same secret. That is the honest answer and the reason this\n * exists: the write path needs to know whether the stored value actually changed so it can emit a\n * rotation event rather than a set event, and the only alternative was to open both and compare\n * plaintexts, which puts two secrets in memory to answer a bookkeeping question. A false negative\n * costs a slightly noisier audit trail; opening the values costs the property this module exists to\n * hold.\n */\nexport function sealedProviderCredentialsAreIdentical(left: string, right: string): boolean {\n if (!isSealedProviderCredential(left) || !isSealedProviderCredential(right)) {\n return false;\n }\n const leftBuffer = Buffer.from(left, 'utf8');\n const rightBuffer = Buffer.from(right, 'utf8');\n if (leftBuffer.length !== rightBuffer.length) {\n return false;\n }\n return timingSafeEqual(leftBuffer, rightBuffer);\n}\n"]}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Turning what a credential row STORES into what goes on the wire.
|
|
3
|
+
*
|
|
4
|
+
* Two things can be sealed into `secretValue`, and they are spent differently:
|
|
5
|
+
*
|
|
6
|
+
* - a credential a person PASTED, which is already the wire value;
|
|
7
|
+
* - an OAuth2 grant a vendor MINTED, whose wire value is one field of a JSON document.
|
|
8
|
+
*
|
|
9
|
+
* This is the single place that distinction is resolved. It exists as one function rather than a
|
|
10
|
+
* branch in each store because both stores — organization and user — hold both shapes, and an
|
|
11
|
+
* invariant applied at one of its two call sites is this repository's most repeated defect. The
|
|
12
|
+
* failure it prevents is specific and silent: a store that returned the opened plaintext directly
|
|
13
|
+
* would put `wildo-oauth2-grant:{"kind":…}` on the wire as a bearer token, and the vendor's 401
|
|
14
|
+
* would name a credential problem rather than a serialization one.
|
|
15
|
+
*
|
|
16
|
+
* assurance-control: WILDO.IDENTITY.DELEGATED_AUTHORIZATION — the token actually presented to a
|
|
17
|
+
* third party is derived from the stored grant rather than from whatever the field happens to hold.
|
|
18
|
+
*/
|
|
19
|
+
import { type ProviderOAuth2Grant } from '@wildo-ai/saas-models';
|
|
20
|
+
/** Raised when a stored credential cannot be turned into a wire value. Never carries the value. */
|
|
21
|
+
export declare class StoredCredentialValueError extends Error {
|
|
22
|
+
constructor(message: string);
|
|
23
|
+
}
|
|
24
|
+
export interface ResolvedStoredCredential {
|
|
25
|
+
/**
|
|
26
|
+
* What goes in the Authorization header.
|
|
27
|
+
*
|
|
28
|
+
* Empty string when {@link needsRefresh} is set — there is no honest wire value for a grant that
|
|
29
|
+
* must be renewed first, and returning the expired token would let a caller that ignored the flag
|
|
30
|
+
* send it. A caller must branch on `needsRefresh` before reading this.
|
|
31
|
+
*/
|
|
32
|
+
readonly wireValue: string;
|
|
33
|
+
/**
|
|
34
|
+
* The grant is expiring and a refresher is available: the caller must renew it, persist the
|
|
35
|
+
* result, and use the renewed access token.
|
|
36
|
+
*
|
|
37
|
+
* A FLAG rather than a refresh performed here, because renewing needs the provider contract and
|
|
38
|
+
* the application's registration while persisting needs the table and the envelope key — and this
|
|
39
|
+
* function is a pure transformation with neither.
|
|
40
|
+
*/
|
|
41
|
+
readonly needsRefresh?: true;
|
|
42
|
+
/**
|
|
43
|
+
* The grant it came from, when it came from one. Carried out so a caller can record what the
|
|
44
|
+
* vendor granted, or refresh it — and ABSENT for a pasted credential, which is what lets a caller
|
|
45
|
+
* tell the two apart without re-parsing.
|
|
46
|
+
*/
|
|
47
|
+
readonly grant?: ProviderOAuth2Grant;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Resolve the opened plaintext of one credential row into the value a request should carry.
|
|
51
|
+
*
|
|
52
|
+
* @param plaintext the opened envelope contents — already decrypted, never the sealed form.
|
|
53
|
+
* @param describeRow how to name the row in a refusal. Never the value, and never the owner's id
|
|
54
|
+
* alone: an operator reading a log needs the provider and slug to act.
|
|
55
|
+
*/
|
|
56
|
+
export declare function resolveStoredCredentialValue(plaintext: string, describeRow: string,
|
|
57
|
+
/**
|
|
58
|
+
* Whether the caller can actually renew an expiring grant.
|
|
59
|
+
*
|
|
60
|
+
* Passed in rather than assumed, so the two outcomes stay distinguishable: with a refresher this
|
|
61
|
+
* returns `needsRefresh` and the caller renews; without one it REFUSES, naming the missing
|
|
62
|
+
* subsystem. Defaulting to "yes" would have a store with no refresher return `needsRefresh` and
|
|
63
|
+
* then dereference a refresher it does not hold.
|
|
64
|
+
*/
|
|
65
|
+
canRefresh?: boolean): ResolvedStoredCredential;
|
|
66
|
+
//# sourceMappingURL=stored-credential-value.backend.utils.d.ts.map
|
package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stored-credential-value.backend.utils.d.ts","sourceRoot":"","sources":["../../../../../../src/security/connected-accounts/utils/stored-credential-value.backend.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,uBAAuB,CAAC;AAE/B,mGAAmG;AACnG,qBAAa,0BAA2B,SAAQ,KAAK;gBACvC,OAAO,EAAE,MAAM;CAI5B;AAED,MAAM,WAAW,wBAAwB;IACvC;;;;;;OAMG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;;;;;;OAOG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,IAAI,CAAC;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,mBAAmB,CAAC;CACtC;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM;AACnB;;;;;;;GAOG;AACH,UAAU,UAAQ,GACjB,wBAAwB,CAmC1B"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Turning what a credential row STORES into what goes on the wire.
|
|
3
|
+
*
|
|
4
|
+
* Two things can be sealed into `secretValue`, and they are spent differently:
|
|
5
|
+
*
|
|
6
|
+
* - a credential a person PASTED, which is already the wire value;
|
|
7
|
+
* - an OAuth2 grant a vendor MINTED, whose wire value is one field of a JSON document.
|
|
8
|
+
*
|
|
9
|
+
* This is the single place that distinction is resolved. It exists as one function rather than a
|
|
10
|
+
* branch in each store because both stores — organization and user — hold both shapes, and an
|
|
11
|
+
* invariant applied at one of its two call sites is this repository's most repeated defect. The
|
|
12
|
+
* failure it prevents is specific and silent: a store that returned the opened plaintext directly
|
|
13
|
+
* would put `wildo-oauth2-grant:{"kind":…}` on the wire as a bearer token, and the vendor's 401
|
|
14
|
+
* would name a credential problem rather than a serialization one.
|
|
15
|
+
*
|
|
16
|
+
* assurance-control: WILDO.IDENTITY.DELEGATED_AUTHORIZATION — the token actually presented to a
|
|
17
|
+
* third party is derived from the stored grant rather than from whatever the field happens to hold.
|
|
18
|
+
*/
|
|
19
|
+
import { parseProviderOAuth2Grant, providerOAuth2GrantNeedsRefresh, } from '@wildo-ai/saas-models';
|
|
20
|
+
/** Raised when a stored credential cannot be turned into a wire value. Never carries the value. */
|
|
21
|
+
export class StoredCredentialValueError extends Error {
|
|
22
|
+
constructor(message) {
|
|
23
|
+
super(message);
|
|
24
|
+
this.name = 'StoredCredentialValueError';
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Resolve the opened plaintext of one credential row into the value a request should carry.
|
|
29
|
+
*
|
|
30
|
+
* @param plaintext the opened envelope contents — already decrypted, never the sealed form.
|
|
31
|
+
* @param describeRow how to name the row in a refusal. Never the value, and never the owner's id
|
|
32
|
+
* alone: an operator reading a log needs the provider and slug to act.
|
|
33
|
+
*/
|
|
34
|
+
export function resolveStoredCredentialValue(plaintext, describeRow,
|
|
35
|
+
/**
|
|
36
|
+
* Whether the caller can actually renew an expiring grant.
|
|
37
|
+
*
|
|
38
|
+
* Passed in rather than assumed, so the two outcomes stay distinguishable: with a refresher this
|
|
39
|
+
* returns `needsRefresh` and the caller renews; without one it REFUSES, naming the missing
|
|
40
|
+
* subsystem. Defaulting to "yes" would have a store with no refresher return `needsRefresh` and
|
|
41
|
+
* then dereference a refresher it does not hold.
|
|
42
|
+
*/
|
|
43
|
+
canRefresh = false) {
|
|
44
|
+
// Throws when the value announces itself as a grant and is not one — deliberately not caught. A
|
|
45
|
+
// credential claiming a shape it does not have was written by something other than the exchange,
|
|
46
|
+
// and falling back to "treat it as pasted" would send the malformed document itself as a token.
|
|
47
|
+
const grant = parseProviderOAuth2Grant(plaintext);
|
|
48
|
+
if (grant === undefined) {
|
|
49
|
+
return { wireValue: plaintext };
|
|
50
|
+
}
|
|
51
|
+
if (providerOAuth2GrantNeedsRefresh(grant)) {
|
|
52
|
+
if (canRefresh) {
|
|
53
|
+
return { wireValue: '', grant, needsRefresh: true };
|
|
54
|
+
}
|
|
55
|
+
// Fail CLOSED, and name the missing subsystem rather than the credential.
|
|
56
|
+
//
|
|
57
|
+
// The alternative — send it anyway and let the vendor reject it — was rejected: the 401 comes
|
|
58
|
+
// back as an authentication failure, the row is stamped INVALID, and the person reading their
|
|
59
|
+
// connections is told their credential is bad when it is merely stale. That is a false statement
|
|
60
|
+
// about their account, and it points them at reconnecting rather than at the refresh that does
|
|
61
|
+
// not run.
|
|
62
|
+
//
|
|
63
|
+
// The population is NO LONGER empty. This was written when nothing could store a grant, so the
|
|
64
|
+
// refusal was unreachable; the authorization exchange has since landed and real grants are
|
|
65
|
+
// stored, which makes this the live answer whenever a store is constructed without a refresher.
|
|
66
|
+
// The engine's container always binds one — pinned in `container-boot-graph-resolves.test.ts`,
|
|
67
|
+
// because the injection is `@optional()` and an absent binding is otherwise silent for about an
|
|
68
|
+
// hour. So reaching this in a running application means the wiring is wrong, not the credential.
|
|
69
|
+
throw new StoredCredentialValueError(`The OAuth2 grant for ${describeRow} has expired or is within the refresh window, and no token `
|
|
70
|
+
+ 'refresher is wired to renew it. The stored credential is not at fault — reconnecting would '
|
|
71
|
+
+ 'work, and so would the refresh exchange once it exists.');
|
|
72
|
+
}
|
|
73
|
+
return { wireValue: grant.accessToken, grant };
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=stored-credential-value.backend.utils.js.map
|
package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stored-credential-value.backend.utils.js","sourceRoot":"","sources":["../../../../../../src/security/connected-accounts/utils/stored-credential-value.backend.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EACL,wBAAwB,EACxB,+BAA+B,GAEhC,MAAM,uBAAuB,CAAC;AAE/B,mGAAmG;AACnG,MAAM,OAAO,0BAA2B,SAAQ,KAAK;IACnD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,4BAA4B,CAAC;IAC3C,CAAC;CACF;AA4BD;;;;;;GAMG;AACH,MAAM,UAAU,4BAA4B,CAC1C,SAAiB,EACjB,WAAmB;AACnB;;;;;;;GAOG;AACH,UAAU,GAAG,KAAK;IAElB,gGAAgG;IAChG,iGAAiG;IACjG,gGAAgG;IAChG,MAAM,KAAK,GAAG,wBAAwB,CAAC,SAAS,CAAC,CAAC;IAClD,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;IAClC,CAAC;IAED,IAAI,+BAA+B,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3C,IAAI,UAAU,EAAE,CAAC;YACf,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;QACtD,CAAC;QACD,0EAA0E;QAC1E,EAAE;QACF,8FAA8F;QAC9F,8FAA8F;QAC9F,iGAAiG;QACjG,+FAA+F;QAC/F,WAAW;QACX,EAAE;QACF,+FAA+F;QAC/F,2FAA2F;QAC3F,gGAAgG;QAChG,+FAA+F;QAC/F,gGAAgG;QAChG,iGAAiG;QACjG,MAAM,IAAI,0BAA0B,CAClC,wBAAwB,WAAW,6DAA6D;cAC9F,6FAA6F;cAC7F,yDAAyD,CAC5D,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,WAAW,EAAE,KAAK,EAAE,CAAC;AACjD,CAAC","sourcesContent":["/**\n * Turning what a credential row STORES into what goes on the wire.\n *\n * Two things can be sealed into `secretValue`, and they are spent differently:\n *\n * - a credential a person PASTED, which is already the wire value;\n * - an OAuth2 grant a vendor MINTED, whose wire value is one field of a JSON document.\n *\n * This is the single place that distinction is resolved. It exists as one function rather than a\n * branch in each store because both stores — organization and user — hold both shapes, and an\n * invariant applied at one of its two call sites is this repository's most repeated defect. The\n * failure it prevents is specific and silent: a store that returned the opened plaintext directly\n * would put `wildo-oauth2-grant:{\"kind\":…}` on the wire as a bearer token, and the vendor's 401\n * would name a credential problem rather than a serialization one.\n *\n * assurance-control: WILDO.IDENTITY.DELEGATED_AUTHORIZATION — the token actually presented to a\n * third party is derived from the stored grant rather than from whatever the field happens to hold.\n */\n\nimport {\n parseProviderOAuth2Grant,\n providerOAuth2GrantNeedsRefresh,\n type ProviderOAuth2Grant,\n} from '@wildo-ai/saas-models';\n\n/** Raised when a stored credential cannot be turned into a wire value. Never carries the value. */\nexport class StoredCredentialValueError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'StoredCredentialValueError';\n }\n}\n\nexport interface ResolvedStoredCredential {\n /**\n * What goes in the Authorization header.\n *\n * Empty string when {@link needsRefresh} is set — there is no honest wire value for a grant that\n * must be renewed first, and returning the expired token would let a caller that ignored the flag\n * send it. A caller must branch on `needsRefresh` before reading this.\n */\n readonly wireValue: string;\n /**\n * The grant is expiring and a refresher is available: the caller must renew it, persist the\n * result, and use the renewed access token.\n *\n * A FLAG rather than a refresh performed here, because renewing needs the provider contract and\n * the application's registration while persisting needs the table and the envelope key — and this\n * function is a pure transformation with neither.\n */\n readonly needsRefresh?: true;\n /**\n * The grant it came from, when it came from one. Carried out so a caller can record what the\n * vendor granted, or refresh it — and ABSENT for a pasted credential, which is what lets a caller\n * tell the two apart without re-parsing.\n */\n readonly grant?: ProviderOAuth2Grant;\n}\n\n/**\n * Resolve the opened plaintext of one credential row into the value a request should carry.\n *\n * @param plaintext the opened envelope contents — already decrypted, never the sealed form.\n * @param describeRow how to name the row in a refusal. Never the value, and never the owner's id\n * alone: an operator reading a log needs the provider and slug to act.\n */\nexport function resolveStoredCredentialValue(\n plaintext: string,\n describeRow: string,\n /**\n * Whether the caller can actually renew an expiring grant.\n *\n * Passed in rather than assumed, so the two outcomes stay distinguishable: with a refresher this\n * returns `needsRefresh` and the caller renews; without one it REFUSES, naming the missing\n * subsystem. Defaulting to \"yes\" would have a store with no refresher return `needsRefresh` and\n * then dereference a refresher it does not hold.\n */\n canRefresh = false,\n): ResolvedStoredCredential {\n // Throws when the value announces itself as a grant and is not one — deliberately not caught. A\n // credential claiming a shape it does not have was written by something other than the exchange,\n // and falling back to \"treat it as pasted\" would send the malformed document itself as a token.\n const grant = parseProviderOAuth2Grant(plaintext);\n if (grant === undefined) {\n return { wireValue: plaintext };\n }\n\n if (providerOAuth2GrantNeedsRefresh(grant)) {\n if (canRefresh) {\n return { wireValue: '', grant, needsRefresh: true };\n }\n // Fail CLOSED, and name the missing subsystem rather than the credential.\n //\n // The alternative — send it anyway and let the vendor reject it — was rejected: the 401 comes\n // back as an authentication failure, the row is stamped INVALID, and the person reading their\n // connections is told their credential is bad when it is merely stale. That is a false statement\n // about their account, and it points them at reconnecting rather than at the refresh that does\n // not run.\n //\n // The population is NO LONGER empty. This was written when nothing could store a grant, so the\n // refusal was unreachable; the authorization exchange has since landed and real grants are\n // stored, which makes this the live answer whenever a store is constructed without a refresher.\n // The engine's container always binds one — pinned in `container-boot-graph-resolves.test.ts`,\n // because the injection is `@optional()` and an absent binding is otherwise silent for about an\n // hour. So reaching this in a running application means the wiring is wrong, not the credential.\n throw new StoredCredentialValueError(\n `The OAuth2 grant for ${describeRow} has expired or is within the refresh window, and no token `\n + 'refresher is wired to renew it. The stored credential is not at fault — reconnecting would '\n + 'work, and so would the refresh exchange once it exists.',\n );\n }\n\n return { wireValue: grant.accessToken, grant };\n}\n"]}
|
|
@@ -7,7 +7,24 @@
|
|
|
7
7
|
* 3. Hard delete cleanup-eligible exhausted BOUNDED_REUSE tokens
|
|
8
8
|
* 4. Hard delete cleanup-eligible revoked tokens older than 7 days
|
|
9
9
|
*
|
|
10
|
-
* Uses bulk `
|
|
10
|
+
* Uses the infrastructure tier's bulk `deleteManyForInfrastructure` door for performance at scale.
|
|
11
|
+
*
|
|
12
|
+
* ## ADAPTER-NEUTRAL, and it was not until 2026-09-01
|
|
13
|
+
*
|
|
14
|
+
* `ConsumableTokenBackendService` moved off the native MongoDB collection onto the adapter-neutral
|
|
15
|
+
* repositories plane on 2026-08-25. This batch — the resource's only other database caller — was the
|
|
16
|
+
* one call site that migration missed, and it kept resolving `MongoDBService`, taking
|
|
17
|
+
* `getConnection()` and issuing four raw `collection.deleteMany(...)`.
|
|
18
|
+
*
|
|
19
|
+
* The consequence was invisible for as long as every application ran a mongod BESIDE PostgreSQL:
|
|
20
|
+
* tokens were written to whichever store the resource is bound to, and the sweep reaped them from
|
|
21
|
+
* Mongo. `wonder-crm` — PostgreSQL on both planes, no mongod at all — is the first application where
|
|
22
|
+
* the two disagree, and there the fail-closed throw below fired every six hours from the day it was
|
|
23
|
+
* created, so the framework's only credential-retention sweep had never run: spent password-reset,
|
|
24
|
+
* invitation, email-verification and magic-link rows accumulate with nothing to remove them.
|
|
25
|
+
*
|
|
26
|
+
* `.claude/rules/invariant-call-site-enumeration.md` is the shape — an invariant applied at one of
|
|
27
|
+
* its N sites, where the miss is silent because the surviving site is the one nobody watches.
|
|
11
28
|
*
|
|
12
29
|
* Integration with Queue System:
|
|
13
30
|
* - Registered as a core engine batch in StartApplicationBackendService
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consumable-tokens-cleanup.batch.backend.service.d.ts","sourceRoot":"","sources":["../../../../../../src/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"consumable-tokens-cleanup.batch.backend.service.d.ts","sourceRoot":"","sources":["../../../../../../src/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAGH,OAAO,EAAE,iCAAiC,EAAE,MAAM,4FAA4F,CAAC;AAuC/I;;;;GAIG;AACH,wBAAgB,kCAAkC,IAAI,UAAU,CAAC,OAAO,iCAAiC,CAAC,CAsLzG"}
|