@wildo-ai/saas-backend-lib 1.1.3 → 1.1.4
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/__tests__/fixture-deep-partial.d.ts.map +1 -1
- package/dist/esm/__tests__/integration/redis-integration-gate.d.ts.map +1 -1
- package/dist/esm/__tests__/setup.d.ts.map +1 -1
- package/dist/esm/__tests__/test-container.d.ts.map +1 -1
- package/dist/esm/applications/models/applications.backend.schemas.d.ts.map +1 -1
- package/dist/esm/applications/seeds/application-metadata-defaults.seeds.d.ts.map +1 -1
- 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.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.map +1 -1
- package/dist/esm/base-classes/models/repositories.backend.schemas.d.ts.map +1 -1
- package/dist/esm/base-classes/services/__tests__/mock-resource-operation-helper.service.d.ts +1 -1
- package/dist/esm/base-classes/services/__tests__/mock-resource-operation-helper.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/batches/batches-cronjobs-custom-execution.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/batches/batches-cronjobs-executor.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/batches/batches-cronjobs-resource-execution.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.js +12 -1
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.js.map +1 -1
- 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.map +1 -1
- package/dist/esm/base-classes/services/batches/resource-retention-sweep.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/batches/suspension-reactivation-sweep.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/controllers/abstract-controller.backend.service.d.ts.map +1 -1
- 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.map +1 -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.map +1 -1
- package/dist/esm/base-classes/services/controllers/utils/audit-access-fields.backend.utils.d.ts.map +1 -1
- package/dist/esm/base-classes/services/controllers/utils/operation-response-serializer.backend.utils.d.ts.map +1 -1
- package/dist/esm/base-classes/services/controllers/validate-field-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/__tests__/method-span-scan.guard-helpers.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/__tests__/mock-repositories-registry-handler.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/field-clearing-partition.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-filter-translation.backend.d.ts.map +1 -1
- 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 +13 -4
- 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-query.backend.d.ts.map +1 -1
- 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 +17 -0
- 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.map +1 -1
- 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.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-row-projection.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-subject-erasure-effect.backend.d.ts.map +1 -1
- 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.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/odoo-jsonrpc-compiler.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/rest-json-query-compiler.backend.d.ts.map +1 -1
- 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.map +1 -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-source.backend.port.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.d.ts +57 -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 +95 -2
- 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.map +1 -1
- package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/repository-guarded-mutation.backend.types.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.d.ts +5 -2
- 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 +14 -3
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/repository-version-metadata.backend.utils.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/resource-write-integrity.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/seed-row-default-materialization.backend.d.ts +72 -0
- package/dist/esm/base-classes/services/repositories/seed-row-default-materialization.backend.d.ts.map +1 -0
- package/dist/esm/base-classes/services/repositories/seed-row-default-materialization.backend.js +88 -0
- package/dist/esm/base-classes/services/repositories/seed-row-default-materialization.backend.js.map +1 -0
- package/dist/esm/base-classes/services/repositories/unique-constraint-conflict-reference.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/resource-operations-helper.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/__tests__/mock-services-registry-handler.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/__tests__/mock-system-access.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/read-only-field-change.backend.utils.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-audit-emission.backend.utils.d.ts.map +1 -1
- 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-custom-implementation-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation.factory.backend.d.ts.map +1 -1
- 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-server-injected-fields.backend.utils.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-transaction-persistence.backend.utils.d.ts.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.map +1 -1
- 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.map +1 -1
- 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 +44 -6
- 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.map +1 -1
- package/dist/esm/base-classes/services/services/system-access.backend.service.js.map +1 -1
- package/dist/esm/base-classes/utils/backend-type-utils.d.ts.map +1 -1
- package/dist/esm/base-classes/utils/single-subject-addressing.backend.utils.d.ts.map +1 -1
- package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.js.map +1 -1
- package/dist/esm/billing/batches/usage-flush.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/batches/usage-flush.batch.backend.service.js.map +1 -1
- package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.d.ts.map +1 -1
- package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.js.map +1 -1
- package/dist/esm/billing/services/back-office/abstract-billing.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/back-office/billing-feature-sync.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.d.ts +1 -1
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.js +5 -4
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.js.map +1 -1
- package/dist/esm/billing/services/back-office/billing-state.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/back-office/billing-state.backend.service.js +11 -1
- package/dist/esm/billing/services/back-office/billing-state.backend.service.js.map +1 -1
- package/dist/esm/billing/services/back-office/billing-subject-erasure-effect.backend.d.ts.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- package/dist/esm/billing/services/billing-adapter-registry.backend.d.ts.map +1 -1
- package/dist/esm/billing/services/billing-adapter-registry.backend.js.map +1 -1
- 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.map +1 -1
- package/dist/esm/billing/services/billing.utils.d.ts.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.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.d.ts +32 -0
- 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 +32 -1
- 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.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/credit-pool.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.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.d.ts +9 -6
- 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 +9 -6
- 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.map +1 -1
- package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.js.map +1 -1
- package/dist/esm/billing/services/webhooks/billing-webhook-adapter.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/webhooks/billing-webhook-capability-handler.backend.service.d.ts.map +1 -1
- 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 +50 -3
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.js.map +1 -1
- package/dist/esm/billing/testing/billing-test-fixtures.d.ts.map +1 -1
- package/dist/esm/billing/testing/mock-billing-provider.d.ts.map +1 -1
- package/dist/esm/billing/testing/mock-billing-provider.js.map +1 -1
- package/dist/esm/charts/controllers/chart.backend.controller.d.ts.map +1 -1
- package/dist/esm/charts/services/chart-registry.backend.service.d.ts +80 -7
- package/dist/esm/charts/services/chart-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/charts/services/chart-registry.backend.service.js +115 -8
- package/dist/esm/charts/services/chart-registry.backend.service.js.map +1 -1
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-logs.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/batches/audit-logs-archive.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/batches/audit-logs-archive.batch.backend.service.js.map +1 -1
- package/dist/esm/compliance/audit-trails/batches/immudb-audit-reconcile.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/batches/siem-webhook-delivery.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/__tests__/mock-audit-logs.service.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.d.ts +107 -4
- 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 +176 -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.map +1 -1
- package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.js.map +1 -1
- 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.map +1 -1
- package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.js.map +1 -1
- 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 +21 -0
- package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/utils/ocsf-class-mapping.backend.utils.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/utils/siem-dictionary.backend.utils.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/utils/siem-ocsf-projection.backend.utils.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/utils/siem-projection-contract.backend.utils.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/utils/audit-actor.backend.utils.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/utils/layer2-audit-provider-boot-diagnostic.backend.utils.d.ts.map +1 -1
- package/dist/esm/compliance/index.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/retention-hide-predicate.backend.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/services/subject-erasure-external-effects.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/services/subject-session-revocation.backend.service.d.ts.map +1 -1
- package/dist/esm/config/bootstrap/application-runtime-profile.backend.d.ts.map +1 -1
- package/dist/esm/config/bootstrap/application-runtime-profile.backend.js.map +1 -1
- package/dist/esm/config/bootstrap/minion-initialization-projection.backend.d.ts.map +1 -1
- package/dist/esm/config/bootstrap/runtime-principal-attestation.backend.service.d.ts.map +1 -1
- package/dist/esm/config/bootstrap/runtime-principal-attestation.backend.service.js +3 -0
- package/dist/esm/config/bootstrap/runtime-principal-attestation.backend.service.js.map +1 -1
- package/dist/esm/config/bootstrap/runtime-principal.backend.service.d.ts.map +1 -1
- package/dist/esm/config/custom/application-config-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/config/models/app-config-secrets.backend.schemas.d.ts.map +1 -1
- package/dist/esm/config/models/app-config.backend-authored.definitions.d.ts.map +1 -1
- package/dist/esm/config/models/app-config.backend.schemas.d.ts +4 -4
- package/dist/esm/config/models/app-config.backend.schemas.d.ts.map +1 -1
- package/dist/esm/config/models/app-config.backend.schemas.js.map +1 -1
- package/dist/esm/config/models/app-env-config.backend.schemas.d.ts.map +1 -1
- package/dist/esm/config/models/apps-manager-transport.backend.definitions.d.ts +36 -0
- package/dist/esm/config/models/apps-manager-transport.backend.definitions.d.ts.map +1 -0
- package/dist/esm/config/models/apps-manager-transport.backend.definitions.js +36 -0
- package/dist/esm/config/models/apps-manager-transport.backend.definitions.js.map +1 -0
- package/dist/esm/config/models/config-mutation-boundary.utils.d.ts.map +1 -1
- package/dist/esm/config/models/postgresql-env-config.backend.schemas.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/config/models/runtime-topology.backend.contracts.d.ts.map +1 -1
- package/dist/esm/config/services/__tests__/mock-app-configuration.service.d.ts.map +1 -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 +3 -0
- 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.map +1 -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.map +1 -1
- package/dist/esm/config/services/application-startup-config-validator.backend.service.d.ts +12 -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 +28 -0
- package/dist/esm/config/services/application-startup-config-validator.backend.service.js.map +1 -1
- package/dist/esm/data-seeding/batches/data-seeding-run-cleanup.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/data-seeding/batches/data-seeding-scheduled-rerun.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/data-seeding/controllers/data-seeding-admin.backend.contracts.d.ts.map +1 -1
- package/dist/esm/data-seeding/controllers/data-seeding-admin.backend.controller.d.ts.map +1 -1
- package/dist/esm/data-seeding/data-seeding-models.d.ts.map +1 -1
- package/dist/esm/data-seeding/models/business-key-resolver.shared.utils.d.ts.map +1 -1
- package/dist/esm/data-seeding/models/data-seed-execution-context.shared.types.d.ts.map +1 -1
- package/dist/esm/data-seeding/models/data-seed-migrator-runner.shared.utils.d.ts.map +1 -1
- package/dist/esm/data-seeding/models/data-seed-reconciler.shared.utils.d.ts.map +1 -1
- package/dist/esm/data-seeding/models/data-seed-row-metadata.shared.schemas.d.ts.map +1 -1
- package/dist/esm/data-seeding/models/data-seed-row-metadata.shared.utils.d.ts.map +1 -1
- package/dist/esm/data-seeding/models/data-seed-run.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/data-seeding/models/data-seed-run.shared.schemas.d.ts.map +1 -1
- package/dist/esm/data-seeding/models/data-seed-trigger-mode-matrix.shared.utils.d.ts.map +1 -1
- package/dist/esm/data-seeding/models/data-seed.shared.schemas.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/data-seed-application-bootstrap.backend.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/data-seed-dispatcher.backend.service.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/data-seed-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/data-seed-scope-resolver-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/engines/additive-seed-engine.backend.service.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/engines/lazy-seed-engine.backend.service.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/engines/manual-seed-engine.backend.service.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/engines/sync-seed-engine.backend.service.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/engines/upgrade-seed-engine.backend.service.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/shared/data-seed-business-key.shared.utils.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/shared/data-seed-error.shared.utils.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/shared/data-seed-run-counters.shared.types.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/shared/data-seed-run-ledger.backend.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/shared/data-seed-scope-anchor.shared.types.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/shared/data-seed-scope-iteration.shared.utils.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/shared/data-seed-scope-resolution.backend.d.ts.map +1 -1
- package/dist/esm/databases/models/aggregation.backend.schemas.d.ts.map +1 -1
- package/dist/esm/databases/models/databases.backend.schemas.d.ts.map +1 -1
- package/dist/esm/databases/models/filter.backend.schemas.d.ts.map +1 -1
- package/dist/esm/databases/models/resolve-persistence-adapter.backend.utils.d.ts.map +1 -1
- package/dist/esm/databases/models/sql.backend.schemas.d.ts.map +1 -1
- package/dist/esm/databases/models/transaction.shared.schemas.d.ts.map +1 -1
- package/dist/esm/databases/services/__tests__/mock-mongo-transaction-registry.service.d.ts.map +1 -1
- package/dist/esm/databases/services/__tests__/mock-mongodb.service.d.ts.map +1 -1
- package/dist/esm/databases/services/__tests__/mock-mongoose-model.service.d.ts.map +1 -1
- package/dist/esm/databases/services/__tests__/mock-redis.service.d.ts.map +1 -1
- package/dist/esm/databases/services/__tests__/mock-zod-mongoose-schema-convertor.service.d.ts.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-query.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/aggregation/computed-measure-evaluator.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/aggregation/field-access-validator.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/aggregation/time-series-densifier.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/aggregation/topn-processor.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/aggregation/window-function-processor.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/db-utils.d.ts.map +1 -1
- package/dist/esm/databases/services/mongo-aggregation.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/mongodb.service.d.ts.map +1 -1
- package/dist/esm/databases/services/postgresql-aggregation.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/postgresql-database.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/postgresql-development-provisioning.backend.d.ts.map +1 -1
- package/dist/esm/databases/services/postgresql-filter.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/postgresql-migration-runner.backend.d.ts.map +1 -1
- package/dist/esm/databases/services/postgresql-schema-ddl.backend.d.ts.map +1 -1
- package/dist/esm/databases/services/postgresql-schema-migration-sql.backend.d.ts.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.map +1 -1
- package/dist/esm/databases/services/postgresql-schema-plan-lockfile.backend.d.ts.map +1 -1
- package/dist/esm/databases/services/redis.service.d.ts.map +1 -1
- package/dist/esm/databases/services/resource-persistence-unit-of-work.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/schema-planning-standalone.backend.d.ts.map +1 -1
- package/dist/esm/databases/services/zod-to-mongoose-schema-convertor.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/zod-to-sql-hybrid-schema.planner.d.ts.map +1 -1
- package/dist/esm/databases/utils/postgresql-identifier.backend.utils.d.ts.map +1 -1
- package/dist/esm/errors/services/__tests__/mock-error-builder.service.d.ts.map +1 -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.map +1 -1
- package/dist/esm/errors/services/error-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/errors/services/error-handler.backend.service.js.map +1 -1
- package/dist/esm/errors/services/rate-limit.backend.service.d.ts.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.js.map +1 -1
- package/dist/esm/external-data/batches/external-data-pipeline-scheduled-run.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/external-data/controllers/external-data-admin.backend.contracts.d.ts.map +1 -1
- package/dist/esm/external-data/controllers/external-data-admin.backend.controller.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-extraction-source.backend.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-models.exports.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/external-data/external-data-transform.backend.d.ts.map +1 -1
- package/dist/esm/external-data/models/external-data-pipeline-state.backend.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/models/external-providers.backend.schemas.d.ts.map +1 -1
- 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 +102 -52
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.js +117 -71
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.js.map +1 -1
- package/dist/esm/external-providers/operations/provider-operation-request.backend.d.ts.map +1 -1
- package/dist/esm/external-providers/operations/provider-operation-request.backend.js.map +1 -1
- package/dist/esm/external-providers/operations/provider-request-signing.backend.d.ts.map +1 -1
- package/dist/esm/external-providers/operations/provider-request-signing.backend.js +26 -7
- package/dist/esm/external-providers/operations/provider-request-signing.backend.js.map +1 -1
- package/dist/esm/external-providers/operations/provider-rest-call-client.backend.d.ts.map +1 -1
- package/dist/esm/external-providers/operations/provider-rest-call-client.backend.js.map +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.map +1 -1
- package/dist/esm/external-providers/services/backend-provider-loader.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/backend-provider-loader.backend.service.js.map +1 -1
- 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.map +1 -1
- package/dist/esm/external-providers/services/document-extraction.backend.service.d.ts +81 -34
- 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 +179 -98
- 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.map +1 -1
- package/dist/esm/external-providers/services/external-api-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts +121 -0
- 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 +151 -0
- 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 +15 -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 +60 -4
- package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.js.map +1 -1
- package/dist/esm/features/controllers/features.backend.controller.d.ts.map +1 -1
- package/dist/esm/features/services/__tests__/mock-feature-definition-registry.service.d.ts.map +1 -1
- package/dist/esm/features/services/__tests__/mock-feature-resolution.service.d.ts.map +1 -1
- package/dist/esm/features/services/application-features-admin-write-path.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/features/services/feature-definition-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/features/services/feature-gate.backend.service.d.ts.map +1 -1
- package/dist/esm/features/services/feature-resolution.backend.service.d.ts.map +1 -1
- package/dist/esm/features/services/organization-features-admin-write-path.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/features/services/scope-feature-ledger-relationship.backend.utils.d.ts.map +1 -1
- package/dist/esm/features/services/scope-features-cache-invalidation.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/features/testing/feature-test-utils.d.ts.map +1 -1
- package/dist/esm/files/batches/files-cleanup.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/files/constraints/file-analyzers.types.d.ts.map +1 -1
- package/dist/esm/files/constraints/file-constraint-resolver-chain.backend.service.d.ts.map +1 -1
- package/dist/esm/files/constraints/file-constraint.types.d.ts.map +1 -1
- package/dist/esm/files/constraints/file-validation.backend.service.d.ts.map +1 -1
- package/dist/esm/files/constraints/resource-field-constraint-resolver.backend.service.d.ts.map +1 -1
- package/dist/esm/files/controllers/file.controller.d.ts.map +1 -1
- package/dist/esm/files/controllers/file.controller.js.map +1 -1
- package/dist/esm/files/handlers/file-upload-route-locals.backend.types.d.ts.map +1 -1
- package/dist/esm/files/handlers/file-upload-route-locals.backend.types.js.map +1 -1
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.d.ts +37 -0
- 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 +221 -21
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.js.map +1 -1
- package/dist/esm/files/scanning/clamav-scanner.backend.service.d.ts.map +1 -1
- package/dist/esm/files/scanning/file-scan.types.d.ts.map +1 -1
- package/dist/esm/files/scanning/yara-scanner.backend.service.d.ts.map +1 -1
- package/dist/esm/files/scanning/yara-scanner.backend.service.js +20 -2
- package/dist/esm/files/scanning/yara-scanner.backend.service.js.map +1 -1
- package/dist/esm/files/services/__tests__/mock-file-field-detection.service.d.ts.map +1 -1
- package/dist/esm/files/services/__tests__/mock-file-operation-handler.service.d.ts.map +1 -1
- package/dist/esm/files/services/__tests__/mock-file-repository.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-field-detection.backend.service.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/files/services/file-population.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-scanning.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-scanning.backend.service.js +5 -0
- 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.map +1 -1
- package/dist/esm/files/services/file-text-extraction.backend.service.js +8 -5
- 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.map +1 -1
- package/dist/esm/files/services/file-upload-grant.backend.service.js.map +1 -1
- package/dist/esm/files/services/files.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/files.backend.service.js +3 -1
- package/dist/esm/files/services/files.backend.service.js.map +1 -1
- package/dist/esm/files/services/rag-source-field-detection.backend.service.d.ts.map +1 -1
- package/dist/esm/files/storage/application-storage-key.backend.utils.d.ts.map +1 -1
- package/dist/esm/files/storage/application-storage-key.backend.utils.js.map +1 -1
- package/dist/esm/files/storage/file-storage-path-resolver.backend.service.d.ts.map +1 -1
- package/dist/esm/files/storage/file-storage-provider.types.d.ts +36 -1
- 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/file-storage-router.backend.service.d.ts +21 -3
- package/dist/esm/files/storage/file-storage-router.backend.service.d.ts.map +1 -1
- package/dist/esm/files/storage/file-storage-router.backend.service.js +38 -5
- package/dist/esm/files/storage/file-storage-router.backend.service.js.map +1 -1
- package/dist/esm/files/storage/google-drive-storage-provider.backend.service.d.ts +87 -0
- package/dist/esm/files/storage/google-drive-storage-provider.backend.service.d.ts.map +1 -0
- package/dist/esm/files/storage/google-drive-storage-provider.backend.service.js +340 -0
- package/dist/esm/files/storage/google-drive-storage-provider.backend.service.js.map +1 -0
- 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.map +1 -1
- package/dist/esm/files/storage/storage-credential-provider.backend.utils.d.ts.map +1 -1
- package/dist/esm/files/storage/storage-platform-sts-credential-resolver.backend.utils.d.ts.map +1 -1
- package/dist/esm/files/storage/storage-sts-credential-resolver.backend.utils.d.ts.map +1 -1
- package/dist/esm/files/storage/storage-sts-credential-resolver.backend.utils.js +10 -3
- package/dist/esm/files/storage/storage-sts-credential-resolver.backend.utils.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.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.map +1 -1
- package/dist/esm/files/utils/file-upload.utils.d.ts.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.map +1 -1
- package/dist/esm/files/utils/file-validation.utils.d.ts.map +1 -1
- package/dist/esm/files/utils/image-derivation.backend.utils.d.ts.map +1 -1
- package/dist/esm/files/utils/image-thumbnail.backend.utils.d.ts.map +1 -1
- package/dist/esm/files/utils/office-document-text-extraction.backend.utils.d.ts.map +1 -1
- package/dist/esm/files/utils/office-document-text-extraction.backend.utils.js.map +1 -1
- package/dist/esm/files/utils/rag-source-field-schema-path.backend.utils.d.ts.map +1 -1
- package/dist/esm/files/utils/storage-application-identity.backend.utils.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/flows-actors/a2a/batches/a2a-push-delivery.batch.backend.service.d.ts.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.map +1 -1
- package/dist/esm/flows-actors/a2a/models/a2a-dialect.backend.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/models/a2a-push-notification-delivery.backend.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/models/a2a-push-notification.backend.schemas.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-push-delivery-log.repository.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-push-dispatcher.backend.service.d.ts.map +1 -1
- 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.map +1 -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.map +1 -1
- 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.map +1 -1
- 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/controllers/flows-actors.controller.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/flows-actors/models/agent-facets.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/agents.backend.definitions.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/flows-actors/models/flows-actors.backend.definitions.d.ts.map +1 -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 +107 -16
- 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 +118 -18
- 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.map +1 -1
- package/dist/esm/flows-actors/models/mcp-client.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/mcp-client.backend.definitions.js.map +1 -1
- package/dist/esm/flows-actors/services/__tests__/fixtures/meta-workflow-evaluation-treatment.test-fixture.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/flows-actors/services/agent-call-trace-sink.backend.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/agent-facets.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/agents.backend.service.d.ts +104 -5
- package/dist/esm/flows-actors/services/agents.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/agents.backend.service.js +263 -31
- package/dist/esm/flows-actors/services/agents.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/services/context-curation.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/conversational-execution.backend.service.d.ts +46 -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 +193 -6
- 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.map +1 -1
- 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.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.map +1 -1
- package/dist/esm/flows-actors/services/mcp-client.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/mcp-client.backend.service.js +3 -0
- package/dist/esm/flows-actors/services/mcp-client.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/services/mcp-credential-resolver.backend.service.d.ts +99 -0
- package/dist/esm/flows-actors/services/mcp-credential-resolver.backend.service.d.ts.map +1 -0
- package/dist/esm/flows-actors/services/mcp-credential-resolver.backend.service.js +155 -0
- package/dist/esm/flows-actors/services/mcp-credential-resolver.backend.service.js.map +1 -0
- package/dist/esm/flows-actors/services/meta-workflow-evaluation-treatment-compiler.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/meta-workflow-standard-action-contracts.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/meta-workflow-standard-evaluation-contracts.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/meta-workflow-structured-artifact-action-compiler.backend.service.d.ts.map +1 -1
- 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.map +1 -1
- 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 +9 -0
- package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.js.map +1 -1
- package/dist/esm/flows-actors/utils/bounded-subprocess.backend.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/utils/flows-actors-frontend-extractor.utils.d.ts.map +1 -1
- 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.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/flows-actors/utils/prompt-ir-adapters.backend.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/utils/tool-approval-modification.backend.utils.d.ts +77 -0
- package/dist/esm/flows-actors/utils/tool-approval-modification.backend.utils.d.ts.map +1 -0
- package/dist/esm/flows-actors/utils/tool-approval-modification.backend.utils.js +164 -0
- package/dist/esm/flows-actors/utils/tool-approval-modification.backend.utils.js.map +1 -0
- package/dist/esm/flows-actors/utils/tool-approval-signing.backend.utils.d.ts +48 -0
- package/dist/esm/flows-actors/utils/tool-approval-signing.backend.utils.d.ts.map +1 -0
- package/dist/esm/flows-actors/utils/tool-approval-signing.backend.utils.js +101 -0
- package/dist/esm/flows-actors/utils/tool-approval-signing.backend.utils.js.map +1 -0
- package/dist/esm/guidance/batches/dormancy-detection.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/guidance/services/guidance-trigger-evaluator.backend.service.d.ts.map +1 -1
- package/dist/esm/guidance/services/lifecycle-custom-implementations.backend.d.ts.map +1 -1
- package/dist/esm/guidance/services/lifecycle-evaluator.backend.service.d.ts.map +1 -1
- package/dist/esm/guidance/services/lifecycle-scope-id.backend.utils.d.ts.map +1 -1
- package/dist/esm/guidance/services/milestone-condition-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/guidance/services/milestone-definition-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/guidance/services/progression-state-store.backend.service.js.map +1 -1
- package/dist/esm/guidance/services/scoped-state-read-custom-implementations.backend.d.ts.map +1 -1
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.js.map +1 -1
- package/dist/esm/i18n/services/i18n.backend.service.d.ts.map +1 -1
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/inject/models/container.d.ts +10 -0
- package/dist/esm/inject/models/container.d.ts.map +1 -1
- package/dist/esm/inject/models/container.js +49 -1
- package/dist/esm/inject/models/container.js.map +1 -1
- package/dist/esm/inject/models/service-types.d.ts +3 -0
- package/dist/esm/inject/models/service-types.d.ts.map +1 -1
- package/dist/esm/inject/models/service-types.js +3 -0
- 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 +50 -3
- package/dist/esm/mcp/controllers/mcp.controller.js.map +1 -1
- package/dist/esm/mcp/models/mcp-protocol.backend.schemas.d.ts.map +1 -1
- package/dist/esm/mcp/models/mcp-tool.backend.schemas.d.ts.map +1 -1
- package/dist/esm/mcp/models/mcp-tool.backend.schemas.js.map +1 -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.map +1 -1
- 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.map +1 -1
- package/dist/esm/mcp/services/resource-server-instances-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/mcp/utils/zod-to-mcp-json-schema.backend.utils.d.ts.map +1 -1
- package/dist/esm/meta-workflow-runtime.exports.d.ts.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.map +1 -1
- package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.js.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.js.map +1 -1
- package/dist/esm/monitoring/logger/services/__tests__/mock-logger.service.d.ts.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 +3 -3
- 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.map +1 -1
- package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.js.map +1 -1
- package/dist/esm/monitoring/logger/utils/log-value-normalization.backend.utils.d.ts.map +1 -1
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.d.ts +10 -6
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.d.ts.map +1 -1
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.js +10 -6
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.js.map +1 -1
- 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/otel-preload.d.ts.map +1 -1
- package/dist/esm/monitoring/observability/otel-sdk-global-handle.d.ts.map +1 -1
- package/dist/esm/monitoring/observability/services/__tests__/mock-metrics.service.d.ts.map +1 -1
- package/dist/esm/monitoring/observability/services/metrics.service.d.ts.map +1 -1
- package/dist/esm/monitoring/observability/services/metrics.service.js.map +1 -1
- package/dist/esm/monitoring/observability/services/observability.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/email/components/email-components.d.ts.map +1 -1
- package/dist/esm/notifications/email/models/email-template-definition.d.ts.map +1 -1
- package/dist/esm/notifications/email/models/email-transport.backend.definitions.d.ts.map +1 -1
- package/dist/esm/notifications/email/services/email-batch-send.batch.backend.service.d.ts.map +1 -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.map +1 -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.map +1 -1
- package/dist/esm/notifications/email/services/email.backend.service.d.ts +47 -6
- package/dist/esm/notifications/email/services/email.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/email/services/email.backend.service.js +86 -36
- package/dist/esm/notifications/email/services/email.backend.service.js.map +1 -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/email/utils/interpolate-email-label.utils.d.ts.map +1 -1
- package/dist/esm/notifications/email/utils/zod-to-typescript.utils.d.ts.map +1 -1
- package/dist/esm/notifications/services/notification-badge.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/services/notification-badge.backend.service.js.map +1 -1
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.js.map +1 -1
- package/dist/esm/notifications/sms/models/sms-transport.backend.definitions.d.ts +32 -0
- package/dist/esm/notifications/sms/models/sms-transport.backend.definitions.d.ts.map +1 -0
- package/dist/esm/notifications/sms/models/sms-transport.backend.definitions.js +32 -0
- package/dist/esm/notifications/sms/models/sms-transport.backend.definitions.js.map +1 -0
- package/dist/esm/notifications/sms/services/sms.backend.service.d.ts +64 -10
- package/dist/esm/notifications/sms/services/sms.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/sms/services/sms.backend.service.js +277 -82
- 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.map +1 -1
- 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.map +1 -1
- 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.map +1 -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.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/services/m2m-webhook-delivery-log.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/services/m2m-webhook-delivery-log.repository.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/services/m2m-webhook-dispatcher.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/services/webhook-config-public-key.custom-impl.backend.service.d.ts.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.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/services/webhook-config.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/services/polymorphic-lookup.backend.service.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/organizations/batches/organization-member-invitation-sweep.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/organizations/batches/organization-purge.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/organizations/batches/organization-purge.batch.backend.service.js.map +1 -1
- package/dist/esm/organizations/services/authority-change-audit.backend.utils.d.ts.map +1 -1
- package/dist/esm/organizations/services/invitation-acceptance.backend.utils.d.ts.map +1 -1
- package/dist/esm/organizations/services/org-creation-on-registration.backend.utils.d.ts.map +1 -1
- package/dist/esm/organizations/services/org-member-roles-validation.backend.utils.d.ts.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.map +1 -1
- package/dist/esm/organizations/services/organization-deletion-audit.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/organizations/services/organization-member-custom-implementation.backend.service.d.ts.map +1 -1
- package/dist/esm/organizations/services/organization-onboarding-operation.backend.utils.d.ts.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-member-custom-implementation.backend.service.d.ts.map +1 -1
- package/dist/esm/organizations/services/scim-provisioning-gate.backend.utils.d.ts.map +1 -1
- package/dist/esm/organizations/services/user-org-type-grant.backend.utils.d.ts.map +1 -1
- package/dist/esm/organizations/services/user-type-revocation-on-org-leave.backend.utils.d.ts.map +1 -1
- package/dist/esm/pdf-templates/__tests__/fixtures/tiny-pdf-template.fixture.d.ts.map +1 -1
- package/dist/esm/pdf-templates/models/pdf-template-binding.d.ts.map +1 -1
- package/dist/esm/pdf-templates/models/pdf-template-definition.d.ts.map +1 -1
- package/dist/esm/pdf-templates/services/pdf-generated-file-writer.backend.service.d.ts.map +1 -1
- package/dist/esm/pdf-templates/services/pdf-generation-orchestrator.backend.service.d.ts.map +1 -1
- package/dist/esm/pdf-templates/services/pdf-renderer.backend.service.d.ts.map +1 -1
- package/dist/esm/pdf-templates/services/pdf-template-binding.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.js.map +1 -1
- package/dist/esm/queue/adapters/queue-adapter.backend.binding.d.ts.map +1 -1
- package/dist/esm/queue/adapters/queue-adapter.backend.binding.js.map +1 -1
- package/dist/esm/queue/adapters/queue-adapter.backend.interface.d.ts.map +1 -1
- package/dist/esm/queue/adapters/queue-adapter.backend.interface.js.map +1 -1
- package/dist/esm/queue/adapters/queue-adapter.backend.options.d.ts.map +1 -1
- package/dist/esm/queue/adapters/queue-adapter.backend.options.js.map +1 -1
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.js.map +1 -1
- package/dist/esm/queue/apps-crontabs-manager.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/cron-job-sync.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/domain-queue-consumer.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/domain-queue-consumer.backend.service.js.map +1 -1
- package/dist/esm/queue/job-completion-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/job-consumer.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/job-consumer.backend.service.js.map +1 -1
- package/dist/esm/queue/job-executor.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/job-executor.backend.service.js.map +1 -1
- package/dist/esm/queue/job-payload-storage.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/job-status-tracking.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/queue-monitoring.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/queue-monitoring.backend.service.js.map +1 -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.map +1 -1
- package/dist/esm/queue/queue.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/queue.backend.service.js.map +1 -1
- package/dist/esm/queue/scheduled-message-verifier.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/worker-shutdown-manager.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/worker-shutdown-manager.backend.service.js.map +1 -1
- package/dist/esm/rag/batches/rag-embedding-drain.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/rag/batches/rag-reconciliation-sweep.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/rag/models/rag-chunk-store.backend.types.d.ts.map +1 -1
- package/dist/esm/rag/models/rag-retrieval.backend.types.d.ts.map +1 -1
- package/dist/esm/rag/services/mongodb-rag-chunk-store.backend.service.d.ts.map +1 -1
- package/dist/esm/rag/services/postgresql-rag-chunk-store.backend.service.d.ts.map +1 -1
- package/dist/esm/rag/services/rag-chunk-collection.mongodb-ddl.backend.d.ts.map +1 -1
- package/dist/esm/rag/services/rag-chunk-retrieval.mongodb-query.backend.d.ts.map +1 -1
- package/dist/esm/rag/services/rag-chunk-retrieval.postgresql-query.backend.d.ts.map +1 -1
- package/dist/esm/rag/services/rag-chunk-store.backend.service.d.ts.map +1 -1
- package/dist/esm/rag/services/rag-chunk-table.postgresql-ddl.backend.d.ts.map +1 -1
- package/dist/esm/rag/services/rag-ingestion.backend.service.d.ts.map +1 -1
- package/dist/esm/rag/services/rag-retrieval.backend.service.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-chunk-fusion.backend.utils.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-chunk-removal.backend.utils.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-chunk-row-shaping.backend.utils.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-chunking.backend.utils.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/rag/utils/rag-context-assembly.backend.utils.js.map +1 -1
- package/dist/esm/rag/utils/rag-ingestion-trigger.backend.utils.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-retrieval-scope.backend.utils.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-source-field-value.backend.utils.d.ts.map +1 -1
- package/dist/esm/requests/models/api-routes.backend.defintions.d.ts.map +1 -1
- package/dist/esm/requests/models/requests.backend.schemas.d.ts.map +1 -1
- package/dist/esm/requests/service/platform-mutualized-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/requests/service/platform-requests.backend.utils.d.ts.map +1 -1
- package/dist/esm/requests/service/remote-client-base.backend.service.d.ts.map +1 -1
- package/dist/esm/requests/service/serverless-services-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/requests/service/websocket.service.d.ts.map +1 -1
- package/dist/esm/requests/service/websocket.service.js +49 -1
- package/dist/esm/requests/service/websocket.service.js.map +1 -1
- package/dist/esm/resources/backend-resource-registry.exports.d.ts.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 +2 -0
- package/dist/esm/resources/models/custom-service-implementations.backend.definition.js.map +1 -1
- package/dist/esm/resources/models/index.d.ts.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.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.map +1 -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.map +1 -1
- package/dist/esm/resources/models/resources.backend.schemas.d.ts.map +1 -1
- package/dist/esm/resources/models/virtual-fields.backend.types.d.ts.map +1 -1
- package/dist/esm/resources/services/__tests__/mock-resources-registry.service.d.ts.map +1 -1
- package/dist/esm/resources/services/resource-context.backend.service.d.ts.map +1 -1
- package/dist/esm/resources/services/resource-id.backend.service.d.ts.map +1 -1
- package/dist/esm/resources/services/resource-population.backend.service.d.ts +17 -2
- package/dist/esm/resources/services/resource-population.backend.service.d.ts.map +1 -1
- package/dist/esm/resources/services/resource-population.backend.service.js +74 -18
- package/dist/esm/resources/services/resource-population.backend.service.js.map +1 -1
- package/dist/esm/resources/services/resources-registry.backend.service.d.ts +23 -0
- package/dist/esm/resources/services/resources-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/resources/services/resources-registry.backend.service.js +31 -0
- package/dist/esm/resources/services/resources-registry.backend.service.js.map +1 -1
- package/dist/esm/resources/services/virtual-fields.backend.service.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-retention.backend.utils.d.ts.map +1 -1
- package/dist/esm/runtime/controllers/health-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/runtime/controllers/health-controller.backend.service.js.map +1 -1
- package/dist/esm/runtime/domain-module.backend.definitions.d.ts.map +1 -1
- package/dist/esm/runtime/domain-module.backend.definitions.js.map +1 -1
- package/dist/esm/runtime/models/execution-context.backend.schemas.d.ts.map +1 -1
- package/dist/esm/runtime/models/request-context.als.backend.d.ts.map +1 -1
- package/dist/esm/runtime/models/runtime.backend.schemas.d.ts.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.map +1 -1
- package/dist/esm/runtime/services/execution-context-handler.backend.service.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/runtime/services/http-server.backend.service.js +10 -0
- package/dist/esm/runtime/services/http-server.backend.service.js.map +1 -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 +26 -12
- package/dist/esm/runtime/services/start-application.backend.service.js.map +1 -1
- package/dist/esm/runtime/services/utils/oauth-body-cap.backend.utils.d.ts.map +1 -1
- package/dist/esm/runtime/testing/execution-context-test-fixtures.d.ts.map +1 -1
- package/dist/esm/runtime/testing/mock-execution-context-creator.service.d.ts.map +1 -1
- package/dist/esm/runtime/utils/application-startup-config-access.backend.utils.d.ts.map +1 -1
- package/dist/esm/runtime/utils/feature-gated-core-resource-exclusions.backend.utils.d.ts.map +1 -1
- package/dist/esm/runtime/utils/request-client-ip.utils.d.ts.map +1 -1
- package/dist/esm/runtime/utils/scan-default-exports.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-key-generation.backend.utils.d.ts.map +1 -1
- 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.map +1 -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.map +1 -1
- package/dist/esm/security/authentications/controllers/auth-method-management-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.d.ts +22 -0
- 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 +84 -0
- 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.map +1 -1
- package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/models/auth-constants.backend.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/authentications.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/authorization-client.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/cimd.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/cimd.backend.schemas.js.map +1 -1
- package/dist/esm/security/authentications/models/federated-auth-transport.backend.definitions.d.ts +37 -0
- package/dist/esm/security/authentications/models/federated-auth-transport.backend.definitions.d.ts.map +1 -0
- package/dist/esm/security/authentications/models/federated-auth-transport.backend.definitions.js +37 -0
- package/dist/esm/security/authentications/models/federated-auth-transport.backend.definitions.js.map +1 -0
- package/dist/esm/security/authentications/models/identity-persistence-boundaries.backend.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/jwt.backend.schemas.d.ts.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/models/saml-authentication.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/sso-connection.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/user-authorization-version.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/seeds/enterprise-config-defaults.seeds.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/__tests__/mock-auth-execution-context-factory.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/__tests__/mock-auth-token-issuer.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/__tests__/oauth-provider-audit-spies.mock.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/__tests__/mock-domain-to-org-lookup.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/__tests__/mock-enterprise-user-provisioning.service.d.ts.map +1 -1
- 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.map +1 -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.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/oidc-discovery.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/oidc-discovery.backend.service.js +2 -1
- package/dist/esm/security/authentications/services/admin-config/oidc-discovery.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.d.ts +9 -2
- 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 +9 -2
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-credential-verifier.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-execution-context-factory.backend.service.d.ts.map +1 -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.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-password-reset.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-phone-verification.backend.service.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.d.ts +97 -0
- 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 +218 -26
- 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 +14 -0
- 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 +36 -0
- 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/saml-assertion-validator.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/saml-authentication.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/saml-metadata.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/saml-replay-guard.backend.service.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/security/authentications/services/auth-session-store.backend.service.d.ts.map +1 -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.map +1 -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.map +1 -1
- 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.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.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/scim-tokens.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/siem-delivery-dlq.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.js +57 -1
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.js.map +1 -1
- 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.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/sso-connection.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/sso-connection.custom-impl.backend.service.js +11 -1
- package/dist/esm/security/authentications/services/custom-impls/sso-connection.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/email-verification-initiator.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/machine-token-issuer.backend.service.d.ts.map +1 -1
- 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.map +1 -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.map +1 -1
- package/dist/esm/security/authentications/services/oidc-user-claims.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/resolve-active-member-orgs.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/__tests__/mock-auth-user-lookup.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-controller.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-credential-ops.backend.service.d.ts.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.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-response-helper.backend.service.d.ts.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.map +1 -1
- package/dist/esm/security/authentications/services/utils/concurrent-session-eviction.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/ensure-user-profile.backend.utils.d.ts.map +1 -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.map +1 -1
- package/dist/esm/security/authentications/services/utils/machine-auth-rate-limit.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/pkce.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/saml-java-availability.d.ts.map +1 -1
- package/dist/esm/security/authentications/utils/application-auth-policy-audit.backend.utils.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/security/authentications/utils/one-off-session-lifetime.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/utils/social-oauth2-purpose.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/access-grant-decision.factory.backend.d.ts +59 -0
- package/dist/esm/security/authorizations/access-grant-decision.factory.backend.d.ts.map +1 -0
- package/dist/esm/security/authorizations/access-grant-decision.factory.backend.js +111 -0
- package/dist/esm/security/authorizations/access-grant-decision.factory.backend.js.map +1 -0
- package/dist/esm/security/authorizations/access-grant-lifecycle-audit.backend.d.ts +57 -0
- package/dist/esm/security/authorizations/access-grant-lifecycle-audit.backend.d.ts.map +1 -0
- package/dist/esm/security/authorizations/access-grant-lifecycle-audit.backend.js +133 -0
- package/dist/esm/security/authorizations/access-grant-lifecycle-audit.backend.js.map +1 -0
- package/dist/esm/security/authorizations/application-access-grant-custom-implementation.backend.service.d.ts +41 -0
- package/dist/esm/security/authorizations/application-access-grant-custom-implementation.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authorizations/application-access-grant-custom-implementation.backend.service.js +157 -0
- package/dist/esm/security/authorizations/application-access-grant-custom-implementation.backend.service.js.map +1 -0
- package/dist/esm/security/authorizations/application-wide-read-admission.backend.d.ts +84 -0
- package/dist/esm/security/authorizations/application-wide-read-admission.backend.d.ts.map +1 -0
- package/dist/esm/security/authorizations/application-wide-read-admission.backend.js +99 -0
- package/dist/esm/security/authorizations/application-wide-read-admission.backend.js.map +1 -0
- package/dist/esm/security/authorizations/authorization-denial-audit.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.d.ts.map +1 -1
- package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.js.map +1 -1
- package/dist/esm/security/authorizations/initiator-organization-confinement.backend.d.ts.map +1 -1
- package/dist/esm/security/authorizations/junction-scope-resolution.backend.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/security/authorizations/organization-unit-narrowing-enforcement.backend.d.ts.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 +20 -181
- 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.map +1 -1
- package/dist/esm/security/authorizations/relationship-foreign-key-filter.backend.d.ts.map +1 -1
- package/dist/esm/security/authorizations/role-ceiling.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/role-ceiling.backend.utils.js.map +1 -1
- package/dist/esm/security/authorizations/role-conferral.backend.utils.d.ts +40 -0
- package/dist/esm/security/authorizations/role-conferral.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/role-conferral.backend.utils.js +43 -1
- package/dist/esm/security/authorizations/role-conferral.backend.utils.js.map +1 -1
- package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.d.ts +27 -17
- 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 +27 -17
- 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 +72 -0
- package/dist/esm/security/authorizations/services/authorizations.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authorizations/services/authorizations.backend.service.js +153 -10
- 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.map +1 -1
- 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.map +1 -1
- package/dist/esm/security/connected-accounts/connection-target-authorization.backend.js.map +1 -1
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.d.ts +139 -1
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.js +474 -33
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.js.map +1 -1
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.d.ts +40 -0
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.js.map +1 -1
- package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.js.map +1 -1
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.d.ts +19 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.js +38 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.js.map +1 -1
- package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.js +17 -1
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.js.map +1 -1
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.d.ts +14 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.js +16 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.js.map +1 -1
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.js +1 -1
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.js.map +1 -1
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.d.ts +19 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.js +45 -2
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.js.map +1 -1
- package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.d.ts +37 -1
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.js.map +1 -1
- package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.js.map +1 -1
- package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.js.map +1 -1
- package/dist/esm/security/connected-accounts/utils/user-delegated-access-token-slot.backend.utils.d.ts +34 -0
- package/dist/esm/security/connected-accounts/utils/user-delegated-access-token-slot.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/utils/user-delegated-access-token-slot.backend.utils.js +39 -0
- package/dist/esm/security/connected-accounts/utils/user-delegated-access-token-slot.backend.utils.js.map +1 -0
- package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/security/consumable-tokens/consumable-token-models.exports.d.ts.map +1 -1
- 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.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/consumable-tokens/models/index.d.ts.map +1 -1
- package/dist/esm/security/consumable-tokens/services/__tests__/mock-consumable-token.service.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/security/credential-rotation-grace.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/credential-rotation-grace.backend.utils.js.map +1 -1
- package/dist/esm/security/jwt/services/auth-jwt-guard.backend.service.d.ts.map +1 -1
- package/dist/esm/security/jwt/services/jwt.backend.service.d.ts.map +1 -1
- package/dist/esm/security/jwt/services/wildo-worker-bootstrap-client.backend.service.d.ts +13 -0
- package/dist/esm/security/jwt/services/wildo-worker-bootstrap-client.backend.service.d.ts.map +1 -1
- package/dist/esm/security/jwt/services/wildo-worker-bootstrap-client.backend.service.js +14 -0
- package/dist/esm/security/jwt/services/wildo-worker-bootstrap-client.backend.service.js.map +1 -1
- package/dist/esm/security/jwt/utils/jwt-verification-error-classification.backend.utils.d.ts.map +1 -1
- 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.map +1 -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.map +1 -1
- package/dist/esm/security/outbound/outbound-request-deadline.backend.utils.d.ts +39 -0
- package/dist/esm/security/outbound/outbound-request-deadline.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/outbound/outbound-request-deadline.backend.utils.js +60 -0
- package/dist/esm/security/outbound/outbound-request-deadline.backend.utils.js.map +1 -0
- package/dist/esm/security/outbound/outbound-request-headers.backend.utils.d.ts +66 -0
- package/dist/esm/security/outbound/outbound-request-headers.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/outbound/outbound-request-headers.backend.utils.js +75 -0
- package/dist/esm/security/outbound/outbound-request-headers.backend.utils.js.map +1 -0
- package/dist/esm/security/scim/controllers/scim.backend.controller.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.js.map +1 -1
- package/dist/esm/security/scim/utils/scim-attribute-path-resolver.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/scim/utils/scim-filter-parser.d.ts.map +1 -1
- package/dist/esm/security/scim/utils/scim-response-formatter.d.ts.map +1 -1
- package/dist/esm/security/session-invalidation-fence.backend.utils.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.js.map +1 -1
- package/dist/esm/security/token-invalidation-fence.backend.utils.d.ts.map +1 -1
- package/dist/esm/testing.d.ts.map +1 -1
- package/dist/esm/users/services/inbound-contact-custom-implementation.backend.service.d.ts.map +1 -1
- package/dist/esm/users/services/user-deletion-audit.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/users/services/user-force-password-reset.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/users/services/user-role-administration.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/users/services/user-self-custom-implementations.backend.d.ts.map +1 -1
- package/dist/esm/users/services/user-super-admin-floor.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/dist/esm/external-providers/services/flow-actor-design.backend.service.d.ts +0 -45
- package/dist/esm/external-providers/services/flow-actor-design.backend.service.d.ts.map +0 -1
- package/dist/esm/external-providers/services/flow-actor-design.backend.service.js +0 -22
- package/dist/esm/external-providers/services/flow-actor-design.backend.service.js.map +0 -1
- package/dist/esm/notifications/email/models/email-context-provider.interface.d.ts +0 -0
- package/dist/esm/notifications/email/models/email-context-provider.interface.d.ts.map +0 -0
- package/dist/esm/notifications/email/models/email-context-provider.interface.js +0 -0
- package/dist/esm/notifications/email/models/email-context-provider.interface.js.map +0 -0
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.d.ts +0 -0
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.d.ts.map +0 -0
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.js +0 -0
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.js.map +0 -0
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.d.ts +0 -0
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.d.ts.map +0 -0
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.js +0 -0
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.js.map +0 -0
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.d.ts +0 -0
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.d.ts.map +0 -0
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.js +0 -0
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.js.map +0 -0
package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cimd-client-metadata.backend.service.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"cimd-client-metadata.backend.service.d.ts","sourceRoot":"","sources":["../../../../../src/security/authentications/services/cimd-client-metadata.backend.service.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAM1B,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAC;AAU7F,OAAO,EAEL,mBAAmB,EACnB,eAAe,EAQf,KAAK,kBAAkB,EACxB,MAAM,yEAAyE,CAAC;AACjF,OAAO,EAAE,uBAAuB,EAAE,MAAM,sEAAsE,CAAC;AAa/G,uEAAuE;AACvE,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,eAAe,CAAC;IACxB,kGAAkG;IAClG,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC;AAED,MAAM,MAAM,cAAc,GACtB;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,kBAAkB,CAAA;CAAE,GAC5C;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,mB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
|
1
|
-
{"version":3,"file":"cimd-client-metadata.backend.service.js","sourceRoot":"","sources":["../../../../../../src/security/authentications/services/cimd-client-metadata.backend.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAC;AAC7F,OAAO,EAAE,2BAA2B,EAAE,MAAM,8EAA8E,CAAC;AAC3H,OAAO,EACL,wBAAwB,EACxB,6BAA6B,GAC9B,MAAM,sEAAsE,CAAC;AAC9E,OAAO,EACL,0BAA0B,EAC1B,mBAAmB,GACpB,MAAM,sEAAsE,CAAC;AAC9E,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,wCAAwC,EACxC,2CAA2C,GAE5C,MAAM,yEAAyE,CAAC;AACjF,OAAO,EAAE,uBAAuB,EAAE,MAAM,sEAAsE,CAAC;AAE/G;;;;;;;;GAQG;AACH,MAAM,uBAAuB,GAAsB,CAAC,QAAQ,CAAC,CAAC;AAe9D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEI,IAAM,gCAAgC,GAAtC,MAAM,gCAAgC;IAmBW;IACU;IAnBhE;;;;;;;;;;;;;;OAcG;IACc,KAAK,GAAG,IAAI,GAAG,EAA0B,CAAC;IAE3D,YACsD,MAAqB,EACX,gBAAyC;QADnD,WAAM,GAAN,MAAM,CAAe;QACX,qBAAgB,GAAhB,gBAAgB,CAAyB;IACtG,CAAC;IAEJ;;;;;;;;;;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;IAoBR,WAAA,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAA;IACjC,WAAA,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAA;qCADgB,aAAa;QACO,uBAAuB;GApB9F,gCAAgC,CAyc5C","sourcesContent":["import 'reflect-metadata';\nimport { injectable, inject } from 'inversify';\nimport { lookup as dnsLookup } from 'node:dns/promises';\nimport { isIP } from 'node:net';\n\nimport { SAAS_SERVICE_TYPES } from '~wildo-backend-lib/inject/models/service-types';\nimport { LoggerService } from '~wildo-backend-lib/monitoring/logger/services/logger.service';\nimport { projectCaughtErrorLogFields } from '~wildo-backend-lib/errors/utils/error-log-level-classification.backend.utils';\nimport {\n OutboundTargetResolution,\n resolvesOnlyToPublicAddresses,\n} from '~wildo-backend-lib/security/ssrf/outbound-target-guard.backend.utils';\nimport {\n OutboundTargetRefusedError,\n pinnedOutboundFetch,\n} from '~wildo-backend-lib/security/ssrf/pinned-outbound-fetch.backend.utils';\nimport {\n CimdClientMetadataSchema,\n CimdRejectionReason,\n CimdTrustPolicy,\n CIMD_CACHE_MAX_TTL_MS,\n CIMD_CACHE_MIN_TTL_MS,\n CIMD_FETCH_TIMEOUT_MS,\n CIMD_MAX_DOCUMENT_BYTES,\n CIMD_MAX_CACHE_ENTRIES,\n CIMD_ACCEPTED_TOKEN_ENDPOINT_AUTH_METHOD,\n CIMD_ASYMMETRIC_TOKEN_ENDPOINT_AUTH_METHODS,\n type CimdClientMetadata,\n} from '~wildo-backend-lib/security/authentications/models/cimd.backend.schemas';\nimport { AppConfigurationService } from '~wildo-backend-lib/config/services/app-configuration.backend.service';\n\n/**\n * The scheme the egress client will issue on.\n *\n * A `client_id` that is not `https:` is already refused at shape time (`refuseMalformedClientId`),\n * so this restates a decision rather than making a new one — deliberately. The pinned client takes\n * the scheme policy as a required input precisely so no caller can inherit a permissive default, and\n * a second statement at the egress point costs one line and survives a future refactor that moves\n * the shape check.\n */\nconst CIMD_ADMITTED_PROTOCOLS: readonly string[] = ['https:'];\n\n/** The deployment's CIMD posture, resolved from application config. */\nexport interface CimdConfiguration {\n policy: CimdTrustPolicy;\n /** Hosts accepted under {@link CimdTrustPolicy.ALLOWLIST}. Exact host match, case-insensitive. */\n allowedHosts?: readonly string[];\n}\n\nexport type CimdResolution =\n | { kind: 'ok'; metadata: CimdClientMetadata }\n | { kind: 'rejected'; reason: CimdRejectionReason; detail: string };\n\ninterface CachedDocument { metadata: CimdClientMetadata; expiresAtMs: number }\n\n/**\n * Resolve an HTTPS `client_id` URL into validated client metadata (CIMD).\n *\n * ## What makes this different from every other lookup in the provider\n *\n * Every other client resolution reads a row this application minted. This one takes a URL from an\n * UNAUTHENTICATED stranger and makes an outbound request to it. That inverts the usual trust\n * direction, and the draft is explicit about the consequence:\n *\n * \"The authorization server takes a URL as input from an unknown client and fetches that URL. A\n * malicious client could use this to trigger the authorization server to make requests to\n * arbitrary URLs, such as requests to private administration endpoints the authorization server\n * has access to.\"\n * spec-cite: MCP 2025-11-25 — Authorization § Client ID Metadata Document Security\n *\n * So the order of operations is itself a control: POLICY first (is this deployment even accepting\n * stranger URLs?), then SHAPE, then the SSRF target check, and only then a bounded fetch. Every\n * cheap refusal happens before anything leaves the process.\n *\n * ## What this deliberately does NOT do\n *\n * It does not decide whether the caller may have a token. It resolves an IDENTITY and the redirect\n * URIs that identity claims; consent, scope and audience remain the caller's own gates. A client\n * that resolves here is a client whose NAME the consent screen may show — nothing more.\n *\n * assurance-control: WILDO.IDENTITY.CLIENT_IDENTITY_ASSERTION — a client identity is bound to a\n * domain the client demonstrably controls\n */\n@injectable()\nexport class CimdClientMetadataBackendService {\n /**\n * In-process, per-pod. Deliberately not Redis.\n *\n * The document is public by construction — anyone can fetch it — so a shared cache buys only\n * fewer outbound requests, at the cost of a shared mutable surface keyed on attacker-supplied\n * strings. A per-pod cache cannot be poisoned across pods and disappears on restart, which is also\n * the crudest revocation path available.\n *\n * **It is bounded by {@link CIMD_MAX_CACHE_ENTRIES}, and that bound is load-bearing.** An earlier\n * revision of this comment claimed the cache was bounded when nothing bounded it: the key is an\n * attacker-supplied URL, entries were only SKIPPED when stale and never reclaimed, and there was\n * no ceiling — so the map grew for the life of the pod. Insertion order is eviction order (a Map\n * preserves it), which is the right policy here because every entry has a short, bounded TTL: the\n * oldest entry is also the closest to expiry.\n */\n private readonly cache = new Map<string, CachedDocument>();\n\n constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) private readonly logger: LoggerService,\n @inject(SAAS_SERVICE_TYPES.AppConfigService) private readonly appConfigService: AppConfigurationService,\n ) {}\n\n /**\n * The deployment's CIMD posture, read from `auth.cimd` in the application configuration.\n *\n * **One reader, deliberately.** Two facts must never disagree: what the discovery document\n * ADVERTISES (`client_id_metadata_document_supported`) and what the authorize path ACCEPTS. When\n * each read the config for itself, a divergence between them would be invisible — the server would\n * advertise a capability it refuses, or refuse one it advertises, and every client would blame its\n * own implementation. Both now call this.\n *\n * Defaults to `DISABLED` when unconfigured: nothing fetches a stranger's URL until an application\n * opts in. A framework that shipped `OPEN` by default would open an SSRF surface on every\n * deployment that never asked for one.\n */\n public deploymentConfiguration(): CimdConfiguration {\n const authored = (this.appConfigService.config?.auth as { cimd?: { policy?: CimdTrustPolicy; allowedClients?: string[] } } | undefined)?.cimd;\n return {\n policy: authored?.policy ?? CimdTrustPolicy.DISABLED,\n allowedHosts: authored?.allowedClients ?? [],\n };\n }\n\n /** Does this `client_id` even look like a CIMD identifier? Cheap, allocation-free triage. */\n public isCimdClientId(clientId: string): boolean {\n return clientId.startsWith('https://');\n }\n\n public async resolve(clientId: string, config: CimdConfiguration, nowMs = Date.now()): Promise<CimdResolution> {\n // 1 — POLICY, before anything else. A disabled deployment must not even parse the URL, let\n // alone resolve DNS for it: refusing later would still have leaked that this server looks.\n if (config.policy === CimdTrustPolicy.DISABLED) {\n return this.reject(CimdRejectionReason.POLICY_DISABLED, 'client id metadata documents are not enabled');\n }\n\n // 2 — SHAPE. \"The `client_id` URL MUST use the \"https\" scheme and contain a path component\".\n // spec-cite: MCP 2025-11-25 — Authorization § Client ID Metadata Documents → Implementation Requirements\n // The path requirement is not cosmetic: it stops a bare origin being an identity, so one\n // compromised host cannot claim to be every client on that host.\n let url: URL;\n try {\n url = new URL(clientId);\n } catch {\n return this.reject(CimdRejectionReason.MALFORMED_CLIENT_ID, 'client_id is not a URL');\n }\n if (url.protocol !== 'https:') {\n return this.reject(CimdRejectionReason.MALFORMED_CLIENT_ID, 'client_id must use the https scheme');\n }\n if (url.pathname === '/' || url.pathname === '') {\n return this.reject(CimdRejectionReason.MALFORMED_CLIENT_ID, 'client_id must contain a path component');\n }\n if (url.hash) {\n // A fragment is never sent to the server, so two client_ids differing only by fragment would\n // fetch the same document and then fail the identity comparison — confusing, and pointless.\n return this.reject(CimdRejectionReason.MALFORMED_CLIENT_ID, 'client_id must not contain a fragment');\n }\n\n // 3 — TRUST POLICY on the host.\n if (config.policy === CimdTrustPolicy.ALLOWLIST && !this.isAllowListed(url, config.allowedHosts ?? [])) {\n return this.reject(CimdRejectionReason.HOST_NOT_ALLOWED, 'client_id is not on this deployment allow-list');\n }\n\n // 4 — CACHE, keyed on the exact URL. Read before the SSRF check because a cached document was\n // already validated against every gate above at the time it was stored, and the policy\n // gates above have already re-run on THIS request.\n const cached = this.cache.get(url.toString());\n if (cached && cached.expiresAtMs > nowMs) {\n return { kind: 'ok', metadata: cached.metadata };\n }\n\n // 5 — SSRF. Resolved BEFORE the fetch: \"Authorization servers SHOULD avoid fetching any URLs\n // using private or loopback addresses\".\n // spec-cite: draft-ietf-oauth-client-id-metadata-document-00 § 6.5\n const ssrf = await this.refuseInternalTarget(url);\n if (ssrf) return ssrf;\n\n // 6 — Bounded fetch.\n const fetched = await this.fetchDocument(url);\n if (fetched.kind !== 'fetched') return fetched;\n\n // 7 — STRUCTURE.\n const parsed = CimdClientMetadataSchema.safeParse(fetched.body);\n if (!parsed.success) {\n // NOT cached: \"The authorization server MUST NOT cache documents which are invalid or\n // malformed.\" Caching a malformed document would let one bad deploy pin a client out for the\n // whole TTL.\n // spec-cite: draft-ietf-oauth-client-id-metadata-document-00 § 4.4\n return this.reject(CimdRejectionReason.MALFORMED_DOCUMENT, 'document is not a valid client metadata document');\n }\n\n // 8 — IDENTITY. \"The client metadata document MUST contain a `client_id` property whose value\n // MUST match the URL of the document using simple string comparison as defined in RFC 3986\n // Section 6.2.1.\"\n // spec-cite: draft-ietf-oauth-client-id-metadata-document-00 § 4.1\n //\n // This is the load-bearing check of the whole mechanism: without it, anyone who can host a\n // JSON file could claim any other client's identity by naming it.\n if (parsed.data.client_id !== url.toString()) {\n return this.reject(\n CimdRejectionReason.IDENTITY_MISMATCH,\n 'the document\\'s client_id does not match the URL it was fetched from',\n );\n }\n\n // 9 — CLIENT AUTHENTICATION. Checked BEFORE the cache write, alongside structure and identity,\n // for the same reason those are: a document this server will never accept must not occupy a\n // cache slot, and must not be re-served to a later request as though it had been validated.\n const authMethod = this.refuseUnacceptableClientAuthentication(parsed.data);\n if (authMethod) return authMethod;\n\n this.storeInCache(url.toString(), parsed.data, nowMs + this.resolveCacheTtlMs(fetched.cacheControl), nowMs);\n return { kind: 'ok', metadata: parsed.data };\n }\n\n /**\n * Write a validated document, reclaiming space first so the map cannot grow without limit.\n *\n * Two steps, in this order:\n *\n * 1. **Sweep the expired.** Reclaiming stale entries before evicting live ones means a steady\n * state of legitimate traffic never evicts anything — the TTL does the work, and eviction is\n * reserved for genuine pressure.\n * 2. **Evict the oldest** while still at the ceiling. `Map` iterates in insertion order, and\n * because every entry carries a short bounded TTL the oldest is also the nearest to expiry —\n * so insertion order is a good proxy for \"least valuable\" without tracking access times.\n *\n * There is deliberately NO delete-before-set for an existing key. A first draft had one, to move a\n * refreshed document to the end of the order — but this method is only ever reached after a cache\n * MISS: a live entry returns from `resolve` before the fetch, and an expired one is removed by the\n * sweep above. The key can never still be present, so the delete was guarding a state that cannot\n * occur, and a test written to prove it necessarily failed. Removed rather than kept as defence,\n * because dead code with a plausible comment is how the next reader is misled.\n */\n private storeInCache(key: string, metadata: CimdClientMetadata, expiresAtMs: number, nowMs: number): void {\n for (const [cachedKey, cached] of this.cache) {\n if (cached.expiresAtMs <= nowMs) this.cache.delete(cachedKey);\n }\n while (this.cache.size >= CIMD_MAX_CACHE_ENTRIES) {\n const oldest = this.cache.keys().next();\n if (oldest.done) break;\n this.cache.delete(oldest.value);\n }\n this.cache.set(key, { metadata, expiresAtMs });\n }\n\n /**\n * Refuse a document whose declared client authentication method this provider will not honour.\n *\n * Two refusals with two reasons, because they are two different facts about the world:\n *\n * - A SYMMETRIC method is the client violating the draft — \"the `token_endpoint_auth_method`\n * property MUST NOT include `client_secret_post`, `client_secret_basic`, `client_secret_jwt`, or\n * any other method based around a shared symmetric secret.\"\n * spec-cite: draft-ietf-oauth-client-id-metadata-document-00 § 4.1\n * - `private_key_jwt` is permitted by § 6.2 (\"clients MAY establish credentials at the\n * authorization server by using authentication methods that use public/private key pairs, by\n * publishing the public key in their metadata document\") and simply is not implemented here.\n *\n * Both refuse. The alternative — accept the document and treat the client as public — is a silent\n * downgrade: the client believes it authenticates, this server never checks, and neither side can\n * observe the disagreement. An absent `token_endpoint_auth_method` IS accepted as public, which is\n * what the specification's own worked example declares (`\"token_endpoint_auth_method\": \"none\"`).\n */\n private refuseUnacceptableClientAuthentication(metadata: CimdClientMetadata): CimdResolution | undefined {\n const declared = metadata.token_endpoint_auth_method;\n if (declared === undefined || declared === CIMD_ACCEPTED_TOKEN_ENDPOINT_AUTH_METHOD) return undefined;\n if (CIMD_ASYMMETRIC_TOKEN_ENDPOINT_AUTH_METHODS.includes(declared)) {\n return this.reject(\n CimdRejectionReason.UNSUPPORTED_CLIENT_AUTHENTICATION,\n `client authentication method '${declared}' is not supported by this authorization server`,\n );\n }\n return this.reject(\n CimdRejectionReason.FORBIDDEN_CLIENT_AUTHENTICATION,\n `client authentication method '${declared}' is not permitted for a client id metadata document`,\n );\n }\n\n /**\n * Is a redirect URI one this client actually claims?\n *\n * \"MUST validate redirect URIs presented in an authorization request against those in the metadata\n * document.\"\n * spec-cite: MCP 2025-11-25 — Authorization § Client ID Metadata Documents → Implementation Requirements\n *\n * EXACT string comparison, not prefix or origin matching: a prefix rule turns one claimed\n * `https://app.example/cb` into authority over `https://app.example/cb.attacker/...`, and OAuth\n * 2.1 requires exact redirect matching independently of CIMD.\n */\n public permitsRedirectUri(metadata: CimdClientMetadata, redirectUri: string): boolean {\n return metadata.redirect_uris.includes(redirectUri);\n }\n\n /**\n * Does this client's claimed redirect set consist ONLY of loopback URIs?\n *\n * Callers use this to decide whether the consent screen needs a stronger warning. CIMD \"cannot\n * prevent `localhost` URL impersonation by themselves\": an attacker presents the LEGITIMATE\n * client's metadata URL, binds any localhost port, and receives the code — while the user sees the\n * legitimate client's name.\n * spec-cite: MCP 2025-11-25 — Authorization § Client ID Metadata Document Security → Localhost Redirect URI Risks\n *\n * Reported rather than refused: loopback redirects are how every CLI and desktop MCP client works,\n * so refusing them would exclude the majority of real callers. The mitigation the spec names is\n * display, and display needs this signal.\n */\n public claimsOnlyLoopbackRedirects(metadata: CimdClientMetadata): boolean {\n return metadata.redirect_uris.every((uri) => {\n try {\n const host = new URL(uri).hostname.toLowerCase();\n return host === 'localhost' || host === '127.0.0.1' || host === '::1' || host === '[::1]';\n } catch {\n return false;\n }\n });\n }\n\n /**\n * Is this `client_id` admitted by the deployment's allow-list?\n *\n * An entry is matched at ONE OF TWO precisions, decided by the entry itself:\n *\n * - **A full `https://…` URL** matches that exact `client_id` and nothing else.\n * - **A bare host** matches every `client_id` on that host.\n *\n * Both exist because they answer different questions. Clerk's CIMD admission is per-Client-ID-URL,\n * and that is the stricter and usually correct grain: a host entry admits EVERY client hosted\n * there, which is wrong the moment the domain is a shared platform hosting many vendors' metadata —\n * allow-listing one vendor would silently admit all of them. The host form is kept for the common\n * case where a deployment trusts a vendor's whole domain and does not want to re-edit config each\n * time that vendor publishes a new client.\n *\n * The first implementation offered ONLY the host form. Checking it against a shipping\n * implementation is what surfaced the shared-domain hole.\n */\n private isAllowListed(url: URL, entries: readonly string[]): boolean {\n const clientId = url.toString();\n const host = url.hostname.toLowerCase();\n return entries.some((entry) => {\n const value = entry.trim();\n if (!value) return false;\n return value.includes('://')\n ? value === clientId\n : value.toLowerCase() === host;\n });\n }\n\n /**\n * Refuse a target that resolves to an address this server can reach but the public internet\n * cannot.\n *\n * DNS is resolved HERE rather than trusting the hostname, because `internal.example.com` may be a\n * public name with a private A record — the attack the guard exists for. Every resolved address is\n * checked, not just the first: a hostile resolver can return one public and one private address\n * and rely on the client picking the other.\n *\n * This is a check-then-fetch, and on its own it would leave DNS rebinding open — a name that\n * answers a public address to THIS resolution and a private one to the connection. That residual\n * is now closed one layer down rather than here: {@link fetchDocument} connects through\n * `pinnedOutboundFetch`, which classifies inside the connection's `lookup` hook, so the address\n * validated and the address connected to are the same value in the same event.\n *\n * This check is KEPT rather than folded into the pinned client, for two reasons. It refuses before\n * anything leaves the process, which is this service's stated order of operations (\"every cheap\n * refusal happens before anything leaves the process\"). And it is the only place that can tell\n * UNRESOLVABLE from INTERNAL — the pinned client's hook sees a resolver failure as a transport\n * failure, and collapsing the two would report a NXDOMAIN as an SSRF attempt.\n */\n private async refuseInternalTarget(url: URL): Promise<CimdResolution | undefined> {\n const resolution = await resolvesOnlyToPublicAddresses(url.hostname, (hostname) => this.resolveAddresses(hostname));\n\n switch (resolution) {\n case OutboundTargetResolution.PUBLIC:\n return undefined;\n case OutboundTargetResolution.UNRESOLVABLE:\n return this.reject(CimdRejectionReason.UNREACHABLE, 'client_id host does not resolve');\n case OutboundTargetResolution.INTERNAL:\n return this.reject(CimdRejectionReason.SSRF_TARGET_REFUSED, 'client_id host resolves to a non-public address');\n }\n }\n\n /**\n * Throws on failure rather than returning `undefined`, because the shared resolver distinguishes\n * \"the resolver refused\" (UNRESOLVABLE) from \"the resolver answered with nothing usable\"\n * (INTERNAL) — collapsing both into an empty array would turn a NXDOMAIN into an SSRF verdict and\n * lose the diagnostic the caller reports.\n */\n private async resolveAddresses(hostname: string): Promise<string[]> {\n try {\n const records = await dnsLookup(hostname, { all: true });\n return records.map((record) => record.address);\n } catch (error) {\n this.logger.debug('[cimd] client_id host did not resolve', { hostname, ...projectCaughtErrorLogFields(error) });\n throw error;\n }\n }\n\n /**\n * The outbound request itself, isolated behind one method so a test can substitute it exactly as\n * it substitutes {@link resolveAddresses}. Those two together are the whole external world this\n * service touches.\n *\n * `pinnedOutboundFetch`, not `fetch`, and the difference is the point. It classifies inside the\n * connection's `lookup` hook, so a `client_id` host that answers a public address to\n * {@link refuseInternalTarget} and a private one to the connection — DNS rebinding, the residual\n * this service documented and could not close — never gets a socket. It also cannot follow a\n * redirect at all, which is strictly stronger than the `redirect: 'error'` this call used to pass:\n * following one would re-point the request at a target no check ever saw.\n *\n * The resolver is the service's OWN {@link resolveAddresses}, so the pre-check and the connection\n * ask the same resolver — a substituted resolver therefore drives both, which is what makes a\n * rebinding pin expressible at all.\n */\n private async performOutboundRequest(url: URL): Promise<Response> {\n return pinnedOutboundFetch(url.toString(), {\n admittedProtocols: CIMD_ADMITTED_PROTOCOLS,\n headers: { accept: 'application/json' },\n signal: AbortSignal.timeout(CIMD_FETCH_TIMEOUT_MS),\n // Never `admitPrivateAddresses` here, under any configuration. A `client_id` URL comes from an\n // UNAUTHENTICATED stranger, so an escape on this path would be an operator declaring that\n // strangers may address the deployment's internal network — a sentence with no legitimate\n // reading. The escape exists only for a target class an operator authors themselves.\n resolveAddresses: async (hostname) => {\n const addresses = await this.resolveAddresses(hostname);\n return addresses.map((address) => ({ address, family: isIP(address) }));\n },\n });\n }\n\n private async fetchDocument(url: URL): Promise<{ kind: 'fetched'; body: unknown; cacheControl: string | null } | CimdResolution> {\n try {\n const response = await this.performOutboundRequest(url);\n if (!response.ok) {\n return this.reject(CimdRejectionReason.UNREACHABLE, `client metadata document responded ${response.status}`);\n }\n\n // ── SIZE, enforced DURING the read rather than after it ─────────────────────────────────\n //\n // The previous implementation did `await response.text()` and then measured — which buffers\n // the ENTIRE body first, so a hostile URL returning a gigabyte was fully downloaded and held\n // in memory before being rejected. The cap existed and bounded nothing; the denial-of-service\n // primitive it was written to remove was still there, and the 5 s timeout does not substitute\n // because a fast server delivers a great deal inside it.\n //\n // It also measured `text.length` — UTF-16 code units — against a constant named `_BYTES`, so a\n // multi-byte document read as smaller than it is.\n const declaredLength = Number(response.headers.get('content-length'));\n if (Number.isFinite(declaredLength) && declaredLength > CIMD_MAX_DOCUMENT_BYTES) {\n // Cheapest possible refusal: the server told us, so nothing needs to be read at all. Not\n // TRUSTED — a lying or absent header just falls through to the streaming counter below.\n return this.reject(CimdRejectionReason.UNREACHABLE, 'client metadata document exceeds the permitted size');\n }\n\n const read = await this.readBoundedBody(response);\n if (read.kind !== 'read') return read;\n\n try {\n return { kind: 'fetched', body: JSON.parse(read.text), cacheControl: response.headers.get('cache-control') };\n } catch {\n return this.reject(CimdRejectionReason.MALFORMED_DOCUMENT, 'client metadata document is not valid JSON');\n }\n } catch (error) {\n /**\n * A connect-time SSRF refusal is NOT \"unreachable\", and collapsing the two would lose the\n * signal this whole guard exists to produce. `SSRF_TARGET_REFUSED` is counted and alerted on —\n * the enum's own JSDoc says an operator watching a spike in it \"is watching an attack, not a\n * misconfiguration\" — while `UNREACHABLE` is ordinary noise from strangers' broken hosts.\n *\n * A rebind lands HERE rather than at {@link refuseInternalTarget}, because by construction it\n * passed that check. This branch is the only place it can be named.\n */\n if (error instanceof OutboundTargetRefusedError) {\n this.logger.debug('[cimd] outbound target refused at connect time', {\n clientId: url.toString(),\n rejection: error.rejection,\n refusedAddress: error.refusedAddress,\n });\n return this.reject(CimdRejectionReason.SSRF_TARGET_REFUSED, 'client_id host connects to a non-public address');\n }\n return this.reject(CimdRejectionReason.UNREACHABLE, 'client metadata document could not be fetched');\n }\n }\n\n /**\n * Read the body with a running BYTE counter, abandoning the transfer the moment it exceeds the cap.\n *\n * This is the half that actually bounds memory: the counter is checked per chunk, so the most that\n * is ever retained is the cap plus one chunk, whatever the server intended to send. `reader.cancel()`\n * tears the connection down rather than politely draining a body we have already refused.\n *\n * Falls back to `response.text()` when the response exposes no stream. That is not a test\n * accommodation — `fetch` may legitimately yield a null body (a 204, or a HEAD-like response) — and\n * the byte length is still measured properly there, via `Buffer.byteLength` rather than `String.length`.\n */\n private async readBoundedBody(response: Response): Promise<{ kind: 'read'; text: string } | CimdResolution> {\n const stream = response.body;\n if (!stream || typeof (stream as ReadableStream<Uint8Array>).getReader !== 'function') {\n const text = await response.text();\n return Buffer.byteLength(text, 'utf8') > CIMD_MAX_DOCUMENT_BYTES\n ? this.reject(CimdRejectionReason.UNREACHABLE, 'client metadata document exceeds the permitted size')\n : { kind: 'read', text };\n }\n\n const reader = (stream as ReadableStream<Uint8Array>).getReader();\n const chunks: Uint8Array[] = [];\n let total = 0;\n try {\n for (;;) {\n const { done, value } = await reader.read();\n if (done) break;\n if (!value) continue;\n total += value.byteLength;\n if (total > CIMD_MAX_DOCUMENT_BYTES) {\n await reader.cancel().catch(() => undefined);\n return this.reject(CimdRejectionReason.UNREACHABLE, 'client metadata document exceeds the permitted size');\n }\n chunks.push(value);\n }\n } finally {\n reader.releaseLock?.();\n }\n return { kind: 'read', text: Buffer.concat(chunks).toString('utf8') };\n }\n\n /** Honour `max-age`, bounded at both ends. See the constants for why each bound exists. */\n private resolveCacheTtlMs(cacheControl: string | null): number {\n const maxAge = cacheControl?.match(/max-age\\s*=\\s*(\\d+)/i);\n if (!maxAge) return CIMD_CACHE_MIN_TTL_MS;\n const requested = Number(maxAge[1]) * 1000;\n if (!Number.isFinite(requested)) return CIMD_CACHE_MIN_TTL_MS;\n return Math.min(CIMD_CACHE_MAX_TTL_MS, Math.max(CIMD_CACHE_MIN_TTL_MS, requested));\n }\n\n private reject(reason: CimdRejectionReason, detail: string): CimdResolution {\n return { kind: 'rejected', reason, detail };\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"cimd-client-metadata.backend.service.js","sourceRoot":"","sources":["../../../../../src/security/auth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AAM,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAA;qCADgB,aAAa;QACO,uBAAuB;GApB9F,gCAAgC,CAyc5C","sourcesContent":["import 'reflect-metadata';\nimport { injectable, inject } from 'inversify';\nimport { lookup as dnsLookup } from 'node:dns/promises';\nimport { isIP } from 'node:net';\n\nimport { SAAS_SERVICE_TYPES } from '~wildo-backend-lib/inject/models/service-types';\nimport { LoggerService } from '~wildo-backend-lib/monitoring/logger/services/logger.service';\nimport { projectCaughtErrorLogFields } from '~wildo-backend-lib/errors/utils/error-log-level-classification.backend.utils';\nimport {\n OutboundTargetResolution,\n resolvesOnlyToPublicAddresses,\n} from '~wildo-backend-lib/security/ssrf/outbound-target-guard.backend.utils';\nimport {\n OutboundTargetRefusedError,\n pinnedOutboundFetch,\n} from '~wildo-backend-lib/security/ssrf/pinned-outbound-fetch.backend.utils';\nimport {\n CimdClientMetadataSchema,\n CimdRejectionReason,\n CimdTrustPolicy,\n CIMD_CACHE_MAX_TTL_MS,\n CIMD_CACHE_MIN_TTL_MS,\n CIMD_FETCH_TIMEOUT_MS,\n CIMD_MAX_DOCUMENT_BYTES,\n CIMD_MAX_CACHE_ENTRIES,\n CIMD_ACCEPTED_TOKEN_ENDPOINT_AUTH_METHOD,\n CIMD_ASYMMETRIC_TOKEN_ENDPOINT_AUTH_METHODS,\n type CimdClientMetadata,\n} from '~wildo-backend-lib/security/authentications/models/cimd.backend.schemas';\nimport { AppConfigurationService } from '~wildo-backend-lib/config/services/app-configuration.backend.service';\n\n/**\n * The scheme the egress client will issue on.\n *\n * A `client_id` that is not `https:` is already refused at shape time (`refuseMalformedClientId`),\n * so this restates a decision rather than making a new one — deliberately. The pinned client takes\n * the scheme policy as a required input precisely so no caller can inherit a permissive default, and\n * a second statement at the egress point costs one line and survives a future refactor that moves\n * the shape check.\n */\nconst CIMD_ADMITTED_PROTOCOLS: readonly string[] = ['https:'];\n\n/** The deployment's CIMD posture, resolved from application config. */\nexport interface CimdConfiguration {\n policy: CimdTrustPolicy;\n /** Hosts accepted under {@link CimdTrustPolicy.ALLOWLIST}. Exact host match, case-insensitive. */\n allowedHosts?: readonly string[];\n}\n\nexport type CimdResolution =\n | { kind: 'ok'; metadata: CimdClientMetadata }\n | { kind: 'rejected'; reason: CimdRejectionReason; detail: string };\n\ninterface CachedDocument { metadata: CimdClientMetadata; expiresAtMs: number }\n\n/**\n * Resolve an HTTPS `client_id` URL into validated client metadata (CIMD).\n *\n * ## What makes this different from every other lookup in the provider\n *\n * Every other client resolution reads a row this application minted. This one takes a URL from an\n * UNAUTHENTICATED stranger and makes an outbound request to it. That inverts the usual trust\n * direction, and the draft is explicit about the consequence:\n *\n * \"The authorization server takes a URL as input from an unknown client and fetches that URL. A\n * malicious client could use this to trigger the authorization server to make requests to\n * arbitrary URLs, such as requests to private administration endpoints the authorization server\n * has access to.\"\n * spec-cite: MCP 2025-11-25 — Authorization § Client ID Metadata Document Security\n *\n * So the order of operations is itself a control: POLICY first (is this deployment even accepting\n * stranger URLs?), then SHAPE, then the SSRF target check, and only then a bounded fetch. Every\n * cheap refusal happens before anything leaves the process.\n *\n * ## What this deliberately does NOT do\n *\n * It does not decide whether the caller may have a token. It resolves an IDENTITY and the redirect\n * URIs that identity claims; consent, scope and audience remain the caller's own gates. A client\n * that resolves here is a client whose NAME the consent screen may show — nothing more.\n *\n * assurance-control: WILDO.IDENTITY.CLIENT_IDENTITY_ASSERTION — a client identity is bound to a\n * domain the client demonstrably controls\n */\n@injectable()\nexport class CimdClientMetadataBackendService {\n /**\n * In-process, per-pod. Deliberately not Redis.\n *\n * The document is public by construction — anyone can fetch it — so a shared cache buys only\n * fewer outbound requests, at the cost of a shared mutable surface keyed on attacker-supplied\n * strings. A per-pod cache cannot be poisoned across pods and disappears on restart, which is also\n * the crudest revocation path available.\n *\n * **It is bounded by {@link CIMD_MAX_CACHE_ENTRIES}, and that bound is load-bearing.** An earlier\n * revision of this comment claimed the cache was bounded when nothing bounded it: the key is an\n * attacker-supplied URL, entries were only SKIPPED when stale and never reclaimed, and there was\n * no ceiling — so the map grew for the life of the pod. Insertion order is eviction order (a Map\n * preserves it), which is the right policy here because every entry has a short, bounded TTL: the\n * oldest entry is also the closest to expiry.\n */\n private readonly cache = new Map<string, CachedDocument>();\n\n constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) private readonly logger: LoggerService,\n @inject(SAAS_SERVICE_TYPES.AppConfigService) private readonly appConfigService: AppConfigurationService,\n ) {}\n\n /**\n * The deployment's CIMD posture, read from `auth.cimd` in the application configuration.\n *\n * **One reader, deliberately.** Two facts must never disagree: what the discovery document\n * ADVERTISES (`client_id_metadata_document_supported`) and what the authorize path ACCEPTS. When\n * each read the config for itself, a divergence between them would be invisible — the server would\n * advertise a capability it refuses, or refuse one it advertises, and every client would blame its\n * own implementation. Both now call this.\n *\n * Defaults to `DISABLED` when unconfigured: nothing fetches a stranger's URL until an application\n * opts in. A framework that shipped `OPEN` by default would open an SSRF surface on every\n * deployment that never asked for one.\n */\n public deploymentConfiguration(): CimdConfiguration {\n const authored = (this.appConfigService.config?.auth as { cimd?: { policy?: CimdTrustPolicy; allowedClients?: string[] } } | undefined)?.cimd;\n return {\n policy: authored?.policy ?? CimdTrustPolicy.DISABLED,\n allowedHosts: authored?.allowedClients ?? [],\n };\n }\n\n /** Does this `client_id` even look like a CIMD identifier? Cheap, allocation-free triage. */\n public isCimdClientId(clientId: string): boolean {\n return clientId.startsWith('https://');\n }\n\n public async resolve(clientId: string, config: CimdConfiguration, nowMs = Date.now()): Promise<CimdResolution> {\n // 1 — POLICY, before anything else. A disabled deployment must not even parse the URL, let\n // alone resolve DNS for it: refusing later would still have leaked that this server looks.\n if (config.policy === CimdTrustPolicy.DISABLED) {\n return this.reject(CimdRejectionReason.POLICY_DISABLED, 'client id metadata documents are not enabled');\n }\n\n // 2 — SHAPE. \"The `client_id` URL MUST use the \"https\" scheme and contain a path component\".\n // spec-cite: MCP 2025-11-25 — Authorization § Client ID Metadata Documents → Implementation Requirements\n // The path requirement is not cosmetic: it stops a bare origin being an identity, so one\n // compromised host cannot claim to be every client on that host.\n let url: URL;\n try {\n url = new URL(clientId);\n } catch {\n return this.reject(CimdRejectionReason.MALFORMED_CLIENT_ID, 'client_id is not a URL');\n }\n if (url.protocol !== 'https:') {\n return this.reject(CimdRejectionReason.MALFORMED_CLIENT_ID, 'client_id must use the https scheme');\n }\n if (url.pathname === '/' || url.pathname === '') {\n return this.reject(CimdRejectionReason.MALFORMED_CLIENT_ID, 'client_id must contain a path component');\n }\n if (url.hash) {\n // A fragment is never sent to the server, so two client_ids differing only by fragment would\n // fetch the same document and then fail the identity comparison — confusing, and pointless.\n return this.reject(CimdRejectionReason.MALFORMED_CLIENT_ID, 'client_id must not contain a fragment');\n }\n\n // 3 — TRUST POLICY on the host.\n if (config.policy === CimdTrustPolicy.ALLOWLIST && !this.isAllowListed(url, config.allowedHosts ?? [])) {\n return this.reject(CimdRejectionReason.HOST_NOT_ALLOWED, 'client_id is not on this deployment allow-list');\n }\n\n // 4 — CACHE, keyed on the exact URL. Read before the SSRF check because a cached document was\n // already validated against every gate above at the time it was stored, and the policy\n // gates above have already re-run on THIS request.\n const cached = this.cache.get(url.toString());\n if (cached && cached.expiresAtMs > nowMs) {\n return { kind: 'ok', metadata: cached.metadata };\n }\n\n // 5 — SSRF. Resolved BEFORE the fetch: \"Authorization servers SHOULD avoid fetching any URLs\n // using private or loopback addresses\".\n // spec-cite: draft-ietf-oauth-client-id-metadata-document-00 § 6.5\n const ssrf = await this.refuseInternalTarget(url);\n if (ssrf) return ssrf;\n\n // 6 — Bounded fetch.\n const fetched = await this.fetchDocument(url);\n if (fetched.kind !== 'fetched') return fetched;\n\n // 7 — STRUCTURE.\n const parsed = CimdClientMetadataSchema.safeParse(fetched.body);\n if (!parsed.success) {\n // NOT cached: \"The authorization server MUST NOT cache documents which are invalid or\n // malformed.\" Caching a malformed document would let one bad deploy pin a client out for the\n // whole TTL.\n // spec-cite: draft-ietf-oauth-client-id-metadata-document-00 § 4.4\n return this.reject(CimdRejectionReason.MALFORMED_DOCUMENT, 'document is not a valid client metadata document');\n }\n\n // 8 — IDENTITY. \"The client metadata document MUST contain a `client_id` property whose value\n // MUST match the URL of the document using simple string comparison as defined in RFC 3986\n // Section 6.2.1.\"\n // spec-cite: draft-ietf-oauth-client-id-metadata-document-00 § 4.1\n //\n // This is the load-bearing check of the whole mechanism: without it, anyone who can host a\n // JSON file could claim any other client's identity by naming it.\n if (parsed.data.client_id !== url.toString()) {\n return this.reject(\n CimdRejectionReason.IDENTITY_MISMATCH,\n 'the document\\'s client_id does not match the URL it was fetched from',\n );\n }\n\n // 9 — CLIENT AUTHENTICATION. Checked BEFORE the cache write, alongside structure and identity,\n // for the same reason those are: a document this server will never accept must not occupy a\n // cache slot, and must not be re-served to a later request as though it had been validated.\n const authMethod = this.refuseUnacceptableClientAuthentication(parsed.data);\n if (authMethod) return authMethod;\n\n this.storeInCache(url.toString(), parsed.data, nowMs + this.resolveCacheTtlMs(fetched.cacheControl), nowMs);\n return { kind: 'ok', metadata: parsed.data };\n }\n\n /**\n * Write a validated document, reclaiming space first so the map cannot grow without limit.\n *\n * Two steps, in this order:\n *\n * 1. **Sweep the expired.** Reclaiming stale entries before evicting live ones means a steady\n * state of legitimate traffic never evicts anything — the TTL does the work, and eviction is\n * reserved for genuine pressure.\n * 2. **Evict the oldest** while still at the ceiling. `Map` iterates in insertion order, and\n * because every entry carries a short bounded TTL the oldest is also the nearest to expiry —\n * so insertion order is a good proxy for \"least valuable\" without tracking access times.\n *\n * There is deliberately NO delete-before-set for an existing key. A first draft had one, to move a\n * refreshed document to the end of the order — but this method is only ever reached after a cache\n * MISS: a live entry returns from `resolve` before the fetch, and an expired one is removed by the\n * sweep above. The key can never still be present, so the delete was guarding a state that cannot\n * occur, and a test written to prove it necessarily failed. Removed rather than kept as defence,\n * because dead code with a plausible comment is how the next reader is misled.\n */\n private storeInCache(key: string, metadata: CimdClientMetadata, expiresAtMs: number, nowMs: number): void {\n for (const [cachedKey, cached] of this.cache) {\n if (cached.expiresAtMs <= nowMs) this.cache.delete(cachedKey);\n }\n while (this.cache.size >= CIMD_MAX_CACHE_ENTRIES) {\n const oldest = this.cache.keys().next();\n if (oldest.done) break;\n this.cache.delete(oldest.value);\n }\n this.cache.set(key, { metadata, expiresAtMs });\n }\n\n /**\n * Refuse a document whose declared client authentication method this provider will not honour.\n *\n * Two refusals with two reasons, because they are two different facts about the world:\n *\n * - A SYMMETRIC method is the client violating the draft — \"the `token_endpoint_auth_method`\n * property MUST NOT include `client_secret_post`, `client_secret_basic`, `client_secret_jwt`, or\n * any other method based around a shared symmetric secret.\"\n * spec-cite: draft-ietf-oauth-client-id-metadata-document-00 § 4.1\n * - `private_key_jwt` is permitted by § 6.2 (\"clients MAY establish credentials at the\n * authorization server by using authentication methods that use public/private key pairs, by\n * publishing the public key in their metadata document\") and simply is not implemented here.\n *\n * Both refuse. The alternative — accept the document and treat the client as public — is a silent\n * downgrade: the client believes it authenticates, this server never checks, and neither side can\n * observe the disagreement. An absent `token_endpoint_auth_method` IS accepted as public, which is\n * what the specification's own worked example declares (`\"token_endpoint_auth_method\": \"none\"`).\n */\n private refuseUnacceptableClientAuthentication(metadata: CimdClientMetadata): CimdResolution | undefined {\n const declared = metadata.token_endpoint_auth_method;\n if (declared === undefined || declared === CIMD_ACCEPTED_TOKEN_ENDPOINT_AUTH_METHOD) return undefined;\n if (CIMD_ASYMMETRIC_TOKEN_ENDPOINT_AUTH_METHODS.includes(declared)) {\n return this.reject(\n CimdRejectionReason.UNSUPPORTED_CLIENT_AUTHENTICATION,\n `client authentication method '${declared}' is not supported by this authorization server`,\n );\n }\n return this.reject(\n CimdRejectionReason.FORBIDDEN_CLIENT_AUTHENTICATION,\n `client authentication method '${declared}' is not permitted for a client id metadata document`,\n );\n }\n\n /**\n * Is a redirect URI one this client actually claims?\n *\n * \"MUST validate redirect URIs presented in an authorization request against those in the metadata\n * document.\"\n * spec-cite: MCP 2025-11-25 — Authorization § Client ID Metadata Documents → Implementation Requirements\n *\n * EXACT string comparison, not prefix or origin matching: a prefix rule turns one claimed\n * `https://app.example/cb` into authority over `https://app.example/cb.attacker/...`, and OAuth\n * 2.1 requires exact redirect matching independently of CIMD.\n */\n public permitsRedirectUri(metadata: CimdClientMetadata, redirectUri: string): boolean {\n return metadata.redirect_uris.includes(redirectUri);\n }\n\n /**\n * Does this client's claimed redirect set consist ONLY of loopback URIs?\n *\n * Callers use this to decide whether the consent screen needs a stronger warning. CIMD \"cannot\n * prevent `localhost` URL impersonation by themselves\": an attacker presents the LEGITIMATE\n * client's metadata URL, binds any localhost port, and receives the code — while the user sees the\n * legitimate client's name.\n * spec-cite: MCP 2025-11-25 — Authorization § Client ID Metadata Document Security → Localhost Redirect URI Risks\n *\n * Reported rather than refused: loopback redirects are how every CLI and desktop MCP client works,\n * so refusing them would exclude the majority of real callers. The mitigation the spec names is\n * display, and display needs this signal.\n */\n public claimsOnlyLoopbackRedirects(metadata: CimdClientMetadata): boolean {\n return metadata.redirect_uris.every((uri) => {\n try {\n const host = new URL(uri).hostname.toLowerCase();\n return host === 'localhost' || host === '127.0.0.1' || host === '::1' || host === '[::1]';\n } catch {\n return false;\n }\n });\n }\n\n /**\n * Is this `client_id` admitted by the deployment's allow-list?\n *\n * An entry is matched at ONE OF TWO precisions, decided by the entry itself:\n *\n * - **A full `https://…` URL** matches that exact `client_id` and nothing else.\n * - **A bare host** matches every `client_id` on that host.\n *\n * Both exist because they answer different questions. Clerk's CIMD admission is per-Client-ID-URL,\n * and that is the stricter and usually correct grain: a host entry admits EVERY client hosted\n * there, which is wrong the moment the domain is a shared platform hosting many vendors' metadata —\n * allow-listing one vendor would silently admit all of them. The host form is kept for the common\n * case where a deployment trusts a vendor's whole domain and does not want to re-edit config each\n * time that vendor publishes a new client.\n *\n * The first implementation offered ONLY the host form. Checking it against a shipping\n * implementation is what surfaced the shared-domain hole.\n */\n private isAllowListed(url: URL, entries: readonly string[]): boolean {\n const clientId = url.toString();\n const host = url.hostname.toLowerCase();\n return entries.some((entry) => {\n const value = entry.trim();\n if (!value) return false;\n return value.includes('://')\n ? value === clientId\n : value.toLowerCase() === host;\n });\n }\n\n /**\n * Refuse a target that resolves to an address this server can reach but the public internet\n * cannot.\n *\n * DNS is resolved HERE rather than trusting the hostname, because `internal.example.com` may be a\n * public name with a private A record — the attack the guard exists for. Every resolved address is\n * checked, not just the first: a hostile resolver can return one public and one private address\n * and rely on the client picking the other.\n *\n * This is a check-then-fetch, and on its own it would leave DNS rebinding open — a name that\n * answers a public address to THIS resolution and a private one to the connection. That residual\n * is now closed one layer down rather than here: {@link fetchDocument} connects through\n * `pinnedOutboundFetch`, which classifies inside the connection's `lookup` hook, so the address\n * validated and the address connected to are the same value in the same event.\n *\n * This check is KEPT rather than folded into the pinned client, for two reasons. It refuses before\n * anything leaves the process, which is this service's stated order of operations (\"every cheap\n * refusal happens before anything leaves the process\"). And it is the only place that can tell\n * UNRESOLVABLE from INTERNAL — the pinned client's hook sees a resolver failure as a transport\n * failure, and collapsing the two would report a NXDOMAIN as an SSRF attempt.\n */\n private async refuseInternalTarget(url: URL): Promise<CimdResolution | undefined> {\n const resolution = await resolvesOnlyToPublicAddresses(url.hostname, (hostname) => this.resolveAddresses(hostname));\n\n switch (resolution) {\n case OutboundTargetResolution.PUBLIC:\n return undefined;\n case OutboundTargetResolution.UNRESOLVABLE:\n return this.reject(CimdRejectionReason.UNREACHABLE, 'client_id host does not resolve');\n case OutboundTargetResolution.INTERNAL:\n return this.reject(CimdRejectionReason.SSRF_TARGET_REFUSED, 'client_id host resolves to a non-public address');\n }\n }\n\n /**\n * Throws on failure rather than returning `undefined`, because the shared resolver distinguishes\n * \"the resolver refused\" (UNRESOLVABLE) from \"the resolver answered with nothing usable\"\n * (INTERNAL) — collapsing both into an empty array would turn a NXDOMAIN into an SSRF verdict and\n * lose the diagnostic the caller reports.\n */\n private async resolveAddresses(hostname: string): Promise<string[]> {\n try {\n const records = await dnsLookup(hostname, { all: true });\n return records.map((record) => record.address);\n } catch (error) {\n this.logger.debug('[cimd] client_id host did not resolve', { hostname, ...projectCaughtErrorLogFields(error) });\n throw error;\n }\n }\n\n /**\n * The outbound request itself, isolated behind one method so a test can substitute it exactly as\n * it substitutes {@link resolveAddresses}. Those two together are the whole external world this\n * service touches.\n *\n * `pinnedOutboundFetch`, not `fetch`, and the difference is the point. It classifies inside the\n * connection's `lookup` hook, so a `client_id` host that answers a public address to\n * {@link refuseInternalTarget} and a private one to the connection — DNS rebinding, the residual\n * this service documented and could not close — never gets a socket. It also cannot follow a\n * redirect at all, which is strictly stronger than the `redirect: 'error'` this call used to pass:\n * following one would re-point the request at a target no check ever saw.\n *\n * The resolver is the service's OWN {@link resolveAddresses}, so the pre-check and the connection\n * ask the same resolver — a substituted resolver therefore drives both, which is what makes a\n * rebinding pin expressible at all.\n */\n private async performOutboundRequest(url: URL): Promise<Response> {\n return pinnedOutboundFetch(url.toString(), {\n admittedProtocols: CIMD_ADMITTED_PROTOCOLS,\n headers: { accept: 'application/json' },\n signal: AbortSignal.timeout(CIMD_FETCH_TIMEOUT_MS),\n // Never `admitPrivateAddresses` here, under any configuration. A `client_id` URL comes from an\n // UNAUTHENTICATED stranger, so an escape on this path would be an operator declaring that\n // strangers may address the deployment's internal network — a sentence with no legitimate\n // reading. The escape exists only for a target class an operator authors themselves.\n resolveAddresses: async (hostname) => {\n const addresses = await this.resolveAddresses(hostname);\n return addresses.map((address) => ({ address, family: isIP(address) }));\n },\n });\n }\n\n private async fetchDocument(url: URL): Promise<{ kind: 'fetched'; body: unknown; cacheControl: string | null } | CimdResolution> {\n try {\n const response = await this.performOutboundRequest(url);\n if (!response.ok) {\n return this.reject(CimdRejectionReason.UNREACHABLE, `client metadata document responded ${response.status}`);\n }\n\n // ── SIZE, enforced DURING the read rather than after it ─────────────────────────────────\n //\n // The previous implementation did `await response.text()` and then measured — which buffers\n // the ENTIRE body first, so a hostile URL returning a gigabyte was fully downloaded and held\n // in memory before being rejected. The cap existed and bounded nothing; the denial-of-service\n // primitive it was written to remove was still there, and the 5 s timeout does not substitute\n // because a fast server delivers a great deal inside it.\n //\n // It also measured `text.length` — UTF-16 code units — against a constant named `_BYTES`, so a\n // multi-byte document read as smaller than it is.\n const declaredLength = Number(response.headers.get('content-length'));\n if (Number.isFinite(declaredLength) && declaredLength > CIMD_MAX_DOCUMENT_BYTES) {\n // Cheapest possible refusal: the server told us, so nothing needs to be read at all. Not\n // TRUSTED — a lying or absent header just falls through to the streaming counter below.\n return this.reject(CimdRejectionReason.UNREACHABLE, 'client metadata document exceeds the permitted size');\n }\n\n const read = await this.readBoundedBody(response);\n if (read.kind !== 'read') return read;\n\n try {\n return { kind: 'fetched', body: JSON.parse(read.text), cacheControl: response.headers.get('cache-control') };\n } catch {\n return this.reject(CimdRejectionReason.MALFORMED_DOCUMENT, 'client metadata document is not valid JSON');\n }\n } catch (error) {\n /**\n * A connect-time SSRF refusal is NOT \"unreachable\", and collapsing the two would lose the\n * signal this whole guard exists to produce. `SSRF_TARGET_REFUSED` is counted and alerted on —\n * the enum's own JSDoc says an operator watching a spike in it \"is watching an attack, not a\n * misconfiguration\" — while `UNREACHABLE` is ordinary noise from strangers' broken hosts.\n *\n * A rebind lands HERE rather than at {@link refuseInternalTarget}, because by construction it\n * passed that check. This branch is the only place it can be named.\n */\n if (error instanceof OutboundTargetRefusedError) {\n this.logger.debug('[cimd] outbound target refused at connect time', {\n clientId: url.toString(),\n rejection: error.rejection,\n refusedAddress: error.refusedAddress,\n });\n return this.reject(CimdRejectionReason.SSRF_TARGET_REFUSED, 'client_id host connects to a non-public address');\n }\n return this.reject(CimdRejectionReason.UNREACHABLE, 'client metadata document could not be fetched');\n }\n }\n\n /**\n * Read the body with a running BYTE counter, abandoning the transfer the moment it exceeds the cap.\n *\n * This is the half that actually bounds memory: the counter is checked per chunk, so the most that\n * is ever retained is the cap plus one chunk, whatever the server intended to send. `reader.cancel()`\n * tears the connection down rather than politely draining a body we have already refused.\n *\n * Falls back to `response.text()` when the response exposes no stream. That is not a test\n * accommodation — `fetch` may legitimately yield a null body (a 204, or a HEAD-like response) — and\n * the byte length is still measured properly there, via `Buffer.byteLength` rather than `String.length`.\n */\n private async readBoundedBody(response: Response): Promise<{ kind: 'read'; text: string } | CimdResolution> {\n const stream = response.body;\n if (!stream || typeof (stream as ReadableStream<Uint8Array>).getReader !== 'function') {\n const text = await response.text();\n return Buffer.byteLength(text, 'utf8') > CIMD_MAX_DOCUMENT_BYTES\n ? this.reject(CimdRejectionReason.UNREACHABLE, 'client metadata document exceeds the permitted size')\n : { kind: 'read', text };\n }\n\n const reader = (stream as ReadableStream<Uint8Array>).getReader();\n const chunks: Uint8Array[] = [];\n let total = 0;\n try {\n for (;;) {\n const { done, value } = await reader.read();\n if (done) break;\n if (!value) continue;\n total += value.byteLength;\n if (total > CIMD_MAX_DOCUMENT_BYTES) {\n await reader.cancel().catch(() => undefined);\n return this.reject(CimdRejectionReason.UNREACHABLE, 'client metadata document exceeds the permitted size');\n }\n chunks.push(value);\n }\n } finally {\n reader.releaseLock?.();\n }\n return { kind: 'read', text: Buffer.concat(chunks).toString('utf8') };\n }\n\n /** Honour `max-age`, bounded at both ends. See the constants for why each bound exists. */\n private resolveCacheTtlMs(cacheControl: string | null): number {\n const maxAge = cacheControl?.match(/max-age\\s*=\\s*(\\d+)/i);\n if (!maxAge) return CIMD_CACHE_MIN_TTL_MS;\n const requested = Number(maxAge[1]) * 1000;\n if (!Number.isFinite(requested)) return CIMD_CACHE_MIN_TTL_MS;\n return Math.min(CIMD_CACHE_MAX_TTL_MS, Math.max(CIMD_CACHE_MIN_TTL_MS, requested));\n }\n\n private reject(reason: CimdRejectionReason, detail: string): CimdResolution {\n return { kind: 'rejected', reason, detail };\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-custom-implementations.backend.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"auth-custom-implementations.backend.d.ts","sourceRoot":"","sources":["../../../../../../src/security/authentications/services/custom-impls/auth-custom-implementations.backend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,0CAA0C,EAAE,MAAM,4GAA4G,CAAC;AAuB7K,eAAO,MAAM,yBAAyB,EAAE,0CAA0C,EAqBjF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-custom-implementations.backend.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"auth-custom-implementations.backend.js","sourceRoot":"","sources":["../../../../../../src/security/authentications/services/custom-impls/auth-custom-implementations.backend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EACL,kCAAkC,EAClC,kCAAkC,EAClC,kCAAkC,EAClC,0CAA0C,EAC1C,6CAA6C,GAC9C,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,8BAA8B,EAAE,MAAM,0CAA0C,CAAC;AAC1F,OAAO,EAAE,0CAA0C,EAAE,MAAM,8DAA8D,CAAC;AAC1H,OAAO,EACL,iCAAiC,EACjC,8BAA8B,EAC9B,8BAA8B,GAC/B,MAAM,iDAAiD,CAAC;AACzD,OAAO,EACL,gCAAgC,EAChC,8BAA8B,EAC9B,8BAA8B,GAC/B,MAAM,2CAA2C,CAAC;AAEnD,wEAAwE;AAExE,MAAM,CAAC,MAAM,yBAAyB,GAAiD;IACrF,4BAA4B;IAC5B,+EAA+E;IAC/E,iFAAiF;IACjF,GAAG,kCAAkC,EAAE;IACvC,GAAG,kCAAkC,EAAE;IACvC,GAAG,kCAAkC,EAAE;IACvC,GAAG,0CAA0C,EAAE;IAC/C,GAAG,6CAA6C,EAAE;IAClD,wBAAwB;IACxB,GAAG,8BAA8B,EAAE;IACnC,0EAA0E;IAC1E,GAAG,0CAA0C,EAAE;IAC/C,+BAA+B;IAC/B,GAAG,iCAAiC,EAAE;IACtC,GAAG,8BAA8B,EAAE;IACnC,GAAG,8BAA8B,EAAE;IACnC,wBAAwB;IACxB,GAAG,gCAAgC,EAAE;IACrC,GAAG,8BAA8B,EAAE;IACnC,GAAG,8BAA8B,EAAE;CACpC,CAAC","sourcesContent":["/**\n * Auth Custom Implementations — Aggregator\n *\n * Exports all auth resource custom implementations for registration\n * in CoreBackend_ServiceImplementationsFactories.\n *\n * Only operations with real runtime behavior are registered. Unsupported\n * integration work is absent rather than exposed through placeholder success\n * handlers. No late-binding initialization is needed yet.\n */\n\nimport type { ResourceCustomServiceImplementationFactory } from '~wildo-backend-lib/base-classes/services/services/resource-operation-custom-implementation.factory.backend';\nimport {\n createSsoConnectionCreateFactories,\n createSsoConnectionUpdateFactories,\n createSsoConnectionDeleteFactories,\n createSsoConnectionTestConnectionFactories,\n createSsoConnectionDiscoverEndpointsFactories,\n} from './sso-connection.custom-impl.backend.service';\nimport { createSsoConfigUpdateFactories } from './sso-config.custom-impl.backend.service';\nimport { createSsoConfigDomainVerificationFactories } from './sso-config-domain-verification.custom-impl.backend.service';\nimport {\n createSiemDlqRetrySingleFactories,\n createSiemDlqRetryAllFactories,\n createSiemDlqPurgeAllFactories,\n} from './siem-delivery-dlq.custom-impl.backend.service';\nimport {\n createScimTokenGenerateFactories,\n createScimTokenRevokeFactories,\n createScimTokenRotateFactories,\n} from './scim-tokens.custom-impl.backend.service';\n\n// ── All auth custom implementation factories ─────────────────────────\n\nexport const authCustomImplementations: ResourceCustomServiceImplementationFactory[] = [\n // SSO Connection operations\n // (READ has no custom impl — oidc.clientSecret masking is framework-driven via\n // `.isWriteOnlySecret()`; the UPDATE prefix re-injects the stored nested secret)\n ...createSsoConnectionCreateFactories(),\n ...createSsoConnectionUpdateFactories(),\n ...createSsoConnectionDeleteFactories(),\n ...createSsoConnectionTestConnectionFactories(),\n ...createSsoConnectionDiscoverEndpointsFactories(),\n // SSO Config operations\n ...createSsoConfigUpdateFactories(),\n // SSO Config domain-ownership operations (claim / verify / revoke) — #424\n ...createSsoConfigDomainVerificationFactories(),\n // SIEM Delivery DLQ operations\n ...createSiemDlqRetrySingleFactories(),\n ...createSiemDlqRetryAllFactories(),\n ...createSiemDlqPurgeAllFactories(),\n // SCIM Token operations\n ...createScimTokenGenerateFactories(),\n ...createScimTokenRevokeFactories(),\n ...createScimTokenRotateFactories(),\n];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scim-tokens.custom-impl.backend.service.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"scim-tokens.custom-impl.backend.service.d.ts","sourceRoot":"","sources":["../../../../../../src/security/authentications/services/custom-impls/scim-tokens.custom-impl.backend.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAaH,OAAO,EAEL,KAAK,0CAA0C,EAChD,MAAM,4GAA4G,CAAC;AA4BpH,wBAAgB,gCAAgC,IAAI,0CAA0C,EAAE,CA0D/F;AAMD,wBAAgB,8BAA8B,IAAI,0CAA0C,EAAE,CA+C7F;AAgBD,wBAAgB,8BAA8B,IAAI,0CAA0C,EAAE,CAgE7F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"siem-delivery-dlq.custom-impl.backend.service.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"siem-delivery-dlq.custom-impl.backend.service.d.ts","sourceRoot":"","sources":["../../../../../../src/security/authentications/services/custom-impls/siem-delivery-dlq.custom-impl.backend.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAmBH,OAAO,EAEL,KAAK,0CAA0C,EAChD,MAAM,4GAA4G,CAAC;AA6IpH,wBAAgB,iCAAiC,IAAI,0CAA0C,EAAE,CAwFhG;AAMD,wBAAgB,8BAA8B,IAAI,0CAA0C,EAAE,CAyF7F;AAMD,wBAAgB,8BAA8B,IAAI,0CAA0C,EAAE,CAuC7F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sso-config-domain-verification.custom-impl.backend.service.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"sso-config-domain-verification.custom-impl.backend.service.d.ts","sourceRoot":"","sources":["../../../../../../src/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAaH,OAAO,EAEL,KAAK,0CAA0C,EAChD,MAAM,4GAA4G,CAAC;AAuXpH,wBAAgB,0CAA0C,IAAI,0CAA0C,EAAE,CAMzG"}
|
|
@@ -150,6 +150,17 @@ function createClaimDomainFactory(variant) {
|
|
|
150
150
|
isOperationDefault: true,
|
|
151
151
|
},
|
|
152
152
|
debugLabel: `${variant.resourceType}.claimDomain`,
|
|
153
|
+
/**
|
|
154
|
+
* The prefix WRITES `domains`, and nothing else can.
|
|
155
|
+
*
|
|
156
|
+
* Without this the repository's strict re-parse drops the key the hook just computed and the
|
|
157
|
+
* operation answers 200 having persisted nothing — the silent no-op the sibling lifecycle verbs
|
|
158
|
+
* (`organizations.requestDeletion`, `organizationMembers.grantOwnership`) each declare against.
|
|
159
|
+
* Declaring it also settles the contract in the other direction: a caller-supplied `domains` is
|
|
160
|
+
* OVERWRITTEN by the hook's value rather than honoured, so the only way to move this block
|
|
161
|
+
* remains the three operations that own it.
|
|
162
|
+
*/
|
|
163
|
+
authoritativeFields: ['domains'],
|
|
153
164
|
handlers: {
|
|
154
165
|
prefixCoreOperations: async (_id, input, executionContext, _operationPath, utils) => {
|
|
155
166
|
const { domain, scopeId, domains } = resolveDomainRequest(variant, input, executionContext, utils);
|
|
@@ -182,6 +193,17 @@ function createVerifyDomainFactory(variant) {
|
|
|
182
193
|
isOperationDefault: true,
|
|
183
194
|
},
|
|
184
195
|
debugLabel: `${variant.resourceType}.verifyDomain`,
|
|
196
|
+
/**
|
|
197
|
+
* The prefix WRITES `domains`, and nothing else can.
|
|
198
|
+
*
|
|
199
|
+
* Without this the repository's strict re-parse drops the key the hook just computed and the
|
|
200
|
+
* operation answers 200 having persisted nothing — the silent no-op the sibling lifecycle verbs
|
|
201
|
+
* (`organizations.requestDeletion`, `organizationMembers.grantOwnership`) each declare against.
|
|
202
|
+
* Declaring it also settles the contract in the other direction: a caller-supplied `domains` is
|
|
203
|
+
* OVERWRITTEN by the hook's value rather than honoured, so the only way to move this block
|
|
204
|
+
* remains the three operations that own it.
|
|
205
|
+
*/
|
|
206
|
+
authoritativeFields: ['domains'],
|
|
185
207
|
handlers: {
|
|
186
208
|
prefixCoreOperations: async (_id, input, executionContext, _operationPath, utils) => {
|
|
187
209
|
const { domain, scopeId, domains } = resolveDomainRequest(variant, input, executionContext, utils);
|
|
@@ -230,6 +252,17 @@ function createRevokeDomainFactory(variant) {
|
|
|
230
252
|
isOperationDefault: true,
|
|
231
253
|
},
|
|
232
254
|
debugLabel: `${variant.resourceType}.revokeDomain`,
|
|
255
|
+
/**
|
|
256
|
+
* The prefix WRITES `domains`, and nothing else can.
|
|
257
|
+
*
|
|
258
|
+
* Without this the repository's strict re-parse drops the key the hook just computed and the
|
|
259
|
+
* operation answers 200 having persisted nothing — the silent no-op the sibling lifecycle verbs
|
|
260
|
+
* (`organizations.requestDeletion`, `organizationMembers.grantOwnership`) each declare against.
|
|
261
|
+
* Declaring it also settles the contract in the other direction: a caller-supplied `domains` is
|
|
262
|
+
* OVERWRITTEN by the hook's value rather than honoured, so the only way to move this block
|
|
263
|
+
* remains the three operations that own it.
|
|
264
|
+
*/
|
|
265
|
+
authoritativeFields: ['domains'],
|
|
233
266
|
handlers: {
|
|
234
267
|
prefixCoreOperations: async (_id, input, executionContext, _operationPath, utils) => {
|
|
235
268
|
const { domain, domains } = resolveDomainRequest(variant, input, executionContext, utils);
|
|
@@ -237,7 +270,30 @@ function createRevokeDomainFactory(variant) {
|
|
|
237
270
|
|| domains.domainVerificationStatus?.[domain] !== undefined
|
|
238
271
|
|| domains.ssoEnabledDomains.includes(domain);
|
|
239
272
|
if (!isClaimed) {
|
|
240
|
-
|
|
273
|
+
/**
|
|
274
|
+
* CONFLICT, not NOT_FOUND — corrected 2026-09-10 after the refusal was driven over HTTP
|
|
275
|
+
* for the first time, and for three independent reasons.
|
|
276
|
+
*
|
|
277
|
+
* **It could not name itself.** `sanitizeErrorForClient` allow-lists a refusal's
|
|
278
|
+
* `context` — and with it the client-branchable `code` — only for VALIDATION, CONFLICT
|
|
279
|
+
* and RATE_LIMIT; every other type has its context stripped whole. So as a NOT_FOUND
|
|
280
|
+
* this answered a bare `not_found` and `SSO_DOMAIN_NOT_CLAIMED` reached no client. A
|
|
281
|
+
* status and a name that cannot both be delivered is not a contract.
|
|
282
|
+
*
|
|
283
|
+
* **Its SIBLING already answers 409 for the same condition.** `verifyDomain` refuses a
|
|
284
|
+
* domain with no challenge as a CONFLICT, eight hundred lines up in this same file. One
|
|
285
|
+
* condition, two verbs, two answers — the shape
|
|
286
|
+
* `.claude/rules/invariant-call-site-enumeration.md` exists for.
|
|
287
|
+
*
|
|
288
|
+
* **And 409 is what the framework's own rule asks for here.**
|
|
289
|
+
* `administrative-continuity-floors.md`: refuse with CONFLICT, never 403 or 400, when
|
|
290
|
+
* the caller IS authorized and the payload IS valid and what forbids the write is the
|
|
291
|
+
* current STATE. The addressed row — the SSO config singleton — exists and resolved;
|
|
292
|
+
* what does not exist is a claim inside it. A 404 on a URL that resolved is also the
|
|
293
|
+
* exact ambiguity issue #542 records against itself: a dispatched 404 and a routing 404
|
|
294
|
+
* are told apart by the body, not the status.
|
|
295
|
+
*/
|
|
296
|
+
throw utils.errorBuilder.buildError(ErrorType.CONFLICT, executionContext, {
|
|
241
297
|
context: {
|
|
242
298
|
code: 'SSO_DOMAIN_NOT_CLAIMED',
|
|
243
299
|
reason: 'sso_domain_not_claimed',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sso-config-domain-verification.custom-impl.backend.service.js","sourceRoot":"","sources":["../../../../../../../src/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.back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,EAAE,EAAE,CAAC;QACpD,wBAAwB,CAAC,OAAO,CAAC;QACjC,yBAAyB,CAAC,OAAO,CAAC;QAClC,yBAAyB,CAAC,OAAO,CAAC;KACnC,CAAC,CAAC;AACL,CAAC","sourcesContent":["/**\n * SSO Config — domain-ownership operations (#424)\n *\n * Three public operations that turn enterprise domain routing from an out-of-band database write\n * into a self-service admin flow:\n *\n * claimDomain → mints a DNS-TXT challenge, records the domain as `pending`, returns the record\n * verifyDomain → resolves the record, records `verified` or `failed`\n * revokeDomain → removes the claim, its status, its nonce and its `ssoEnabledDomains` entry\n *\n * ## Why PREFIX, and not OVERRIDE_ALL\n *\n * Each handler computes the new `domains` block and returns it; the framework's own core UPDATE\n * persists it. `OVERRIDE_ALL` returns before the post-operation lane, so it emits NO\n * `RESOURCE_OPERATION_PERFORMED` audit event — and the audit row is the control that makes a\n * privileged configuration change with cross-tenant reach accountable. An operation that granted a\n * tenant SSO routing authority and left no trail would be strictly worse than the database write it\n * replaces, which at least happens where a DBA can see it.\n *\n * ## Where the domain-ownership rules live\n *\n * In `DomainVerificationBackendService`, as pure planners. This file is the door: it resolves the\n * scope, enforces the refusals, and hands the plan to the framework. Nothing here re-implements\n * what a claim or a revocation means.\n */\n\nimport {\n AuthScopeType,\n CoreResourceType,\n DomainVerificationStatus,\n ErrorType,\n ResourceOperationVariantType,\n SsoConfig_Operations,\n} from '@wildo-ai/saas-models';\nimport type { SsoConfigBase } from '@wildo-ai/saas-models';\nimport type { Container } from 'inversify';\nimport { SAAS_SERVICE_TYPES } from '~wildo-backend-lib/inject/models/service-types';\nimport {\n createResourceCustomServiceImplementation,\n type ResourceCustomServiceImplementationFactory,\n} from '~wildo-backend-lib/base-classes/services/services/resource-operation-custom-implementation.factory.backend';\nimport type { ResourcesRegistryBackendService } from '~wildo-backend-lib/resources/services/resources-registry.backend.service';\nimport type {\n DomainVerificationBackendService,\n SsoConfigDomains,\n} from '~wildo-backend-lib/security/authentications/services/admin-config/domain-verification.backend.service';\nimport type { ResourceOperation_CustomImplementation_Utils } from '~wildo-backend-lib/base-classes/services/services/resource-operation-custom-implementation-base.backend.service';\nimport type { ExecutionContext } from '~wildo-backend-lib/runtime/models/execution-context.backend.schemas';\n\n// ── The two scope variants, and how each names its scope ─────────────\n\ninterface SsoConfigScopeVariant {\n readonly resourceType: CoreResourceType;\n readonly scopeType: AuthScopeType;\n readonly scopeField: 'organizationId' | 'applicationId';\n}\n\nconst SSO_CONFIG_SCOPE_VARIANTS: readonly SsoConfigScopeVariant[] = [\n {\n resourceType: CoreResourceType.ORGANIZATION_SSO_CONFIG,\n scopeType: AuthScopeType.ORGANIZATION,\n scopeField: 'organizationId',\n },\n {\n resourceType: CoreResourceType.APPLICATION_SSO_CONFIG,\n scopeType: AuthScopeType.APPLICATION,\n scopeField: 'applicationId',\n },\n];\n\n/**\n * Carries the two values a response needs that the persisted row does not hold, from the PREFIX\n * that computed them to the POSTFIX that shapes the reply.\n *\n * Bounded on purpose. The precedent bridges in this tree (`ROTATE_BRIDGE_BY_TARGET_ID`) delete\n * their entry in the postfix and rely on the postfix always running; a core UPDATE that throws\n * between the two leaks one entry forever. Expiring on write costs one `Date.now()` per call and\n * removes the question.\n */\nconst RESPONSE_BRIDGE_TTL_MS = 60_000;\nconst RESPONSE_BRIDGE = new Map<string, { value: Record<string, unknown>; expiresAt: number }>();\n\n/**\n * Keyed on the REQUEST, not on the row.\n *\n * The postfix receives the persisted row and the execution context — never the request body — so it\n * cannot re-derive which domain the call was about. `correlationId` is minted per request and is\n * the same value in both handlers, which makes the hand-off exact: two admins claiming two domains\n * on the same configuration row at the same instant cannot read each other's response.\n */\nfunction bridgeKey(resourceType: CoreResourceType, operation: string, executionContext: ExecutionContext<any>): string {\n return `${resourceType}|${operation}|${executionContext.correlationId}`;\n}\n\nfunction putBridged(key: string, value: Record<string, unknown>): void {\n const now = Date.now();\n for (const [existingKey, entry] of RESPONSE_BRIDGE) {\n if (entry.expiresAt <= now) RESPONSE_BRIDGE.delete(existingKey);\n }\n RESPONSE_BRIDGE.set(key, { value, expiresAt: now + RESPONSE_BRIDGE_TTL_MS });\n}\n\nfunction takeBridged(key: string): Record<string, unknown> | undefined {\n const entry = RESPONSE_BRIDGE.get(key);\n RESPONSE_BRIDGE.delete(key);\n if (!entry || entry.expiresAt <= Date.now()) return undefined;\n return entry.value;\n}\n\n// ── Shared request resolution ────────────────────────────────────────\n\ninterface ResolvedDomainRequest {\n readonly domain: string;\n readonly scopeId: string;\n readonly domains: SsoConfigDomains;\n}\n\n/**\n * The row being updated, its scope id, and the normalised domain.\n *\n * `utils.currentObject` is the pre-image the framework already fetched for this UPDATE, so nothing\n * here re-reads the config. The domain is lowercased HERE, once, because every stored map is keyed\n * on the lowercase form and a second normalisation site is a second place for the two to disagree.\n */\nfunction resolveDomainRequest(\n variant: SsoConfigScopeVariant,\n input: unknown,\n executionContext: ExecutionContext<any>,\n utils: ResourceOperation_CustomImplementation_Utils,\n): ResolvedDomainRequest {\n const rawDomain = (input as { domain?: unknown } | undefined)?.domain;\n if (typeof rawDomain !== 'string' || rawDomain.trim().length === 0) {\n throw utils.errorBuilder.buildError(ErrorType.VALIDATION, executionContext, {\n context: {\n code: 'SSO_DOMAIN_REQUIRED',\n reason: 'sso_domain_required',\n message: 'Provide `domain`: the DNS hostname this scope is claiming.',\n },\n });\n }\n\n const currentObject = utils.currentObject as (SsoConfigBase & Record<string, unknown>) | undefined;\n const scopeId = currentObject?.[variant.scopeField];\n if (!currentObject?.domains || typeof scopeId !== 'string' || scopeId.length === 0) {\n // The row is addressed by its scope (a one-to-one composition), so a missing scope id means the\n // framework could not resolve the singleton — never that the caller addressed someone else.\n throw utils.errorBuilder.buildError(ErrorType.CONFIGURATION, executionContext, {\n context: {\n code: 'SSO_CONFIG_SCOPE_UNRESOLVED',\n reason: 'sso_config_scope_unresolved',\n message: 'The SSO configuration row for this scope could not be resolved.',\n resourceType: variant.resourceType,\n },\n });\n }\n\n return { domain: rawDomain.trim().toLowerCase(), scopeId, domains: currentObject.domains };\n}\n\nfunction getDomainVerificationService(container: Container): DomainVerificationBackendService {\n return container.get<DomainVerificationBackendService>(SAAS_SERVICE_TYPES.DomainVerificationService);\n}\n\n/**\n * Refuse when another scope already holds this domain VERIFIED.\n *\n * Run at CLAIM as a helpful early refusal, and again at VERIFY because that is the gate that\n * matters: a claim is not a lock, so another scope can complete its own verification in between.\n *\n * **The holder is deliberately not named.** Telling one tenant which other tenant holds a domain\n * discloses a customer's configuration to a stranger who supplied nothing but a hostname. The\n * message says what to do instead — the current holder revokes, and then the claim succeeds — which\n * is the only remedy anyway.\n */\nasync function assertDomainNotHeldElsewhere(\n container: Container,\n variant: SsoConfigScopeVariant,\n scopeId: string,\n domain: string,\n executionContext: ExecutionContext<any>,\n utils: ResourceOperation_CustomImplementation_Utils,\n): Promise<void> {\n const conflict = await getDomainVerificationService(container)\n .findConflictingScope(variant.scopeType, scopeId, domain);\n if (!conflict) return;\n\n throw utils.errorBuilder.buildError(ErrorType.CONFLICT, executionContext, {\n context: {\n code: 'SSO_DOMAIN_VERIFIED_ELSEWHERE',\n reason: 'sso_domain_verified_elsewhere',\n message:\n 'This domain is already verified for another scope. A domain routes sign-ins to exactly one '\n + 'identity provider, so it must be revoked where it is held before it can be claimed here.',\n domain,\n },\n });\n}\n\n// ════════════════════════════════════════════════════════════════════\n// claimDomain\n// ════════════════════════════════════════════════════════════════════\n\nfunction createClaimDomainFactory(variant: SsoConfigScopeVariant): ResourceCustomServiceImplementationFactory {\n const factory = (_resourcesRegistryService: ResourcesRegistryBackendService, container: Container) =>\n createResourceCustomServiceImplementation({\n operationPath: {\n resourceIdentifier: variant.resourceType,\n operationIdentifier: SsoConfig_Operations.CLAIM_DOMAIN,\n variantType: ResourceOperationVariantType.API_CALL,\n isOperationDefault: true,\n },\n debugLabel: `${variant.resourceType}.claimDomain`,\n handlers: {\n prefixCoreOperations: async (_id, input, executionContext, _operationPath, utils) => {\n const { domain, scopeId, domains } = resolveDomainRequest(variant, input, executionContext, utils);\n await assertDomainNotHeldElsewhere(container, variant, scopeId, domain, executionContext, utils);\n\n const plan = getDomainVerificationService(container).planDomainClaim(domains, domain);\n\n putBridged(bridgeKey(variant.resourceType, SsoConfig_Operations.CLAIM_DOMAIN, executionContext), {\n domain,\n status: DomainVerificationStatus.PENDING,\n dnsName: plan.dnsName,\n dnsRecordValue: plan.dnsRecordValue,\n });\n\n // The ONLY key returned. The core UPDATE `$set`s what it is given, so returning the whole\n // row here would re-write every other block from a pre-image this handler never validated.\n return { domains: plan.domains };\n },\n postfixCoreOperations: async (_id, updatedRow, executionContext, _operationPath, _utils) =>\n takeBridged(bridgeKey(variant.resourceType, SsoConfig_Operations.CLAIM_DOMAIN, executionContext)) ?? updatedRow,\n },\n });\n\n return factory as unknown as ResourceCustomServiceImplementationFactory;\n}\n\n// ════════════════════════════════════════════════════════════════════\n// verifyDomain\n// ════════════════════════════════════════════════════════════════════\n\nfunction createVerifyDomainFactory(variant: SsoConfigScopeVariant): ResourceCustomServiceImplementationFactory {\n const factory = (_resourcesRegistryService: ResourcesRegistryBackendService, container: Container) =>\n createResourceCustomServiceImplementation({\n operationPath: {\n resourceIdentifier: variant.resourceType,\n operationIdentifier: SsoConfig_Operations.VERIFY_DOMAIN,\n variantType: ResourceOperationVariantType.API_CALL,\n isOperationDefault: true,\n },\n debugLabel: `${variant.resourceType}.verifyDomain`,\n handlers: {\n prefixCoreOperations: async (_id, input, executionContext, _operationPath, utils) => {\n const { domain, scopeId, domains } = resolveDomainRequest(variant, input, executionContext, utils);\n const service = getDomainVerificationService(container);\n\n const expectedToken = service.getVerificationToken(domains, domain);\n if (!expectedToken) {\n // A claim mints the nonce, so verifying without one is not a failed check — it is a\n // request for a challenge that was never raised. Saying so is what stops an operator\n // publishing a record and waiting for a verification that can never pass.\n throw utils.errorBuilder.buildError(ErrorType.CONFLICT, executionContext, {\n context: {\n code: 'SSO_DOMAIN_NOT_CLAIMED',\n reason: 'sso_domain_not_claimed',\n message: 'No verification challenge exists for this domain in this scope. Claim it first.',\n domain,\n },\n });\n }\n\n // Re-checked HERE, not only at claim: a claim takes no lock, so another scope may have\n // completed its own verification since. This is the write that confers routing authority\n // and therefore the one that must be exclusive.\n await assertDomainNotHeldElsewhere(container, variant, scopeId, domain, executionContext, utils);\n\n const { verified, recordsFound } = await service.checkDomainChallenge(domain, expectedToken);\n\n putBridged(bridgeKey(variant.resourceType, SsoConfig_Operations.VERIFY_DOMAIN, executionContext), {\n domain,\n status: verified ? DomainVerificationStatus.VERIFIED : DomainVerificationStatus.FAILED,\n dnsName: service.verificationDnsName(domain),\n dnsRecordsFound: recordsFound,\n });\n\n return { domains: service.planVerificationOutcome(domains, domain, verified) };\n },\n postfixCoreOperations: async (_id, updatedRow, executionContext, _operationPath, _utils) =>\n takeBridged(bridgeKey(variant.resourceType, SsoConfig_Operations.VERIFY_DOMAIN, executionContext)) ?? updatedRow,\n },\n });\n\n return factory as unknown as ResourceCustomServiceImplementationFactory;\n}\n\n// ════════════════════════════════════════════════════════════════════\n// revokeDomain\n// ════════════════════════════════════════════════════════════════════\n\nfunction createRevokeDomainFactory(variant: SsoConfigScopeVariant): ResourceCustomServiceImplementationFactory {\n const factory = (_resourcesRegistryService: ResourcesRegistryBackendService, container: Container) =>\n createResourceCustomServiceImplementation({\n operationPath: {\n resourceIdentifier: variant.resourceType,\n operationIdentifier: SsoConfig_Operations.REVOKE_DOMAIN,\n variantType: ResourceOperationVariantType.API_CALL,\n isOperationDefault: true,\n },\n debugLabel: `${variant.resourceType}.revokeDomain`,\n handlers: {\n prefixCoreOperations: async (_id, input, executionContext, _operationPath, utils) => {\n const { domain, domains } = resolveDomainRequest(variant, input, executionContext, utils);\n\n const isClaimed = domains.verifiedDomains.includes(domain)\n || domains.domainVerificationStatus?.[domain] !== undefined\n || domains.ssoEnabledDomains.includes(domain);\n if (!isClaimed) {\n throw utils.errorBuilder.buildError(ErrorType.NOT_FOUND, executionContext, {\n context: {\n code: 'SSO_DOMAIN_NOT_CLAIMED',\n reason: 'sso_domain_not_claimed',\n message: 'This scope holds no claim on that domain, so there is nothing to revoke.',\n domain,\n },\n });\n }\n\n putBridged(bridgeKey(variant.resourceType, SsoConfig_Operations.REVOKE_DOMAIN, executionContext), {\n domain,\n revoked: true,\n });\n\n /*\n * ─── Sessions already routed by this domain are NOT terminated, and that is a decision ──\n *\n * \"Revoke the domain\" reads like \"cut the sessions\", and it must not mean that. Domain\n * routing decides where a NEW sign-in is sent; it is not a credential and confers no\n * standing — `DomainOrgLookupResult` says so explicitly, and every reader treats the\n * scope it returns as a hint that may only TIGHTEN an enforcement decision. So a session\n * established while the domain was verified was established by an identity provider that\n * really did authenticate that person; nothing about it becomes false when the routing\n * hint is withdrawn.\n *\n * Ending sessions is a different control with its own doors (member suspension, user\n * deactivation, the session-version fence). Folding it in here would make revocation —\n * the ordinary step in handing a domain to another scope — a mass logout of people whose\n * standing has not changed.\n */\n return { domains: getDomainVerificationService(container).planDomainRevocation(domains, domain) };\n },\n postfixCoreOperations: async (_id, updatedRow, executionContext, _operationPath, _utils) =>\n takeBridged(bridgeKey(variant.resourceType, SsoConfig_Operations.REVOKE_DOMAIN, executionContext)) ?? updatedRow,\n },\n });\n\n return factory as unknown as ResourceCustomServiceImplementationFactory;\n}\n\nexport function createSsoConfigDomainVerificationFactories(): ResourceCustomServiceImplementationFactory[] {\n return SSO_CONFIG_SCOPE_VARIANTS.flatMap((variant) => [\n createClaimDomainFactory(variant),\n createVerifyDomainFactory(variant),\n createRevokeDomainFactory(variant),\n ]);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"sso-config-domain-verification.custom-impl.backend.service.js","sourceRoot":"","sources":["../../../../../../src/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,wBAAwB,EACxB,SAAS,EACT,4BAA4B,EAC5B,oBAAoB,GACrB,MAAM,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xD,OAAO,yBAAyB,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;QACpD,wBAAwB,CAAC,OAAO,CAAC;QACjC,yBAAyB,CAAC,OAAO,CAAC;QAClC,yBAAyB,CAAC,OAAO,CAAC;KACnC,CAAC,CAAC;AACL,CAAC","sourcesContent":["/**\n * SSO Config — domain-ownership operations (#424)\n *\n * Three public operations that turn enterprise domain routing from an out-of-band database write\n * into a self-service admin flow:\n *\n * claimDomain → mints a DNS-TXT challenge, records the domain as `pending`, returns the record\n * verifyDomain → resolves the record, records `verified` or `failed`\n * revokeDomain → removes the claim, its status, its nonce and its `ssoEnabledDomains` entry\n *\n * ## Why PREFIX, and not OVERRIDE_ALL\n *\n * Each handler computes the new `domains` block and returns it; the framework's own core UPDATE\n * persists it. `OVERRIDE_ALL` returns before the post-operation lane, so it emits NO\n * `RESOURCE_OPERATION_PERFORMED` audit event — and the audit row is the control that makes a\n * privileged configuration change with cross-tenant reach accountable. An operation that granted a\n * tenant SSO routing authority and left no trail would be strictly worse than the database write it\n * replaces, which at least happens where a DBA can see it.\n *\n * ## Where the domain-ownership rules live\n *\n * In `DomainVerificationBackendService`, as pure planners. This file is the door: it resolves the\n * scope, enforces the refusals, and hands the plan to the framework. Nothing here re-implements\n * what a claim or a revocation means.\n */\n\nimport {\n AuthScopeType,\n CoreResourceType,\n DomainVerificationStatus,\n ErrorType,\n ResourceOperationVariantType,\n SsoConfig_Operations,\n} from '@wildo-ai/saas-models';\nimport type { SsoConfigBase } from '@wildo-ai/saas-models';\nimport type { Container } from 'inversify';\nimport { SAAS_SERVICE_TYPES } from '~wildo-backend-lib/inject/models/service-types';\nimport {\n createResourceCustomServiceImplementation,\n type ResourceCustomServiceImplementationFactory,\n} from '~wildo-backend-lib/base-classes/services/services/resource-operation-custom-implementation.factory.backend';\nimport type { ResourcesRegistryBackendService } from '~wildo-backend-lib/resources/services/resources-registry.backend.service';\nimport type {\n DomainVerificationBackendService,\n SsoConfigDomains,\n} from '~wildo-backend-lib/security/authentications/services/admin-config/domain-verification.backend.service';\nimport type { ResourceOperation_CustomImplementation_Utils } from '~wildo-backend-lib/base-classes/services/services/resource-operation-custom-implementation-base.backend.service';\nimport type { ExecutionContext } from '~wildo-backend-lib/runtime/models/execution-context.backend.schemas';\n\n// ── The two scope variants, and how each names its scope ─────────────\n\ninterface SsoConfigScopeVariant {\n readonly resourceType: CoreResourceType;\n readonly scopeType: AuthScopeType;\n readonly scopeField: 'organizationId' | 'applicationId';\n}\n\nconst SSO_CONFIG_SCOPE_VARIANTS: readonly SsoConfigScopeVariant[] = [\n {\n resourceType: CoreResourceType.ORGANIZATION_SSO_CONFIG,\n scopeType: AuthScopeType.ORGANIZATION,\n scopeField: 'organizationId',\n },\n {\n resourceType: CoreResourceType.APPLICATION_SSO_CONFIG,\n scopeType: AuthScopeType.APPLICATION,\n scopeField: 'applicationId',\n },\n];\n\n/**\n * Carries the two values a response needs that the persisted row does not hold, from the PREFIX\n * that computed them to the POSTFIX that shapes the reply.\n *\n * Bounded on purpose. The precedent bridges in this tree (`ROTATE_BRIDGE_BY_TARGET_ID`) delete\n * their entry in the postfix and rely on the postfix always running; a core UPDATE that throws\n * between the two leaks one entry forever. Expiring on write costs one `Date.now()` per call and\n * removes the question.\n */\nconst RESPONSE_BRIDGE_TTL_MS = 60_000;\nconst RESPONSE_BRIDGE = new Map<string, { value: Record<string, unknown>; expiresAt: number }>();\n\n/**\n * Keyed on the REQUEST, not on the row.\n *\n * The postfix receives the persisted row and the execution context — never the request body — so it\n * cannot re-derive which domain the call was about. `correlationId` is minted per request and is\n * the same value in both handlers, which makes the hand-off exact: two admins claiming two domains\n * on the same configuration row at the same instant cannot read each other's response.\n */\nfunction bridgeKey(resourceType: CoreResourceType, operation: string, executionContext: ExecutionContext<any>): string {\n return `${resourceType}|${operation}|${executionContext.correlationId}`;\n}\n\nfunction putBridged(key: string, value: Record<string, unknown>): void {\n const now = Date.now();\n for (const [existingKey, entry] of RESPONSE_BRIDGE) {\n if (entry.expiresAt <= now) RESPONSE_BRIDGE.delete(existingKey);\n }\n RESPONSE_BRIDGE.set(key, { value, expiresAt: now + RESPONSE_BRIDGE_TTL_MS });\n}\n\nfunction takeBridged(key: string): Record<string, unknown> | undefined {\n const entry = RESPONSE_BRIDGE.get(key);\n RESPONSE_BRIDGE.delete(key);\n if (!entry || entry.expiresAt <= Date.now()) return undefined;\n return entry.value;\n}\n\n// ── Shared request resolution ────────────────────────────────────────\n\ninterface ResolvedDomainRequest {\n readonly domain: string;\n readonly scopeId: string;\n readonly domains: SsoConfigDomains;\n}\n\n/**\n * The row being updated, its scope id, and the normalised domain.\n *\n * `utils.currentObject` is the pre-image the framework already fetched for this UPDATE, so nothing\n * here re-reads the config. The domain is lowercased HERE, once, because every stored map is keyed\n * on the lowercase form and a second normalisation site is a second place for the two to disagree.\n */\nfunction resolveDomainRequest(\n variant: SsoConfigScopeVariant,\n input: unknown,\n executionContext: ExecutionContext<any>,\n utils: ResourceOperation_CustomImplementation_Utils,\n): ResolvedDomainRequest {\n const rawDomain = (input as { domain?: unknown } | undefined)?.domain;\n if (typeof rawDomain !== 'string' || rawDomain.trim().length === 0) {\n throw utils.errorBuilder.buildError(ErrorType.VALIDATION, executionContext, {\n context: {\n code: 'SSO_DOMAIN_REQUIRED',\n reason: 'sso_domain_required',\n message: 'Provide `domain`: the DNS hostname this scope is claiming.',\n },\n });\n }\n\n const currentObject = utils.currentObject as (SsoConfigBase & Record<string, unknown>) | undefined;\n const scopeId = currentObject?.[variant.scopeField];\n if (!currentObject?.domains || typeof scopeId !== 'string' || scopeId.length === 0) {\n // The row is addressed by its scope (a one-to-one composition), so a missing scope id means the\n // framework could not resolve the singleton — never that the caller addressed someone else.\n throw utils.errorBuilder.buildError(ErrorType.CONFIGURATION, executionContext, {\n context: {\n code: 'SSO_CONFIG_SCOPE_UNRESOLVED',\n reason: 'sso_config_scope_unresolved',\n message: 'The SSO configuration row for this scope could not be resolved.',\n resourceType: variant.resourceType,\n },\n });\n }\n\n return { domain: rawDomain.trim().toLowerCase(), scopeId, domains: currentObject.domains };\n}\n\nfunction getDomainVerificationService(container: Container): DomainVerificationBackendService {\n return container.get<DomainVerificationBackendService>(SAAS_SERVICE_TYPES.DomainVerificationService);\n}\n\n/**\n * Refuse when another scope already holds this domain VERIFIED.\n *\n * Run at CLAIM as a helpful early refusal, and again at VERIFY because that is the gate that\n * matters: a claim is not a lock, so another scope can complete its own verification in between.\n *\n * **The holder is deliberately not named.** Telling one tenant which other tenant holds a domain\n * discloses a customer's configuration to a stranger who supplied nothing but a hostname. The\n * message says what to do instead — the current holder revokes, and then the claim succeeds — which\n * is the only remedy anyway.\n */\nasync function assertDomainNotHeldElsewhere(\n container: Container,\n variant: SsoConfigScopeVariant,\n scopeId: string,\n domain: string,\n executionContext: ExecutionContext<any>,\n utils: ResourceOperation_CustomImplementation_Utils,\n): Promise<void> {\n const conflict = await getDomainVerificationService(container)\n .findConflictingScope(variant.scopeType, scopeId, domain);\n if (!conflict) return;\n\n throw utils.errorBuilder.buildError(ErrorType.CONFLICT, executionContext, {\n context: {\n code: 'SSO_DOMAIN_VERIFIED_ELSEWHERE',\n reason: 'sso_domain_verified_elsewhere',\n message:\n 'This domain is already verified for another scope. A domain routes sign-ins to exactly one '\n + 'identity provider, so it must be revoked where it is held before it can be claimed here.',\n domain,\n },\n });\n}\n\n// ════════════════════════════════════════════════════════════════════\n// claimDomain\n// ════════════════════════════════════════════════════════════════════\n\nfunction createClaimDomainFactory(variant: SsoConfigScopeVariant): ResourceCustomServiceImplementationFactory {\n const factory = (_resourcesRegistryService: ResourcesRegistryBackendService, container: Container) =>\n createResourceCustomServiceImplementation({\n operationPath: {\n resourceIdentifier: variant.resourceType,\n operationIdentifier: SsoConfig_Operations.CLAIM_DOMAIN,\n variantType: ResourceOperationVariantType.API_CALL,\n isOperationDefault: true,\n },\n debugLabel: `${variant.resourceType}.claimDomain`,\n /**\n * The prefix WRITES `domains`, and nothing else can.\n *\n * Without this the repository's strict re-parse drops the key the hook just computed and the\n * operation answers 200 having persisted nothing — the silent no-op the sibling lifecycle verbs\n * (`organizations.requestDeletion`, `organizationMembers.grantOwnership`) each declare against.\n * Declaring it also settles the contract in the other direction: a caller-supplied `domains` is\n * OVERWRITTEN by the hook's value rather than honoured, so the only way to move this block\n * remains the three operations that own it.\n */\n authoritativeFields: ['domains'],\n handlers: {\n prefixCoreOperations: async (_id, input, executionContext, _operationPath, utils) => {\n const { domain, scopeId, domains } = resolveDomainRequest(variant, input, executionContext, utils);\n await assertDomainNotHeldElsewhere(container, variant, scopeId, domain, executionContext, utils);\n\n const plan = getDomainVerificationService(container).planDomainClaim(domains, domain);\n\n putBridged(bridgeKey(variant.resourceType, SsoConfig_Operations.CLAIM_DOMAIN, executionContext), {\n domain,\n status: DomainVerificationStatus.PENDING,\n dnsName: plan.dnsName,\n dnsRecordValue: plan.dnsRecordValue,\n });\n\n // The ONLY key returned. The core UPDATE `$set`s what it is given, so returning the whole\n // row here would re-write every other block from a pre-image this handler never validated.\n return { domains: plan.domains };\n },\n postfixCoreOperations: async (_id, updatedRow, executionContext, _operationPath, _utils) =>\n takeBridged(bridgeKey(variant.resourceType, SsoConfig_Operations.CLAIM_DOMAIN, executionContext)) ?? updatedRow,\n },\n });\n\n return factory as unknown as ResourceCustomServiceImplementationFactory;\n}\n\n// ════════════════════════════════════════════════════════════════════\n// verifyDomain\n// ════════════════════════════════════════════════════════════════════\n\nfunction createVerifyDomainFactory(variant: SsoConfigScopeVariant): ResourceCustomServiceImplementationFactory {\n const factory = (_resourcesRegistryService: ResourcesRegistryBackendService, container: Container) =>\n createResourceCustomServiceImplementation({\n operationPath: {\n resourceIdentifier: variant.resourceType,\n operationIdentifier: SsoConfig_Operations.VERIFY_DOMAIN,\n variantType: ResourceOperationVariantType.API_CALL,\n isOperationDefault: true,\n },\n debugLabel: `${variant.resourceType}.verifyDomain`,\n /**\n * The prefix WRITES `domains`, and nothing else can.\n *\n * Without this the repository's strict re-parse drops the key the hook just computed and the\n * operation answers 200 having persisted nothing — the silent no-op the sibling lifecycle verbs\n * (`organizations.requestDeletion`, `organizationMembers.grantOwnership`) each declare against.\n * Declaring it also settles the contract in the other direction: a caller-supplied `domains` is\n * OVERWRITTEN by the hook's value rather than honoured, so the only way to move this block\n * remains the three operations that own it.\n */\n authoritativeFields: ['domains'],\n handlers: {\n prefixCoreOperations: async (_id, input, executionContext, _operationPath, utils) => {\n const { domain, scopeId, domains } = resolveDomainRequest(variant, input, executionContext, utils);\n const service = getDomainVerificationService(container);\n\n const expectedToken = service.getVerificationToken(domains, domain);\n if (!expectedToken) {\n // A claim mints the nonce, so verifying without one is not a failed check — it is a\n // request for a challenge that was never raised. Saying so is what stops an operator\n // publishing a record and waiting for a verification that can never pass.\n throw utils.errorBuilder.buildError(ErrorType.CONFLICT, executionContext, {\n context: {\n code: 'SSO_DOMAIN_NOT_CLAIMED',\n reason: 'sso_domain_not_claimed',\n message: 'No verification challenge exists for this domain in this scope. Claim it first.',\n domain,\n },\n });\n }\n\n // Re-checked HERE, not only at claim: a claim takes no lock, so another scope may have\n // completed its own verification since. This is the write that confers routing authority\n // and therefore the one that must be exclusive.\n await assertDomainNotHeldElsewhere(container, variant, scopeId, domain, executionContext, utils);\n\n const { verified, recordsFound } = await service.checkDomainChallenge(domain, expectedToken);\n\n putBridged(bridgeKey(variant.resourceType, SsoConfig_Operations.VERIFY_DOMAIN, executionContext), {\n domain,\n status: verified ? DomainVerificationStatus.VERIFIED : DomainVerificationStatus.FAILED,\n dnsName: service.verificationDnsName(domain),\n dnsRecordsFound: recordsFound,\n });\n\n return { domains: service.planVerificationOutcome(domains, domain, verified) };\n },\n postfixCoreOperations: async (_id, updatedRow, executionContext, _operationPath, _utils) =>\n takeBridged(bridgeKey(variant.resourceType, SsoConfig_Operations.VERIFY_DOMAIN, executionContext)) ?? updatedRow,\n },\n });\n\n return factory as unknown as ResourceCustomServiceImplementationFactory;\n}\n\n// ════════════════════════════════════════════════════════════════════\n// revokeDomain\n// ════════════════════════════════════════════════════════════════════\n\nfunction createRevokeDomainFactory(variant: SsoConfigScopeVariant): ResourceCustomServiceImplementationFactory {\n const factory = (_resourcesRegistryService: ResourcesRegistryBackendService, container: Container) =>\n createResourceCustomServiceImplementation({\n operationPath: {\n resourceIdentifier: variant.resourceType,\n operationIdentifier: SsoConfig_Operations.REVOKE_DOMAIN,\n variantType: ResourceOperationVariantType.API_CALL,\n isOperationDefault: true,\n },\n debugLabel: `${variant.resourceType}.revokeDomain`,\n /**\n * The prefix WRITES `domains`, and nothing else can.\n *\n * Without this the repository's strict re-parse drops the key the hook just computed and the\n * operation answers 200 having persisted nothing — the silent no-op the sibling lifecycle verbs\n * (`organizations.requestDeletion`, `organizationMembers.grantOwnership`) each declare against.\n * Declaring it also settles the contract in the other direction: a caller-supplied `domains` is\n * OVERWRITTEN by the hook's value rather than honoured, so the only way to move this block\n * remains the three operations that own it.\n */\n authoritativeFields: ['domains'],\n handlers: {\n prefixCoreOperations: async (_id, input, executionContext, _operationPath, utils) => {\n const { domain, domains } = resolveDomainRequest(variant, input, executionContext, utils);\n\n const isClaimed = domains.verifiedDomains.includes(domain)\n || domains.domainVerificationStatus?.[domain] !== undefined\n || domains.ssoEnabledDomains.includes(domain);\n if (!isClaimed) {\n /**\n * CONFLICT, not NOT_FOUND — corrected 2026-09-10 after the refusal was driven over HTTP\n * for the first time, and for three independent reasons.\n *\n * **It could not name itself.** `sanitizeErrorForClient` allow-lists a refusal's\n * `context` — and with it the client-branchable `code` — only for VALIDATION, CONFLICT\n * and RATE_LIMIT; every other type has its context stripped whole. So as a NOT_FOUND\n * this answered a bare `not_found` and `SSO_DOMAIN_NOT_CLAIMED` reached no client. A\n * status and a name that cannot both be delivered is not a contract.\n *\n * **Its SIBLING already answers 409 for the same condition.** `verifyDomain` refuses a\n * domain with no challenge as a CONFLICT, eight hundred lines up in this same file. One\n * condition, two verbs, two answers — the shape\n * `.claude/rules/invariant-call-site-enumeration.md` exists for.\n *\n * **And 409 is what the framework's own rule asks for here.**\n * `administrative-continuity-floors.md`: refuse with CONFLICT, never 403 or 400, when\n * the caller IS authorized and the payload IS valid and what forbids the write is the\n * current STATE. The addressed row — the SSO config singleton — exists and resolved;\n * what does not exist is a claim inside it. A 404 on a URL that resolved is also the\n * exact ambiguity issue #542 records against itself: a dispatched 404 and a routing 404\n * are told apart by the body, not the status.\n */\n throw utils.errorBuilder.buildError(ErrorType.CONFLICT, executionContext, {\n context: {\n code: 'SSO_DOMAIN_NOT_CLAIMED',\n reason: 'sso_domain_not_claimed',\n message: 'This scope holds no claim on that domain, so there is nothing to revoke.',\n domain,\n },\n });\n }\n\n putBridged(bridgeKey(variant.resourceType, SsoConfig_Operations.REVOKE_DOMAIN, executionContext), {\n domain,\n revoked: true,\n });\n\n /*\n * ─── Sessions already routed by this domain are NOT terminated, and that is a decision ──\n *\n * \"Revoke the domain\" reads like \"cut the sessions\", and it must not mean that. Domain\n * routing decides where a NEW sign-in is sent; it is not a credential and confers no\n * standing — `DomainOrgLookupResult` says so explicitly, and every reader treats the\n * scope it returns as a hint that may only TIGHTEN an enforcement decision. So a session\n * established while the domain was verified was established by an identity provider that\n * really did authenticate that person; nothing about it becomes false when the routing\n * hint is withdrawn.\n *\n * Ending sessions is a different control with its own doors (member suspension, user\n * deactivation, the session-version fence). Folding it in here would make revocation —\n * the ordinary step in handing a domain to another scope — a mass logout of people whose\n * standing has not changed.\n */\n return { domains: getDomainVerificationService(container).planDomainRevocation(domains, domain) };\n },\n postfixCoreOperations: async (_id, updatedRow, executionContext, _operationPath, _utils) =>\n takeBridged(bridgeKey(variant.resourceType, SsoConfig_Operations.REVOKE_DOMAIN, executionContext)) ?? updatedRow,\n },\n });\n\n return factory as unknown as ResourceCustomServiceImplementationFactory;\n}\n\nexport function createSsoConfigDomainVerificationFactories(): ResourceCustomServiceImplementationFactory[] {\n return SSO_CONFIG_SCOPE_VARIANTS.flatMap((variant) => [\n createClaimDomainFactory(variant),\n createVerifyDomainFactory(variant),\n createRevokeDomainFactory(variant),\n ]);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sso-config.custom-impl.backend.service.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"sso-config.custom-impl.backend.service.d.ts","sourceRoot":"","sources":["../../../../../../src/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAQH,OAAO,EAEL,KAAK,0CAA0C,EAChD,MAAM,4GAA4G,CAAC;AAcpH,wBAAgB,8BAA8B,IAAI,0CAA0C,EAAE,CAiE7F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sso-config.custom-impl.backend.service.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"sso-config.custom-impl.backend.service.js","sourceRoot":"","sources":["../../../../../../src/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,4BAA4B,EAC5B,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,yCAAyC,GAE1C,MAAM,4GAA4G,CAAC;AAGpH,yEAAyE;AAEzE,MAAM,6BAA6B,GAAG;IACpC,gBAAgB,CAAC,uBAAuB;IACxC,gBAAgB,CAAC,sBAAsB;CAC/B,CAAC;AAEX,uEAAuE;AACvE,kCAAkC;AAClC,uEAAuE;AAEvE,MAAM,UAAU,8BAA8B;IAC5C,OAAO,6BAA6B,CAAC,GAAG,CAAC,CAAC,mBAAmB,EAAE,EAAE;QAC/D,MAAM,OAAO,GAAG,CAAC,yBAA0D,EAAE,EAAE;YAC7E,OAAO,yCAAyC,CAAC;gBAC/C,aAAa,EAAE;oBACb,kBAAkB,EAAE,mBAAmB;oBACvC,mBAAmB,EAAE,qBAAqB,CAAC,MAAM;oBACjD,8DAA8D;oBAC9D,i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AC,MAAM,CAAC,cAAc,IAAI,KAAK,CAAC,cAAc,EAAE,CAAC;oCACnD,MAAM,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC;gCAC/C,CAAC;gCACD,IAAI,CAAC,MAAM,CAAC,eAAe,IAAI,KAAK,CAAC,eAAe,EAAE,CAAC;oCACrD,MAAM,CAAC,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;gCACjD,CAAC;gCACD,OAAO,MAAM,CAAC;4BAChB,CAAC,CACF,CAAC;wBACJ,CAAC;wBACD,OAAO,KAAK,CAAC;oBACf,CAAC;iBACF;aACF,CAAC,CAAC;QACL,CAAC,CAAC;QAEF,OAAO,OAAgE,CAAC;IAC1E,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["/**\n * SSO Config Custom Implementations\n *\n * Implements the internal UPDATE path on SSO config polymorphic variants\n * (ORG + APP).\n *\n * Patterns:\n * UPDATE → PREFIX_CORE_OPERATIONS — preserves per-override secret fields in\n * socialCredentialOverrides (P3): the `.isWriteOnlySecret()`\n * clientSecret (round-tripped as the `••••••••` mask) and the\n * `.isBackendOnly()` signedJwt* ids (never sent to the frontend)\n * Domain claim / verify / revoke now EXIST, backed by `DomainVerificationBackendService`, and live\n * in `sso-config-domain-verification.custom-impl.backend.service.ts` (#424). The rule that kept them\n * out of this file still stands and is what they were held to: a placeholder 200 must never be\n * registered as an externally usable operation.\n */\n\nimport {\n CoreResourceOperation,\n CoreResourceType,\n ResourceOperationVariantType,\n WRITE_ONLY_SECRET_MASK,\n} from '@wildo-ai/saas-models';\nimport {\n createResourceCustomServiceImplementation,\n type ResourceCustomServiceImplementationFactory,\n} from '~wildo-backend-lib/base-classes/services/services/resource-operation-custom-implementation.factory.backend';\nimport type { ResourcesRegistryBackendService } from '~wildo-backend-lib/resources/services/resources-registry.backend.service';\n\n// ── SSO config polymorphic variant types ──────────────────────────────\n\nconst AUTH_SSO_CONFIG_VARIANT_TYPES = [\n CoreResourceType.ORGANIZATION_SSO_CONFIG,\n CoreResourceType.APPLICATION_SSO_CONFIG,\n] as const;\n\n// ════════════════════════════════════════════════════════════════════\n// UPDATE — PREFIX_CORE_OPERATIONS\n// ════════════════════════════════════════════════════════════════════\n\nexport function createSsoConfigUpdateFactories(): ResourceCustomServiceImplementationFactory[] {\n return AUTH_SSO_CONFIG_VARIANT_TYPES.map((variantResourceType) => {\n const factory = (_resourcesRegistryService: ResourcesRegistryBackendService) => {\n return createResourceCustomServiceImplementation({\n operationPath: {\n resourceIdentifier: variantResourceType,\n operationIdentifier: CoreResourceOperation.UPDATE,\n // INTERNAL_CALL — MUST match the SSO-config UPDATE variant in\n // `sso-config.shared.resources-config.schemas.ts`. The custom-impl registry keys\n // registrations on the FULL operation path (variantType included), so if this\n // drifts from the config variant the dispatch never finds this PREFIX and the\n // per-override write-only secrets (`clientSecret` / signedJwt* on\n // socialCredentialOverrides) are wiped on every update. Moved from REPOSITORY_ONLY\n // in lockstep with the config change that made `saveSSOConfig`'s `.update()`\n // resolvable via `getServiceOperationPathDefault` (which rejects REPOSITORY_ONLY).\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isOperationDefault: true,\n },\n handlers: {\n prefixCoreOperations: async (_id, input, _executionContext, _operationPath, utils) => {\n // P3: Preserve per-override secret fields for socialCredentialOverrides on UPDATE.\n //\n // Problem: the secret fields never round-trip a usable value from the client.\n // `clientSecret` is `.isWriteOnlySecret()` — the client renders the `••••••••`\n // mask and saves it back; `signedJwtKeyId` / `signedJwtTeamId` are\n // `.isBackendOnly()` — stripped from READ responses entirely, so the client\n // sends them absent. Either way, the repository UPDATE replaces the WHOLE\n // `socialCredentialOverrides` array via `$set` (no deep merge), so without this\n // handler the stored secrets are permanently lost. The framework's central\n // write-only-secret sentinel-strip cannot rescue them either — it only helps\n // TOP-LEVEL fields, not array elements.\n //\n // Solution: match each incoming override to the existing record by providerRef\n // and re-inject any secret that arrived absent or as the `••••••••` mask, BEFORE\n // the central sentinel-strip runs.\n if (input?.socialCredentialOverrides && Array.isArray(input.socialCredentialOverrides)) {\n const existing = (utils.currentObject as any)?.socialCredentialOverrides || [];\n input.socialCredentialOverrides = input.socialCredentialOverrides.map(\n (override: any) => {\n const match = existing.find(\n (e: any) => e.providerRef === override.providerRef,\n );\n if (!match) return override;\n const merged = { ...override };\n if (!merged.clientSecret || merged.clientSecret === WRITE_ONLY_SECRET_MASK) {\n merged.clientSecret = match.clientSecret;\n }\n if (!merged.signedJwtKeyId && match.signedJwtKeyId) {\n merged.signedJwtKeyId = match.signedJwtKeyId;\n }\n if (!merged.signedJwtTeamId && match.signedJwtTeamId) {\n merged.signedJwtTeamId = match.signedJwtTeamId;\n }\n return merged;\n },\n );\n }\n return input;\n },\n },\n });\n };\n\n return factory as unknown as ResourceCustomServiceImplementationFactory;\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sso-connection.custom-impl.backend.service.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"sso-connection.custom-impl.backend.service.d.ts","sourceRoot":"","sources":["../../../../../../src/security/authentications/services/custom-impls/sso-connection.custom-impl.backend.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAqBH,OAAO,EAEL,KAAK,0CAA0C,EAChD,MAAM,4GAA4G,CAAC;AAoUpH;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kCAAkC,IAAI,0CAA0C,EAAE,CAgCjG;AAMD,wBAAgB,kCAAkC,IAAI,0CAA0C,EAAE,CAsDjG;AAkFD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kCAAkC,IAAI,0CAA0C,EAAE,CAuFjG;AAMD,wBAAgB,0CAA0C,IAAI,0CAA0C,EAAE,CAmCzG;AAMD,wBAAgB,6CAA6C,IAAI,0CAA0C,EAAE,CAqC5G"}
|
|
@@ -35,6 +35,16 @@ const SAML_BINDINGS = {
|
|
|
35
35
|
POST: 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST',
|
|
36
36
|
};
|
|
37
37
|
const MAX_METADATA_SIZE = 2 * 1024 * 1024; // 2MB
|
|
38
|
+
/**
|
|
39
|
+
* Hard deadline for fetching an IdP's SAML metadata document.
|
|
40
|
+
*
|
|
41
|
+
* An administrator is watching: this runs while they configure an enterprise connection and press
|
|
42
|
+
* save, so an unresponsive metadata host must produce an error they can act on rather than a form
|
|
43
|
+
* that never returns. 10s — the document is XML capped by {@link MAX_METADATA_SIZE}, served by a
|
|
44
|
+
* host the administrator has just typed, and erring generous here spends their whole wait on what
|
|
45
|
+
* is most often a typo.
|
|
46
|
+
*/
|
|
47
|
+
const SAML_METADATA_FETCH_TIMEOUT_MS = 10_000;
|
|
38
48
|
const SHA1_RSA_OID = Buffer.from('06092a864886f70d010105', 'hex');
|
|
39
49
|
const ECDSA_SHA1_OID = Buffer.from('06072a8648ce3d0401', 'hex');
|
|
40
50
|
const SIG_ALG_OIDS = [
|
|
@@ -622,7 +632,7 @@ async function discoverSamlEndpoints(metadataUrl, executionContext, utils) {
|
|
|
622
632
|
try {
|
|
623
633
|
const response = await fetch(metadataUrl, {
|
|
624
634
|
method: 'GET',
|
|
625
|
-
signal: AbortSignal.timeout(
|
|
635
|
+
signal: AbortSignal.timeout(SAML_METADATA_FETCH_TIMEOUT_MS),
|
|
626
636
|
redirect: 'follow',
|
|
627
637
|
});
|
|
628
638
|
if (!response.ok) {
|