@wildo-ai/saas-backend-lib 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/applications/services/worker-remote-client-factory.backend.service.d.ts.map +1 -1
- package/dist/esm/applications/services/worker-remote-client-factory.backend.service.js +19 -1
- package/dist/esm/applications/services/worker-remote-client-factory.backend.service.js.map +1 -1
- package/dist/esm/base-classes/models/manual-controllers.backend.definition.d.ts.map +1 -1
- package/dist/esm/base-classes/models/manual-controllers.backend.definition.js +4 -0
- package/dist/esm/base-classes/models/manual-controllers.backend.definition.js.map +1 -1
- package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.d.ts +35 -0
- package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.js +111 -0
- package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.d.ts +50 -0
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.js +199 -0
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.d.ts +111 -0
- package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.d.ts.map +1 -1
- package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.js +140 -0
- package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.js.map +1 -1
- package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.js +27 -6
- package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.d.ts +124 -13
- package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.js +207 -21
- package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.d.ts +60 -8
- package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.js +174 -26
- package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.d.ts +47 -4
- package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.js +96 -29
- package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.d.ts +55 -0
- package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.d.ts.map +1 -0
- package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.js +114 -0
- package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.js.map +1 -0
- package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.d.ts +89 -14
- package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.js +84 -11
- package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.js +9 -1
- package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.d.ts +49 -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 +171 -18
- 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 +23 -3
- package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.js +20 -0
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.d.ts +22 -0
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.js +4 -1
- package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.d.ts +11 -0
- package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.js +39 -5
- package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.js.map +1 -1
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.d.ts +181 -2
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.js +529 -41
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/services/system-access.backend.service.d.ts +36 -3
- package/dist/esm/base-classes/services/services/system-access.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/system-access.backend.service.js +70 -8
- package/dist/esm/base-classes/services/services/system-access.backend.service.js.map +1 -1
- package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.d.ts +28 -0
- package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.js +90 -0
- package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.js.map +1 -0
- package/dist/esm/billing/batches/usage-flush.batch.backend.service.d.ts +44 -0
- package/dist/esm/billing/batches/usage-flush.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/batches/usage-flush.batch.backend.service.js +99 -0
- package/dist/esm/billing/batches/usage-flush.batch.backend.service.js.map +1 -0
- package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.d.ts +91 -0
- package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.d.ts.map +1 -0
- package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.js +152 -0
- package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.js.map +1 -0
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.d.ts +186 -0
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.js +474 -0
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.js.map +1 -0
- package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.d.ts +100 -0
- package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.js +209 -6
- package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.js.map +1 -1
- package/dist/esm/billing/services/back-office/usage-metering.backend.service.d.ts +200 -4
- package/dist/esm/billing/services/back-office/usage-metering.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/back-office/usage-metering.backend.service.js +593 -64
- package/dist/esm/billing/services/back-office/usage-metering.backend.service.js.map +1 -1
- package/dist/esm/billing/services/billing-adapter-registry.backend.d.ts +36 -0
- package/dist/esm/billing/services/billing-adapter-registry.backend.d.ts.map +1 -0
- package/dist/esm/billing/services/billing-adapter-registry.backend.js +83 -0
- package/dist/esm/billing/services/billing-adapter-registry.backend.js.map +1 -0
- package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.d.ts +9 -0
- package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.d.ts.map +1 -1
- package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.js +11 -1
- package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.js +48 -7
- package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.d.ts +38 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.js +67 -2
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.d.ts +30 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.js +43 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.d.ts +11 -3
- package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.js +30 -16
- package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.js +104 -25
- package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.d.ts +18 -1
- package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.js +106 -2
- package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.js.map +1 -1
- package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.d.ts +52 -0
- package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.d.ts.map +1 -0
- package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.js +74 -0
- package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.js.map +1 -0
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.d.ts +104 -11
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.js +260 -26
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.js.map +1 -1
- package/dist/esm/billing/testing/mock-billing-provider.d.ts +30 -1
- package/dist/esm/billing/testing/mock-billing-provider.d.ts.map +1 -1
- package/dist/esm/billing/testing/mock-billing-provider.js +25 -0
- package/dist/esm/billing/testing/mock-billing-provider.js.map +1 -1
- package/dist/esm/compliance/audit-trails/batches/audit-logs-archive.batch.backend.service.js +11 -4
- package/dist/esm/compliance/audit-trails/batches/audit-logs-archive.batch.backend.service.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.d.ts +225 -13
- package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.js +340 -62
- 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 +244 -7
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.js +386 -5
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/composite-audit-log-sink.backend.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/composite-audit-log-sink.backend.js +7 -1
- package/dist/esm/compliance/audit-trails/services/composite-audit-log-sink.backend.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.d.ts +6 -2
- 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 +31 -9
- 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 +42 -0
- package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.js +57 -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 +110 -0
- package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.d.ts.map +1 -0
- package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.js +192 -0
- package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.js.map +1 -0
- package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.js +31 -0
- package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.js.map +1 -1
- package/dist/esm/config/bootstrap/application-runtime-profile.backend.d.ts +5 -0
- package/dist/esm/config/bootstrap/application-runtime-profile.backend.d.ts.map +1 -1
- package/dist/esm/config/bootstrap/application-runtime-profile.backend.js +6 -0
- package/dist/esm/config/bootstrap/application-runtime-profile.backend.js.map +1 -1
- package/dist/esm/config/models/app-config.backend.schemas.d.ts +142 -46
- package/dist/esm/config/models/app-config.backend.schemas.d.ts.map +1 -1
- package/dist/esm/config/models/app-config.backend.schemas.js +121 -12
- package/dist/esm/config/models/app-config.backend.schemas.js.map +1 -1
- package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.d.ts +38 -15
- package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.d.ts.map +1 -1
- package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.js +17 -2
- package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.js.map +1 -1
- package/dist/esm/config/services/app-configuration-loader.backend.service.d.ts +0 -1
- package/dist/esm/config/services/app-configuration-loader.backend.service.d.ts.map +1 -1
- package/dist/esm/config/services/app-configuration-loader.backend.service.js +68 -76
- package/dist/esm/config/services/app-configuration-loader.backend.service.js.map +1 -1
- package/dist/esm/config/services/app-configuration.backend.service.d.ts.map +1 -1
- package/dist/esm/config/services/app-configuration.backend.service.js +23 -1
- package/dist/esm/config/services/app-configuration.backend.service.js.map +1 -1
- package/dist/esm/config/services/app-configuration.backend.utils.d.ts +33 -0
- package/dist/esm/config/services/app-configuration.backend.utils.d.ts.map +1 -1
- package/dist/esm/config/services/app-configuration.backend.utils.js +39 -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 +25 -0
- package/dist/esm/config/services/application-startup-config-validator.backend.service.d.ts.map +1 -1
- package/dist/esm/config/services/application-startup-config-validator.backend.service.js +41 -1
- package/dist/esm/config/services/application-startup-config-validator.backend.service.js.map +1 -1
- package/dist/esm/databases/services/postgresql-schema-plan-diff.backend.d.ts.map +1 -1
- package/dist/esm/databases/services/postgresql-schema-plan-diff.backend.js +48 -0
- package/dist/esm/databases/services/postgresql-schema-plan-diff.backend.js.map +1 -1
- package/dist/esm/errors/services/error-builder.backend.service.d.ts +13 -1
- package/dist/esm/errors/services/error-builder.backend.service.d.ts.map +1 -1
- package/dist/esm/errors/services/error-builder.backend.service.js +13 -1
- package/dist/esm/errors/services/error-builder.backend.service.js.map +1 -1
- package/dist/esm/errors/services/error-handler.backend.service.d.ts +70 -7
- package/dist/esm/errors/services/error-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/errors/services/error-handler.backend.service.js +129 -8
- package/dist/esm/errors/services/error-handler.backend.service.js.map +1 -1
- package/dist/esm/errors/services/rate-limit.backend.service.d.ts +66 -0
- package/dist/esm/errors/services/rate-limit.backend.service.d.ts.map +1 -1
- package/dist/esm/errors/services/rate-limit.backend.service.js +102 -25
- package/dist/esm/errors/services/rate-limit.backend.service.js.map +1 -1
- package/dist/esm/errors/utils/error-log-level-classification.backend.utils.d.ts +5 -0
- package/dist/esm/errors/utils/error-log-level-classification.backend.utils.d.ts.map +1 -1
- package/dist/esm/errors/utils/error-log-level-classification.backend.utils.js +25 -0
- package/dist/esm/errors/utils/error-log-level-classification.backend.utils.js.map +1 -1
- package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.d.ts +33 -0
- package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.d.ts.map +1 -1
- package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.js +40 -0
- package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.js.map +1 -1
- package/dist/esm/external-data/external-data-pipeline-run.backend.service.d.ts +59 -2
- 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 +52 -17
- package/dist/esm/external-data/external-data-pipeline-run.backend.service.js.map +1 -1
- package/dist/esm/external-providers/models/provider-selection-resolution-evidence.backend.definitions.d.ts +4 -2
- package/dist/esm/external-providers/models/provider-selection-resolution-evidence.backend.definitions.d.ts.map +1 -1
- package/dist/esm/external-providers/models/provider-selection-resolution-evidence.backend.definitions.js.map +1 -1
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.d.ts +256 -0
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.d.ts.map +1 -0
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.js +333 -0
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.js.map +1 -0
- package/dist/esm/external-providers/operations/provider-operation-request.backend.d.ts +56 -0
- package/dist/esm/external-providers/operations/provider-operation-request.backend.d.ts.map +1 -0
- package/dist/esm/external-providers/operations/provider-operation-request.backend.js +211 -0
- package/dist/esm/external-providers/operations/provider-operation-request.backend.js.map +1 -0
- package/dist/esm/external-providers/operations/provider-request-signing.backend.d.ts +45 -0
- package/dist/esm/external-providers/operations/provider-request-signing.backend.d.ts.map +1 -0
- package/dist/esm/external-providers/operations/provider-request-signing.backend.js +216 -0
- package/dist/esm/external-providers/operations/provider-request-signing.backend.js.map +1 -0
- package/dist/esm/external-providers/operations/provider-rest-call-client.backend.d.ts +56 -0
- package/dist/esm/external-providers/operations/provider-rest-call-client.backend.d.ts.map +1 -0
- package/dist/esm/external-providers/operations/provider-rest-call-client.backend.js +78 -0
- package/dist/esm/external-providers/operations/provider-rest-call-client.backend.js.map +1 -0
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.d.ts +1 -1
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.js +2 -2
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.js.map +1 -1
- package/dist/esm/external-providers/services/backend-provider-loader.backend.service.d.ts +89 -0
- package/dist/esm/external-providers/services/backend-provider-loader.backend.service.d.ts.map +1 -0
- package/dist/esm/external-providers/services/backend-provider-loader.backend.service.js +164 -0
- package/dist/esm/external-providers/services/backend-provider-loader.backend.service.js.map +1 -0
- package/dist/esm/external-providers/services/backend-provider-registry.backend.service.d.ts +26 -27
- package/dist/esm/external-providers/services/backend-provider-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/backend-provider-registry.backend.service.js +50 -64
- package/dist/esm/external-providers/services/backend-provider-registry.backend.service.js.map +1 -1
- package/dist/esm/external-providers/services/document-extraction.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/document-extraction.backend.service.js +3 -3
- package/dist/esm/external-providers/services/document-extraction.backend.service.js.map +1 -1
- package/dist/esm/external-providers/services/embeddings.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/embeddings.backend.service.js +4 -4
- package/dist/esm/external-providers/services/embeddings.backend.service.js.map +1 -1
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts +292 -7
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.js +533 -45
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.js.map +1 -1
- package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.js +25 -2
- package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.js.map +1 -1
- package/dist/esm/files/controllers/file.controller.d.ts.map +1 -1
- package/dist/esm/files/controllers/file.controller.js +21 -13
- package/dist/esm/files/controllers/file.controller.js.map +1 -1
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.js +39 -15
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.js.map +1 -1
- package/dist/esm/files/services/file-scanning.backend.service.d.ts +94 -9
- package/dist/esm/files/services/file-scanning.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-scanning.backend.service.js +197 -17
- package/dist/esm/files/services/file-scanning.backend.service.js.map +1 -1
- package/dist/esm/files/services/file-text-extraction.backend.service.d.ts +60 -1
- package/dist/esm/files/services/file-text-extraction.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-text-extraction.backend.service.js +167 -8
- package/dist/esm/files/services/file-text-extraction.backend.service.js.map +1 -1
- package/dist/esm/files/services/file-upload-grant.backend.service.d.ts +53 -2
- 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 +127 -3
- package/dist/esm/files/services/file-upload-grant.backend.service.js.map +1 -1
- package/dist/esm/files/services/files.backend.service.d.ts +68 -0
- package/dist/esm/files/services/files.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/files.backend.service.js +175 -5
- package/dist/esm/files/services/files.backend.service.js.map +1 -1
- package/dist/esm/files/storage/application-storage-key.backend.utils.d.ts +109 -0
- package/dist/esm/files/storage/application-storage-key.backend.utils.d.ts.map +1 -0
- package/dist/esm/files/storage/application-storage-key.backend.utils.js +123 -0
- package/dist/esm/files/storage/application-storage-key.backend.utils.js.map +1 -0
- package/dist/esm/files/storage/file-storage-provider.types.d.ts +16 -10
- package/dist/esm/files/storage/file-storage-provider.types.d.ts.map +1 -1
- package/dist/esm/files/storage/file-storage-provider.types.js.map +1 -1
- package/dist/esm/files/storage/local-directory-storage-provider.backend.service.d.ts +67 -8
- package/dist/esm/files/storage/local-directory-storage-provider.backend.service.d.ts.map +1 -1
- package/dist/esm/files/storage/local-directory-storage-provider.backend.service.js +101 -28
- package/dist/esm/files/storage/local-directory-storage-provider.backend.service.js.map +1 -1
- package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.d.ts.map +1 -1
- package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.js +8 -55
- package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.js.map +1 -1
- package/dist/esm/files/utils/file-field-schema-path.backend.utils.d.ts.map +1 -1
- package/dist/esm/files/utils/file-field-schema-path.backend.utils.js +20 -0
- package/dist/esm/files/utils/file-field-schema-path.backend.utils.js.map +1 -1
- package/dist/esm/files/utils/office-document-text-extraction.backend.utils.d.ts +86 -0
- package/dist/esm/files/utils/office-document-text-extraction.backend.utils.d.ts.map +1 -0
- package/dist/esm/files/utils/office-document-text-extraction.backend.utils.js +288 -0
- package/dist/esm/files/utils/office-document-text-extraction.backend.utils.js.map +1 -0
- package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.d.ts +15 -0
- package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.js +76 -5
- package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/a2a/controllers/a2a.controller.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/controllers/a2a.controller.js +6 -1
- package/dist/esm/flows-actors/a2a/controllers/a2a.controller.js.map +1 -1
- package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.d.ts +60 -0
- package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.js +63 -0
- package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.js.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.d.ts +74 -0
- package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.js +196 -40
- package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.d.ts +7 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.js +53 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.d.ts +18 -0
- package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.js +18 -0
- package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a.backend.service.d.ts +12 -7
- package/dist/esm/flows-actors/a2a/services/a2a.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.d.ts +0 -13
- package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.js +14 -22
- package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.js.map +1 -1
- package/dist/esm/flows-actors/models/core-facets.backend.definitions.d.ts +8 -3
- package/dist/esm/flows-actors/models/core-facets.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/core-facets.backend.definitions.js +25 -15
- package/dist/esm/flows-actors/models/core-facets.backend.definitions.js.map +1 -1
- package/dist/esm/flows-actors/models/flows-actors.backend.schemas.d.ts +13 -1
- package/dist/esm/flows-actors/models/flows-actors.backend.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/flows-actors.backend.schemas.js.map +1 -1
- package/dist/esm/flows-actors/models/function-tools.backend.definitions.d.ts +88 -8
- package/dist/esm/flows-actors/models/function-tools.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/function-tools.backend.definitions.js +333 -31
- package/dist/esm/flows-actors/models/function-tools.backend.definitions.js.map +1 -1
- package/dist/esm/flows-actors/models/market-generation.actors-system.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/market-generation.actors-system.backend.definitions.js +4 -2
- package/dist/esm/flows-actors/models/market-generation.actors-system.backend.definitions.js.map +1 -1
- package/dist/esm/flows-actors/models/mcp-client.backend.definitions.d.ts +113 -0
- package/dist/esm/flows-actors/models/mcp-client.backend.definitions.d.ts.map +1 -0
- package/dist/esm/flows-actors/models/mcp-client.backend.definitions.js +62 -0
- package/dist/esm/flows-actors/models/mcp-client.backend.definitions.js.map +1 -0
- package/dist/esm/flows-actors/services/actors-system.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/actors-system.backend.service.js +0 -2
- package/dist/esm/flows-actors/services/actors-system.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/services/agents.backend.service.d.ts +28 -1
- package/dist/esm/flows-actors/services/agents.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/agents.backend.service.js +204 -18
- package/dist/esm/flows-actors/services/agents.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/services/conversational-execution.backend.service.d.ts +5 -1
- package/dist/esm/flows-actors/services/conversational-execution.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/conversational-execution.backend.service.js +79 -16
- package/dist/esm/flows-actors/services/conversational-execution.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/services/flows-actors-registry.service.d.ts +34 -5
- package/dist/esm/flows-actors/services/flows-actors-registry.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/flows-actors-registry.service.js +154 -20
- package/dist/esm/flows-actors/services/flows-actors-registry.service.js.map +1 -1
- package/dist/esm/flows-actors/services/flows.backend.services.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/flows.backend.services.js +27 -23
- package/dist/esm/flows-actors/services/flows.backend.services.js.map +1 -1
- package/dist/esm/flows-actors/services/llm-observability-agent-call-trace-sink.backend.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/llm-observability-agent-call-trace-sink.backend.js +7 -1
- package/dist/esm/flows-actors/services/llm-observability-agent-call-trace-sink.backend.js.map +1 -1
- package/dist/esm/flows-actors/services/mcp-client.backend.service.d.ts +90 -0
- package/dist/esm/flows-actors/services/mcp-client.backend.service.d.ts.map +1 -0
- package/dist/esm/flows-actors/services/mcp-client.backend.service.js +368 -0
- package/dist/esm/flows-actors/services/mcp-client.backend.service.js.map +1 -0
- package/dist/esm/flows-actors/services/prompt-compiler.backend.service.d.ts +9 -5
- package/dist/esm/flows-actors/services/prompt-compiler.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/prompt-compiler.backend.service.js +12 -17
- package/dist/esm/flows-actors/services/prompt-compiler.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.js +8 -4
- package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.js.map +1 -1
- package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.d.ts +0 -207
- package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.js +8 -243
- package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.js.map +1 -1
- package/dist/esm/flows-actors/utils/meta-workflow-structured-generation-plan.backend.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/utils/meta-workflow-structured-generation-plan.backend.utils.js.map +1 -1
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.d.ts +9 -14
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.d.ts.map +1 -1
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.js +18 -89
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.js.map +1 -1
- package/dist/esm/guidance/services/progression-state-store.backend.service.d.ts +86 -0
- package/dist/esm/guidance/services/progression-state-store.backend.service.d.ts.map +1 -0
- package/dist/esm/guidance/services/progression-state-store.backend.service.js +155 -0
- package/dist/esm/guidance/services/progression-state-store.backend.service.js.map +1 -0
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.d.ts +10 -0
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.js +55 -5
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.js.map +1 -1
- package/dist/esm/index.d.ts +11 -4
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +31 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/inject/models/container.d.ts.map +1 -1
- package/dist/esm/inject/models/container.js +78 -10
- package/dist/esm/inject/models/container.js.map +1 -1
- package/dist/esm/inject/models/service-types.d.ts +17 -3
- package/dist/esm/inject/models/service-types.d.ts.map +1 -1
- package/dist/esm/inject/models/service-types.js +19 -3
- package/dist/esm/inject/models/service-types.js.map +1 -1
- package/dist/esm/mcp/controllers/mcp.controller.d.ts.map +1 -1
- package/dist/esm/mcp/controllers/mcp.controller.js +20 -0
- package/dist/esm/mcp/controllers/mcp.controller.js.map +1 -1
- package/dist/esm/mcp/services/mcp-server.backend.service.d.ts +56 -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 +107 -11
- package/dist/esm/mcp/services/mcp-server.backend.service.js.map +1 -1
- package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.d.ts.map +1 -1
- package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.js +22 -0
- package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.js.map +1 -1
- package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.d.ts.map +1 -1
- package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.js +49 -4
- package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.js.map +1 -1
- package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.d.ts +66 -0
- package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.d.ts.map +1 -0
- package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.js +199 -0
- package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.js.map +1 -0
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.d.ts +149 -13
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.d.ts.map +1 -1
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.js +411 -19
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.js.map +1 -1
- package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.d.ts +11 -2
- package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.js.map +1 -1
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.d.ts +28 -9
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.d.ts.map +1 -1
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.js +30 -10
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.js.map +1 -1
- package/dist/esm/monitoring/logger/services/logger.service.d.ts +12 -0
- package/dist/esm/monitoring/logger/services/logger.service.d.ts.map +1 -1
- package/dist/esm/monitoring/logger/services/logger.service.js +52 -11
- package/dist/esm/monitoring/logger/services/logger.service.js.map +1 -1
- package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.d.ts +62 -0
- package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.d.ts.map +1 -0
- package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.js +78 -0
- package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.js.map +1 -0
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.d.ts +309 -0
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.d.ts.map +1 -0
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.js +385 -0
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.js.map +1 -0
- package/dist/esm/monitoring/observability/models/observability.backend.schemas.d.ts +1 -0
- package/dist/esm/monitoring/observability/models/observability.backend.schemas.d.ts.map +1 -1
- package/dist/esm/monitoring/observability/models/observability.backend.schemas.js.map +1 -1
- package/dist/esm/monitoring/observability/services/metrics.service.d.ts +21 -0
- package/dist/esm/monitoring/observability/services/metrics.service.d.ts.map +1 -1
- package/dist/esm/monitoring/observability/services/metrics.service.js +38 -0
- package/dist/esm/monitoring/observability/services/metrics.service.js.map +1 -1
- package/dist/esm/notifications/email/models/email-context-provider.interface.d.ts +0 -80
- package/dist/esm/notifications/email/models/email-context-provider.interface.d.ts.map +0 -1
- package/dist/esm/notifications/email/models/email-context-provider.interface.js +0 -25
- package/dist/esm/notifications/email/models/email-context-provider.interface.js.map +0 -1
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.d.ts +0 -49
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.d.ts.map +0 -1
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.js +0 -141
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.js.map +0 -1
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.d.ts +0 -37
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.d.ts.map +0 -1
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.js +0 -121
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.js.map +0 -1
- package/dist/esm/notifications/email/services/email-template-registry.backend.service.d.ts +66 -1
- package/dist/esm/notifications/email/services/email-template-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/email/services/email-template-registry.backend.service.js +105 -10
- package/dist/esm/notifications/email/services/email-template-registry.backend.service.js.map +1 -1
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.d.ts +0 -58
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.d.ts.map +0 -1
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.js +0 -223
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.js.map +0 -1
- package/dist/esm/notifications/email/services/email-template-validator.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/email/services/email-template-validator.backend.service.js +10 -1
- package/dist/esm/notifications/email/services/email-template-validator.backend.service.js.map +1 -1
- package/dist/esm/notifications/email/services/email.backend.service.d.ts +60 -4
- package/dist/esm/notifications/email/services/email.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/email/services/email.backend.service.js +145 -43
- package/dist/esm/notifications/email/services/email.backend.service.js.map +1 -1
- package/dist/esm/notifications/email/utils/color-conversion.utils.d.ts +0 -1
- package/dist/esm/notifications/email/utils/color-conversion.utils.d.ts.map +1 -1
- package/dist/esm/notifications/email/utils/color-conversion.utils.js.map +1 -1
- package/dist/esm/notifications/services/notification-badge.backend.service.d.ts +142 -21
- package/dist/esm/notifications/services/notification-badge.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/services/notification-badge.backend.service.js +283 -58
- package/dist/esm/notifications/services/notification-badge.backend.service.js.map +1 -1
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.d.ts +99 -13
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.js +422 -66
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.js.map +1 -1
- package/dist/esm/notifications/sms/services/sms.backend.service.d.ts +2 -2
- package/dist/esm/notifications/sms/services/sms.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/sms/services/sms.backend.service.js +5 -5
- package/dist/esm/notifications/sms/services/sms.backend.service.js.map +1 -1
- package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.d.ts +117 -5
- package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.js +164 -6
- package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.js.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.d.ts +0 -6
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.js +46 -1
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.js.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 +16 -6
- package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.js.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.js +12 -12
- package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.d.ts +16 -0
- package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.js +18 -0
- package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.js.map +1 -1
- package/dist/esm/organizations/batches/organization-purge.batch.backend.service.d.ts +2 -2
- package/dist/esm/organizations/batches/organization-purge.batch.backend.service.js +2 -2
- package/dist/esm/organizations/batches/organization-purge.batch.backend.service.js.map +1 -1
- package/dist/esm/organizations/services/organization-custom-implementation.backend.service.d.ts.map +1 -1
- package/dist/esm/organizations/services/organization-custom-implementation.backend.service.js +63 -2
- package/dist/esm/organizations/services/organization-custom-implementation.backend.service.js.map +1 -1
- package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.d.ts +66 -0
- package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.js +257 -0
- package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.js.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.binding.d.ts +12 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.binding.d.ts.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.binding.js +47 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.binding.js.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.interface.d.ts +87 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.interface.d.ts.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.interface.js +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.interface.js.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.options.d.ts +31 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.options.d.ts.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.options.js +13 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.options.js.map +1 -0
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.d.ts +19 -25
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.js +33 -0
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.js.map +1 -1
- package/dist/esm/queue/domain-queue-consumer.backend.service.d.ts +2 -2
- package/dist/esm/queue/domain-queue-consumer.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/domain-queue-consumer.backend.service.js +1 -4
- package/dist/esm/queue/domain-queue-consumer.backend.service.js.map +1 -1
- package/dist/esm/queue/job-consumer.backend.service.d.ts +2 -2
- package/dist/esm/queue/job-consumer.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/job-consumer.backend.service.js +1 -4
- package/dist/esm/queue/job-consumer.backend.service.js.map +1 -1
- package/dist/esm/queue/job-executor.backend.service.d.ts +2 -2
- package/dist/esm/queue/job-executor.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/job-executor.backend.service.js +1 -4
- package/dist/esm/queue/job-executor.backend.service.js.map +1 -1
- package/dist/esm/queue/queue-monitoring.backend.service.d.ts +8 -4
- package/dist/esm/queue/queue-monitoring.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/queue-monitoring.backend.service.js +25 -17
- package/dist/esm/queue/queue-monitoring.backend.service.js.map +1 -1
- package/dist/esm/queue/queue-worker-initializer.backend.service.d.ts +16 -1
- package/dist/esm/queue/queue-worker-initializer.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/queue-worker-initializer.backend.service.js +16 -1
- package/dist/esm/queue/queue-worker-initializer.backend.service.js.map +1 -1
- package/dist/esm/queue/queue.backend.service.d.ts +3 -3
- package/dist/esm/queue/queue.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/queue.backend.service.js +26 -4
- package/dist/esm/queue/queue.backend.service.js.map +1 -1
- package/dist/esm/queue/worker-shutdown-manager.backend.service.d.ts +2 -2
- package/dist/esm/queue/worker-shutdown-manager.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/worker-shutdown-manager.backend.service.js +18 -3
- package/dist/esm/queue/worker-shutdown-manager.backend.service.js.map +1 -1
- package/dist/esm/rag/utils/rag-chunking.backend.utils.d.ts +50 -25
- package/dist/esm/rag/utils/rag-chunking.backend.utils.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-chunking.backend.utils.js +147 -39
- package/dist/esm/rag/utils/rag-chunking.backend.utils.js.map +1 -1
- package/dist/esm/rag/utils/rag-context-assembly.backend.utils.d.ts +12 -3
- package/dist/esm/rag/utils/rag-context-assembly.backend.utils.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-context-assembly.backend.utils.js +12 -3
- package/dist/esm/rag/utils/rag-context-assembly.backend.utils.js.map +1 -1
- package/dist/esm/requests/service/websocket.service.d.ts +9 -0
- package/dist/esm/requests/service/websocket.service.d.ts.map +1 -1
- package/dist/esm/requests/service/websocket.service.js +32 -8
- package/dist/esm/requests/service/websocket.service.js.map +1 -1
- package/dist/esm/resources/models/custom-service-implementations.backend.definition.d.ts.map +1 -1
- package/dist/esm/resources/models/custom-service-implementations.backend.definition.js +14 -2
- package/dist/esm/resources/models/custom-service-implementations.backend.definition.js.map +1 -1
- package/dist/esm/resources/models/resources-operations.backend.definitions.d.ts.map +1 -1
- package/dist/esm/resources/models/resources-operations.backend.definitions.js +2 -0
- package/dist/esm/resources/models/resources-operations.backend.definitions.js.map +1 -1
- package/dist/esm/resources/models/resources-relationships.backend.definitions.d.ts.map +1 -1
- package/dist/esm/resources/models/resources-relationships.backend.definitions.js +14 -0
- package/dist/esm/resources/models/resources-relationships.backend.definitions.js.map +1 -1
- package/dist/esm/resources/models/resources-types.backend.schemas.d.ts +2 -1
- package/dist/esm/resources/models/resources-types.backend.schemas.d.ts.map +1 -1
- package/dist/esm/resources/models/resources-types.backend.schemas.js +8 -0
- package/dist/esm/resources/models/resources-types.backend.schemas.js.map +1 -1
- package/dist/esm/resources/services/resources-registry.backend.service.d.ts +60 -5
- package/dist/esm/resources/services/resources-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/resources/services/resources-registry.backend.service.js +90 -6
- package/dist/esm/resources/services/resources-registry.backend.service.js.map +1 -1
- package/dist/esm/runtime/controllers/health-controller.backend.service.d.ts +36 -3
- package/dist/esm/runtime/controllers/health-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/runtime/controllers/health-controller.backend.service.js +32 -10
- package/dist/esm/runtime/controllers/health-controller.backend.service.js.map +1 -1
- package/dist/esm/runtime/domain-module.backend.definitions.d.ts +24 -0
- package/dist/esm/runtime/domain-module.backend.definitions.d.ts.map +1 -1
- package/dist/esm/runtime/domain-module.backend.definitions.js +24 -0
- package/dist/esm/runtime/domain-module.backend.definitions.js.map +1 -1
- package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.d.ts +51 -0
- package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.d.ts.map +1 -1
- package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.js.map +1 -1
- package/dist/esm/runtime/services/http-server.backend.service.d.ts +26 -0
- package/dist/esm/runtime/services/http-server.backend.service.d.ts.map +1 -1
- package/dist/esm/runtime/services/http-server.backend.service.js +181 -1
- package/dist/esm/runtime/services/http-server.backend.service.js.map +1 -1
- package/dist/esm/runtime/services/start-application.backend.service.d.ts +19 -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 +261 -77
- package/dist/esm/runtime/services/start-application.backend.service.js.map +1 -1
- package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.d.ts +15 -0
- package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.js +28 -0
- package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.d.ts +5 -1
- package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.js +24 -4
- package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.js +29 -4
- package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.d.ts +114 -0
- package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.js +354 -3
- package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/models/cimd.backend.schemas.d.ts +1 -0
- package/dist/esm/security/authentications/models/cimd.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/cimd.backend.schemas.js +22 -0
- package/dist/esm/security/authentications/models/cimd.backend.schemas.js.map +1 -1
- package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.d.ts +15 -0
- package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.js.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.d.ts +0 -2
- package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.js +23 -14
- package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.js.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.d.ts +0 -1
- package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.js +15 -12
- package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.d.ts +113 -3
- package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.js +207 -30
- package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.d.ts +95 -2
- package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.js +153 -9
- package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.d.ts +190 -0
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.js +377 -53
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.js +68 -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-registration.backend.service.d.ts +41 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.js +202 -23
- package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.js +42 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.js +34 -4
- package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.d.ts +29 -5
- package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.js +77 -5
- package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.d.ts +17 -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 +49 -17
- package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.d.ts +43 -1
- package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.js +277 -97
- package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.d.ts +28 -5
- package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.js +72 -12
- package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.js +3 -0
- package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.js.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.d.ts +28 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.js +283 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.d.ts +4 -3
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.js +4 -3
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.d.ts +35 -0
- package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.js +111 -21
- package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.d.ts +14 -1
- package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.js +49 -8
- package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-policy-resolution.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-policy-resolution.backend.utils.js +4 -0
- package/dist/esm/security/authentications/services/utils/auth-policy-resolution.backend.utils.js.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.js +6 -0
- package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.d.ts +37 -1
- package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.js +51 -0
- package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.js.map +1 -1
- package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.d.ts +41 -0
- package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.js +45 -0
- package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.js.map +1 -1
- package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.d.ts +116 -0
- package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.d.ts.map +1 -0
- package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.js +162 -0
- package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.js.map +1 -0
- package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.d.ts +20 -20
- package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.js +27 -28
- package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.js.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.js +77 -3
- package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.js.map +1 -1
- package/dist/esm/security/authorizations/role-ceiling.backend.utils.d.ts +4 -0
- package/dist/esm/security/authorizations/role-ceiling.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/role-ceiling.backend.utils.js +4 -0
- package/dist/esm/security/authorizations/role-ceiling.backend.utils.js.map +1 -1
- package/dist/esm/security/authorizations/role-conferral.backend.utils.d.ts +93 -0
- package/dist/esm/security/authorizations/role-conferral.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/authorizations/role-conferral.backend.utils.js +95 -0
- package/dist/esm/security/authorizations/role-conferral.backend.utils.js.map +1 -0
- package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.d.ts +124 -1
- package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.d.ts.map +1 -1
- package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.js +142 -5
- package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.js.map +1 -1
- package/dist/esm/security/authorizations/services/authorizations.backend.service.d.ts +74 -8
- package/dist/esm/security/authorizations/services/authorizations.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authorizations/services/authorizations.backend.service.js +175 -19
- package/dist/esm/security/authorizations/services/authorizations.backend.service.js.map +1 -1
- package/dist/esm/security/authorizations/super-admin-floor.backend.utils.d.ts +6 -14
- package/dist/esm/security/authorizations/super-admin-floor.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/super-admin-floor.backend.utils.js +13 -22
- package/dist/esm/security/authorizations/super-admin-floor.backend.utils.js.map +1 -1
- package/dist/esm/security/connected-accounts/connection-target-authorization.backend.d.ts +60 -0
- package/dist/esm/security/connected-accounts/connection-target-authorization.backend.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/connection-target-authorization.backend.js +79 -0
- package/dist/esm/security/connected-accounts/connection-target-authorization.backend.js.map +1 -0
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.d.ts +161 -0
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.js +512 -0
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.d.ts +59 -0
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.js +22 -0
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.js.map +1 -0
- package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.d.ts +44 -0
- package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.js +20 -0
- package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.d.ts +191 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.js +385 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.d.ts +41 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.js +358 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.d.ts +160 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.js +266 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.d.ts +111 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.js +107 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.d.ts +54 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.js +153 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.d.ts +195 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.js +387 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.d.ts +45 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.js +291 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.d.ts +62 -0
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.js +29 -0
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.js.map +1 -0
- package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.d.ts +127 -0
- package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.js +277 -0
- package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.js.map +1 -0
- package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.d.ts +66 -0
- package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.js +75 -0
- package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.js.map +1 -0
- package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.d.ts +21 -3
- package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.d.ts.map +1 -1
- package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.js +26 -16
- package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.js.map +1 -1
- package/dist/esm/security/credential-rotation-grace.backend.utils.d.ts +9 -4
- package/dist/esm/security/credential-rotation-grace.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/credential-rotation-grace.backend.utils.js +9 -4
- package/dist/esm/security/credential-rotation-grace.backend.utils.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.d.ts +26 -0
- package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.js +43 -0
- package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.d.ts +8 -1
- package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.js +49 -0
- package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/security/scim/controllers/scim.backend.controller.d.ts.map +1 -1
- package/dist/esm/security/scim/controllers/scim.backend.controller.js +17 -5
- package/dist/esm/security/scim/controllers/scim.backend.controller.js.map +1 -1
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.d.ts +67 -29
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.js +47 -25
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.js.map +1 -1
- package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.d.ts +10 -2
- package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.js +10 -2
- package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.js.map +1 -1
- package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.d.ts +143 -0
- package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.js +258 -0
- package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.js.map +1 -0
- package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.d.ts +39 -0
- package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.js +159 -0
- package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +11 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-method-management.backend.service.js","sourceRoot":"","sources":["../../../../../../../src/security/authentications/services/auth-methods/auth-method-management.backend.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,0BAA0B,EAAE,MAAM,kEAAkE,CAAC;AAG9G,OAAO,EAAE,oCAAoC,EAAE,MAAM,+FAA+F,CAAC;AACrJ,OAAO,EAAE,uBAAuB,EAAE,MAAM,sEAAsE,CAAC;AAC/G,OAAO,EAAE,uBAAuB,EAAE,MAAM,gFAAgF,CAAC;AACzH,OAAO,EAAE,6BAA6B,EAAE,MAAM,yFAAyF,CAAC;AACxI,OAAO,EAAE,6BAA6B,EAAE,MAAM,wFAAwF,CAAC;AACvI,OAAO,EAAE,4BAA4B,EAAE,MAAM,6FAA6F,CAAC;AAC3I,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAC;AAC7F,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,2BAA2B,EAC3B,mBAAmB,EACnB,UAAU,EACV,wBAAwB,EACxB,+BAA+B,EAC/B,sBAAsB,EACtB,iBAAiB,GAClB,MAAM,uBAAuB,CAAC;AAK/B,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4FAA4F,CAAC;AACnI,OAAO,EAAE,6BAA6B,EAAE,sBAAsB,EAAE,MAAM,4FAA4F,CAAC;AAe5J,IAAM,kCAAkC,GAAxC,MAAM,kCAAkC;IAIS;IACa;IACW;IACR;IACN;IACA;IACM;IACP;IACM;IAMF;IAIL;IAEC;IAvB9C,QAAQ,CAA+D;IAExF,YACsD,MAAqB,EACR,YAAwC,EAC7B,uBAA8D,EACtE,kBAAwD,EAC9D,gBAAyC,EACzC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B,CAAC,gBAAgB,CAAC,CAAA;IAC3C,WAAA,MAAM,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,CAAA;IACjD,WAAA,MAAM,CAAC,kBAAkB,CAAC,eAAe,CAAC,CAAA;IAC1C,WAAA,MAAM,CAAC,kBAAkB,CAAC,qBAAqB,CAAC,CAAA;IAMhD,WAAA,MAAM,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAA;IAI9C,YAAA,MAAM,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAAA;IAEzC,YAAA,MAAM,CAAC,kBAAkB,CAAC,eAAe,CAAC,CAAA;qCApBiB,aAAa;QACM,0BAA0B,YAEjB,oCAAoC;QAC5C,uBAAuB;QACvB,uBAAuB;QACX,6BAA6B;QAC/C,6BAA6B;QACxB,4BAA4B,YAU/B,qBAAqB;QAEnB,sBAAsB;GAxB3F,kCAAkC,CA4nB9C","sourcesContent":["import 'reflect-metadata';\nimport { inject, injectable } from 'inversify';\nimport { SAAS_SERVICE_TYPES } from '~wildo-backend-lib/inject/models/service-types';\nimport { ErrorBuilderBackendService } from '~wildo-backend-lib/errors/services/error-builder.backend.service';\nimport type { ServicesRegistryHandlerBackendService } from '~wildo-backend-lib/base-classes/services/services/services-registry-handler.backend.service';\nimport type { SystemAccessBackendService } from '~wildo-backend-lib/base-classes/services/services/system-access.backend.service';\nimport { AuthCredentialVerifierBackendService } from '~wildo-backend-lib/security/authentications/services/auth-credential-verifier.backend.service';\nimport { AppConfigurationService } from '~wildo-backend-lib/config/services/app-configuration.backend.service';\nimport { AuditLogsBackendService } from '~wildo-backend-lib/compliance/audit-trails/services/audit-logs.backend.service';\nimport { ConsumableTokenBackendService } from '~wildo-backend-lib/security/consumable-tokens/services/consumable-token.backend.service';\nimport { AuthTokenIssuerBackendService } from '~wildo-backend-lib/security/authentications/services/auth-token-issuer.backend.service';\nimport { AuthUserLookupBackendService } from '~wildo-backend-lib/security/authentications/services/utils/auth-user-lookup.backend.service';\nimport { LoggerService } from '~wildo-backend-lib/monitoring/logger/services/logger.service';\nimport {\n CoreResourceType,\n ErrorType,\n ErrorCustomMessageReference,\n isWildoBackendError,\n AuthMethod,\n CoreConsumableTokenTypes,\n ConsumableToken_ConsumptionMode,\n ExternalIdentitySource,\n SsoConnectionType,\n} from '@wildo-ai/saas-models';\nimport type {\n UserIdentityLink,\n UserTypeAuthPolicy,\n} from '@wildo-ai/saas-models';\nimport { DurationUnit } from '@wildo-ai/zod-decorators';\nimport { AuthMfaBackendService } from '~wildo-backend-lib/security/authentications/services/auth-methods/auth-mfa.backend.service';\nimport { PasskeyAuthenticationCeremony, WebAuthnBackendService } from '~wildo-backend-lib/security/authentications/services/auth-methods/webauthn.backend.service';\nimport type { AuthenticationResponseJSON } from '@simplewebauthn/server';\nimport type { ExecutionContext } from '~wildo-backend-lib/runtime/models/execution-context.backend.schemas';\n\ninterface IdentityLinkSummary {\n _id: string;\n connectionType: SsoConnectionType;\n source: ExternalIdentitySource;\n providerRef: string;\n providerEmail: string;\n linkedAt: Date;\n lastUsedAt: Date;\n}\n\n@injectable()\nexport class AuthMethodManagementBackendService {\n private readonly logDebug: (message: string, context?: Record<string, unknown>) => void;\n\n constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) private readonly logger: LoggerService,\n @inject(SAAS_SERVICE_TYPES.ErrorBuilderService) private readonly errorBuilder: ErrorBuilderBackendService,\n @inject(SAAS_SERVICE_TYPES.ServicesRegistryHandlerService) private readonly servicesRegistryHandler: ServicesRegistryHandlerBackendService,\n @inject(SAAS_SERVICE_TYPES.AuthCredentialVerifier) private readonly credentialVerifier: AuthCredentialVerifierBackendService,\n @inject(SAAS_SERVICE_TYPES.AppConfigService) private readonly appConfigService: AppConfigurationService,\n @inject(SAAS_SERVICE_TYPES.AuditLogsService) private readonly auditLogsService: AuditLogsBackendService,\n @inject(SAAS_SERVICE_TYPES.ConsumableTokenService) private readonly consumableTokenService: ConsumableTokenBackendService,\n @inject(SAAS_SERVICE_TYPES.AuthTokenIssuer) private readonly tokenIssuer: AuthTokenIssuerBackendService,\n @inject(SAAS_SERVICE_TYPES.AuthUserLookupService) private readonly userLookup: AuthUserLookupBackendService,\n // TOTP-disable clears `secretBase32` + `backupCodesHashed` (both `.isBackendOnly()`),\n // which a plain handler update strips → the secret and backup codes would silently\n // survive a \"disable\". `updateAsSystem` re-attaches the cleared values after the\n // strict parse, fail-closed behind USER_CREDENTIALS' `systemAccessPolicy.update`.\n // Appended LAST to keep the positional test construction stable.\n @inject(SAAS_SERVICE_TYPES.SystemAccessService) private readonly systemAccessService: SystemAccessBackendService,\n // Appended LAST for the same reason as the parameter above — keeps positional test\n // construction stable. Supplies the enrolled-second-factor authority `reAuthenticate` uses for\n // `AuthMethod.TOTP`, shared with the login second-factor step.\n @inject(SAAS_SERVICE_TYPES.AuthMfaService) private readonly authMfaService: AuthMfaBackendService,\n // Appended LAST, same reason as the two above. Supplies the STEP_UP passkey ceremony.\n @inject(SAAS_SERVICE_TYPES.WebAuthnService) private readonly webAuthnService: WebAuthnBackendService,\n ) {\n this.logDebug = this.logger.debugByType('AuthMethodManagementBackendService');\n this.logger.setDebugTypeLogging('AuthMethodManagementBackendService', true);\n }\n\n // ==========================================================================\n // INTERNAL HELPERS\n // ==========================================================================\n\n private maskPhone(phone: string): string {\n if (!phone || phone.length < 4) return '****';\n return `***${phone.slice(-4)}`;\n }\n\n /**\n * W6.8 + AUTH-14: Resolve effective auth policy for a user, including org override merging.\n * Falls back to null if the user or user type is not found.\n */\n private async _resolveUserTypePolicy(ec: ExecutionContext<any>, userId: string): Promise<UserTypeAuthPolicy | null> {\n try {\n const user = await this.servicesRegistryHandler.read<{ userTypes?: string[] }>(CoreResourceType.USERS, ec, { _id: userId });\n if (user?.userTypes?.length) {\n return this.userLookup.resolveEffectiveAuthPolicy(ec, userId, user.userTypes[0]);\n }\n } catch {\n // Suppress — non-fatal, will use defaults\n }\n return null;\n }\n\n public async enforceUserMethodRemovalAllowed(ec: ExecutionContext<any>, userId: string): Promise<void> {\n const policy = await this._resolveUserTypePolicy(ec, userId);\n const methodManagement = policy?.methodManagement;\n if (methodManagement && !methodManagement.allowUserMethodRemoval) {\n throw this.errorBuilder.buildError(ErrorType.AUTHORIZATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.AUTHORIZATION,\n context: { reason: 'User-initiated auth method removal is disabled by policy' },\n });\n }\n }\n\n // ==========================================================================\n // PASSWORD MANAGEMENT\n // ==========================================================================\n\n public async changePassword(\n ec: ExecutionContext<any>,\n userId: string,\n currentPassword: string,\n newPassword: string,\n ipAddress: string,\n userAgent: string,\n ): Promise<void> {\n try {\n\n const credentials = await this.credentialVerifier.resolveCredentials(ec, userId);\n\n if (!credentials || !credentials.passwordHash) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { reason: 'No password set. Use /auth/password/set instead' },\n });\n }\n\n const isCurrentValid = await this.credentialVerifier.verifyPassword(\n credentials.passwordHash, currentPassword,\n );\n if (!isCurrentValid) {\n throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { reason: 'Current password is incorrect' },\n });\n }\n\n const userTypePolicy = await this._resolveUserTypePolicy(ec, userId);\n const passwordPolicy = userTypePolicy?.passwordPolicy;\n const policyResult = this.credentialVerifier.validatePasswordPolicy(newPassword, passwordPolicy);\n if (!policyResult.valid) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION_PASSWORD_POLICY_VIOLATION,\n context: { violations: policyResult.violations, minLength: passwordPolicy?.minLength, maxLength: passwordPolicy?.maxLength },\n });\n }\n\n const newPasswordHash = await this.credentialVerifier.hashPassword(newPassword, this.appConfigService.config.auth.passwordHashing);\n await this.tokenIssuer.invalidateAllTokensForUser(userId);\n await this.credentialVerifier.updatePasswordHash(ec, userId, newPasswordHash);\n\n await this.auditLogsService.logUserPasswordChanged({ userId: userId, ipAddress, userAgent }, ec);\n } catch (error) {\n if (isWildoBackendError(error)) throw error;\n throw this.errorBuilder.buildFromStandardError(error, undefined, {\n context: { reason: 'Failed to change password' },\n });\n }\n }\n\n public async setPassword(\n ec: ExecutionContext<any>,\n userId: string,\n newPassword: string,\n ipAddress: string,\n userAgent: string,\n ): Promise<void> {\n try {\n\n const credentials = await this.credentialVerifier.resolveCredentials(ec, userId);\n\n if (credentials?.passwordHash) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { reason: 'Password already set. Use /auth/password/change instead' },\n });\n }\n\n const userTypePolicy = await this._resolveUserTypePolicy(ec, userId);\n const passwordPolicy = userTypePolicy?.passwordPolicy;\n const policyResult = this.credentialVerifier.validatePasswordPolicy(newPassword, passwordPolicy);\n if (!policyResult.valid) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION_PASSWORD_POLICY_VIOLATION,\n context: { violations: policyResult.violations, minLength: passwordPolicy?.minLength, maxLength: passwordPolicy?.maxLength },\n });\n }\n\n const newPasswordHash = await this.credentialVerifier.hashPassword(newPassword, this.appConfigService.config.auth.passwordHashing);\n await this.credentialVerifier.updatePasswordHash(ec, userId, newPasswordHash);\n\n await this.auditLogsService.logUserPasswordSet({ userId: userId, ipAddress, userAgent }, ec);\n } catch (error) {\n if (isWildoBackendError(error)) throw error;\n throw this.errorBuilder.buildFromStandardError(error, undefined, {\n context: { reason: 'Failed to set password' },\n });\n }\n }\n\n // ==========================================================================\n // TOTP MANAGEMENT\n // ==========================================================================\n\n public async disableTotp(\n ec: ExecutionContext<any>,\n userId: string,\n reAuthToken: string | undefined,\n ipAddress: string,\n userAgent: string,\n ): Promise<void> {\n try {\n await this.enforceUserMethodRemovalAllowed(ec, userId);\n\n const userTypePolicy = await this._resolveUserTypePolicy(ec, userId);\n\n if (userTypePolicy?.methodManagement?.requireReauthForMethodChanges) {\n if (!reAuthToken) {\n throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined, {\n context: { reason: 'Re-authentication is required for this action' },\n });\n }\n try {\n await this.consumableTokenService.validateToken(reAuthToken, [CoreConsumableTokenTypes.REAUTH]);\n const token = await this.consumableTokenService.consumeToken(reAuthToken);\n if (token.userId !== userId) {\n throw this.errorBuilder.buildError(ErrorType.AUTHORIZATION, undefined, {\n context: { reason: 'Re-authentication token does not belong to this user' },\n });\n }\n } catch (error) {\n if (isWildoBackendError(error)) throw error;\n throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined, {\n context: { reason: 'Invalid or expired re-authentication token' },\n });\n }\n }\n\n const credentials = await this.credentialVerifier.resolveCredentials(ec, userId);\n\n if (!credentials?.totpVerified) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { reason: 'TOTP is not enabled' },\n });\n }\n\n const mfaRequired = !!userTypePolicy?.mfaPolicy?.requireMFA;\n if (mfaRequired) {\n const hasOtherMFA =\n (credentials.passkeyCredentials?.length ?? 0) > 0 ||\n credentials.phoneNumberVerified === true;\n\n if (!hasOtherMFA) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { reason: 'Cannot disable your only MFA method while MFA is required' },\n });\n }\n }\n\n // Trusted system write: clearing `secretBase32` + `backupCodesHashed` (both\n // backendOnly) must survive the strict parse, otherwise the TOTP secret and\n // backup codes silently persist after a \"disable\". `updateAsSystem` re-attaches\n // the cleared values; `totpVerified`/`totpVerifiedAt` are plain fields parsed\n // normally, exactly as before.\n await this.systemAccessService.updateAsSystem(CoreResourceType.USER_CREDENTIALS, { userId }, {\n secretBase32: null,\n totpVerified: false,\n backupCodesHashed: [],\n totpVerifiedAt: null,\n });\n\n await this.auditLogsService.logUserTOTPDisabled({ userId: userId, ipAddress, userAgent }, ec);\n } catch (error) {\n if (isWildoBackendError(error)) throw error;\n throw this.errorBuilder.buildFromStandardError(error, undefined, {\n context: { reason: 'Failed to disable TOTP' },\n });\n }\n }\n\n // ==========================================================================\n // METHOD INTROSPECTION\n // ==========================================================================\n\n public async getMyMethods(\n ec: ExecutionContext<any>,\n userId: string,\n ): Promise<{ methods: Array<{ method: AuthMethod; enrolled: boolean; enrolledAt?: Date; details?: Record<string, unknown> }> }> {\n try {\n\n const credentials = await this.credentialVerifier.resolveCredentials(ec, userId);\n\n const identityLinks = await this.servicesRegistryHandler.list<UserIdentityLink>(\n CoreResourceType.USER_IDENTITY_LINKS,\n ec,\n { userId },\n undefined,\n { paginated: false },\n ) as UserIdentityLink[] ?? [];\n\n const userTypePolicy = await this._resolveUserTypePolicy(ec, userId);\n const authMethodsEnabled = userTypePolicy?.authMethodsEnabled;\n\n const allMethods: Array<{ method: AuthMethod; enrolled: boolean; enrolledAt?: Date; details?: Record<string, unknown> }> = [];\n\n const shouldInclude = (method: AuthMethod): boolean => {\n if (!authMethodsEnabled) return true;\n return !!authMethodsEnabled[method];\n };\n\n if (shouldInclude(AuthMethod.PASSWORD)) {\n allMethods.push({\n method: AuthMethod.PASSWORD,\n enrolled: !!credentials?.passwordHash,\n });\n }\n\n if (shouldInclude(AuthMethod.TOTP)) {\n allMethods.push({\n method: AuthMethod.TOTP,\n enrolled: credentials?.totpVerified === true,\n enrolledAt: credentials?.totpVerifiedAt ?? undefined,\n });\n }\n\n if (shouldInclude(AuthMethod.PASSKEY)) {\n allMethods.push({\n method: AuthMethod.PASSKEY,\n enrolled: (credentials?.passkeyCredentials?.length ?? 0) > 0,\n details: { passkeyCount: credentials?.passkeyCredentials?.length ?? 0 },\n });\n }\n\n if (shouldInclude(AuthMethod.SMS_OTP)) {\n allMethods.push({\n method: AuthMethod.SMS_OTP,\n enrolled: credentials?.phoneNumberVerified === true,\n details: credentials?.phoneNumberVerified\n ? { phoneNumber: this.maskPhone(credentials.phoneNumber!) }\n : undefined,\n });\n }\n\n if (shouldInclude(AuthMethod.EMAIL_OTP)) {\n allMethods.push({\n method: AuthMethod.EMAIL_OTP,\n enrolled: true,\n });\n }\n\n if (shouldInclude(AuthMethod.MAGIC_LINK)) {\n allMethods.push({\n method: AuthMethod.MAGIC_LINK,\n enrolled: true,\n });\n }\n\n if (shouldInclude(AuthMethod.EXTERNAL_OAUTH2)) {\n const socialLinks = identityLinks.filter(\n (link) => link.connectionType === SsoConnectionType.SOCIAL,\n );\n allMethods.push({\n method: AuthMethod.EXTERNAL_OAUTH2,\n enrolled: socialLinks.length > 0,\n });\n }\n\n if (shouldInclude(AuthMethod.ORG_SAML)) {\n allMethods.push({\n method: AuthMethod.ORG_SAML,\n enrolled: identityLinks.some(\n (link) =>\n link.connectionType === SsoConnectionType.ENTERPRISE\n && link.source === ExternalIdentitySource.SAML,\n ),\n });\n }\n\n if (shouldInclude(AuthMethod.ORG_OPENID_CONNECT)) {\n allMethods.push({\n method: AuthMethod.ORG_OPENID_CONNECT,\n enrolled: identityLinks.some(\n (link) =>\n link.connectionType === SsoConnectionType.ENTERPRISE\n && link.source === ExternalIdentitySource.OIDC,\n ),\n });\n }\n\n return { methods: allMethods };\n } catch (error) {\n if (isWildoBackendError(error)) throw error;\n throw this.errorBuilder.buildFromStandardError(error, undefined, {\n context: { reason: 'Failed to get auth methods' },\n });\n }\n }\n\n // ==========================================================================\n // IDENTITY LINKS\n // ==========================================================================\n\n public async getIdentityLinks(\n ec: ExecutionContext<any>,\n userId: string,\n ): Promise<{ links: IdentityLinkSummary[] }> {\n try {\n\n const rawLinks = await this.servicesRegistryHandler.list<UserIdentityLink>(\n CoreResourceType.USER_IDENTITY_LINKS,\n ec,\n { userId },\n undefined,\n { paginated: false },\n ) as UserIdentityLink[];\n\n const links = rawLinks.map((link) => ({\n _id: link._id,\n connectionType: link.connectionType,\n source: link.source,\n providerRef: link.providerRef,\n providerEmail: link.providerEmail,\n linkedAt: link.linkedAt,\n lastUsedAt: link.lastUsedAt,\n }));\n\n return { links };\n } catch (error) {\n if (isWildoBackendError(error)) throw error;\n throw this.errorBuilder.buildFromStandardError(error, undefined, {\n context: { reason: 'Failed to get identity links' },\n });\n }\n }\n\n public async unlinkIdentityLink(\n ec: ExecutionContext<any>,\n userId: string,\n linkId: string,\n ipAddress: string,\n userAgent: string,\n ): Promise<void> {\n try {\n await this.enforceUserMethodRemovalAllowed(ec, userId);\n\n const link = await this.servicesRegistryHandler.read<UserIdentityLink>(\n CoreResourceType.USER_IDENTITY_LINKS,\n ec,\n { _id: linkId },\n );\n\n if (!link) {\n throw this.errorBuilder.buildError(ErrorType.NOT_FOUND, undefined, {\n context: { reason: 'Identity link not found' },\n });\n }\n\n if (link.userId !== userId) {\n throw this.errorBuilder.buildError(ErrorType.NOT_FOUND, undefined, {\n context: { reason: 'Identity link not found' },\n });\n }\n\n const authMethodCounts = await this.countAuthMethods(ec, userId);\n if (authMethodCounts.total <= 1) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { reason: 'Cannot remove your only authentication method' },\n });\n }\n\n await this.servicesRegistryHandler.delete(CoreResourceType.USER_IDENTITY_LINKS, ec, linkId);\n\n await this.auditLogsService.logUserIdentityLinkRemoved({\n userId: userId,\n linkId,\n providerRef: link.providerRef,\n ipAddress,\n userAgent,\n }, ec);\n } catch (error) {\n if (isWildoBackendError(error)) throw error;\n throw this.errorBuilder.buildFromStandardError(error, undefined, {\n context: { reason: 'Failed to unlink identity link' },\n });\n }\n }\n\n // ==========================================================================\n // RE-AUTHENTICATION\n // ==========================================================================\n\n /**\n * Prove the caller is still themselves, and mint a single-use `REAUTH` token on success.\n *\n * # Which factors are accepted, and why TOTP had to be one of them\n *\n * `requiresStepUpAuthentication` operations are cleared ONLY by the token this method mints, so\n * the factor list here decides who can perform them at all. While it was PASSWORD-only, two\n * populations were structurally locked out of every gated verb:\n *\n * - user types whose `authMethodsEnabled` excludes `PASSWORD` (SSO-only, passkey-only) — also\n * reachable through a per-ORGANIZATION `authMethodsEnabled` override;\n * - **directory-managed (SCIM) users**, whose `passwordHash` AND passkeys the framework\n * deliberately destroys so a local first factor cannot survive IdP deprovisioning\n * (`_reconcileLocalCredentialsForDirectoryManaged`).\n *\n * That second group is not an edge case: once tenant teardown split into `request_deletion` +\n * purge, an ORG_ADMIN of a directory-managed tenant could not start even the NORMAL teardown.\n * TOTP is the right remedy precisely because the same reconciliation leaves it INTACT — it is a\n * second factor sitting on top of the IdP first factor, so it survives deprovisioning by design.\n *\n * `TOTP` here means \"an enrolled second factor\": a TOTP code or one of the principal's backup\n * codes, verified through the single shared authority\n * ({@link AuthMfaBackendService.verifyEnrolledSecondFactor}) that login uses — including its\n * anti-replay. The anti-replay is load-bearing for step-up specifically: without it a code\n * observed during login would still be valid moments later, and step-up would authorize a\n * destructive operation on a credential the caller never freshly proved.\n *\n * `PASSKEY` is SUPPORTED, through a dedicated two-legged ceremony rather than the one call\n * password and TOTP take: `POST /auth/reauth/passkey/options` then `POST /auth/reauth` with the\n * assertion, because WebAuthn is challenge-response. It is a re-proof rather than a possession\n * check — the branch below verifies under `PasskeyAuthenticationCeremony.STEP_UP`, which reads a\n * SEPARATE challenge (so an assertion minted for a login cannot be redeemed here) and demands\n * user verification even where the app policy is `preferred`.\n *\n * Any other `AuthMethod` is refused explicitly by the trailing `else`, rather than silently\n * unsupported.\n *\n * assurance-control: WILDO.IDENTITY.STEP_UP_AUTHENTICATION — re-proof of identity before a\n * high-impact action, over any factor the principal actually holds.\n */\n public async reAuthenticate(\n ec: ExecutionContext<any>,\n userId: string,\n method: AuthMethod,\n password?: string,\n passkeyResponse?: unknown,\n ipAddress?: string,\n userAgent?: string,\n /**\n * The enrolled-second-factor code for `method === TOTP` (a TOTP code or a backup code).\n * Appended LAST so every existing positional caller keeps its meaning.\n */\n totpCode?: string,\n ): Promise<{ reAuthToken: string }> {\n try {\n\n if (method === AuthMethod.TOTP) {\n if (!totpCode) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n context: { reason: 'A code is required for TOTP re-authentication' },\n });\n }\n\n const verification = await this.authMfaService.verifyEnrolledSecondFactor(ec, userId, totpCode);\n\n if (verification.notEnrolled) {\n // Distinct from a wrong code on purpose: this account has NO enrolled second factor, so\n // retrying cannot help. The caller needs a different factor, or enrollment.\n throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined, {\n context: { reason: 'No enrolled second factor for this account' },\n });\n }\n\n if (!verification.valid) {\n throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined, {\n context: { reason: 'Invalid code' },\n });\n }\n } else if (method === AuthMethod.PASSWORD) {\n if (!password) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n context: { reason: 'Password is required for password re-authentication' },\n });\n }\n\n const credentials = await this.credentialVerifier.resolveCredentials(ec, userId);\n\n if (!credentials?.passwordHash) {\n throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined, {\n context: { reason: 'No password set for this account' },\n });\n }\n\n const isValid = await this.credentialVerifier.verifyPassword(\n credentials.passwordHash, password,\n );\n if (!isValid) {\n throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined, {\n context: { reason: 'Invalid password' },\n });\n }\n } else if (method === AuthMethod.PASSKEY) {\n if (!passkeyResponse) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n context: { reason: 'A passkey assertion is required for passkey re-authentication' },\n });\n }\n\n // STEP_UP ceremony, NOT login: it reads a separate challenge (so an assertion produced for a\n // login cannot be redeemed here) and demands user verification even where the app policy is\n // `preferred`. See `PasskeyAuthenticationCeremony`.\n const { verified } = await this.webAuthnService.verifyAuthenticationResponse(\n ec,\n userId,\n passkeyResponse as AuthenticationResponseJSON,\n PasskeyAuthenticationCeremony.STEP_UP,\n );\n\n if (!verified) {\n // Deliberately ONE refusal for every failure mode below the verifier — no challenge\n // outstanding, wrong credential, absent user verification, bad signature. Distinguishing\n // them here would tell an attacker which half of the ceremony to attack; the service logs\n // the specific cause.\n throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined, {\n context: { reason: 'Passkey re-authentication failed' },\n });\n }\n } else {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n context: { reason: `Unsupported re-authentication method: ${method}` },\n });\n }\n\n const token = await this.consumableTokenService.createToken({\n tokenType: CoreConsumableTokenTypes.REAUTH,\n consumptionMode: ConsumableToken_ConsumptionMode.SINGLE_USE,\n expiresIn: { value: 5, unit: DurationUnit.MINUTES },\n userId: userId,\n resourceIdentifier: CoreResourceType.USERS,\n relatedId: userId,\n });\n\n return { reAuthToken: token.token };\n } catch (error) {\n if (isWildoBackendError(error)) throw error;\n throw this.errorBuilder.buildFromStandardError(error, undefined, {\n context: { reason: 'Failed to re-authenticate' },\n });\n }\n }\n\n // ==========================================================================\n // AUTH METHOD COUNTING (D9 Safety Check)\n // ==========================================================================\n\n public async countAuthMethods(\n ec: ExecutionContext<any>,\n userId: string,\n ): Promise<{ passwordCount: number; passkeyCount: number; identityLinkCount: number; total: number }> {\n const credentials = await this.credentialVerifier.resolveCredentials(ec, userId);\n\n const passwordCount = credentials?.passwordHash ? 1 : 0;\n const passkeyCount = credentials?.passkeyCredentials?.length ?? 0;\n\n const identityLinks = await this.servicesRegistryHandler.list<UserIdentityLink>(\n CoreResourceType.USER_IDENTITY_LINKS,\n ec,\n { userId },\n undefined,\n { paginated: false },\n ) as UserIdentityLink[];\n const identityLinkCount = identityLinks.length;\n\n return {\n passwordCount,\n passkeyCount,\n identityLinkCount,\n total: passwordCount + passkeyCount + identityLinkCount,\n };\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"auth-method-management.backend.service.js","sourceRoot":"","sources":["../../../../../../../src/security/authentications/services/auth-methods/auth-method-management.backend.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,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I9C,YAAA,MAAM,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAAA;IAEzC,YAAA,MAAM,CAAC,kBAAkB,CAAC,eAAe,CAAC,CAAA;qCApBiB,aAAa;QACM,0BAA0B,YAEjB,oCAAoC;QAC5C,uBAAuB;QACvB,uBAAuB;QACX,6BAA6B;QAC/C,6BAA6B;QACxB,4BAA4B,YAU/B,qBAAqB;QAEnB,sBAAsB;GAxB3F,kCAAkC,CAgsB9C","sourcesContent":["import 'reflect-metadata';\nimport { inject, injectable } from 'inversify';\nimport { SAAS_SERVICE_TYPES } from '~wildo-backend-lib/inject/models/service-types';\nimport { ErrorBuilderBackendService } from '~wildo-backend-lib/errors/services/error-builder.backend.service';\nimport type { ServicesRegistryHandlerBackendService } from '~wildo-backend-lib/base-classes/services/services/services-registry-handler.backend.service';\nimport type { SystemAccessBackendService } from '~wildo-backend-lib/base-classes/services/services/system-access.backend.service';\nimport { AuthCredentialVerifierBackendService } from '~wildo-backend-lib/security/authentications/services/auth-credential-verifier.backend.service';\nimport { AppConfigurationService } from '~wildo-backend-lib/config/services/app-configuration.backend.service';\nimport { AuditLogsBackendService } from '~wildo-backend-lib/compliance/audit-trails/services/audit-logs.backend.service';\nimport { ConsumableTokenBackendService } from '~wildo-backend-lib/security/consumable-tokens/services/consumable-token.backend.service';\nimport { AuthTokenIssuerBackendService } from '~wildo-backend-lib/security/authentications/services/auth-token-issuer.backend.service';\nimport { AuthUserLookupBackendService } from '~wildo-backend-lib/security/authentications/services/utils/auth-user-lookup.backend.service';\nimport { LoggerService } from '~wildo-backend-lib/monitoring/logger/services/logger.service';\nimport {\n CoreResourceType,\n ErrorType,\n ErrorCustomMessageReference,\n isWildoBackendError,\n AuthMethod,\n CoreConsumableTokenTypes,\n ConsumableToken_ConsumptionMode,\n ExternalIdentitySource,\n SsoConnectionType,\n} from '@wildo-ai/saas-models';\nimport type {\n UserIdentityLink,\n UserTypeAuthPolicy,\n} from '@wildo-ai/saas-models';\nimport { DurationUnit } from '@wildo-ai/zod-decorators';\nimport { AuthMfaBackendService } from '~wildo-backend-lib/security/authentications/services/auth-methods/auth-mfa.backend.service';\nimport { PasskeyAuthenticationCeremony, WebAuthnBackendService } from '~wildo-backend-lib/security/authentications/services/auth-methods/webauthn.backend.service';\nimport type { AuthenticationResponseJSON } from '@simplewebauthn/server';\nimport type { ExecutionContext } from '~wildo-backend-lib/runtime/models/execution-context.backend.schemas';\n\ninterface IdentityLinkSummary {\n _id: string;\n connectionType: SsoConnectionType;\n source: ExternalIdentitySource;\n providerRef: string;\n providerEmail: string;\n linkedAt: Date;\n lastUsedAt: Date;\n}\n\n@injectable()\nexport class AuthMethodManagementBackendService {\n private readonly logDebug: (message: string, context?: Record<string, unknown>) => void;\n\n constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) private readonly logger: LoggerService,\n @inject(SAAS_SERVICE_TYPES.ErrorBuilderService) private readonly errorBuilder: ErrorBuilderBackendService,\n @inject(SAAS_SERVICE_TYPES.ServicesRegistryHandlerService) private readonly servicesRegistryHandler: ServicesRegistryHandlerBackendService,\n @inject(SAAS_SERVICE_TYPES.AuthCredentialVerifier) private readonly credentialVerifier: AuthCredentialVerifierBackendService,\n @inject(SAAS_SERVICE_TYPES.AppConfigService) private readonly appConfigService: AppConfigurationService,\n @inject(SAAS_SERVICE_TYPES.AuditLogsService) private readonly auditLogsService: AuditLogsBackendService,\n @inject(SAAS_SERVICE_TYPES.ConsumableTokenService) private readonly consumableTokenService: ConsumableTokenBackendService,\n @inject(SAAS_SERVICE_TYPES.AuthTokenIssuer) private readonly tokenIssuer: AuthTokenIssuerBackendService,\n @inject(SAAS_SERVICE_TYPES.AuthUserLookupService) private readonly userLookup: AuthUserLookupBackendService,\n // TOTP-disable clears `secretBase32` + `backupCodesHashed` (both `.isBackendOnly()`),\n // which a plain handler update strips → the secret and backup codes would silently\n // survive a \"disable\". `updateAsSystem` re-attaches the cleared values after the\n // strict parse, fail-closed behind USER_CREDENTIALS' `systemAccessPolicy.update`.\n // Appended LAST to keep the positional test construction stable.\n @inject(SAAS_SERVICE_TYPES.SystemAccessService) private readonly systemAccessService: SystemAccessBackendService,\n // Appended LAST for the same reason as the parameter above — keeps positional test\n // construction stable. Supplies the enrolled-second-factor authority `reAuthenticate` uses for\n // `AuthMethod.TOTP`, shared with the login second-factor step.\n @inject(SAAS_SERVICE_TYPES.AuthMfaService) private readonly authMfaService: AuthMfaBackendService,\n // Appended LAST, same reason as the two above. Supplies the STEP_UP passkey ceremony.\n @inject(SAAS_SERVICE_TYPES.WebAuthnService) private readonly webAuthnService: WebAuthnBackendService,\n ) {\n this.logDebug = this.logger.debugByType('AuthMethodManagementBackendService');\n this.logger.setDebugTypeLogging('AuthMethodManagementBackendService', true);\n }\n\n // ==========================================================================\n // INTERNAL HELPERS\n // ==========================================================================\n\n private maskPhone(phone: string): string {\n if (!phone || phone.length < 4) return '****';\n return `***${phone.slice(-4)}`;\n }\n\n /**\n * W6.8 + AUTH-14: Resolve effective auth policy for a user, including org override merging.\n * Falls back to null if the user or user type is not found.\n */\n private async _resolveUserTypePolicy(ec: ExecutionContext<any>, userId: string): Promise<UserTypeAuthPolicy | null> {\n try {\n const user = await this.servicesRegistryHandler.read<{ userTypes?: string[] }>(CoreResourceType.USERS, ec, { _id: userId });\n if (user?.userTypes?.length) {\n return this.userLookup.resolveEffectiveAuthPolicy(ec, userId, user.userTypes[0]);\n }\n } catch {\n // Suppress — non-fatal, will use defaults\n }\n return null;\n }\n\n public async enforceUserMethodRemovalAllowed(ec: ExecutionContext<any>, userId: string): Promise<void> {\n const policy = await this._resolveUserTypePolicy(ec, userId);\n const methodManagement = policy?.methodManagement;\n if (methodManagement && !methodManagement.allowUserMethodRemoval) {\n throw this.errorBuilder.buildError(ErrorType.AUTHORIZATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.AUTHORIZATION,\n context: { reason: 'User-initiated auth method removal is disabled by policy' },\n });\n }\n }\n\n // ==========================================================================\n // PASSWORD MANAGEMENT\n // ==========================================================================\n\n public async changePassword(\n ec: ExecutionContext<any>,\n userId: string,\n currentPassword: string,\n newPassword: string,\n ipAddress: string,\n userAgent: string,\n ): Promise<void> {\n try {\n\n const credentials = await this.credentialVerifier.resolveCredentials(ec, userId);\n\n if (!credentials || !credentials.passwordHash) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { reason: 'No password set. Use /auth/password/set instead' },\n });\n }\n\n const isCurrentValid = await this.credentialVerifier.verifyPassword(\n credentials.passwordHash, currentPassword,\n );\n if (!isCurrentValid) {\n throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { reason: 'Current password is incorrect' },\n });\n }\n\n const userTypePolicy = await this._resolveUserTypePolicy(ec, userId);\n const passwordPolicy = userTypePolicy?.passwordPolicy;\n const policyResult = this.credentialVerifier.validatePasswordPolicy(newPassword, passwordPolicy);\n if (!policyResult.valid) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION_PASSWORD_POLICY_VIOLATION,\n context: { violations: policyResult.violations, minLength: passwordPolicy?.minLength, maxLength: passwordPolicy?.maxLength },\n });\n }\n\n const newPasswordHash = await this.credentialVerifier.hashPassword(newPassword, this.appConfigService.config.auth.passwordHashing);\n await this.tokenIssuer.invalidateAllTokensForUser(userId);\n await this.credentialVerifier.updatePasswordHash(ec, userId, newPasswordHash);\n\n await this.auditLogsService.logUserPasswordChanged({ userId: userId, ipAddress, userAgent }, ec);\n } catch (error) {\n if (isWildoBackendError(error)) throw error;\n throw this.errorBuilder.buildFromStandardError(error, undefined, {\n context: { reason: 'Failed to change password' },\n });\n }\n }\n\n public async setPassword(\n ec: ExecutionContext<any>,\n userId: string,\n newPassword: string,\n ipAddress: string,\n userAgent: string,\n ): Promise<void> {\n try {\n\n const credentials = await this.credentialVerifier.resolveCredentials(ec, userId);\n\n if (credentials?.passwordHash) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { reason: 'Password already set. Use /auth/password/change instead' },\n });\n }\n\n const userTypePolicy = await this._resolveUserTypePolicy(ec, userId);\n const passwordPolicy = userTypePolicy?.passwordPolicy;\n const policyResult = this.credentialVerifier.validatePasswordPolicy(newPassword, passwordPolicy);\n if (!policyResult.valid) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION_PASSWORD_POLICY_VIOLATION,\n context: { violations: policyResult.violations, minLength: passwordPolicy?.minLength, maxLength: passwordPolicy?.maxLength },\n });\n }\n\n const newPasswordHash = await this.credentialVerifier.hashPassword(newPassword, this.appConfigService.config.auth.passwordHashing);\n await this.credentialVerifier.updatePasswordHash(ec, userId, newPasswordHash);\n\n await this.auditLogsService.logUserPasswordSet({ userId: userId, ipAddress, userAgent }, ec);\n } catch (error) {\n if (isWildoBackendError(error)) throw error;\n throw this.errorBuilder.buildFromStandardError(error, undefined, {\n context: { reason: 'Failed to set password' },\n });\n }\n }\n\n // ==========================================================================\n // TOTP MANAGEMENT\n // ==========================================================================\n\n public async disableTotp(\n ec: ExecutionContext<any>,\n userId: string,\n reAuthToken: string | undefined,\n ipAddress: string,\n userAgent: string,\n ): Promise<void> {\n try {\n await this.enforceUserMethodRemovalAllowed(ec, userId);\n\n const userTypePolicy = await this._resolveUserTypePolicy(ec, userId);\n\n if (userTypePolicy?.methodManagement?.requireReauthForMethodChanges) {\n if (!reAuthToken) {\n throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined, {\n context: { reason: 'Re-authentication is required for this action' },\n });\n }\n try {\n await this.consumableTokenService.validateToken(reAuthToken, [CoreConsumableTokenTypes.REAUTH]);\n const token = await this.consumableTokenService.consumeToken(reAuthToken);\n if (token.userId !== userId) {\n throw this.errorBuilder.buildError(ErrorType.AUTHORIZATION, undefined, {\n context: { reason: 'Re-authentication token does not belong to this user' },\n });\n }\n } catch (error) {\n if (isWildoBackendError(error)) throw error;\n throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined, {\n context: { reason: 'Invalid or expired re-authentication token' },\n });\n }\n }\n\n const credentials = await this.credentialVerifier.resolveCredentials(ec, userId);\n\n if (!credentials?.totpVerified) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { reason: 'TOTP is not enabled' },\n });\n }\n\n const mfaRequired = !!userTypePolicy?.mfaPolicy?.requireMFA;\n if (mfaRequired) {\n const hasOtherMFA =\n (credentials.passkeyCredentials?.length ?? 0) > 0 ||\n credentials.phoneNumberVerified === true;\n\n if (!hasOtherMFA) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { reason: 'Cannot disable your only MFA method while MFA is required' },\n });\n }\n }\n\n // Trusted system write: clearing `secretBase32` + `backupCodesHashed` (both\n // backendOnly) must survive the strict parse, otherwise the TOTP secret and\n // backup codes silently persist after a \"disable\". `updateAsSystem` re-attaches\n // the cleared values; `totpVerified`/`totpVerifiedAt` are plain fields parsed\n // normally, exactly as before.\n await this.systemAccessService.updateAsSystem(CoreResourceType.USER_CREDENTIALS, { userId }, {\n secretBase32: null,\n totpVerified: false,\n backupCodesHashed: [],\n totpVerifiedAt: null,\n });\n\n await this.auditLogsService.logUserTOTPDisabled({ userId: userId, ipAddress, userAgent }, ec);\n } catch (error) {\n if (isWildoBackendError(error)) throw error;\n throw this.errorBuilder.buildFromStandardError(error, undefined, {\n context: { reason: 'Failed to disable TOTP' },\n });\n }\n }\n\n // ==========================================================================\n // METHOD INTROSPECTION\n // ==========================================================================\n\n public async getMyMethods(\n ec: ExecutionContext<any>,\n userId: string,\n ): Promise<{ methods: Array<{ method: AuthMethod; enrolled: boolean; enrolledAt?: Date; details?: Record<string, unknown> }> }> {\n try {\n\n const credentials = await this.credentialVerifier.resolveCredentials(ec, userId);\n\n const identityLinks = await this.servicesRegistryHandler.list<UserIdentityLink>(\n CoreResourceType.USER_IDENTITY_LINKS,\n ec,\n { userId },\n undefined,\n { paginated: false },\n ) as UserIdentityLink[] ?? [];\n\n const userTypePolicy = await this._resolveUserTypePolicy(ec, userId);\n const authMethodsEnabled = userTypePolicy?.authMethodsEnabled;\n\n const allMethods: Array<{ method: AuthMethod; enrolled: boolean; enrolledAt?: Date; details?: Record<string, unknown> }> = [];\n\n const shouldInclude = (method: AuthMethod): boolean => {\n if (!authMethodsEnabled) return true;\n return !!authMethodsEnabled[method];\n };\n\n if (shouldInclude(AuthMethod.PASSWORD)) {\n allMethods.push({\n method: AuthMethod.PASSWORD,\n enrolled: !!credentials?.passwordHash,\n });\n }\n\n if (shouldInclude(AuthMethod.TOTP)) {\n allMethods.push({\n method: AuthMethod.TOTP,\n enrolled: credentials?.totpVerified === true,\n enrolledAt: credentials?.totpVerifiedAt ?? undefined,\n });\n }\n\n if (shouldInclude(AuthMethod.PASSKEY)) {\n allMethods.push({\n method: AuthMethod.PASSKEY,\n enrolled: (credentials?.passkeyCredentials?.length ?? 0) > 0,\n details: { passkeyCount: credentials?.passkeyCredentials?.length ?? 0 },\n });\n }\n\n if (shouldInclude(AuthMethod.SMS_OTP)) {\n allMethods.push({\n method: AuthMethod.SMS_OTP,\n enrolled: credentials?.phoneNumberVerified === true,\n details: credentials?.phoneNumberVerified\n ? { phoneNumber: this.maskPhone(credentials.phoneNumber!) }\n : undefined,\n });\n }\n\n if (shouldInclude(AuthMethod.EMAIL_OTP)) {\n allMethods.push({\n method: AuthMethod.EMAIL_OTP,\n enrolled: true,\n });\n }\n\n if (shouldInclude(AuthMethod.MAGIC_LINK)) {\n allMethods.push({\n method: AuthMethod.MAGIC_LINK,\n enrolled: true,\n });\n }\n\n if (shouldInclude(AuthMethod.EXTERNAL_OAUTH2)) {\n const socialLinks = identityLinks.filter(\n (link) => link.connectionType === SsoConnectionType.SOCIAL,\n );\n allMethods.push({\n method: AuthMethod.EXTERNAL_OAUTH2,\n enrolled: socialLinks.length > 0,\n });\n }\n\n if (shouldInclude(AuthMethod.ORG_SAML)) {\n allMethods.push({\n method: AuthMethod.ORG_SAML,\n enrolled: identityLinks.some(\n (link) =>\n link.connectionType === SsoConnectionType.ENTERPRISE\n && link.source === ExternalIdentitySource.SAML,\n ),\n });\n }\n\n if (shouldInclude(AuthMethod.ORG_OPENID_CONNECT)) {\n allMethods.push({\n method: AuthMethod.ORG_OPENID_CONNECT,\n enrolled: identityLinks.some(\n (link) =>\n link.connectionType === SsoConnectionType.ENTERPRISE\n && link.source === ExternalIdentitySource.OIDC,\n ),\n });\n }\n\n return { methods: allMethods };\n } catch (error) {\n if (isWildoBackendError(error)) throw error;\n throw this.errorBuilder.buildFromStandardError(error, undefined, {\n context: { reason: 'Failed to get auth methods' },\n });\n }\n }\n\n // ==========================================================================\n // IDENTITY LINKS\n // ==========================================================================\n\n public async getIdentityLinks(\n ec: ExecutionContext<any>,\n userId: string,\n ): Promise<{ links: IdentityLinkSummary[] }> {\n try {\n\n const rawLinks = await this.servicesRegistryHandler.list<UserIdentityLink>(\n CoreResourceType.USER_IDENTITY_LINKS,\n ec,\n { userId },\n undefined,\n { paginated: false },\n ) as UserIdentityLink[];\n\n const links = rawLinks.map((link) => ({\n _id: link._id,\n connectionType: link.connectionType,\n source: link.source,\n providerRef: link.providerRef,\n providerEmail: link.providerEmail,\n linkedAt: link.linkedAt,\n lastUsedAt: link.lastUsedAt,\n }));\n\n return { links };\n } catch (error) {\n if (isWildoBackendError(error)) throw error;\n throw this.errorBuilder.buildFromStandardError(error, undefined, {\n context: { reason: 'Failed to get identity links' },\n });\n }\n }\n\n public async unlinkIdentityLink(\n ec: ExecutionContext<any>,\n userId: string,\n linkId: string,\n ipAddress: string,\n userAgent: string,\n ): Promise<void> {\n try {\n await this.enforceUserMethodRemovalAllowed(ec, userId);\n\n const link = await this.servicesRegistryHandler.read<UserIdentityLink>(\n CoreResourceType.USER_IDENTITY_LINKS,\n ec,\n { _id: linkId },\n );\n\n if (!link) {\n throw this.errorBuilder.buildError(ErrorType.NOT_FOUND, undefined, {\n context: { reason: 'Identity link not found' },\n });\n }\n\n if (link.userId !== userId) {\n throw this.errorBuilder.buildError(ErrorType.NOT_FOUND, undefined, {\n context: { reason: 'Identity link not found' },\n });\n }\n\n const authMethodCounts = await this.countAuthMethods(ec, userId);\n if (authMethodCounts.total <= 1) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { reason: 'Cannot remove your only authentication method' },\n });\n }\n\n await this.servicesRegistryHandler.delete(CoreResourceType.USER_IDENTITY_LINKS, ec, linkId);\n\n await this.auditLogsService.logUserIdentityLinkRemoved({\n userId: userId,\n linkId,\n providerRef: link.providerRef,\n ipAddress,\n userAgent,\n }, ec);\n } catch (error) {\n if (isWildoBackendError(error)) throw error;\n throw this.errorBuilder.buildFromStandardError(error, undefined, {\n context: { reason: 'Failed to unlink identity link' },\n });\n }\n }\n\n // ==========================================================================\n // RE-AUTHENTICATION\n // ==========================================================================\n\n /**\n * Prove the caller is still themselves, and mint a single-use `REAUTH` token on success.\n *\n * # Which factors are accepted, and why TOTP had to be one of them\n *\n * `requiresStepUpAuthentication` operations are cleared ONLY by the token this method mints, so\n * the factor list here decides who can perform them at all. While it was PASSWORD-only, two\n * populations were structurally locked out of every gated verb:\n *\n * - user types whose `authMethodsEnabled` excludes `PASSWORD` (SSO-only, passkey-only) — also\n * reachable through a per-ORGANIZATION `authMethodsEnabled` override;\n * - **directory-managed (SCIM) users**, whose `passwordHash` AND passkeys the framework\n * deliberately destroys so a local first factor cannot survive IdP deprovisioning\n * (`_reconcileLocalCredentialsForDirectoryManaged`).\n *\n * That second group is not an edge case: once tenant teardown split into `request_deletion` +\n * purge, an ORG_ADMIN of a directory-managed tenant could not start even the NORMAL teardown.\n * TOTP is the right remedy precisely because the same reconciliation leaves it INTACT — it is a\n * second factor sitting on top of the IdP first factor, so it survives deprovisioning by design.\n *\n * `TOTP` here means \"an enrolled second factor\": a TOTP code or one of the principal's backup\n * codes, verified through the single shared authority\n * ({@link AuthMfaBackendService.verifyEnrolledSecondFactor}) that login uses — including its\n * anti-replay. The anti-replay is load-bearing for step-up specifically: without it a code\n * observed during login would still be valid moments later, and step-up would authorize a\n * destructive operation on a credential the caller never freshly proved.\n *\n * `PASSKEY` is SUPPORTED, through a dedicated two-legged ceremony rather than the one call\n * password and TOTP take: `POST /auth/reauth/passkey/options` then `POST /auth/reauth` with the\n * assertion, because WebAuthn is challenge-response. It is a re-proof rather than a possession\n * check — the branch below verifies under `PasskeyAuthenticationCeremony.STEP_UP`, which reads a\n * SEPARATE challenge (so an assertion minted for a login cannot be redeemed here) and demands\n * user verification even where the app policy is `preferred`.\n *\n * Any other `AuthMethod` is refused explicitly by the trailing `else`, rather than silently\n * unsupported.\n *\n * assurance-control: WILDO.IDENTITY.STEP_UP_AUTHENTICATION — re-proof of identity before a\n * high-impact action, over any factor the principal actually holds.\n */\n public async reAuthenticate(\n ec: ExecutionContext<any>,\n userId: string,\n method: AuthMethod,\n password?: string,\n passkeyResponse?: unknown,\n ipAddress?: string,\n userAgent?: string,\n /**\n * The enrolled-second-factor code for `method === TOTP` (a TOTP code or a backup code).\n * Appended LAST so every existing positional caller keeps its meaning.\n */\n totpCode?: string,\n ): Promise<{ reAuthToken: string }> {\n try {\n /*\n * The user type's step-up policy decides WHICH FACTORS may satisfy a step-up (#422).\n *\n * `stepUpAuth.methods` was read only by a startup warning: the gate in\n * `services-registry-handler.backend.service.ts` consumed any `REAUTH` token whose `userId`\n * matched, whatever produced it. So a policy naming WebAuthn was satisfied by a password\n * re-authentication, and an operator who configured a phishing-resistant factor got a\n * password prompt and NO error — the same shape as an OIDC `acrValues` that is never sent.\n *\n * Enforced at MINT rather than at the gate, deliberately:\n * - the factor is known here and is NOT recorded on the token, so gate-time enforcement\n * would need a token-payload change and a migration for tokens already in flight;\n * - a refusal here names the allowed factors while the person is still choosing one,\n * instead of accepting their proof and refusing the operation afterwards;\n * - it makes the wrong token UNMINTABLE rather than merely rejected, so the gate keeps its\n * single question (\"is there a valid REAUTH token for this user?\") and cannot drift from\n * the policy.\n *\n * NO ENROLMENT FALLBACK, and that is the decision rather than an oversight. A user whose only\n * enrolled factor is outside the policy cannot mint a token and is told to enrol. Falling back\n * to an unnamed factor would reopen exactly the hole this closes — a policy that names a\n * factor and accepts a weaker one is what the defect was.\n *\n * The residual, stated: a token minted under one policy and redeemed after the policy narrows\n * is still accepted. REAUTH tokens live five minutes and are single-use, so the window is that\n * long; closing it entirely is the token-payload change rejected above.\n */\n const stepUpAuth = ec.activeUserType\n ? this.appConfigService.getUserTypeAuthPolicy(ec.activeUserType)?.stepUpAuth\n : undefined;\n if (stepUpAuth?.enabled && !stepUpAuth.methods.includes(method)) {\n throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, ec, {\n context: {\n reason: 'This factor is not accepted for step-up re-authentication by this account type',\n requestedMethod: method,\n acceptedMethods: stepUpAuth.methods,\n },\n });\n }\n\n if (method === AuthMethod.TOTP) {\n if (!totpCode) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n context: { reason: 'A code is required for TOTP re-authentication' },\n });\n }\n\n const verification = await this.authMfaService.verifyEnrolledSecondFactor(ec, userId, totpCode);\n\n if (verification.notEnrolled) {\n // Distinct from a wrong code on purpose: this account has NO enrolled second factor, so\n // retrying cannot help. The caller needs a different factor, or enrollment.\n throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined, {\n context: { reason: 'No enrolled second factor for this account' },\n });\n }\n\n if (!verification.valid) {\n throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined, {\n context: { reason: 'Invalid code' },\n });\n }\n } else if (method === AuthMethod.PASSWORD) {\n if (!password) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n context: { reason: 'Password is required for password re-authentication' },\n });\n }\n\n const credentials = await this.credentialVerifier.resolveCredentials(ec, userId);\n\n if (!credentials?.passwordHash) {\n throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined, {\n context: { reason: 'No password set for this account' },\n });\n }\n\n const isValid = await this.credentialVerifier.verifyPassword(\n credentials.passwordHash, password,\n );\n if (!isValid) {\n throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined, {\n context: { reason: 'Invalid password' },\n });\n }\n } else if (method === AuthMethod.PASSKEY) {\n if (!passkeyResponse) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n context: { reason: 'A passkey assertion is required for passkey re-authentication' },\n });\n }\n\n // STEP_UP ceremony, NOT login: it reads a separate challenge (so an assertion produced for a\n // login cannot be redeemed here) and demands user verification even where the app policy is\n // `preferred`. See `PasskeyAuthenticationCeremony`.\n const { verified, cloneSuspicion } = await this.webAuthnService.verifyAuthenticationResponse(\n ec,\n userId,\n passkeyResponse as AuthenticationResponseJSON,\n PasskeyAuthenticationCeremony.STEP_UP,\n );\n\n /*\n * A verified assertion whose signature counter did not advance is the cloned-authenticator\n * signal, and it gets the same CRITICAL row here as at the login door — a regression met\n * while re-proving identity for a privileged action is if anything the more interesting of\n * the two. It is reachable only after signature verification, so it cannot be forged by\n * someone who merely knows a credential id.\n *\n * It does NOT change the refusal below: this branch already produces the deliberately\n * uniform `Passkey re-authentication failed`. Until 2026-09-08 a counter regression escaped\n * that uniformity — the library threw before the verifier returned, and the catch at the\n * end of this method wrapped it through `buildFromStandardError` as a generic error rather\n * than an AUTHENTICATION refusal. Returning `verified: false` instead of throwing is what\n * put it back on this path.\n */\n if (cloneSuspicion) {\n await this.auditLogsService.logUserPasskeyCloneSuspected({\n userId,\n credentialId: cloneSuspicion.credentialId,\n storedCounter: cloneSuspicion.storedCounter,\n receivedCounter: cloneSuspicion.receivedCounter,\n credentialDeviceType: cloneSuspicion.credentialDeviceType,\n credentialBackedUp: cloneSuspicion.credentialBackedUp,\n ...(cloneSuspicion.aaguid ? { aaguid: cloneSuspicion.aaguid } : {}),\n ceremony: cloneSuspicion.ceremony,\n ipAddress: ipAddress || 'unknown',\n userAgent: userAgent || 'unknown',\n }, ec);\n }\n\n if (!verified) {\n // Deliberately ONE refusal for every failure mode below the verifier — no challenge\n // outstanding, wrong credential, absent user verification, bad signature. Distinguishing\n // them here would tell an attacker which half of the ceremony to attack; the service logs\n // the specific cause.\n throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined, {\n context: { reason: 'Passkey re-authentication failed' },\n });\n }\n } else {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n context: { reason: `Unsupported re-authentication method: ${method}` },\n });\n }\n\n const token = await this.consumableTokenService.createToken({\n tokenType: CoreConsumableTokenTypes.REAUTH,\n consumptionMode: ConsumableToken_ConsumptionMode.SINGLE_USE,\n expiresIn: { value: 5, unit: DurationUnit.MINUTES },\n userId: userId,\n resourceIdentifier: CoreResourceType.USERS,\n relatedId: userId,\n });\n\n return { reAuthToken: token.token };\n } catch (error) {\n if (isWildoBackendError(error)) throw error;\n throw this.errorBuilder.buildFromStandardError(error, undefined, {\n context: { reason: 'Failed to re-authenticate' },\n });\n }\n }\n\n // ==========================================================================\n // AUTH METHOD COUNTING (D9 Safety Check)\n // ==========================================================================\n\n public async countAuthMethods(\n ec: ExecutionContext<any>,\n userId: string,\n ): Promise<{ passwordCount: number; passkeyCount: number; identityLinkCount: number; total: number }> {\n const credentials = await this.credentialVerifier.resolveCredentials(ec, userId);\n\n const passwordCount = credentials?.passwordHash ? 1 : 0;\n const passkeyCount = credentials?.passkeyCredentials?.length ?? 0;\n\n const identityLinks = await this.servicesRegistryHandler.list<UserIdentityLink>(\n CoreResourceType.USER_IDENTITY_LINKS,\n ec,\n { userId },\n undefined,\n { paginated: false },\n ) as UserIdentityLink[];\n const identityLinkCount = identityLinks.length;\n\n return {\n passwordCount,\n passkeyCount,\n identityLinkCount,\n total: passwordCount + passkeyCount + identityLinkCount,\n };\n }\n}\n"]}
|
|
@@ -18,6 +18,7 @@ import { AuthenticationOrchestratorBackendService } from '../../../../security/a
|
|
|
18
18
|
import type { EmailVerificationInitiatorBackendService } from '../../../../security/authentications/services/email-verification-initiator.backend.service';
|
|
19
19
|
import type { WebAuthnBackendService } from '../../../../security/authentications/services/auth-methods/webauthn.backend.service';
|
|
20
20
|
import type { PublicKeyCredentialCreationOptionsJSON } from '@simplewebauthn/server';
|
|
21
|
+
import { AuthMethod } from '@wildo-ai/saas-models';
|
|
21
22
|
import type { AuthInvitationInfoResponse, InvitationAcceptCredentialMethod } from '@wildo-ai/saas-models';
|
|
22
23
|
import type { ExecutionContext } from '../../../../runtime/models/execution-context.backend.schemas';
|
|
23
24
|
export interface RegisterUserParams {
|
|
@@ -27,6 +28,14 @@ export interface RegisterUserParams {
|
|
|
27
28
|
password?: string;
|
|
28
29
|
/** W5.5: Org name provided during registration when orgNameSource is 'ask'. */
|
|
29
30
|
organizationName?: string;
|
|
31
|
+
/**
|
|
32
|
+
* How the registrant will authenticate afterwards. Absent ⇒ {@link AuthMethod.PASSWORD}, which is
|
|
33
|
+
* what every caller meant before there was a choice (#463).
|
|
34
|
+
*
|
|
35
|
+
* Only a method the user type lists in `registration.allowedMethods` is accepted, and only
|
|
36
|
+
* PASSWORD, MAGIC_LINK and PASSKEY have a public-signup implementation.
|
|
37
|
+
*/
|
|
38
|
+
method?: AuthMethod;
|
|
30
39
|
}
|
|
31
40
|
export interface RegisterUserContext {
|
|
32
41
|
frontendUrl: string;
|
|
@@ -178,6 +187,38 @@ export declare class AuthRegistrationBackendService {
|
|
|
178
187
|
/**
|
|
179
188
|
* User registration.
|
|
180
189
|
* Returns generic success on email collision (anti-enumeration).
|
|
190
|
+
*
|
|
191
|
+
* ## Password-less registration, and the three questions it owed (#463)
|
|
192
|
+
*
|
|
193
|
+
* `params.method` selects how the registrant will authenticate afterwards. PASSWORD is unchanged
|
|
194
|
+
* and is the default. MAGIC_LINK and PASSKEY create the account with NO credential and hand back a
|
|
195
|
+
* magic link; there is no session at signup, because nothing has been proven yet.
|
|
196
|
+
*
|
|
197
|
+
* **Verification.** The link IS the proof — clicking it establishes both the address and the first
|
|
198
|
+
* session, so a magic-link registration cannot reach an authenticated state without verifying. For
|
|
199
|
+
* PASSKEY this is the only available proof: a passkey attests possession of an authenticator and
|
|
200
|
+
* says nothing whatsoever about an email address, and enrolling one needs a session bound to a
|
|
201
|
+
* user, which public signup has no invitation token to stand in for. So a public passkey signup
|
|
202
|
+
* necessarily routes through the link.
|
|
203
|
+
*
|
|
204
|
+
* **Anti-enumeration.** Unchanged and load-bearing: an address already in use returns the same
|
|
205
|
+
* success response and sends nothing. The observable a magic-link signup adds — whether a mail
|
|
206
|
+
* arrives — is exactly the one the existing password flow already exposes through its verification
|
|
207
|
+
* mail, so the surface is not widened. No `userId` is returned for a password-less registration,
|
|
208
|
+
* which the password path does return under DEFERRED: handing an unauthenticated caller an
|
|
209
|
+
* identifier for an account they have not shown they own would be a new disclosure.
|
|
210
|
+
*
|
|
211
|
+
* **Recovery — the question this issue said to settle first, and the design answers it.** A
|
|
212
|
+
* passkey-only account that loses its authenticator is NOT locked out, because the account always
|
|
213
|
+
* has a proven address and the magic link is a standing way in. The registrant requests a link,
|
|
214
|
+
* signs in, and enrolls a replacement passkey through the authenticated route. No separate recovery
|
|
215
|
+
* mechanism was needed, and none was invented — which is the strongest form the answer could take,
|
|
216
|
+
* because a recovery path that exists only for one method is a path nobody maintains.
|
|
217
|
+
*
|
|
218
|
+
* The corollary is worth stating so it is not weakened later: **a passkey-only account must keep a
|
|
219
|
+
* usable email address**, and anything that would let an application disable magic links for a user
|
|
220
|
+
* type while allowing passkey registration would recreate the lockout. That pairing belongs in
|
|
221
|
+
* `registration.allowedMethods` validation the day such a switch exists.
|
|
181
222
|
*/
|
|
182
223
|
registerUser(ec: ExecutionContext<any>, params: RegisterUserParams, ctx: RegisterUserContext): Promise<{
|
|
183
224
|
messageRef: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-registration.backend.service.d.ts","sourceRoot":"","sources":["../../../../../../../src/security/authentications/services/auth-methods/auth-registration.backend.service.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAK1B,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,yEAAyE,CAAC;AAC/H,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAC;AAC7F,OAAO,EAAE,0BAA0B,EAAE,MAAM,kEAAkE,CAAC;AAC9G,OAAO,EAAE,uBAAuB,EAAE,MAAM,sEAAsE,CAAC;AAC/G,OAAO,EAAE,6BAA6B,EAAE,MAAM,yFAAyF,CAAC;AACxI,OAAO,KAAK,EAAE,yCAAyC,EAAE,MAAM,qGAAqG,CAAC;AACrK,OAAO,EAAE,oCAAoC,EAAE,MAAM,+FAA+F,CAAC;AACrJ,OAAO,EAAE,6BAA6B,EAAE,MAAM,wFAAwF,CAAC;AACvI,OAAO,EAAE,4BAA4B,EAAE,MAAM,6FAA6F,CAAC;AAC3I,OAAO,EAAE,gCAAgC,EAAE,MAAM,iGAAiG,CAAC;AAEnJ,OAAO,EAAE,+BAA+B,EAAE,MAAM,wGAAwG,CAAC;AACzJ,OAAO,EAAE,uBAAuB,EAAE,MAAM,gFAAgF,CAAC;AACzH,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,6FAA6F,CAAC;AACzJ,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iFAAiF,CAAC;AAClI,OAAO,KAAK,EAAE,2CAA2C,EAAE,MAAM,yFAAyF,CAAC;AAiB3J,OAAO,EAAE,wCAAwC,EAAE,MAAM,kGAAkG,CAAC;AAC5J,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,mGAAmG,CAAC;AAClK,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4FAA4F,CAAC;AACzI,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"auth-registration.backend.service.d.ts","sourceRoot":"","sources":["../../../../../../../src/security/authentications/services/auth-methods/auth-registration.backend.service.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAK1B,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,yEAAyE,CAAC;AAC/H,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAC;AAC7F,OAAO,EAAE,0BAA0B,EAAE,MAAM,kEAAkE,CAAC;AAC9G,OAAO,EAAE,uBAAuB,EAAE,MAAM,sEAAsE,CAAC;AAC/G,OAAO,EAAE,6BAA6B,EAAE,MAAM,yFAAyF,CAAC;AACxI,OAAO,KAAK,EAAE,yCAAyC,EAAE,MAAM,qGAAqG,CAAC;AACrK,OAAO,EAAE,oCAAoC,EAAE,MAAM,+FAA+F,CAAC;AACrJ,OAAO,EAAE,6BAA6B,EAAE,MAAM,wFAAwF,CAAC;AACvI,OAAO,EAAE,4BAA4B,EAAE,MAAM,6FAA6F,CAAC;AAC3I,OAAO,EAAE,gCAAgC,EAAE,MAAM,iGAAiG,CAAC;AAEnJ,OAAO,EAAE,+BAA+B,EAAE,MAAM,wGAAwG,CAAC;AACzJ,OAAO,EAAE,uBAAuB,EAAE,MAAM,gFAAgF,CAAC;AACzH,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,6FAA6F,CAAC;AACzJ,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iFAAiF,CAAC;AAClI,OAAO,KAAK,EAAE,2CAA2C,EAAE,MAAM,yFAAyF,CAAC;AAiB3J,OAAO,EAAE,wCAAwC,EAAE,MAAM,kGAAkG,CAAC;AAC5J,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,mGAAmG,CAAC;AAClK,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4FAA4F,CAAC;AACzI,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,wBAAwB,CAAC;AAErF,OAAO,EAUL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AAE,IAAI,CAAC;QAAC,cAAc,EAAE,MAAM,CAAA;KAAE,CAAC;IA0DtD;;;;;OAKG;IACG,kBAAkB,CACtB,EAAE,EAAE,gBAAgB,CAAC,GAAG,CAAC,EACzB,MAAM,EAAE;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,eAAe,CAAC,EAAE,MAAM,CAAA;KAAE,GAC/E,OAAO,CAAC;QAAE,QAAQ,EAAE,IAAI,CAAC;QAAC,cAAc,EAAE,MAAM,CAAA;KAAE,CAAC;IAQtD;;;;;;;;;OASG;YACW,0BAA0B;IAgCxC;;;;OAIG;IACG,qBAAqB,CACzB,EAAE,EAAE,gBAAgB,CAAC,GAAG,CAAC,EACzB,MAAM,EAAE;QACN,SAAS,EAAE,MAAM,CAAC;QAClB,gBAAgB,EAAE,MAAM,CAAC;KAC1B,GACA,OAAO,CAAC;QACT,SAAS,EAAE,MAAM,CAAC;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CA6BH"}
|
package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.js
CHANGED
|
@@ -242,9 +242,59 @@ let AuthRegistrationBackendService = class AuthRegistrationBackendService {
|
|
|
242
242
|
/**
|
|
243
243
|
* User registration.
|
|
244
244
|
* Returns generic success on email collision (anti-enumeration).
|
|
245
|
+
*
|
|
246
|
+
* ## Password-less registration, and the three questions it owed (#463)
|
|
247
|
+
*
|
|
248
|
+
* `params.method` selects how the registrant will authenticate afterwards. PASSWORD is unchanged
|
|
249
|
+
* and is the default. MAGIC_LINK and PASSKEY create the account with NO credential and hand back a
|
|
250
|
+
* magic link; there is no session at signup, because nothing has been proven yet.
|
|
251
|
+
*
|
|
252
|
+
* **Verification.** The link IS the proof — clicking it establishes both the address and the first
|
|
253
|
+
* session, so a magic-link registration cannot reach an authenticated state without verifying. For
|
|
254
|
+
* PASSKEY this is the only available proof: a passkey attests possession of an authenticator and
|
|
255
|
+
* says nothing whatsoever about an email address, and enrolling one needs a session bound to a
|
|
256
|
+
* user, which public signup has no invitation token to stand in for. So a public passkey signup
|
|
257
|
+
* necessarily routes through the link.
|
|
258
|
+
*
|
|
259
|
+
* **Anti-enumeration.** Unchanged and load-bearing: an address already in use returns the same
|
|
260
|
+
* success response and sends nothing. The observable a magic-link signup adds — whether a mail
|
|
261
|
+
* arrives — is exactly the one the existing password flow already exposes through its verification
|
|
262
|
+
* mail, so the surface is not widened. No `userId` is returned for a password-less registration,
|
|
263
|
+
* which the password path does return under DEFERRED: handing an unauthenticated caller an
|
|
264
|
+
* identifier for an account they have not shown they own would be a new disclosure.
|
|
265
|
+
*
|
|
266
|
+
* **Recovery — the question this issue said to settle first, and the design answers it.** A
|
|
267
|
+
* passkey-only account that loses its authenticator is NOT locked out, because the account always
|
|
268
|
+
* has a proven address and the magic link is a standing way in. The registrant requests a link,
|
|
269
|
+
* signs in, and enrolls a replacement passkey through the authenticated route. No separate recovery
|
|
270
|
+
* mechanism was needed, and none was invented — which is the strongest form the answer could take,
|
|
271
|
+
* because a recovery path that exists only for one method is a path nobody maintains.
|
|
272
|
+
*
|
|
273
|
+
* The corollary is worth stating so it is not weakened later: **a passkey-only account must keep a
|
|
274
|
+
* usable email address**, and anything that would let an application disable magic links for a user
|
|
275
|
+
* type while allowing passkey registration would recreate the lockout. That pairing belongs in
|
|
276
|
+
* `registration.allowedMethods` validation the day such a switch exists.
|
|
245
277
|
*/
|
|
246
278
|
async registerUser(ec, params, ctx) {
|
|
247
279
|
const { email, firstName, lastName, password, organizationName } = params;
|
|
280
|
+
/*
|
|
281
|
+
* PASSWORD when unstated — every caller predating #463 meant that, and defaulting keeps a
|
|
282
|
+
* registration that omits the field behaving exactly as it did.
|
|
283
|
+
*/
|
|
284
|
+
const method = params.method ?? AuthMethod.PASSWORD;
|
|
285
|
+
/*
|
|
286
|
+
* MAGIC_LINK and PASSKEY both establish the account WITHOUT a local credential and prove the
|
|
287
|
+
* address by a link the registrant must click. So neither can issue a session at signup — there
|
|
288
|
+
* is nothing yet to authenticate — and both are handled by one branch below.
|
|
289
|
+
*
|
|
290
|
+
* PASSKEY is that branch plus an enrollment step, and the reason is worth stating because it was
|
|
291
|
+
* the design question this issue said to settle first: a passkey proves possession of an
|
|
292
|
+
* authenticator and says NOTHING about an email address, and enrolling one needs a session bound
|
|
293
|
+
* to a user. Public signup has no invitation token to stand in for that proof. So a passkey
|
|
294
|
+
* registration necessarily routes through an address proof, which is the magic link — and that
|
|
295
|
+
* is also what answers the recovery question, below.
|
|
296
|
+
*/
|
|
297
|
+
const isPasswordlessMethod = method === AuthMethod.MAGIC_LINK || method === AuthMethod.PASSKEY;
|
|
248
298
|
const { frontendUrl, ipAddress, userAgent, frontendServiceName, activeUserType } = ctx;
|
|
249
299
|
const successResponse = this.authResponseHelper.getAuthResponse(AuthResponseMessageRef.REGISTRATION_SUCCESS);
|
|
250
300
|
this.logDebug('Registration attempt', { email, activeUserType });
|
|
@@ -360,29 +410,38 @@ let AuthRegistrationBackendService = class AuthRegistrationBackendService {
|
|
|
360
410
|
});
|
|
361
411
|
}
|
|
362
412
|
const allowedMethods = registrationConfig.allowedMethods;
|
|
363
|
-
|
|
413
|
+
// The requested method, not a hardcoded PASSWORD. An application that lists only MAGIC_LINK now
|
|
414
|
+
// refuses a password signup, which is the point of the list.
|
|
415
|
+
if (!allowedMethods.includes(method)) {
|
|
364
416
|
throw this.errorBuilder.buildError(ErrorType.AUTHORIZATION, undefined, {
|
|
365
417
|
customMessageReference: ErrorCustomMessageReference.AUTHENTICATION_METHOD_NOT_SUPPORTED,
|
|
366
|
-
context: { method
|
|
418
|
+
context: { method, allowedMethods },
|
|
367
419
|
});
|
|
368
420
|
}
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
421
|
+
/*
|
|
422
|
+
* The credential the method requires, and ONLY for the method that requires one. A password sent
|
|
423
|
+
* alongside `method: MAGIC_LINK` is ignored rather than refused: the registrant's client may
|
|
424
|
+
* carry a stale field, and refusing would fail a signup for a value that changes nothing.
|
|
425
|
+
*/
|
|
426
|
+
if (method === AuthMethod.PASSWORD) {
|
|
427
|
+
if (!password) {
|
|
428
|
+
throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {
|
|
429
|
+
customMessageReference: ErrorCustomMessageReference.REGISTRATION_PASSWORD_REQUIRED,
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
const passwordPolicy = userTypeAuthPolicy?.passwordPolicy;
|
|
433
|
+
const policyValidation = this.credentialVerifier.validatePasswordPolicy(password, passwordPolicy);
|
|
434
|
+
if (!policyValidation.valid) {
|
|
435
|
+
throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {
|
|
436
|
+
customMessageReference: ErrorCustomMessageReference
|
|
437
|
+
.VALIDATION_PASSWORD_POLICY_VIOLATION,
|
|
438
|
+
context: {
|
|
439
|
+
violations: policyValidation.violations,
|
|
440
|
+
minLength: passwordPolicy?.minLength,
|
|
441
|
+
maxLength: passwordPolicy?.maxLength,
|
|
442
|
+
},
|
|
443
|
+
});
|
|
444
|
+
}
|
|
386
445
|
}
|
|
387
446
|
const existing = await this.userLookup.findUserByEmail(ec, email);
|
|
388
447
|
if (existing) {
|
|
@@ -400,10 +459,37 @@ let AuthRegistrationBackendService = class AuthRegistrationBackendService {
|
|
|
400
459
|
}
|
|
401
460
|
}
|
|
402
461
|
}
|
|
403
|
-
|
|
404
|
-
//
|
|
462
|
+
// Undefined for a password-less method, which the persistence request already understands:
|
|
463
|
+
// `includeCredentials: passwordHash !== undefined` below was written for exactly this shape.
|
|
464
|
+
const passwordHash = method === AuthMethod.PASSWORD && password
|
|
465
|
+
? await this.credentialVerifier.hashPassword(password, config.auth.passwordHashing)
|
|
466
|
+
: undefined;
|
|
467
|
+
// W2.6: Email verification mode — DEFERRED creates user as ACTIVE immediately.
|
|
405
468
|
const isDeferredVerification = registrationConfig.emailVerification === EmailVerificationMode.DEFERRED;
|
|
406
|
-
|
|
469
|
+
/*
|
|
470
|
+
* A PASSWORD-LESS registrant is created ACTIVE whatever the verification mode says, and the
|
|
471
|
+
* status is what makes the flow work at all (#463).
|
|
472
|
+
*
|
|
473
|
+
* `verifyMagicLink` REFUSES any non-ACTIVE user (generically, as an invalid link — the status is
|
|
474
|
+
* recorded in the audit trail rather than told to the caller). So a magic-link or passkey
|
|
475
|
+
* registrant created `PENDING_VERIFICATION` would be sent a link that is rejected the moment they
|
|
476
|
+
* click it — an account reachable by nobody, created by the flow meant to reach it. The
|
|
477
|
+
* invitation-accept path already does exactly this: it ACTIVATES the invitee and only then mints
|
|
478
|
+
* the link.
|
|
479
|
+
*
|
|
480
|
+
* ACTIVE here does not mean "access granted". A password-less account holds no credential, so
|
|
481
|
+
* possession of the emailed link is the ONLY way in, and clicking it is what proves the address.
|
|
482
|
+
* The status gate and the verification gate are not the same gate, and conflating them is what
|
|
483
|
+
* makes this look wrong at first glance.
|
|
484
|
+
*
|
|
485
|
+
* Recorded because the first version of this code had it exactly inverted — it forced
|
|
486
|
+
* `PENDING_VERIFICATION` reasoning that "an ACTIVE account with an unproven address is worse",
|
|
487
|
+
* which reads well and would have shipped a flow that could not complete.
|
|
488
|
+
*/
|
|
489
|
+
const initialStatusForMethod = isPasswordlessMethod
|
|
490
|
+
? UserStatus.ACTIVE
|
|
491
|
+
: (isDeferredVerification ? UserStatus.ACTIVE : UserStatus.PENDING_VERIFICATION);
|
|
492
|
+
const initialStatus = initialStatusForMethod;
|
|
407
493
|
// W3.4: Resolve userTypes and defaultAppRoles from the active user type definition
|
|
408
494
|
const userTypes = activeUserType ? [activeUserType] : [];
|
|
409
495
|
const userTypeDefinition = activeUserType
|
|
@@ -514,7 +600,10 @@ let AuthRegistrationBackendService = class AuthRegistrationBackendService {
|
|
|
514
600
|
}
|
|
515
601
|
// W2.6: Only send verification email when emailVerification !== DEFERRED. Delegated to the
|
|
516
602
|
// shared initiator (one implementation across registration / resend / SCIM provisioning).
|
|
517
|
-
|
|
603
|
+
// Not for a password-less registration: the magic link below IS the address proof, and a second
|
|
604
|
+
// "confirm your address" mail arriving beside it asks the registrant to do the same thing twice
|
|
605
|
+
// through a link that grants less.
|
|
606
|
+
if (!isDeferredVerification && !isPasswordlessMethod) {
|
|
518
607
|
await this.emailVerificationInitiator.sendVerificationEmail({
|
|
519
608
|
userId: newUser._id,
|
|
520
609
|
email: newUser.email,
|
|
@@ -523,6 +612,64 @@ let AuthRegistrationBackendService = class AuthRegistrationBackendService {
|
|
|
523
612
|
});
|
|
524
613
|
}
|
|
525
614
|
this.auditLogsService.logUserRegistered({ userId: newUser._id, email: newUser.email, ipAddress, userAgent }, ec).catch(() => { });
|
|
615
|
+
/*
|
|
616
|
+
* PASSWORD-LESS REGISTRATION (#463) — the account exists, holds no credential, and its address is
|
|
617
|
+
* still unproven. A magic link is what closes both: clicking it proves the address AND
|
|
618
|
+
* establishes the first session.
|
|
619
|
+
*
|
|
620
|
+
* No session, no tokens and no `userId` are returned. That is not caution, it is the only honest
|
|
621
|
+
* answer: nothing has been proven yet, and returning a `userId` here would hand an unauthenticated
|
|
622
|
+
* caller a fact about an account they have not shown they own.
|
|
623
|
+
*
|
|
624
|
+
* No separate verification mail is sent: this link IS the address proof, and a second "confirm
|
|
625
|
+
* your address" message beside it would ask the registrant to do the same thing twice through a
|
|
626
|
+
* link that grants less.
|
|
627
|
+
*/
|
|
628
|
+
if (isPasswordlessMethod) {
|
|
629
|
+
/*
|
|
630
|
+
* PASSKEY only: the WebAuthn challenge and the later verify both require a USER_CREDENTIALS row
|
|
631
|
+
* to exist, and a brand-new registrant has none. Provisioned here for the same reason and in the
|
|
632
|
+
* same non-fatal way as the invitation-accept path — a failure must not strand an account that
|
|
633
|
+
* has already been created, and the registrant can still enroll later through the authenticated
|
|
634
|
+
* route once the magic link has let them in.
|
|
635
|
+
*/
|
|
636
|
+
if (method === AuthMethod.PASSKEY) {
|
|
637
|
+
try {
|
|
638
|
+
await this._ensurePasswordlessCredentialRecord(ec, newUser._id);
|
|
639
|
+
}
|
|
640
|
+
catch (error) {
|
|
641
|
+
this.logger.error('Password-less credential row provisioning failed at passkey registration (non-fatal)', {
|
|
642
|
+
userId: newUser._id,
|
|
643
|
+
...projectCaughtErrorLogFields(error),
|
|
644
|
+
});
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
/*
|
|
648
|
+
* `skipGlobalEnablementCheck: true`, for the reason the invitation path records: the method was
|
|
649
|
+
* already authorized above against this user type's own `registration.allowedMethods`, and we
|
|
650
|
+
* are PAST the account creation. Re-rejecting on `sendMagicLink`'s coarser base-policy gate
|
|
651
|
+
* would strand an account that now exists and has no other way in.
|
|
652
|
+
*/
|
|
653
|
+
const magic = await this.authOrchestrator.sendMagicLink(ec, { email: newUser.email }, { ipAddress, userAgent }, true);
|
|
654
|
+
this.logDebug('Password-less registration completed — magic link minted for delivery', {
|
|
655
|
+
userId: newUser._id,
|
|
656
|
+
method,
|
|
657
|
+
// Diagnostic only: an absent token is the anti-enumeration no-op, which cannot happen for an
|
|
658
|
+
// account we have just created and activated-by-construction, so its absence is worth seeing.
|
|
659
|
+
hasToken: Boolean(magic.token),
|
|
660
|
+
});
|
|
661
|
+
return {
|
|
662
|
+
...successResponse,
|
|
663
|
+
/*
|
|
664
|
+
* The registrant's next act differs by method and the client cannot infer it: a magic-link
|
|
665
|
+
* signup is finished once they click, a passkey signup has an enrollment step waiting on the
|
|
666
|
+
* other side of the same click.
|
|
667
|
+
*/
|
|
668
|
+
nextStep: method === AuthMethod.PASSKEY
|
|
669
|
+
? AuthNextStep.PASSKEY_ENROLLMENT
|
|
670
|
+
: AuthNextStep.MAGIC_LINK_SENT,
|
|
671
|
+
};
|
|
672
|
+
}
|
|
526
673
|
// F7 fix: When email verification is deferred, the user is ACTIVE immediately.
|
|
527
674
|
// Process through the registration pipeline (MFA check, etc.) and issue tokens
|
|
528
675
|
// so the user can start using the app without a separate login step.
|
|
@@ -1319,6 +1466,38 @@ let AuthRegistrationBackendService = class AuthRegistrationBackendService {
|
|
|
1319
1466
|
: new Set();
|
|
1320
1467
|
const registrationMethodAllowed = credentialMethod !== AuthMethod.PASSWORD
|
|
1321
1468
|
|| resolvedPolicy?.registration.allowedMethods.includes(AuthMethod.PASSWORD) === true;
|
|
1469
|
+
/*
|
|
1470
|
+
* An UNRESOLVABLE policy and a DISABLED method are different faults, and they must not share a
|
|
1471
|
+
* message (#388).
|
|
1472
|
+
*
|
|
1473
|
+
* When no user type resolves for the organization being joined, `resolvedPolicy` is null and the
|
|
1474
|
+
* enabled set is EMPTY — so every method fails the check below identically, and reporting that as
|
|
1475
|
+
* `AUTHENTICATION_METHOD_NOT_SUPPORTED` names the one thing that is NOT the cause. Measured: an
|
|
1476
|
+
* application whose `userTypes.member` enabled PASSWORD *and* listed it in
|
|
1477
|
+
* `registration.allowedMethods` was refused for PASSWORD, MAGIC_LINK and PASSKEY alike, because
|
|
1478
|
+
* it declared no `organizationTypes` at all. Three methods were tried before anyone looked one
|
|
1479
|
+
* level up, and the first written diagnosis was a false claim that the application had no auth
|
|
1480
|
+
* policy.
|
|
1481
|
+
*
|
|
1482
|
+
* The refusal itself is unchanged and still fail-closed — an unresolvable policy must never
|
|
1483
|
+
* silently permit a method. Only the DIAGNOSTIC is split, so the message names the missing
|
|
1484
|
+
* declaration rather than the method that could never have satisfied it.
|
|
1485
|
+
*/
|
|
1486
|
+
if (!resolvedPolicy) {
|
|
1487
|
+
throw this.errorBuilder.buildError(ErrorType.AUTHORIZATION, undefined, {
|
|
1488
|
+
customMessageReference: ErrorCustomMessageReference.INVITATION_ORGANIZATION_TYPE_UNRESOLVED,
|
|
1489
|
+
context: {
|
|
1490
|
+
// Diagnostic (log-only): AUTHORIZATION strips non-allowlisted context at the wire.
|
|
1491
|
+
organizationId,
|
|
1492
|
+
orgType,
|
|
1493
|
+
resolutionUserType,
|
|
1494
|
+
method: credentialMethod,
|
|
1495
|
+
hint: orgType
|
|
1496
|
+
? 'No user type resolved for this organization type. Declare `organizationTypes[<orgType>].userTypes` in the application configuration.'
|
|
1497
|
+
: 'The organization carries no `type`, so no organization-type entry could be looked up. Set the organization type, and declare `organizationTypes` in the application configuration.',
|
|
1498
|
+
},
|
|
1499
|
+
});
|
|
1500
|
+
}
|
|
1322
1501
|
if (!registrationMethodAllowed
|
|
1323
1502
|
|| !enabledMethods.has(credentialMethod)) {
|
|
1324
1503
|
throw this.errorBuilder.buildError(ErrorType.AUTHORIZATION, undefined, {
|