@wildo-ai/saas-models 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/applications/applications-context.schemas.d.ts +16 -10
- package/dist/esm/applications/applications-context.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications.shared.resources-config.schemas.js +4 -3
- package/dist/esm/applications/applications.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts +1 -1
- package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-account.shared.resources-config.schemas.js +36 -0
- package/dist/esm/billing/billing-account.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/billing-account.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-account.shared.schemas.js +8 -1
- package/dist/esm/billing/billing-account.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-configuration.shared.schemas.d.ts +0 -4
- package/dist/esm/billing/billing-configuration.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-configuration.shared.schemas.js +59 -17
- package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-enums.shared.schemas.d.ts +77 -21
- package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-enums.shared.schemas.js +85 -23
- package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-types.shared.schemas.d.ts +5 -5
- package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts +1 -1
- package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/credit-pool.shared.resources-config.schemas.js +39 -0
- package/dist/esm/billing/credit-pool.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/credit-pool.shared.schemas.d.ts +6 -6
- package/dist/esm/billing/credit-pool.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/credit-pool.shared.schemas.js +8 -4
- package/dist/esm/billing/credit-pool.shared.schemas.js.map +1 -1
- package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.d.ts +1 -1
- package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.js +35 -0
- package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/invoice-ref.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/invoice-ref.shared.schemas.js +8 -3
- package/dist/esm/billing/invoice-ref.shared.schemas.js.map +1 -1
- package/dist/esm/billing/price.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/price.shared.schemas.js +7 -1
- package/dist/esm/billing/price.shared.schemas.js.map +1 -1
- package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product-behavior-policy.shared.schemas.js +52 -11
- package/dist/esm/billing/product-behavior-policy.shared.schemas.js.map +1 -1
- package/dist/esm/billing/product-definition.shared.schemas.d.ts +2 -2
- package/dist/esm/billing/product.shared.resources-config.schemas.d.ts +2 -2
- package/dist/esm/billing/product.shared.schemas.d.ts +2 -2
- package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.schemas.js +7 -3
- package/dist/esm/billing/product.shared.schemas.js.map +1 -1
- package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts +2 -2
- package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/subscription.shared.resources-config.schemas.js +54 -1
- package/dist/esm/billing/subscription.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/subscription.shared.schemas.d.ts +4 -4
- package/dist/esm/billing/subscription.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/subscription.shared.schemas.js +6 -2
- package/dist/esm/billing/subscription.shared.schemas.js.map +1 -1
- package/dist/esm/billing/usage-record.shared.resources-config.schemas.d.ts +1 -1
- package/dist/esm/billing/usage-record.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/usage-record.shared.resources-config.schemas.js +39 -0
- package/dist/esm/billing/usage-record.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/usage-record.shared.schemas.d.ts +11 -7
- package/dist/esm/billing/usage-record.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/usage-record.shared.schemas.js +29 -6
- package/dist/esm/billing/usage-record.shared.schemas.js.map +1 -1
- package/dist/esm/companion/provider-discovery.shared.schemas.d.ts +69 -2
- package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -1
- package/dist/esm/companion/provider-discovery.shared.schemas.js +20 -1
- package/dist/esm/companion/provider-discovery.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts +85 -0
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js +157 -0
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.js +35 -2
- package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts +23 -0
- package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js +56 -0
- package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts +541 -20
- package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js +605 -23
- package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js.map +1 -1
- package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js +96 -3
- package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js.map +1 -1
- package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.d.ts +49 -0
- package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.js +124 -1
- package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.js.map +1 -1
- package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts +11 -3
- package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/impersonalization.shared.schemas.js +11 -3
- package/dist/esm/compliance/privacy/impersonalization.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts +94 -0
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js +211 -0
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js.map +1 -0
- package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts +67 -12
- package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js +95 -8
- package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts +17 -0
- package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/privacy.shared.schemas.js +27 -4
- package/dist/esm/compliance/privacy/privacy.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts +89 -16
- package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/redaction.shared.schemas.js +101 -15
- package/dist/esm/compliance/privacy/redaction.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/subject-export.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-export.shared.schemas.js +12 -5
- package/dist/esm/compliance/privacy/subject-export.shared.schemas.js.map +1 -1
- package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts +21 -0
- package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/analytics-value-moments.shared.schemas.js +20 -0
- package/dist/esm/config/analytics-value-moments.shared.schemas.js.map +1 -1
- package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts +9 -5
- package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/app-configuration-shared.shared.schemas.js +29 -0
- package/dist/esm/config/app-configuration-shared.shared.schemas.js.map +1 -1
- package/dist/esm/config/auth-config-resolution.shared.utils.d.ts +8 -1
- package/dist/esm/config/auth-config-resolution.shared.utils.d.ts.map +1 -1
- package/dist/esm/config/auth-config-resolution.shared.utils.js +29 -0
- package/dist/esm/config/auth-config-resolution.shared.utils.js.map +1 -1
- package/dist/esm/config/entity-identity-config.shared.schemas.d.ts +95 -17
- package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/entity-identity-config.shared.schemas.js +86 -8
- package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
- package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts +12 -12
- package/dist/esm/config/frontend/navigation.shared.schemas.d.ts +33 -0
- package/dist/esm/config/frontend/navigation.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/frontend/navigation.shared.schemas.js +32 -0
- package/dist/esm/config/frontend/navigation.shared.schemas.js.map +1 -1
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts +40 -1
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts.map +1 -1
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js +40 -1
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js.map +1 -1
- package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts +57 -11
- package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-pipeline.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts +109 -64
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.js +200 -19
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts +15 -3
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts.map +1 -1
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js +32 -7
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js.map +1 -1
- package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts +84 -7
- package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts +59 -0
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js +61 -0
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js.map +1 -0
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts +97 -0
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts.map +1 -0
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js +41 -0
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js.map +1 -0
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts +148 -2
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js +56 -1
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts +9 -31
- package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-capability.shared.schemas.js +8 -5
- package/dist/esm/external-providers/provider-capability.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts +18 -8
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js +9 -4
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts +338 -0
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js +332 -0
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js.map +1 -0
- package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts +178 -9
- package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-metadata.shared.schemas.js +181 -9
- package/dist/esm/external-providers/provider-metadata.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts +7 -5
- package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-protocol.shared.schemas.js +7 -5
- package/dist/esm/external-providers/provider-protocol.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts +40 -0
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.js +80 -0
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.js.map +1 -0
- package/dist/esm/features/core-feature-definitions.shared.d.ts.map +1 -1
- package/dist/esm/features/core-feature-definitions.shared.js +7 -1
- package/dist/esm/features/core-feature-definitions.shared.js.map +1 -1
- package/dist/esm/features/feature-builders.shared.d.ts +32 -0
- package/dist/esm/features/feature-builders.shared.d.ts.map +1 -1
- package/dist/esm/features/feature-builders.shared.js +32 -0
- package/dist/esm/features/feature-builders.shared.js.map +1 -1
- package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts +1 -1
- package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/features/user-features.shared.resources-config.schemas.js +48 -0
- package/dist/esm/features/user-features.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/files/file-upload-grant.shared.schemas.d.ts +156 -0
- package/dist/esm/files/file-upload-grant.shared.schemas.d.ts.map +1 -0
- package/dist/esm/files/file-upload-grant.shared.schemas.js +175 -0
- package/dist/esm/files/file-upload-grant.shared.schemas.js.map +1 -0
- package/dist/esm/files/files.shared.schemas.d.ts +52 -4
- package/dist/esm/files/files.shared.schemas.d.ts.map +1 -1
- package/dist/esm/files/files.shared.schemas.js +55 -4
- package/dist/esm/files/files.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.d.ts +1 -1
- package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.js +33 -0
- package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.js +6 -2
- package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.d.ts +1 -1
- package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.js +53 -0
- package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/actors.shared.schemas.js +3 -2
- package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/agents.shared.schemas.d.ts +54 -5
- package/dist/esm/flows-actors/agents.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/agents.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.d.ts +6 -6
- package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts +0 -3
- package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/deliberation.shared.schemas.js +0 -5
- package/dist/esm/flows-actors/deliberation.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.d.ts +1 -1
- package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.js +43 -0
- package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts +14 -0
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js +48 -6
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.d.ts +1 -1
- package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.js +41 -0
- package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors-task.shared.schemas.d.ts +0 -7
- package/dist/esm/flows-actors/flows-actors-task.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors-task.shared.schemas.js +23 -13
- package/dist/esm/flows-actors/flows-actors-task.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts +19 -0
- package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js +33 -0
- package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts +14 -9
- package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js +14 -9
- package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js +3 -2
- package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows.shared.schemas.js +3 -2
- package/dist/esm/flows-actors/flows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts +128 -0
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.js +142 -0
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts +0 -3
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js +1 -4
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts +0 -16
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.js +1 -17
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts +3 -3
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.js +3 -3
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts +2 -8
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js +4 -15
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.d.ts +1 -1
- package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.js +51 -0
- package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.schemas.js +8 -2
- package/dist/esm/guidance/guidance-state.shared.schemas.js.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.utils.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.utils.js +1 -0
- package/dist/esm/guidance/guidance-state.shared.utils.js.map +1 -1
- package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.d.ts +1 -1
- package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.js +51 -0
- package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/lifecycle-state.shared.schemas.js +28 -3
- package/dist/esm/guidance/lifecycle-state.shared.schemas.js.map +1 -1
- package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts +9 -1
- package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/progression-state.shared.resources-config.schemas.js +51 -0
- package/dist/esm/guidance/progression-state.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/guidance/progression-state.shared.schemas.d.ts +46 -0
- package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/progression-state.shared.schemas.js +67 -4
- package/dist/esm/guidance/progression-state.shared.schemas.js.map +1 -1
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts +356 -52
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts.map +1 -1
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js +166 -39
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js.map +1 -1
- package/dist/esm/index.d.ts +15 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +15 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts +11 -2
- package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/email/email-template-registry.shared.schemas.js.map +1 -1
- package/dist/esm/notifications/email/email-template.shared.enums.d.ts +15 -0
- package/dist/esm/notifications/email/email-template.shared.enums.d.ts.map +1 -1
- package/dist/esm/notifications/email/email-template.shared.enums.js +15 -0
- package/dist/esm/notifications/email/email-template.shared.enums.js.map +1 -1
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.d.ts +70 -0
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.d.ts.map +1 -0
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.js +71 -0
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.js.map +1 -0
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts +1 -0
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js +19 -0
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts +30 -0
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js +65 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js.map +1 -1
- package/dist/esm/notifications/notification-badges.core.definitions.d.ts +6 -4
- package/dist/esm/notifications/notification-badges.core.definitions.d.ts.map +1 -1
- package/dist/esm/notifications/notification-badges.core.definitions.js +6 -4
- package/dist/esm/notifications/notification-badges.core.definitions.js.map +1 -1
- package/dist/esm/notifications/notification-badges.schemas.d.ts +167 -5
- package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notification-badges.schemas.js +191 -6
- package/dist/esm/notifications/notification-badges.schemas.js.map +1 -1
- package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts +1 -1
- package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.js +36 -0
- package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/notifications/notifications.shared.schemas.d.ts +107 -0
- package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notifications.shared.schemas.js +149 -1
- package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts +1 -1
- package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js +44 -0
- package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-members.shared.schemas.js +15 -4
- package/dist/esm/organizations/organization-members.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-notifications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-notifications.shared.schemas.js +22 -1
- package/dist/esm/organizations/organization-notifications.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts +26 -0
- package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-preferences.shared.schemas.js +25 -0
- package/dist/esm/organizations/organization-preferences.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-profile.shared.schemas.d.ts +25 -0
- package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-profile.shared.schemas.js +42 -17
- package/dist/esm/organizations/organization-profile.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts +3 -2
- package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing.shared.js +9 -2
- package/dist/esm/organizations/organization-unit-narrowing.shared.js.map +1 -1
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.js +35 -12
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/public-runtime/index.d.ts +49 -2
- package/dist/esm/public-runtime/index.d.ts.map +1 -1
- package/dist/esm/public-runtime/index.js +48 -1
- package/dist/esm/public-runtime/index.js.map +1 -1
- package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts +6 -5
- package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/queue/jobs.shared.resources-config.schemas.js +23 -5
- package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/queue/jobs.shared.schemas.d.ts +16 -3
- package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
- package/dist/esm/queue/jobs.shared.schemas.js +16 -3
- package/dist/esm/queue/jobs.shared.schemas.js.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-documentation.d.ts +137 -0
- package/dist/esm/requests/manual-controllers-routes-documentation.d.ts.map +1 -0
- package/dist/esm/requests/manual-controllers-routes-documentation.js +1201 -0
- package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -0
- package/dist/esm/requests/manual-controllers-routes-urls.d.ts +67 -0
- package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-urls.js +78 -0
- package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
- package/dist/esm/requests/rate-limits.shared.schemas.d.ts +11 -1
- package/dist/esm/requests/rate-limits.shared.schemas.d.ts.map +1 -1
- package/dist/esm/requests/rate-limits.shared.schemas.js +11 -1
- package/dist/esm/requests/rate-limits.shared.schemas.js.map +1 -1
- package/dist/esm/requests/websocket.shared.schemas.d.ts +86 -4
- package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
- package/dist/esm/requests/websocket.shared.schemas.js +138 -0
- package/dist/esm/requests/websocket.shared.schemas.js.map +1 -1
- package/dist/esm/resources/collection-query-parameters.shared.d.ts +22 -0
- package/dist/esm/resources/collection-query-parameters.shared.d.ts.map +1 -0
- package/dist/esm/resources/collection-query-parameters.shared.js +22 -0
- package/dist/esm/resources/collection-query-parameters.shared.js.map +1 -0
- package/dist/esm/resources/resources-config.shared.factory.d.ts +1 -0
- package/dist/esm/resources/resources-config.shared.factory.d.ts.map +1 -1
- package/dist/esm/resources/resources-config.shared.factory.js +189 -31
- package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
- package/dist/esm/resources/resources-config.shared.schemas.d.ts +395 -92
- package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources-config.shared.schemas.js +109 -20
- package/dist/esm/resources/resources-config.shared.schemas.js.map +1 -1
- package/dist/esm/resources/resources-registry.shared.core.definitions.d.ts.map +1 -1
- package/dist/esm/resources/resources-registry.shared.core.definitions.js +97 -5
- package/dist/esm/resources/resources-registry.shared.core.definitions.js.map +1 -1
- package/dist/esm/resources/resources-relationships.shared.factory.d.ts.map +1 -1
- package/dist/esm/resources/resources-relationships.shared.factory.js +15 -0
- package/dist/esm/resources/resources-relationships.shared.factory.js.map +1 -1
- package/dist/esm/resources/resources.shared.core.definitions.d.ts +37 -0
- package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.core.definitions.js +51 -0
- package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
- package/dist/esm/resources/resources.shared.schemas.d.ts +11 -2
- package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.schemas.js +34 -3
- package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
- package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts +51 -0
- package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts.map +1 -0
- package/dist/esm/resources/utils/field-value-disclosure.utils.js +53 -0
- package/dist/esm/resources/utils/field-value-disclosure.utils.js.map +1 -0
- package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js +21 -6
- package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js.map +1 -1
- package/dist/esm/resources/utils/resources-summary.utils.d.ts +16 -2
- package/dist/esm/resources/utils/resources-summary.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-summary.utils.js +19 -5
- package/dist/esm/resources/utils/resources-summary.utils.js.map +1 -1
- package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/shared-persistence-collection.utils.js +11 -0
- package/dist/esm/resources/utils/shared-persistence-collection.utils.js.map +1 -1
- package/dist/esm/runtime/domain-module.shared.definitions.d.ts +25 -0
- package/dist/esm/runtime/domain-module.shared.definitions.d.ts.map +1 -1
- package/dist/esm/runtime/domain-module.shared.definitions.js.map +1 -1
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts +1 -0
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js +38 -0
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts +1 -0
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js +38 -0
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts +4 -11
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.js +0 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.schemas.d.ts +141 -5
- package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.schemas.js +147 -3
- package/dist/esm/security/authentications/authentication.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts +17 -1
- package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/consumable-token.shared.schemas.js +16 -0
- package/dist/esm/security/authentications/consumable-token.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/mfa-backup-code-contract.shared.d.ts +28 -0
- package/dist/esm/security/authentications/mfa-backup-code-contract.shared.d.ts.map +1 -0
- package/dist/esm/security/authentications/mfa-backup-code-contract.shared.js +28 -0
- package/dist/esm/security/authentications/mfa-backup-code-contract.shared.js.map +1 -0
- package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts +1 -0
- package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/registration.shared.dto.schemas.js +11 -0
- package/dist/esm/security/authentications/registration.shared.dto.schemas.js.map +1 -1
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts +15 -0
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js +21 -4
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.d.ts +21 -0
- package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.d.ts.map +1 -0
- package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.js +21 -0
- package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.js.map +1 -0
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts +61 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js +208 -6
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts +37 -27
- package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js +134 -12
- package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts +0 -6
- package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js +17 -8
- package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.d.ts +1 -1
- package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js +70 -0
- package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts +45 -8
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js +56 -10
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.schemas.d.ts +16 -1
- package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.schemas.js +16 -1
- package/dist/esm/security/authorizations/roles.shared.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.utils.d.ts +54 -0
- package/dist/esm/security/authorizations/roles.shared.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.utils.js +59 -0
- package/dist/esm/security/authorizations/roles.shared.utils.js.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts +31 -0
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js +198 -0
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts +31 -0
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js +191 -0
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts +250 -0
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js +486 -0
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -0
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts +4 -1
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js +29 -0
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts +4 -1
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js +29 -0
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts +67 -0
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js +44 -1
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.d.ts +1 -1
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.js +35 -0
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts +13 -0
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js +31 -4
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js.map +1 -1
- package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts +1 -1
- package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js +34 -0
- package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/inbound-contacts.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/inbound-contacts.shared.schemas.js +7 -4
- package/dist/esm/users/inbound-contacts.shared.schemas.js.map +1 -1
- package/dist/esm/users/user-credentials.shared.resources-config.schemas.d.ts +1 -1
- package/dist/esm/users/user-credentials.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-credentials.shared.resources-config.schemas.js +37 -0
- package/dist/esm/users/user-credentials.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/user-credentials.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-credentials.shared.schemas.js +17 -2
- package/dist/esm/users/user-credentials.shared.schemas.js.map +1 -1
- package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts +1 -1
- package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-identity-links.shared.resources-config.schemas.js +36 -0
- package/dist/esm/users/user-identity-links.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/user-identity-links.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-identity-links.shared.schemas.js +15 -5
- package/dist/esm/users/user-identity-links.shared.schemas.js.map +1 -1
- package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts +5 -5
- package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-preferences.shared.resources-config.schemas.js +53 -0
- package/dist/esm/users/user-preferences.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts +1 -1
- package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-profiles.shared.resources-config.schemas.js +62 -0
- package/dist/esm/users/user-profiles.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts +5 -5
- package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.js +53 -0
- package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.d.ts +1 -1
- package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.js +62 -0
- package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self.shared.resources-config.schemas.js +33 -3
- package/dist/esm/users/user-self.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/users.shared.resources-config.schemas.d.ts +17 -1
- package/dist/esm/users/users.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/users.shared.resources-config.schemas.js +136 -5
- package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/users.shared.schemas.d.ts +62 -12
- package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/users.shared.schemas.js +79 -23
- package/dist/esm/users/users.shared.schemas.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +5 -6
- package/dist/esm/.builder.pid +0 -9
|
@@ -15,17 +15,11 @@ export declare const DomainVerificationStatus: {
|
|
|
15
15
|
readonly FAILED: "failed";
|
|
16
16
|
readonly EXPIRED: "expired";
|
|
17
17
|
};
|
|
18
|
-
export declare const SSOAuditLevel: {
|
|
19
|
-
readonly MINIMAL: "minimal";
|
|
20
|
-
readonly STANDARD: "standard";
|
|
21
|
-
readonly VERBOSE: "verbose";
|
|
22
|
-
};
|
|
23
18
|
export declare const SsoConfigBaseSchema: z.ZodObject<{
|
|
24
19
|
_id: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodString>>;
|
|
25
20
|
enforcement: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodObject<{
|
|
26
21
|
requireSSO: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodBoolean>>;
|
|
27
22
|
allowPasswordFallback: z.ZodDefault<z.ZodBoolean>;
|
|
28
|
-
enforceForAdmins: z.ZodDefault<z.ZodBoolean>;
|
|
29
23
|
graceLoginAttempts: z.ZodDefault<z.ZodNumber>;
|
|
30
24
|
}, z.core.$strip>>>;
|
|
31
25
|
domains: z.ZodObject<{
|
|
@@ -33,12 +27,12 @@ export declare const SsoConfigBaseSchema: z.ZodObject<{
|
|
|
33
27
|
ssoEnabledDomains: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodArray<z.ZodString>>>;
|
|
34
28
|
domainHinting: z.ZodDefault<z.ZodBoolean>;
|
|
35
29
|
allowExternalDomains: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodBoolean>>;
|
|
36
|
-
domainVerificationStatus: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
30
|
+
domainVerificationStatus: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
37
31
|
readonly PENDING: "pending";
|
|
38
32
|
readonly VERIFIED: "verified";
|
|
39
33
|
readonly FAILED: "failed";
|
|
40
34
|
readonly EXPIRED: "expired";
|
|
41
|
-
}
|
|
35
|
+
}>>>>;
|
|
42
36
|
domainVerificationTokens: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
43
37
|
}, z.core.$strip>;
|
|
44
38
|
provisioning: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodObject<{
|
|
@@ -64,14 +58,7 @@ export declare const SsoConfigBaseSchema: z.ZodObject<{
|
|
|
64
58
|
}, z.core.$strip>>;
|
|
65
59
|
emergencyAccess: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodObject<{
|
|
66
60
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
67
|
-
breakGlassAccounts: z.ZodDefault<z.ZodArray<z.
|
|
68
|
-
requireApproval: z.ZodDefault<z.ZodBoolean>;
|
|
69
|
-
maxDurationHours: z.ZodDefault<z.ZodNumber>;
|
|
70
|
-
auditLevel: z.ZodDefault<z.ZodEnum<{
|
|
71
|
-
readonly MINIMAL: "minimal";
|
|
72
|
-
readonly STANDARD: "standard";
|
|
73
|
-
readonly VERBOSE: "verbose";
|
|
74
|
-
}>>;
|
|
61
|
+
breakGlassAccounts: z.ZodDefault<z.ZodArray<z.ZodEmail>>;
|
|
75
62
|
}, z.core.$strip>>;
|
|
76
63
|
oauth2ProviderRestrictions: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodObject<{
|
|
77
64
|
allowedProviders: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -89,12 +76,42 @@ export declare const SsoConfigBaseSchema: z.ZodObject<{
|
|
|
89
76
|
updatedAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodDate>>>;
|
|
90
77
|
}, z.core.$strip>;
|
|
91
78
|
export type SsoConfigBase = z.infer<typeof SsoConfigBaseSchema>;
|
|
79
|
+
/**
|
|
80
|
+
* The domains this organization has actually VERIFIED — the join `verifiedDomains` does not carry.
|
|
81
|
+
*
|
|
82
|
+
* ## Why this exists rather than five correct joins
|
|
83
|
+
*
|
|
84
|
+
* The stored list holds CLAIMED domains, so safety depends on every reader filtering it by
|
|
85
|
+
* `domainVerificationStatus`. Measured 2026-09-08, **five** reader sites did that by hand — the SCIM
|
|
86
|
+
* controller, the SCIM virtual field, the domain-verification service, and the domain-to-org lookup
|
|
87
|
+
* TWICE — and a sixth, `getDomains`, did not. It returned the raw list under the name `verified`.
|
|
88
|
+
*
|
|
89
|
+
* That is `.claude/rules/invariant-call-site-enumeration.md`'s exact shape: an invariant hand-applied
|
|
90
|
+
* at N sites, where the next site is the one that forgets. It had already happened; it was harmless
|
|
91
|
+
* only because that reader had no consumer — and claiming a domain is now reachable by tenants
|
|
92
|
+
* through `SsoConfig_Operations.CLAIM_DOMAIN` (#424), so the margin that made it harmless is gone.
|
|
93
|
+
*
|
|
94
|
+
* So the join is computed ONCE, here, beside the field it corrects. A new reader that reaches for
|
|
95
|
+
* the verified set finds this; one that reaches for the raw array finds the warning on the field.
|
|
96
|
+
*
|
|
97
|
+
* Takes the shape structurally rather than `SsoConfigBase` so a caller holding a partial config, a
|
|
98
|
+
* DTO or a lean document can use it — the three existing shapes at the call sites — without the
|
|
99
|
+
* helper forcing a cast at every one of them.
|
|
100
|
+
*/
|
|
101
|
+
export declare function resolveVerifiedDomains(domains: {
|
|
102
|
+
readonly verifiedDomains?: readonly string[];
|
|
103
|
+
readonly domainVerificationStatus?: Readonly<Record<string, string>>;
|
|
104
|
+
} | undefined): string[];
|
|
105
|
+
/** Whether ONE domain is verified for this organization. The single-domain form of the join. */
|
|
106
|
+
export declare function isDomainVerified(domains: {
|
|
107
|
+
readonly verifiedDomains?: readonly string[];
|
|
108
|
+
readonly domainVerificationStatus?: Readonly<Record<string, string>>;
|
|
109
|
+
} | undefined, domain: string): boolean;
|
|
92
110
|
export declare const ssoConfigPolymorphicDeclaration: import("../../..").PolymorphicSchemaDeclaration<z.ZodObject<{
|
|
93
111
|
_id: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodString>>;
|
|
94
112
|
enforcement: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodObject<{
|
|
95
113
|
requireSSO: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodBoolean>>;
|
|
96
114
|
allowPasswordFallback: z.ZodDefault<z.ZodBoolean>;
|
|
97
|
-
enforceForAdmins: z.ZodDefault<z.ZodBoolean>;
|
|
98
115
|
graceLoginAttempts: z.ZodDefault<z.ZodNumber>;
|
|
99
116
|
}, z.core.$strip>>>;
|
|
100
117
|
domains: z.ZodObject<{
|
|
@@ -102,12 +119,12 @@ export declare const ssoConfigPolymorphicDeclaration: import("../../..").Polymor
|
|
|
102
119
|
ssoEnabledDomains: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodArray<z.ZodString>>>;
|
|
103
120
|
domainHinting: z.ZodDefault<z.ZodBoolean>;
|
|
104
121
|
allowExternalDomains: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodBoolean>>;
|
|
105
|
-
domainVerificationStatus: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
122
|
+
domainVerificationStatus: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
106
123
|
readonly PENDING: "pending";
|
|
107
124
|
readonly VERIFIED: "verified";
|
|
108
125
|
readonly FAILED: "failed";
|
|
109
126
|
readonly EXPIRED: "expired";
|
|
110
|
-
}
|
|
127
|
+
}>>>>;
|
|
111
128
|
domainVerificationTokens: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
112
129
|
}, z.core.$strip>;
|
|
113
130
|
provisioning: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodObject<{
|
|
@@ -133,14 +150,7 @@ export declare const ssoConfigPolymorphicDeclaration: import("../../..").Polymor
|
|
|
133
150
|
}, z.core.$strip>>;
|
|
134
151
|
emergencyAccess: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodObject<{
|
|
135
152
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
136
|
-
breakGlassAccounts: z.ZodDefault<z.ZodArray<z.
|
|
137
|
-
requireApproval: z.ZodDefault<z.ZodBoolean>;
|
|
138
|
-
maxDurationHours: z.ZodDefault<z.ZodNumber>;
|
|
139
|
-
auditLevel: z.ZodDefault<z.ZodEnum<{
|
|
140
|
-
readonly MINIMAL: "minimal";
|
|
141
|
-
readonly STANDARD: "standard";
|
|
142
|
-
readonly VERBOSE: "verbose";
|
|
143
|
-
}>>;
|
|
153
|
+
breakGlassAccounts: z.ZodDefault<z.ZodArray<z.ZodEmail>>;
|
|
144
154
|
}, z.core.$strip>>;
|
|
145
155
|
oauth2ProviderRestrictions: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodObject<{
|
|
146
156
|
allowedProviders: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sso-config.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../../../src/security/authentications/sso/sso-config.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,wBAAwB;;;;;CAK3B,CAAC;AAEX,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"sso-config.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../../../src/security/authentications/sso/sso-config.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,wBAAwB;;;;;CAK3B,CAAC;AAEX,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoO9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE;IAC9C,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7C,QAAQ,CAAC,wBAAwB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACtE,GAAG,SAAS,GAAG,MAAM,EAAE,CAKvB;AAED,gGAAgG;AAChG,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE;IACP,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7C,QAAQ,CAAC,wBAAwB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACtE,GAAG,SAAS,EACb,MAAM,EAAE,MAAM,GACb,OAAO,CAGT;AAED,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAM1C,CAAC"}
|
|
@@ -17,11 +17,6 @@ export const DomainVerificationStatus = {
|
|
|
17
17
|
FAILED: 'failed',
|
|
18
18
|
EXPIRED: 'expired',
|
|
19
19
|
};
|
|
20
|
-
export const SSOAuditLevel = {
|
|
21
|
-
MINIMAL: 'minimal',
|
|
22
|
-
STANDARD: 'standard',
|
|
23
|
-
VERBOSE: 'verbose',
|
|
24
|
-
};
|
|
25
20
|
export const SsoConfigBaseSchema = z.object({
|
|
26
21
|
_id: z.string().min(1).isPrimaryKey().isSummaryField(),
|
|
27
22
|
// ── `.isAuditEvidence()` on the authentication-authority blocks ──────────────────────────────
|
|
@@ -39,10 +34,27 @@ export const SsoConfigBaseSchema = z.object({
|
|
|
39
34
|
//
|
|
40
35
|
// assurance-control: WILDO.IDENTITY.SESSION_ASSURANCE — SSO enforcement decides how principals are
|
|
41
36
|
// permitted to authenticate at all.
|
|
37
|
+
//
|
|
38
|
+
// `enforceForAdmins` was REMOVED here (#481). It said "this tenant's SSO requirement also binds
|
|
39
|
+
// its administrators", defaulted `true`, and was read by nothing — so an operator who set it
|
|
40
|
+
// `false` believed their administrators had a way in when the IdP broke, and they did not.
|
|
41
|
+
//
|
|
42
|
+
// It was not reimplemented, because a ROLE is the wrong unit for an authentication bypass. Role
|
|
43
|
+
// membership changes, and a standing exemption for "whoever is an admin" means compromising one
|
|
44
|
+
// administrator and promoting an account silently grants an SSO bypass to the promoted one.
|
|
45
|
+
// Microsoft Entra's emergency-access guidance is explicit about the alternative — exclude a small
|
|
46
|
+
// NAMED set through a dedicated group, never a role — and that is what `emergencyAccess` below
|
|
47
|
+
// now does. Google Workspace does take the role-shaped route for its super administrators; it was
|
|
48
|
+
// considered and rejected here for the escalation path above.
|
|
49
|
+
//
|
|
50
|
+
// spec-cite: Microsoft Entra ID — "Manage emergency access admin accounts"
|
|
51
|
+
// (https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/security-emergency-access),
|
|
52
|
+
// "Conditional Access considerations": create a dedicated security group for the emergency access
|
|
53
|
+
// accounts and exclude THAT from policies. The reading that a role is the wrong unit is this
|
|
54
|
+
// repository's, not a quotation.
|
|
42
55
|
enforcement: z.object({
|
|
43
56
|
requireSSO: z.boolean().default(false).isSummaryField(),
|
|
44
57
|
allowPasswordFallback: z.boolean().default(true),
|
|
45
|
-
enforceForAdmins: z.boolean().default(true),
|
|
46
58
|
graceLoginAttempts: z.number().min(0).max(10).default(3),
|
|
47
59
|
}).isSummaryField().isAuditEvidence(),
|
|
48
60
|
// NOT marked, deliberately: this block carries `domainVerificationTokens`, which is
|
|
@@ -55,11 +67,49 @@ export const SsoConfigBaseSchema = z.object({
|
|
|
55
67
|
// Read this before marking any other container: a block is safe to mark WHOLESALE only when no
|
|
56
68
|
// descendant is `.isBackendOnly()` or personal data.
|
|
57
69
|
domains: z.object({
|
|
70
|
+
/**
|
|
71
|
+
* Every domain this organization has CLAIMED — verified and unverified alike.
|
|
72
|
+
*
|
|
73
|
+
* ⚠️ The name asserts more than the field holds. `initiateDomainVerification` pushes a domain
|
|
74
|
+
* here at CLAIM time with `domainVerificationStatus[domain] = 'pending'`, so membership means
|
|
75
|
+
* "somebody asked", never "we checked". The real answer is the join with that map, and
|
|
76
|
+
* `resolveVerifiedDomains` below is the only place it should be computed (#457).
|
|
77
|
+
*
|
|
78
|
+
* **Do not read this array directly.** A reader that does gets pending, failed and expired
|
|
79
|
+
* domains under a name that says otherwise — which `AuthOrganizationConfigurationService
|
|
80
|
+
* .getDomains` did, returning them as `verified`, with no consumer to notice.
|
|
81
|
+
*
|
|
82
|
+
* The field was NOT renamed to `claimedDomains`, and that is a decision rather than an
|
|
83
|
+
* omission: it is persisted on every SSO config row of both dogfood applications, so the rename
|
|
84
|
+
* is a schema change plus a data migration for a field whose every reader now goes through the
|
|
85
|
+
* helper. The name is no longer what a new reader reaches.
|
|
86
|
+
*/
|
|
58
87
|
verifiedDomains: z.array(z.string()).default([]).isAuditEvidence(),
|
|
59
88
|
ssoEnabledDomains: z.array(z.string()).default([]).isAuditEvidence(),
|
|
60
89
|
domainHinting: z.boolean().default(true),
|
|
61
90
|
allowExternalDomains: z.boolean().default(false).isAuditEvidence(),
|
|
62
|
-
|
|
91
|
+
/**
|
|
92
|
+
* The half of the join that decides routing authority — and therefore the audit evidence.
|
|
93
|
+
*
|
|
94
|
+
* Marked individually rather than through the containing `domains` block, for the reason that
|
|
95
|
+
* block's own comment gives: a whole-object mark would copy `domainVerificationTokens` into the
|
|
96
|
+
* immutable ledger. This map holds domain names and one of four statuses — no secret, no
|
|
97
|
+
* personal data — and it is the only field that answers the question an auditor asks about a
|
|
98
|
+
* domain workflow: WHICH domain became verified, and when did it stop being verified.
|
|
99
|
+
*
|
|
100
|
+
* Without it the trail records `domains` as a changed field name and nothing more, which cannot
|
|
101
|
+
* distinguish "a tenant claimed a domain" from "a tenant gained SSO routing control over every
|
|
102
|
+
* address at it".
|
|
103
|
+
*/
|
|
104
|
+
domainVerificationStatus: z.record(z.string(), z.enum(DomainVerificationStatus)).default({}).isAuditEvidence(),
|
|
105
|
+
/**
|
|
106
|
+
* The DNS-TXT challenge nonce per claimed domain. `.isBackendOnly()` — never leaves the backend
|
|
107
|
+
* through a resource READ, and never enters the audit trail (see the block comment above).
|
|
108
|
+
*
|
|
109
|
+
* The one place its value is disclosed is the response to `claimDomain`, which returns it once
|
|
110
|
+
* as an `.isEphemeral()` field, because the operator cannot publish a record they cannot see.
|
|
111
|
+
* A lost token is recovered by claiming again, which mints a new one — there is no re-read.
|
|
112
|
+
*/
|
|
63
113
|
domainVerificationTokens: z.record(z.string(), z.string()).default({}).isBackendOnly(),
|
|
64
114
|
}),
|
|
65
115
|
provisioning: z.object({
|
|
@@ -87,13 +137,54 @@ export const SsoConfigBaseSchema = z.object({
|
|
|
87
137
|
complianceReporting: z.boolean().default(false),
|
|
88
138
|
retentionDays: z.number().min(1).max(2555).default(365),
|
|
89
139
|
}).isAuditEvidence(),
|
|
90
|
-
|
|
140
|
+
/**
|
|
141
|
+
* Break-glass: the named accounts that may still sign in with a password when the identity
|
|
142
|
+
* provider cannot be reached.
|
|
143
|
+
*
|
|
144
|
+
* Every field here is READ at runtime. It carried three more — `requireApproval`,
|
|
145
|
+
* `maxDurationHours` and `auditLevel` — and all three were removed with `enforceForAdmins` (#481,
|
|
146
|
+
* #423) rather than implemented, for reasons worth keeping:
|
|
147
|
+
*
|
|
148
|
+
* - **`requireApproval` cannot exist on this path.** Break-glass is the door for the case where
|
|
149
|
+
* nobody can act; an approval step means the approver may be locked out too, which is the
|
|
150
|
+
* deadlock the door exists to break. Entra's guidance asks for monitoring and a post-mortem
|
|
151
|
+
* after each use, never for prior approval.
|
|
152
|
+
* - **`maxDurationHours`** describes a bounded break-glass SESSION, which is a real control and
|
|
153
|
+
* is not built. A field that names a control nobody enforces is exactly what this issue was
|
|
154
|
+
* about, so it is absent until the session cap exists.
|
|
155
|
+
* - **`auditLevel`** could not change anything: `EMERGENCY_ACCESS_USED` is CRITICAL in
|
|
156
|
+
* `SECURITY_AUDIT_EVENT_ENVELOPE`, and a per-tenant knob that lowers the severity of a
|
|
157
|
+
* privileged-access record is not a setting a tenant should have.
|
|
158
|
+
*
|
|
159
|
+
* ## What a listed account gets, and what it does not
|
|
160
|
+
*
|
|
161
|
+
* A listed account is exempt from the SSO enforcement refusal — including grace exhaustion — and
|
|
162
|
+
* nothing else. It authenticates with the same password, against the same lockout counters and
|
|
163
|
+
* the same rate limits, and every use emits `EMERGENCY_ACCESS_USED` at CRITICAL.
|
|
164
|
+
*
|
|
165
|
+
* ## Why the whole TENANT keeps a password field when this list is non-empty
|
|
166
|
+
*
|
|
167
|
+
* The sign-in surface must not depend on the account, or the offered methods become an oracle for
|
|
168
|
+
* "is this address a break-glass account". So `requiresEnterpriseSsoOnly` answers false for the
|
|
169
|
+
* whole tenant while this list is non-empty: everyone at the domain sees a password field, and
|
|
170
|
+
* everyone not on the list is refused AFTER presenting a correct credential. The cost is a
|
|
171
|
+
* password field that only two accounts can use; the alternative discloses who they are.
|
|
172
|
+
*
|
|
173
|
+
* assurance-control: WILDO.IDENTITY.SESSION_ASSURANCE — the authenticated bypass of this tenant's
|
|
174
|
+
* own authentication requirement.
|
|
175
|
+
*/
|
|
91
176
|
emergencyAccess: z.object({
|
|
177
|
+
/** Off switch. `true` with an empty list grants nothing — the list is what confers the bypass. */
|
|
92
178
|
enabled: z.boolean().default(true),
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
179
|
+
/**
|
|
180
|
+
* The email addresses that may bypass SSO enforcement. An authority LIST: adding an entry grants
|
|
181
|
+
* a standing password path into a tenant that has otherwise required SSO.
|
|
182
|
+
*
|
|
183
|
+
* Keep it SMALL and keep it reviewed. Entra asks for at least two (redundancy), credentials
|
|
184
|
+
* stored apart from any individual, and a validation drill every 90 days; none of that is
|
|
185
|
+
* enforceable from here, and all of it is what makes this list safe to have.
|
|
186
|
+
*/
|
|
187
|
+
breakGlassAccounts: z.array(z.email()).default([]),
|
|
97
188
|
}).isAuditEvidence(),
|
|
98
189
|
oauth2ProviderRestrictions: z.object({
|
|
99
190
|
allowedProviders: z.array(z.string()).default([]),
|
|
@@ -143,6 +234,37 @@ export const SsoConfigBaseSchema = z.object({
|
|
|
143
234
|
createdAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),
|
|
144
235
|
updatedAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),
|
|
145
236
|
});
|
|
237
|
+
/**
|
|
238
|
+
* The domains this organization has actually VERIFIED — the join `verifiedDomains` does not carry.
|
|
239
|
+
*
|
|
240
|
+
* ## Why this exists rather than five correct joins
|
|
241
|
+
*
|
|
242
|
+
* The stored list holds CLAIMED domains, so safety depends on every reader filtering it by
|
|
243
|
+
* `domainVerificationStatus`. Measured 2026-09-08, **five** reader sites did that by hand — the SCIM
|
|
244
|
+
* controller, the SCIM virtual field, the domain-verification service, and the domain-to-org lookup
|
|
245
|
+
* TWICE — and a sixth, `getDomains`, did not. It returned the raw list under the name `verified`.
|
|
246
|
+
*
|
|
247
|
+
* That is `.claude/rules/invariant-call-site-enumeration.md`'s exact shape: an invariant hand-applied
|
|
248
|
+
* at N sites, where the next site is the one that forgets. It had already happened; it was harmless
|
|
249
|
+
* only because that reader had no consumer — and claiming a domain is now reachable by tenants
|
|
250
|
+
* through `SsoConfig_Operations.CLAIM_DOMAIN` (#424), so the margin that made it harmless is gone.
|
|
251
|
+
*
|
|
252
|
+
* So the join is computed ONCE, here, beside the field it corrects. A new reader that reaches for
|
|
253
|
+
* the verified set finds this; one that reaches for the raw array finds the warning on the field.
|
|
254
|
+
*
|
|
255
|
+
* Takes the shape structurally rather than `SsoConfigBase` so a caller holding a partial config, a
|
|
256
|
+
* DTO or a lean document can use it — the three existing shapes at the call sites — without the
|
|
257
|
+
* helper forcing a cast at every one of them.
|
|
258
|
+
*/
|
|
259
|
+
export function resolveVerifiedDomains(domains) {
|
|
260
|
+
const status = domains?.domainVerificationStatus ?? {};
|
|
261
|
+
return (domains?.verifiedDomains ?? []).filter(domain => status[domain] === DomainVerificationStatus.VERIFIED);
|
|
262
|
+
}
|
|
263
|
+
/** Whether ONE domain is verified for this organization. The single-domain form of the join. */
|
|
264
|
+
export function isDomainVerified(domains, domain) {
|
|
265
|
+
return (domains?.verifiedDomains ?? []).includes(domain)
|
|
266
|
+
&& domains?.domainVerificationStatus?.[domain] === DomainVerificationStatus.VERIFIED;
|
|
267
|
+
}
|
|
146
268
|
export const ssoConfigPolymorphicDeclaration = declarePolymorphicSchemas({
|
|
147
269
|
baseResourceType: 'ssoConfig',
|
|
148
270
|
baseFieldIdentifier: 'ssoConfigId',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sso-config.shared.schemas.js","sourceRoot":"","sources":["../../../../../../src/security/authentications/sso/sso-config.shared.schemas.ts"],"names":[],"mappings":"AAAA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,\n * session settings, emergency access. Policy/settings layer only —\n * provider connections are a separate resource (SsoConnection).\n * Scope FK (organizationId / applicationId) is injected by the polymorphism engine.\n *\n * @see auth-data-model-audit.md §2A\n */\n\nimport { z } from 'zod';\nimport { AUTH_SCOPE_VARIANTS } from '../authentication.shared.schemas';\nimport { declarePolymorphicSchemas } from '../../../resources/utils/resource-polymorphism.schemas';\n\nexport const DomainVerificationStatus = {\n PENDING: 'pending',\n VERIFIED: 'verified',\n FAILED: 'failed',\n EXPIRED: 'expired',\n} as const;\n\nexport const SSOAuditLevel = {\n MINIMAL: 'minimal',\n STANDARD: 'standard',\n VERBOSE: 'verbose',\n} as const;\n\nexport const SsoConfigBaseSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n\n // ── `.isAuditEvidence()` on the authentication-authority blocks ──────────────────────────────\n // Every block below decides WHO may authenticate into this tenant and with what standing, so a\n // change to one is an authorization change even though no role is named: weakening `requireSSO`,\n // re-enabling `allowPasswordFallback`, granting a `defaultRole` on auto-provision, or adding a\n // break-glass account each widen access tenant-wide. The generic resource-operation audit event\n // records the changed field NAMES for free; the marker is what makes the before/after VALUES\n // survive, and without values \"someone changed the SSO enforcement\" proves nothing.\n //\n // These are configuration flags, domains and role names — NOT personal data — so recording their\n // values does not conflict with the Art. 5(1)(c) / Art. 17 minimisation reasoning that keeps\n // user-identifying fields unmarked (audit rows replicate to an immutable ledger that cannot be\n // scrubbed).\n //\n // assurance-control: WILDO.IDENTITY.SESSION_ASSURANCE — SSO enforcement decides how principals are\n // permitted to authenticate at all.\n enforcement: z.object({\n requireSSO: z.boolean().default(false).isSummaryField(),\n allowPasswordFallback: z.boolean().default(true),\n enforceForAdmins: z.boolean().default(true),\n graceLoginAttempts: z.number().min(0).max(10).default(3),\n }).isSummaryField().isAuditEvidence(),\n\n // NOT marked, deliberately: this block carries `domainVerificationTokens`, which is\n // `.isBackendOnly()` — a SECRET. `.isAuditEvidence()` on a parent object records the WHOLE object\n // before/after, so marking `domains` would copy live verification tokens into audit rows that\n // replicate to the immutable ledger and to every configured SIEM sink. The security-relevant\n // sub-fields (`ssoEnabledDomains`, `allowExternalDomains`) are marked individually instead, which\n // keeps the secret out by construction rather than by reviewer vigilance.\n //\n // Read this before marking any other container: a block is safe to mark WHOLESALE only when no\n // descendant is `.isBackendOnly()` or personal data.\n domains: z.object({\n verifiedDomains: z.array(z.string()).default([]).isAuditEvidence(),\n ssoEnabledDomains: z.array(z.string()).default([]).isAuditEvidence(),\n domainHinting: z.boolean().default(true),\n allowExternalDomains: z.boolean().default(false).isAuditEvidence(),\n domainVerificationStatus: z.record(z.string(), z.enum(DomainVerificationStatus)).default({}),\n domainVerificationTokens: z.record(z.string(), z.string()).default({}).isBackendOnly(),\n }),\n\n provisioning: z.object({\n autoCreateUsers: z.boolean().default(true),\n autoUpdateUsers: z.boolean().default(true),\n autoDeactivateUsers: z.boolean().default(false),\n defaultRole: z.string().optional(),\n requiredAttributes: z.array(z.string()).default(['email']),\n syncFrequencyHours: z.number().min(1).max(168).default(24),\n }).isAuditEvidence(),\n\n sessionSettings: z.object({\n ssoSessionDurationMinutes: z.number().min(15).max(1440).default(480),\n requireReauthForSensitive: z.boolean().default(true),\n singleLogoutEnabled: z.boolean().default(true),\n maxConcurrentSessions: z.number().min(1).max(50).default(5),\n }).isAuditEvidence(),\n\n // Marked because this block governs the AUDIT TRAIL ITSELF — disabling `logAllSSOEvents` or\n // shortening `retentionDays` is the classic pre-incident tampering move, and it must not be the\n // one change the trail cannot evidence.\n // assurance-control: WILDO.AUDIT.EVIDENCE_INTEGRITY — this block governs the audit trail itself.\n auditConfig: z.object({\n logAllSSOEvents: z.boolean().default(true),\n logProviderSwitching: z.boolean().default(true),\n logRoleMapping: z.boolean().default(true),\n complianceReporting: z.boolean().default(false),\n retentionDays: z.number().min(1).max(2555).default(365),\n }).isAuditEvidence(),\n\n // `breakGlassAccounts` is an authority LIST — adding an entry grants emergency bypass.\n emergencyAccess: z.object({\n enabled: z.boolean().default(true),\n breakGlassAccounts: z.array(z.string()).default([]),\n requireApproval: z.boolean().default(true),\n maxDurationHours: z.number().min(1).max(72).default(24),\n auditLevel: z.enum(SSOAuditLevel).default(SSOAuditLevel.VERBOSE),\n }).isAuditEvidence(),\n\n oauth2ProviderRestrictions: z.object({\n allowedProviders: z.array(z.string()).default([]),\n blockedProviders: z.array(z.string()).default([]),\n requireEnterpriseSSOOnly: z.boolean().default(false),\n }).isAuditEvidence(),\n\n /**\n * Per-scope social provider credential overrides (P3).\n *\n * By default, social providers (Google, GitHub, Apple, etc.) use platform-level\n * OAuth2 credentials from AppConfiguration. This array lets an org/app override\n * those with their own registered OAuth2 app at the identity provider.\n *\n * Only `clientId` + `clientSecret` are needed for most providers — the OAuth2\n * endpoints, scopes, and profile mapping still come from the provider catalog.\n *\n * `signedJwtKeyId` / `signedJwtTeamId` are required only for providers that use\n * signed-JWT client secrets (e.g. Apple Sign-In, where the \"client secret\" is a\n * short-lived JWT signed with a private key). These correspond to the Apple\n * Developer Team ID and Key ID that are bound to the private key.\n * When omitted, the app-level values from the secrets store are used.\n *\n * Secret handling (two distinct contracts, on purpose):\n * - `clientSecret` is `.isWriteOnlySecret()` — the operator sets/rotates it, so it\n * stays writable AND stays in the response DTO where the framework redacts it to\n * `••••••••` at the client boundary. Internal reads (`resolveSocialConnection`\n * via `readAsSystem`) keep the real value.\n * - `signedJwtKeyId` / `signedJwtTeamId` are `.isBackendOnly()` — never sent to the\n * frontend at all (stripped from every client DTO).\n *\n * Because these secrets live inside an ARRAY, neither the central write-only-secret\n * sentinel-strip NOR a whole-array `$set` preserves them on save: the repository\n * replaces the entire array with no deep merge. The UPDATE custom-impl therefore\n * matches each incoming override to the stored record by `providerRef` and\n * re-injects any secret that arrived absent or as the `••••••••` mask.\n *\n * @see oauth2-connection-resolver — resolveSocialConnection() steps 5b/5c\n * @see sso-config.custom-impl — prefixCoreOperations UPDATE handler\n */\n socialCredentialOverrides: z.array(z.object({\n providerRef: z.string().min(1),\n clientId: z.string().min(1),\n clientSecret: z.string().min(1).isWriteOnlySecret(),\n signedJwtKeyId: z.string().optional().isBackendOnly(),\n signedJwtTeamId: z.string().optional().isBackendOnly(),\n })).default([]).refine(\n (arr) => new Set(arr.map(o => o.providerRef)).size === arr.length,\n { message: 'Duplicate providerRef in socialCredentialOverrides' },\n ),\n\n createdAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),\n});\n\nexport type SsoConfigBase = z.infer<typeof SsoConfigBaseSchema>;\n\nexport const ssoConfigPolymorphicDeclaration = declarePolymorphicSchemas({\n baseResourceType: 'ssoConfig',\n baseFieldIdentifier: 'ssoConfigId',\n baseEnumKey: 'SSO_CONFIG',\n baseSchema: SsoConfigBaseSchema,\n variants: AUTH_SCOPE_VARIANTS,\n});\n"]}
|
|
1
|
+
{"version":3,"file":"sso-config.shared.schemas.js","sourceRoot":"","sources":["../../../../../../src/security/authentications/sso/sso-config.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,wDAAwD,CAAC;AAEnG,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;CACV,CAAC;AAEX,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE;IAEtD,gGAAgG;IAChG,+FAA+F;IAC/F,iGAAiG;IACjG,+FAA+F;IAC/F,gGAAgG;IAChG,6FA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EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;IACrF,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;CACtF,CAAC,CAAC;AAIH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAG1B;IACX,MAAM,MAAM,GAAG,OAAO,EAAE,wBAAwB,IAAI,EAAE,CAAC;IACvD,OAAO,CAAC,OAAO,EAAE,eAAe,IAAI,EAAE,CAAC,CAAC,MAAM,CAC5C,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,wBAAwB,CAAC,QAAQ,CAC/D,CAAC;AACJ,CAAC;AAED,gGAAgG;AAChG,MAAM,UAAU,gBAAgB,CAC9B,OAGa,EACb,MAAc;IAEd,OAAO,CAAC,OAAO,EAAE,eAAe,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC;WACnD,OAAO,EAAE,wBAAwB,EAAE,CAAC,MAAM,CAAC,KAAK,wBAAwB,CAAC,QAAQ,CAAC;AACzF,CAAC;AAED,MAAM,CAAC,MAAM,+BAA+B,GAAG,yBAAyB,CAAC;IACvE,gBAAgB,EAAE,WAAW;IAC7B,mBAAmB,EAAE,aAAa;IAClC,WAAW,EAAE,YAAY;IACzB,UAAU,EAAE,mBAAmB;IAC/B,QAAQ,EAAE,mBAAmB;CAC9B,CAAC,CAAC","sourcesContent":["/**\n * SSO Config Schema (Shared) — Polymorphic\n *\n * SSO enforcement, domain verification, provider restrictions, provisioning,\n * session settings, emergency access. Policy/settings layer only —\n * provider connections are a separate resource (SsoConnection).\n * Scope FK (organizationId / applicationId) is injected by the polymorphism engine.\n *\n * @see auth-data-model-audit.md §2A\n */\n\nimport { z } from 'zod';\nimport { AUTH_SCOPE_VARIANTS } from '../authentication.shared.schemas';\nimport { declarePolymorphicSchemas } from '../../../resources/utils/resource-polymorphism.schemas';\n\nexport const DomainVerificationStatus = {\n PENDING: 'pending',\n VERIFIED: 'verified',\n FAILED: 'failed',\n EXPIRED: 'expired',\n} as const;\n\nexport const SsoConfigBaseSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n\n // ── `.isAuditEvidence()` on the authentication-authority blocks ──────────────────────────────\n // Every block below decides WHO may authenticate into this tenant and with what standing, so a\n // change to one is an authorization change even though no role is named: weakening `requireSSO`,\n // re-enabling `allowPasswordFallback`, granting a `defaultRole` on auto-provision, or adding a\n // break-glass account each widen access tenant-wide. The generic resource-operation audit event\n // records the changed field NAMES for free; the marker is what makes the before/after VALUES\n // survive, and without values \"someone changed the SSO enforcement\" proves nothing.\n //\n // These are configuration flags, domains and role names — NOT personal data — so recording their\n // values does not conflict with the Art. 5(1)(c) / Art. 17 minimisation reasoning that keeps\n // user-identifying fields unmarked (audit rows replicate to an immutable ledger that cannot be\n // scrubbed).\n //\n // assurance-control: WILDO.IDENTITY.SESSION_ASSURANCE — SSO enforcement decides how principals are\n // permitted to authenticate at all.\n //\n // `enforceForAdmins` was REMOVED here (#481). It said \"this tenant's SSO requirement also binds\n // its administrators\", defaulted `true`, and was read by nothing — so an operator who set it\n // `false` believed their administrators had a way in when the IdP broke, and they did not.\n //\n // It was not reimplemented, because a ROLE is the wrong unit for an authentication bypass. Role\n // membership changes, and a standing exemption for \"whoever is an admin\" means compromising one\n // administrator and promoting an account silently grants an SSO bypass to the promoted one.\n // Microsoft Entra's emergency-access guidance is explicit about the alternative — exclude a small\n // NAMED set through a dedicated group, never a role — and that is what `emergencyAccess` below\n // now does. Google Workspace does take the role-shaped route for its super administrators; it was\n // considered and rejected here for the escalation path above.\n //\n // spec-cite: Microsoft Entra ID — \"Manage emergency access admin accounts\"\n // (https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/security-emergency-access),\n // \"Conditional Access considerations\": create a dedicated security group for the emergency access\n // accounts and exclude THAT from policies. The reading that a role is the wrong unit is this\n // repository's, not a quotation.\n enforcement: z.object({\n requireSSO: z.boolean().default(false).isSummaryField(),\n allowPasswordFallback: z.boolean().default(true),\n graceLoginAttempts: z.number().min(0).max(10).default(3),\n }).isSummaryField().isAuditEvidence(),\n\n // NOT marked, deliberately: this block carries `domainVerificationTokens`, which is\n // `.isBackendOnly()` — a SECRET. `.isAuditEvidence()` on a parent object records the WHOLE object\n // before/after, so marking `domains` would copy live verification tokens into audit rows that\n // replicate to the immutable ledger and to every configured SIEM sink. The security-relevant\n // sub-fields (`ssoEnabledDomains`, `allowExternalDomains`) are marked individually instead, which\n // keeps the secret out by construction rather than by reviewer vigilance.\n //\n // Read this before marking any other container: a block is safe to mark WHOLESALE only when no\n // descendant is `.isBackendOnly()` or personal data.\n domains: z.object({\n /**\n * Every domain this organization has CLAIMED — verified and unverified alike.\n *\n * ⚠️ The name asserts more than the field holds. `initiateDomainVerification` pushes a domain\n * here at CLAIM time with `domainVerificationStatus[domain] = 'pending'`, so membership means\n * \"somebody asked\", never \"we checked\". The real answer is the join with that map, and\n * `resolveVerifiedDomains` below is the only place it should be computed (#457).\n *\n * **Do not read this array directly.** A reader that does gets pending, failed and expired\n * domains under a name that says otherwise — which `AuthOrganizationConfigurationService\n * .getDomains` did, returning them as `verified`, with no consumer to notice.\n *\n * The field was NOT renamed to `claimedDomains`, and that is a decision rather than an\n * omission: it is persisted on every SSO config row of both dogfood applications, so the rename\n * is a schema change plus a data migration for a field whose every reader now goes through the\n * helper. The name is no longer what a new reader reaches.\n */\n verifiedDomains: z.array(z.string()).default([]).isAuditEvidence(),\n ssoEnabledDomains: z.array(z.string()).default([]).isAuditEvidence(),\n domainHinting: z.boolean().default(true),\n allowExternalDomains: z.boolean().default(false).isAuditEvidence(),\n /**\n * The half of the join that decides routing authority — and therefore the audit evidence.\n *\n * Marked individually rather than through the containing `domains` block, for the reason that\n * block's own comment gives: a whole-object mark would copy `domainVerificationTokens` into the\n * immutable ledger. This map holds domain names and one of four statuses — no secret, no\n * personal data — and it is the only field that answers the question an auditor asks about a\n * domain workflow: WHICH domain became verified, and when did it stop being verified.\n *\n * Without it the trail records `domains` as a changed field name and nothing more, which cannot\n * distinguish \"a tenant claimed a domain\" from \"a tenant gained SSO routing control over every\n * address at it\".\n */\n domainVerificationStatus: z.record(z.string(), z.enum(DomainVerificationStatus)).default({}).isAuditEvidence(),\n /**\n * The DNS-TXT challenge nonce per claimed domain. `.isBackendOnly()` — never leaves the backend\n * through a resource READ, and never enters the audit trail (see the block comment above).\n *\n * The one place its value is disclosed is the response to `claimDomain`, which returns it once\n * as an `.isEphemeral()` field, because the operator cannot publish a record they cannot see.\n * A lost token is recovered by claiming again, which mints a new one — there is no re-read.\n */\n domainVerificationTokens: z.record(z.string(), z.string()).default({}).isBackendOnly(),\n }),\n\n provisioning: z.object({\n autoCreateUsers: z.boolean().default(true),\n autoUpdateUsers: z.boolean().default(true),\n autoDeactivateUsers: z.boolean().default(false),\n defaultRole: z.string().optional(),\n requiredAttributes: z.array(z.string()).default(['email']),\n syncFrequencyHours: z.number().min(1).max(168).default(24),\n }).isAuditEvidence(),\n\n sessionSettings: z.object({\n ssoSessionDurationMinutes: z.number().min(15).max(1440).default(480),\n requireReauthForSensitive: z.boolean().default(true),\n singleLogoutEnabled: z.boolean().default(true),\n maxConcurrentSessions: z.number().min(1).max(50).default(5),\n }).isAuditEvidence(),\n\n // Marked because this block governs the AUDIT TRAIL ITSELF — disabling `logAllSSOEvents` or\n // shortening `retentionDays` is the classic pre-incident tampering move, and it must not be the\n // one change the trail cannot evidence.\n // assurance-control: WILDO.AUDIT.EVIDENCE_INTEGRITY — this block governs the audit trail itself.\n auditConfig: z.object({\n logAllSSOEvents: z.boolean().default(true),\n logProviderSwitching: z.boolean().default(true),\n logRoleMapping: z.boolean().default(true),\n complianceReporting: z.boolean().default(false),\n retentionDays: z.number().min(1).max(2555).default(365),\n }).isAuditEvidence(),\n\n /**\n * Break-glass: the named accounts that may still sign in with a password when the identity\n * provider cannot be reached.\n *\n * Every field here is READ at runtime. It carried three more — `requireApproval`,\n * `maxDurationHours` and `auditLevel` — and all three were removed with `enforceForAdmins` (#481,\n * #423) rather than implemented, for reasons worth keeping:\n *\n * - **`requireApproval` cannot exist on this path.** Break-glass is the door for the case where\n * nobody can act; an approval step means the approver may be locked out too, which is the\n * deadlock the door exists to break. Entra's guidance asks for monitoring and a post-mortem\n * after each use, never for prior approval.\n * - **`maxDurationHours`** describes a bounded break-glass SESSION, which is a real control and\n * is not built. A field that names a control nobody enforces is exactly what this issue was\n * about, so it is absent until the session cap exists.\n * - **`auditLevel`** could not change anything: `EMERGENCY_ACCESS_USED` is CRITICAL in\n * `SECURITY_AUDIT_EVENT_ENVELOPE`, and a per-tenant knob that lowers the severity of a\n * privileged-access record is not a setting a tenant should have.\n *\n * ## What a listed account gets, and what it does not\n *\n * A listed account is exempt from the SSO enforcement refusal — including grace exhaustion — and\n * nothing else. It authenticates with the same password, against the same lockout counters and\n * the same rate limits, and every use emits `EMERGENCY_ACCESS_USED` at CRITICAL.\n *\n * ## Why the whole TENANT keeps a password field when this list is non-empty\n *\n * The sign-in surface must not depend on the account, or the offered methods become an oracle for\n * \"is this address a break-glass account\". So `requiresEnterpriseSsoOnly` answers false for the\n * whole tenant while this list is non-empty: everyone at the domain sees a password field, and\n * everyone not on the list is refused AFTER presenting a correct credential. The cost is a\n * password field that only two accounts can use; the alternative discloses who they are.\n *\n * assurance-control: WILDO.IDENTITY.SESSION_ASSURANCE — the authenticated bypass of this tenant's\n * own authentication requirement.\n */\n emergencyAccess: z.object({\n /** Off switch. `true` with an empty list grants nothing — the list is what confers the bypass. */\n enabled: z.boolean().default(true),\n /**\n * The email addresses that may bypass SSO enforcement. An authority LIST: adding an entry grants\n * a standing password path into a tenant that has otherwise required SSO.\n *\n * Keep it SMALL and keep it reviewed. Entra asks for at least two (redundancy), credentials\n * stored apart from any individual, and a validation drill every 90 days; none of that is\n * enforceable from here, and all of it is what makes this list safe to have.\n */\n breakGlassAccounts: z.array(z.email()).default([]),\n }).isAuditEvidence(),\n\n oauth2ProviderRestrictions: z.object({\n allowedProviders: z.array(z.string()).default([]),\n blockedProviders: z.array(z.string()).default([]),\n requireEnterpriseSSOOnly: z.boolean().default(false),\n }).isAuditEvidence(),\n\n /**\n * Per-scope social provider credential overrides (P3).\n *\n * By default, social providers (Google, GitHub, Apple, etc.) use platform-level\n * OAuth2 credentials from AppConfiguration. This array lets an org/app override\n * those with their own registered OAuth2 app at the identity provider.\n *\n * Only `clientId` + `clientSecret` are needed for most providers — the OAuth2\n * endpoints, scopes, and profile mapping still come from the provider catalog.\n *\n * `signedJwtKeyId` / `signedJwtTeamId` are required only for providers that use\n * signed-JWT client secrets (e.g. Apple Sign-In, where the \"client secret\" is a\n * short-lived JWT signed with a private key). These correspond to the Apple\n * Developer Team ID and Key ID that are bound to the private key.\n * When omitted, the app-level values from the secrets store are used.\n *\n * Secret handling (two distinct contracts, on purpose):\n * - `clientSecret` is `.isWriteOnlySecret()` — the operator sets/rotates it, so it\n * stays writable AND stays in the response DTO where the framework redacts it to\n * `••••••••` at the client boundary. Internal reads (`resolveSocialConnection`\n * via `readAsSystem`) keep the real value.\n * - `signedJwtKeyId` / `signedJwtTeamId` are `.isBackendOnly()` — never sent to the\n * frontend at all (stripped from every client DTO).\n *\n * Because these secrets live inside an ARRAY, neither the central write-only-secret\n * sentinel-strip NOR a whole-array `$set` preserves them on save: the repository\n * replaces the entire array with no deep merge. The UPDATE custom-impl therefore\n * matches each incoming override to the stored record by `providerRef` and\n * re-injects any secret that arrived absent or as the `••••••••` mask.\n *\n * @see oauth2-connection-resolver — resolveSocialConnection() steps 5b/5c\n * @see sso-config.custom-impl — prefixCoreOperations UPDATE handler\n */\n socialCredentialOverrides: z.array(z.object({\n providerRef: z.string().min(1),\n clientId: z.string().min(1),\n clientSecret: z.string().min(1).isWriteOnlySecret(),\n signedJwtKeyId: z.string().optional().isBackendOnly(),\n signedJwtTeamId: z.string().optional().isBackendOnly(),\n })).default([]).refine(\n (arr) => new Set(arr.map(o => o.providerRef)).size === arr.length,\n { message: 'Duplicate providerRef in socialCredentialOverrides' },\n ),\n\n createdAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),\n});\n\nexport type SsoConfigBase = z.infer<typeof SsoConfigBaseSchema>;\n\n/**\n * The domains this organization has actually VERIFIED — the join `verifiedDomains` does not carry.\n *\n * ## Why this exists rather than five correct joins\n *\n * The stored list holds CLAIMED domains, so safety depends on every reader filtering it by\n * `domainVerificationStatus`. Measured 2026-09-08, **five** reader sites did that by hand — the SCIM\n * controller, the SCIM virtual field, the domain-verification service, and the domain-to-org lookup\n * TWICE — and a sixth, `getDomains`, did not. It returned the raw list under the name `verified`.\n *\n * That is `.claude/rules/invariant-call-site-enumeration.md`'s exact shape: an invariant hand-applied\n * at N sites, where the next site is the one that forgets. It had already happened; it was harmless\n * only because that reader had no consumer — and claiming a domain is now reachable by tenants\n * through `SsoConfig_Operations.CLAIM_DOMAIN` (#424), so the margin that made it harmless is gone.\n *\n * So the join is computed ONCE, here, beside the field it corrects. A new reader that reaches for\n * the verified set finds this; one that reaches for the raw array finds the warning on the field.\n *\n * Takes the shape structurally rather than `SsoConfigBase` so a caller holding a partial config, a\n * DTO or a lean document can use it — the three existing shapes at the call sites — without the\n * helper forcing a cast at every one of them.\n */\nexport function resolveVerifiedDomains(domains: {\n readonly verifiedDomains?: readonly string[];\n readonly domainVerificationStatus?: Readonly<Record<string, string>>;\n} | undefined): string[] {\n const status = domains?.domainVerificationStatus ?? {};\n return (domains?.verifiedDomains ?? []).filter(\n domain => status[domain] === DomainVerificationStatus.VERIFIED,\n );\n}\n\n/** Whether ONE domain is verified for this organization. The single-domain form of the join. */\nexport function isDomainVerified(\n domains: {\n readonly verifiedDomains?: readonly string[];\n readonly domainVerificationStatus?: Readonly<Record<string, string>>;\n } | undefined,\n domain: string,\n): boolean {\n return (domains?.verifiedDomains ?? []).includes(domain)\n && domains?.domainVerificationStatus?.[domain] === DomainVerificationStatus.VERIFIED;\n}\n\nexport const ssoConfigPolymorphicDeclaration = declarePolymorphicSchemas({\n baseResourceType: 'ssoConfig',\n baseFieldIdentifier: 'ssoConfigId',\n baseEnumKey: 'SSO_CONFIG',\n baseSchema: SsoConfigBaseSchema,\n variants: AUTH_SCOPE_VARIANTS,\n});\n"]}
|
|
@@ -122,9 +122,6 @@ export declare const SsoConnectionBaseSchema: z.ZodObject<{
|
|
|
122
122
|
employeeId: z.ZodOptional<z.ZodString>;
|
|
123
123
|
groups: z.ZodOptional<z.ZodString>;
|
|
124
124
|
}, z.core.$strip>;
|
|
125
|
-
validateIssuer: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodBoolean>>;
|
|
126
|
-
validateAudience: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodBoolean>>;
|
|
127
|
-
clockTolerance: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodNumber>>;
|
|
128
125
|
acrValues: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
129
126
|
maxAge: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodNumber>>;
|
|
130
127
|
prompt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodEnum<{
|
|
@@ -233,9 +230,6 @@ export declare const ssoConnectionPolymorphicDeclaration: import("../../..").Pol
|
|
|
233
230
|
employeeId: z.ZodOptional<z.ZodString>;
|
|
234
231
|
groups: z.ZodOptional<z.ZodString>;
|
|
235
232
|
}, z.core.$strip>;
|
|
236
|
-
validateIssuer: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodBoolean>>;
|
|
237
|
-
validateAudience: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodBoolean>>;
|
|
238
|
-
clockTolerance: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodNumber>>;
|
|
239
233
|
acrValues: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
240
234
|
maxAge: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodNumber>>;
|
|
241
235
|
prompt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodEnum<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sso-connection.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../../../src/security/authentications/sso/sso-connection.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,2EAA2E;AAC3E,oBAAY,WAAW;IACrB,IAAI,SAAS;IACb,IAAI,SAAS;CACd;AAED,eAAO,MAAM,eAAe;;;;CAIlB,CAAC;AAEX,eAAO,MAAM,eAAe;;;;CAIlB,CAAC;AAEX,eAAO,MAAM,eAAe;;;;CAIlB,CAAC;AAEX,eAAO,MAAM,SAAS;;;;;CAKZ,CAAC;AAEX,eAAO,MAAM,aAAa;;;CAGhB,CAAC;AAEX,eAAO,MAAM,gBAAgB;;;;;CAKnB,CAAC;AAEX,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"sso-connection.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../../../src/security/authentications/sso/sso-connection.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,2EAA2E;AAC3E,oBAAY,WAAW;IACrB,IAAI,SAAS;IACb,IAAI,SAAS;CACd;AAED,eAAO,MAAM,eAAe;;;;CAIlB,CAAC;AAEX,eAAO,MAAM,eAAe;;;;CAIlB,CAAC;AAEX,eAAO,MAAM,eAAe;;;;CAIlB,CAAC;AAEX,eAAO,MAAM,SAAS;;;;;CAKZ,CAAC;AAEX,eAAO,MAAM,aAAa;;;CAGhB,CAAC;AAEX,eAAO,MAAM,gBAAgB;;;;;CAKnB,CAAC;AAEX,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA8JlC,CAAC;AAMH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAQ9C,CAAC"}
|
|
@@ -105,11 +105,12 @@ export const SsoConnectionBaseSchema = z.object({
|
|
|
105
105
|
}).optional(),
|
|
106
106
|
// `.isAuditEvidence()` on the OIDC leaves below — like the SAML block, they say WHERE this connection
|
|
107
107
|
// federates (`discoveryUrl` / `issuer` / the four endpoints / `jwksUri` / `endSessionEndpoint` /
|
|
108
|
-
// `clientId`) and HOW strictly it validates tokens (`
|
|
109
|
-
//
|
|
110
|
-
//
|
|
111
|
-
// `
|
|
112
|
-
//
|
|
108
|
+
// `clientId`) and HOW strictly it validates tokens (`pkceEnabled`, `pkceMethod`), plus what it
|
|
109
|
+
// requests (`scopes` / `customScopes` / `responseType` / `responseMode` / template + auth-request
|
|
110
|
+
// shaping, including the `acrValues` step-up demand). Turning `pkceEnabled` off, or repointing
|
|
111
|
+
// `issuer` / `jwksUri`, silently breaks the token trust chain, so a reviewer must see the
|
|
112
|
+
// before/after — and so does a change to `acrValues`, which is an authentication-strength
|
|
113
|
+
// requirement placed on the identity provider. `clientSecret` is NEVER marked (it is
|
|
113
114
|
// a write-only secret); `claimsMapping` / `auditSettings` are two-level and out of the resolver's
|
|
114
115
|
// one-level reach.
|
|
115
116
|
// assurance-control: WILDO.IDENTITY.SESSION_ASSURANCE — the OIDC endpoints, issuer and token-
|
|
@@ -158,9 +159,17 @@ export const SsoConnectionBaseSchema = z.object({
|
|
|
158
159
|
employeeId: z.string().optional(),
|
|
159
160
|
groups: z.string().optional(),
|
|
160
161
|
}),
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
/*
|
|
163
|
+
* NO `validateIssuer` / `validateAudience` / `clockTolerance`. All three were declared here,
|
|
164
|
+
* persisted and audit-marked, and read by nothing — and they were inert in the SAFE direction,
|
|
165
|
+
* which is why they were removed rather than honoured (#419, decided 2026-09-08).
|
|
166
|
+
*
|
|
167
|
+
* `verifyIdToken` ALWAYS verifies the issuer and the audience and hardcodes a five-minute
|
|
168
|
+
* maximum token age. Honouring the three toggles could therefore only ever LOOSEN a guard that
|
|
169
|
+
* is currently unconditional — an operator could switch off issuer or audience validation and
|
|
170
|
+
* break the token trust chain from a settings screen. A configuration field whose only
|
|
171
|
+
* achievable effect is to weaken a security control should not exist.
|
|
172
|
+
*/
|
|
164
173
|
acrValues: z.array(z.string()).optional().isAuditEvidence(),
|
|
165
174
|
maxAge: z.number().min(0).optional().isAuditEvidence(),
|
|
166
175
|
prompt: z.enum(SSOPrompt).optional().isAuditEvidence(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sso-connection.shared.schemas.js","sourceRoot":"","sources":["../../../../../../src/security/authentications/sso/sso-connection.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mB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CAAC,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;IACrF,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;CACtF,CAAC,CAAC;AAQH,MAAM,CAAC,MAAM,mCAAmC,GAAG,yBAAyB,CAAC;IAC3E,gBAAgB,EAAE,gBAAgB;IAClC,mBAAmB,EAAE,iBAAiB;IACtC,WAAW,EAAE,iBAAiB;IAC9B,UAAU,EAAE,uBAAuB;IACnC,0EAA0E;IAC1E,uEAAuE;IACvE,QAAQ,EAAE,mBAAmB,CAAC,GAAG,CAAC,gCAAgC,CAAC;CACpE,CAAC,CAAC","sourcesContent":["/**\n * SSO Connection Schema (Shared) — Polymorphic\n *\n * Individual SSO provider connections with protocol discriminator (OIDC vs SAML).\n * Unified resource — `protocol` field determines which sub-object is populated.\n * Both OIDC and SAML protocol engines consume this shared discriminator.\n * Scope FK (organizationId / applicationId) is injected by the polymorphism engine.\n *\n * @see auth-data-model-audit.md §2B\n */\n\nimport { z } from 'zod';\nimport { AUTH_SCOPE_VARIANTS } from '../authentication.shared.schemas';\nimport { declarePolymorphicSchemas, optOutPolymorphicAutoBusinessKey } from '../../../resources/utils/resource-polymorphism.schemas';\n\n/** Interactive single-sign-on protocols supported by an SSO connection. */\nexport enum SsoProtocol {\n OIDC = 'oidc',\n SAML = 'saml',\n}\n\nexport const SSOTemplateMode = {\n TEMPLATE: 'template',\n DISCOVERY: 'discovery',\n MANUAL: 'manual',\n} as const;\n\nexport const SSOResponseType = {\n CODE: 'code',\n ID_TOKEN: 'id_token',\n TOKEN: 'token',\n} as const;\n\nexport const SSOResponseMode = {\n QUERY: 'query',\n FRAGMENT: 'fragment',\n FORM_POST: 'form_post',\n} as const;\n\nexport const SSOPrompt = {\n NONE: 'none',\n LOGIN: 'login',\n CONSENT: 'consent',\n SELECT_ACCOUNT: 'select_account',\n} as const;\n\nexport const SSOPKCEMethod = {\n S256: 'S256',\n PLAIN: 'plain',\n} as const;\n\nexport const SamlNameIdFormat = {\n UNSPECIFIED: 'urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified',\n EMAIL_ADDRESS: 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress',\n PERSISTENT: 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent',\n TRANSIENT: 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient',\n} as const;\n\nexport const SsoConnectionBaseSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n\n protocol: z.enum(SsoProtocol).isSummaryField(),\n externalProviderId: z.string().min(1).optional(),\n displayName: z.string().min(1).isSummaryField(),\n // `.isAuditEvidence()` — `enabled` is the connection's live/dead switch and `isDefault` decides\n // which IdP silently receives logins. Marked individually rather than on any parent: this\n // schema carries `x509Certificates` under `.isBackendOnly()`, and marking a container records\n // the WHOLE object into rows that replicate to an unerasable ledger.\n // assurance-control: WILDO.IDENTITY.SESSION_ASSURANCE — the live/dead switch and the default IdP\n // decide which identity provider is trusted to authenticate this tenant.\n enabled: z.boolean().default(true).isSummaryField().isAuditEvidence(),\n isDefault: z.boolean().default(false).isAuditEvidence(),\n\n // `.isAuditEvidence()` on the SAML leaves below — they say WHERE this connection federates\n // (`entityId` / `ssoUrl` / `sloUrl`) and HOW strictly it validates the IdP (`signRequests`,\n // `wantAssertionsSigned`, `allowedClockDrift`, `forceAuthn`, `maxAuthAge`, `nameIdFormat`,\n // `allowIdpInitiated`). A silent change here redirects the trust anchor or accepts unsigned/replayed\n // assertions — an authentication-assurance change the field NAME alone cannot evidence — so a\n // reviewer must see the before/after value. Marked per LEAF, never on the `saml` container: the\n // certificate material (`x509Certificates` / `x509CertificatePem`) sits beside these and marking the\n // container would copy key material into an unerasable ledger. The two-level `attributeMapping` /\n // `auditSettings` leaves are deliberately NOT marked — the evidence resolver reaches one level of\n // nesting only, so a marker there would be inert.\n // assurance-control: WILDO.IDENTITY.SESSION_ASSURANCE — the IdP endpoints and signature/replay\n // validation posture decide which provider is trusted to authenticate this tenant and whether its\n // assertions are actually verified.\n saml: z.object({\n entityId: z.string().min(1).isAuditEvidence(),\n ssoUrl: z.url().isAuditEvidence(),\n sloUrl: z.url().optional().isAuditEvidence(),\n /** Frontend input: PEM-encoded certificate(s). Backend transforms to x509Certificates. */\n x509CertificatePem: z.string().min(1).optional(),\n x509Certificates: z.array(z.string()).min(1).isBackendOnly(),\n attributeMapping: z.object({\n email: z.string().default('http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress'),\n firstName: z.string().default('http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname'),\n lastName: z.string().default('http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname'),\n roles: z.string().optional(),\n department: z.string().optional(),\n employeeId: z.string().optional(),\n groups: z.string().optional(),\n }),\n signRequests: z.boolean().default(true).isAuditEvidence(),\n wantAssertionsSigned: z.boolean().default(true).isAuditEvidence(),\n allowedClockDrift: z.number().min(0).max(300).default(30).isAuditEvidence(),\n forceAuthn: z.boolean().default(false).isAuditEvidence(),\n maxAuthAge: z.number().min(0).optional().isAuditEvidence(),\n nameIdFormat: z.enum(SamlNameIdFormat).default(SamlNameIdFormat.EMAIL_ADDRESS).isAuditEvidence(),\n allowIdpInitiated: z.boolean().default(false).isAuditEvidence(),\n auditSettings: z.object({\n logAuthAttempts: z.boolean().default(true),\n logAttributeMapping: z.boolean().default(true),\n retentionDays: z.number().min(1).max(2555).default(90),\n }),\n }).optional(),\n\n // `.isAuditEvidence()` on the OIDC leaves below — like the SAML block, they say WHERE this connection\n // federates (`discoveryUrl` / `issuer` / the four endpoints / `jwksUri` / `endSessionEndpoint` /\n // `clientId`) and HOW strictly it validates tokens (`validateIssuer`, `validateAudience`,\n // `clockTolerance`, `pkceEnabled`, `pkceMethod`), plus what it requests (`scopes` / `customScopes` /\n // `responseType` / `responseMode` / template + auth-request shaping). Turning `validateIssuer` /\n // `validateAudience` / `pkceEnabled` off, or repointing `issuer` / `jwksUri`, silently breaks the\n // token trust chain, so a reviewer must see the before/after. `clientSecret` is NEVER marked (it is\n // a write-only secret); `claimsMapping` / `auditSettings` are two-level and out of the resolver's\n // one-level reach.\n // assurance-control: WILDO.IDENTITY.SESSION_ASSURANCE — the OIDC endpoints, issuer and token-\n // validation posture decide which provider is trusted and whether its tokens are actually verified.\n oidc: z.object({\n templateMode: z.enum(SSOTemplateMode).default(SSOTemplateMode.MANUAL).isAuditEvidence(),\n templateOverrides: z.record(z.string(), z.string()).optional().isAuditEvidence(),\n customScopes: z.array(z.string()).optional().isAuditEvidence(),\n discoveryUrl: z.url().optional().isAuditEvidence(),\n issuer: z.url().optional().isAuditEvidence(),\n authorizationEndpoint: z.url().optional().isAuditEvidence(),\n tokenEndpoint: z.url().optional().isAuditEvidence(),\n userInfoEndpoint: z.url().optional().isAuditEvidence(),\n jwksUri: z.url().optional().isAuditEvidence(),\n endSessionEndpoint: z.url().optional().isAuditEvidence(),\n clientId: z.string().min(1).isAuditEvidence(),\n /**\n * OIDC/OAuth2 client secret issued by the IdP, used by the backend token\n * exchange (`oauth2-connection-resolver` → `exchangeCodeForTokens`) to\n * authenticate this connection at the provider's token endpoint.\n *\n * `.isWriteOnlySecret()` gives it the framework's write-then-masked contract:\n * the operator sets/rotates it (stays in the CREATE/UPDATE request DTO) and it\n * stays in the response DTO so the UI renders a masked placeholder, but the\n * framework redacts it to `••••••••` at the client-serialization boundary only\n * — internal reads (`servicesRegistryHandler.read` during token exchange) keep\n * the real value. Do NOT use `.isBackendOnly()`: that strips the field from\n * every client DTO, so the operator could never supply it.\n *\n * Preservation on UPDATE is NOT automatic here: this is a nested field, and the\n * repository UPDATE is a whole-subdocument `$set` (no deep merge), so a\n * round-tripped mask must be re-injected from the stored record by the SSO\n * connection UPDATE custom-impl (`sso-connection.custom-impl` prefix). The\n * central sentinel-strip only preserves TOP-LEVEL write-only secrets.\n */\n clientSecret: z.string().min(1).isWriteOnlySecret(),\n scopes: z.array(z.string()).default(['openid', 'email', 'profile']).isAuditEvidence(),\n responseType: z.enum(SSOResponseType).default(SSOResponseType.CODE).isAuditEvidence(),\n responseMode: z.enum(SSOResponseMode).optional().isAuditEvidence(),\n claimsMapping: z.object({\n email: z.string().default('email'),\n firstName: z.string().default('given_name'),\n lastName: z.string().default('family_name'),\n roles: z.string().optional(),\n department: z.string().optional(),\n employeeId: z.string().optional(),\n groups: z.string().optional(),\n }),\n validateIssuer: z.boolean().default(true).isAuditEvidence(),\n validateAudience: z.boolean().default(true).isAuditEvidence(),\n clockTolerance: z.number().min(0).max(300).default(30).isAuditEvidence(),\n acrValues: z.array(z.string()).optional().isAuditEvidence(),\n maxAge: z.number().min(0).optional().isAuditEvidence(),\n prompt: z.enum(SSOPrompt).optional().isAuditEvidence(),\n pkceEnabled: z.boolean().default(true).isAuditEvidence(),\n pkceMethod: z.enum(SSOPKCEMethod).default(SSOPKCEMethod.S256).isAuditEvidence(),\n auditSettings: z.object({\n logAuthAttempts: z.boolean().default(true),\n logTokenExchange: z.boolean().default(true),\n logClaimsMapping: z.boolean().default(true),\n retentionDays: z.number().min(1).max(2555).default(90),\n }),\n }).optional(),\n\n autoCreateUsers: z.boolean().default(true),\n autoVerifyEmail: z.boolean().default(true),\n /** W2.8: if true, users authenticating via this SSO connection skip the application-level MFA policy. */\n // `.isAuditEvidence()` — an explicit escape from the application MFA policy for everyone who\n // authenticates through this connection. Flipping it on lowers the assurance level tenant-wide.\n bypassAppMFA: z.boolean().default(false).isAuditEvidence(),\n // `.isAuditEvidence()` on all four — this is the connection's ROLE-GRANT surface. `defaultRole`\n // and the two mappings decide what authority an externally-authenticated identity lands with,\n // and `allowedDomains` decides whose identities the connection will accept at all. A change\n // here is an authorization change; the field NAME alone cannot evidence it.\n // The values are role names and domains — configuration, not personal data.\n // assurance-control: WILDO.ACCESS.PRIVILEGE_EVIDENCE — these decide what authority an\n // externally-authenticated identity lands with, and whose identities are accepted.\n defaultRole: z.string().optional().isAuditEvidence(),\n allowedDomains: z.array(z.string()).default([]).isDBIndexed().isAuditEvidence(),\n roleMapping: z.record(z.string(), z.string()).optional().isAuditEvidence(),\n groupMapping: z.record(z.string(), z.array(z.string())).optional().isAuditEvidence(),\n\n createdAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),\n});\n// NOTE: Protocol-config discriminant enforcement (protocol=saml → saml defined, protocol=oidc → oidc defined)\n// is validated at the backend service layer, not via .refine() here.\n// Zod 4 doesn't allow .extend() on refined objects, which breaks the polymorphism engine.\n\n\nexport type SsoConnectionBase = z.infer<typeof SsoConnectionBaseSchema>;\n\nexport const ssoConnectionPolymorphicDeclaration = declarePolymorphicSchemas({\n baseResourceType: 'ssoConnections',\n baseFieldIdentifier: 'ssoConnectionId',\n baseEnumKey: 'SSO_CONNECTIONS',\n baseSchema: SsoConnectionBaseSchema,\n // Many connections per scope (LIST/CREATE/UPDATE/DELETE) — opt out of the\n // polymorphism engine's singleton-per-scope business-key auto-default.\n variants: AUTH_SCOPE_VARIANTS.map(optOutPolymorphicAutoBusinessKey),\n});\n"]}
|
|
1
|
+
{"version":3,"file":"sso-connection.shared.schemas.js","sourceRoot":"","sources":["../../../../../../src/security/authentications/sso/sso-connection.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,gCAAgC,EAAE,MAAM,wDAAwD,CAAC;AAErI,2EAA2E;AAC3E,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,4BAAa,CAAA;AACf,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB;AAED,MAAM,CAAC,MAAM,eAAe,GAAG;I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IAC5E,sFAAsF;IACtF,mFAAmF;IACnF,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,eAAe,EAAE;IACpD,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,eAAe,EAAE;IAC/E,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,eAAe,EAAE;IAC1E,YAAY,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,eAAe,EAAE;IAEpF,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;IACrF,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;CACtF,CAAC,CAAC;AAQH,MAAM,CAAC,MAAM,mCAAmC,GAAG,yBAAyB,CAAC;IAC3E,gBAAgB,EAAE,gBAAgB;IAClC,mBAAmB,EAAE,iBAAiB;IACtC,WAAW,EAAE,iBAAiB;IAC9B,UAAU,EAAE,uBAAuB;IACnC,0EAA0E;IAC1E,uEAAuE;IACvE,QAAQ,EAAE,mBAAmB,CAAC,GAAG,CAAC,gCAAgC,CAAC;CACpE,CAAC,CAAC","sourcesContent":["/**\n * SSO Connection Schema (Shared) — Polymorphic\n *\n * Individual SSO provider connections with protocol discriminator (OIDC vs SAML).\n * Unified resource — `protocol` field determines which sub-object is populated.\n * Both OIDC and SAML protocol engines consume this shared discriminator.\n * Scope FK (organizationId / applicationId) is injected by the polymorphism engine.\n *\n * @see auth-data-model-audit.md §2B\n */\n\nimport { z } from 'zod';\nimport { AUTH_SCOPE_VARIANTS } from '../authentication.shared.schemas';\nimport { declarePolymorphicSchemas, optOutPolymorphicAutoBusinessKey } from '../../../resources/utils/resource-polymorphism.schemas';\n\n/** Interactive single-sign-on protocols supported by an SSO connection. */\nexport enum SsoProtocol {\n OIDC = 'oidc',\n SAML = 'saml',\n}\n\nexport const SSOTemplateMode = {\n TEMPLATE: 'template',\n DISCOVERY: 'discovery',\n MANUAL: 'manual',\n} as const;\n\nexport const SSOResponseType = {\n CODE: 'code',\n ID_TOKEN: 'id_token',\n TOKEN: 'token',\n} as const;\n\nexport const SSOResponseMode = {\n QUERY: 'query',\n FRAGMENT: 'fragment',\n FORM_POST: 'form_post',\n} as const;\n\nexport const SSOPrompt = {\n NONE: 'none',\n LOGIN: 'login',\n CONSENT: 'consent',\n SELECT_ACCOUNT: 'select_account',\n} as const;\n\nexport const SSOPKCEMethod = {\n S256: 'S256',\n PLAIN: 'plain',\n} as const;\n\nexport const SamlNameIdFormat = {\n UNSPECIFIED: 'urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified',\n EMAIL_ADDRESS: 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress',\n PERSISTENT: 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent',\n TRANSIENT: 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient',\n} as const;\n\nexport const SsoConnectionBaseSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n\n protocol: z.enum(SsoProtocol).isSummaryField(),\n externalProviderId: z.string().min(1).optional(),\n displayName: z.string().min(1).isSummaryField(),\n // `.isAuditEvidence()` — `enabled` is the connection's live/dead switch and `isDefault` decides\n // which IdP silently receives logins. Marked individually rather than on any parent: this\n // schema carries `x509Certificates` under `.isBackendOnly()`, and marking a container records\n // the WHOLE object into rows that replicate to an unerasable ledger.\n // assurance-control: WILDO.IDENTITY.SESSION_ASSURANCE — the live/dead switch and the default IdP\n // decide which identity provider is trusted to authenticate this tenant.\n enabled: z.boolean().default(true).isSummaryField().isAuditEvidence(),\n isDefault: z.boolean().default(false).isAuditEvidence(),\n\n // `.isAuditEvidence()` on the SAML leaves below — they say WHERE this connection federates\n // (`entityId` / `ssoUrl` / `sloUrl`) and HOW strictly it validates the IdP (`signRequests`,\n // `wantAssertionsSigned`, `allowedClockDrift`, `forceAuthn`, `maxAuthAge`, `nameIdFormat`,\n // `allowIdpInitiated`). A silent change here redirects the trust anchor or accepts unsigned/replayed\n // assertions — an authentication-assurance change the field NAME alone cannot evidence — so a\n // reviewer must see the before/after value. Marked per LEAF, never on the `saml` container: the\n // certificate material (`x509Certificates` / `x509CertificatePem`) sits beside these and marking the\n // container would copy key material into an unerasable ledger. The two-level `attributeMapping` /\n // `auditSettings` leaves are deliberately NOT marked — the evidence resolver reaches one level of\n // nesting only, so a marker there would be inert.\n // assurance-control: WILDO.IDENTITY.SESSION_ASSURANCE — the IdP endpoints and signature/replay\n // validation posture decide which provider is trusted to authenticate this tenant and whether its\n // assertions are actually verified.\n saml: z.object({\n entityId: z.string().min(1).isAuditEvidence(),\n ssoUrl: z.url().isAuditEvidence(),\n sloUrl: z.url().optional().isAuditEvidence(),\n /** Frontend input: PEM-encoded certificate(s). Backend transforms to x509Certificates. */\n x509CertificatePem: z.string().min(1).optional(),\n x509Certificates: z.array(z.string()).min(1).isBackendOnly(),\n attributeMapping: z.object({\n email: z.string().default('http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress'),\n firstName: z.string().default('http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname'),\n lastName: z.string().default('http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname'),\n roles: z.string().optional(),\n department: z.string().optional(),\n employeeId: z.string().optional(),\n groups: z.string().optional(),\n }),\n signRequests: z.boolean().default(true).isAuditEvidence(),\n wantAssertionsSigned: z.boolean().default(true).isAuditEvidence(),\n allowedClockDrift: z.number().min(0).max(300).default(30).isAuditEvidence(),\n forceAuthn: z.boolean().default(false).isAuditEvidence(),\n maxAuthAge: z.number().min(0).optional().isAuditEvidence(),\n nameIdFormat: z.enum(SamlNameIdFormat).default(SamlNameIdFormat.EMAIL_ADDRESS).isAuditEvidence(),\n allowIdpInitiated: z.boolean().default(false).isAuditEvidence(),\n auditSettings: z.object({\n logAuthAttempts: z.boolean().default(true),\n logAttributeMapping: z.boolean().default(true),\n retentionDays: z.number().min(1).max(2555).default(90),\n }),\n }).optional(),\n\n // `.isAuditEvidence()` on the OIDC leaves below — like the SAML block, they say WHERE this connection\n // federates (`discoveryUrl` / `issuer` / the four endpoints / `jwksUri` / `endSessionEndpoint` /\n // `clientId`) and HOW strictly it validates tokens (`pkceEnabled`, `pkceMethod`), plus what it\n // requests (`scopes` / `customScopes` / `responseType` / `responseMode` / template + auth-request\n // shaping, including the `acrValues` step-up demand). Turning `pkceEnabled` off, or repointing\n // `issuer` / `jwksUri`, silently breaks the token trust chain, so a reviewer must see the\n // before/after — and so does a change to `acrValues`, which is an authentication-strength\n // requirement placed on the identity provider. `clientSecret` is NEVER marked (it is\n // a write-only secret); `claimsMapping` / `auditSettings` are two-level and out of the resolver's\n // one-level reach.\n // assurance-control: WILDO.IDENTITY.SESSION_ASSURANCE — the OIDC endpoints, issuer and token-\n // validation posture decide which provider is trusted and whether its tokens are actually verified.\n oidc: z.object({\n templateMode: z.enum(SSOTemplateMode).default(SSOTemplateMode.MANUAL).isAuditEvidence(),\n templateOverrides: z.record(z.string(), z.string()).optional().isAuditEvidence(),\n customScopes: z.array(z.string()).optional().isAuditEvidence(),\n discoveryUrl: z.url().optional().isAuditEvidence(),\n issuer: z.url().optional().isAuditEvidence(),\n authorizationEndpoint: z.url().optional().isAuditEvidence(),\n tokenEndpoint: z.url().optional().isAuditEvidence(),\n userInfoEndpoint: z.url().optional().isAuditEvidence(),\n jwksUri: z.url().optional().isAuditEvidence(),\n endSessionEndpoint: z.url().optional().isAuditEvidence(),\n clientId: z.string().min(1).isAuditEvidence(),\n /**\n * OIDC/OAuth2 client secret issued by the IdP, used by the backend token\n * exchange (`oauth2-connection-resolver` → `exchangeCodeForTokens`) to\n * authenticate this connection at the provider's token endpoint.\n *\n * `.isWriteOnlySecret()` gives it the framework's write-then-masked contract:\n * the operator sets/rotates it (stays in the CREATE/UPDATE request DTO) and it\n * stays in the response DTO so the UI renders a masked placeholder, but the\n * framework redacts it to `••••••••` at the client-serialization boundary only\n * — internal reads (`servicesRegistryHandler.read` during token exchange) keep\n * the real value. Do NOT use `.isBackendOnly()`: that strips the field from\n * every client DTO, so the operator could never supply it.\n *\n * Preservation on UPDATE is NOT automatic here: this is a nested field, and the\n * repository UPDATE is a whole-subdocument `$set` (no deep merge), so a\n * round-tripped mask must be re-injected from the stored record by the SSO\n * connection UPDATE custom-impl (`sso-connection.custom-impl` prefix). The\n * central sentinel-strip only preserves TOP-LEVEL write-only secrets.\n */\n clientSecret: z.string().min(1).isWriteOnlySecret(),\n scopes: z.array(z.string()).default(['openid', 'email', 'profile']).isAuditEvidence(),\n responseType: z.enum(SSOResponseType).default(SSOResponseType.CODE).isAuditEvidence(),\n responseMode: z.enum(SSOResponseMode).optional().isAuditEvidence(),\n claimsMapping: z.object({\n email: z.string().default('email'),\n firstName: z.string().default('given_name'),\n lastName: z.string().default('family_name'),\n roles: z.string().optional(),\n department: z.string().optional(),\n employeeId: z.string().optional(),\n groups: z.string().optional(),\n }),\n /*\n * NO `validateIssuer` / `validateAudience` / `clockTolerance`. All three were declared here,\n * persisted and audit-marked, and read by nothing — and they were inert in the SAFE direction,\n * which is why they were removed rather than honoured (#419, decided 2026-09-08).\n *\n * `verifyIdToken` ALWAYS verifies the issuer and the audience and hardcodes a five-minute\n * maximum token age. Honouring the three toggles could therefore only ever LOOSEN a guard that\n * is currently unconditional — an operator could switch off issuer or audience validation and\n * break the token trust chain from a settings screen. A configuration field whose only\n * achievable effect is to weaken a security control should not exist.\n */\n acrValues: z.array(z.string()).optional().isAuditEvidence(),\n maxAge: z.number().min(0).optional().isAuditEvidence(),\n prompt: z.enum(SSOPrompt).optional().isAuditEvidence(),\n pkceEnabled: z.boolean().default(true).isAuditEvidence(),\n pkceMethod: z.enum(SSOPKCEMethod).default(SSOPKCEMethod.S256).isAuditEvidence(),\n auditSettings: z.object({\n logAuthAttempts: z.boolean().default(true),\n logTokenExchange: z.boolean().default(true),\n logClaimsMapping: z.boolean().default(true),\n retentionDays: z.number().min(1).max(2555).default(90),\n }),\n }).optional(),\n\n autoCreateUsers: z.boolean().default(true),\n autoVerifyEmail: z.boolean().default(true),\n /** W2.8: if true, users authenticating via this SSO connection skip the application-level MFA policy. */\n // `.isAuditEvidence()` — an explicit escape from the application MFA policy for everyone who\n // authenticates through this connection. Flipping it on lowers the assurance level tenant-wide.\n bypassAppMFA: z.boolean().default(false).isAuditEvidence(),\n // `.isAuditEvidence()` on all four — this is the connection's ROLE-GRANT surface. `defaultRole`\n // and the two mappings decide what authority an externally-authenticated identity lands with,\n // and `allowedDomains` decides whose identities the connection will accept at all. A change\n // here is an authorization change; the field NAME alone cannot evidence it.\n // The values are role names and domains — configuration, not personal data.\n // assurance-control: WILDO.ACCESS.PRIVILEGE_EVIDENCE — these decide what authority an\n // externally-authenticated identity lands with, and whose identities are accepted.\n defaultRole: z.string().optional().isAuditEvidence(),\n allowedDomains: z.array(z.string()).default([]).isDBIndexed().isAuditEvidence(),\n roleMapping: z.record(z.string(), z.string()).optional().isAuditEvidence(),\n groupMapping: z.record(z.string(), z.array(z.string())).optional().isAuditEvidence(),\n\n createdAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),\n});\n// NOTE: Protocol-config discriminant enforcement (protocol=saml → saml defined, protocol=oidc → oidc defined)\n// is validated at the backend service layer, not via .refine() here.\n// Zod 4 doesn't allow .extend() on refined objects, which breaks the polymorphism engine.\n\n\nexport type SsoConnectionBase = z.infer<typeof SsoConnectionBaseSchema>;\n\nexport const ssoConnectionPolymorphicDeclaration = declarePolymorphicSchemas({\n baseResourceType: 'ssoConnections',\n baseFieldIdentifier: 'ssoConnectionId',\n baseEnumKey: 'SSO_CONNECTIONS',\n baseSchema: SsoConnectionBaseSchema,\n // Many connections per scope (LIST/CREATE/UPDATE/DELETE) — opt out of the\n // polymorphism engine's singleton-per-scope business-key auto-default.\n variants: AUTH_SCOPE_VARIANTS.map(optOutPolymorphicAutoBusinessKey),\n});\n"]}
|
package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ import { z } from 'zod';
|
|
|
16
16
|
import { PlatformAccessGrantStatus, PlatformAccessGrants_Operations } from './platform-access-grants.shared.schemas';
|
|
17
17
|
import { CoreResourceOperation } from '../../resources/resources.shared.core.definitions';
|
|
18
18
|
import { type ResourceRelationship } from '../../resources/resources.shared.schemas';
|
|
19
|
-
type PlatformAccessGrantsCoreOperations = CoreResourceOperation.READ | CoreResourceOperation.LIST | CoreResourceOperation.COUNT | CoreResourceOperation.DELETE;
|
|
19
|
+
type PlatformAccessGrantsCoreOperations = CoreResourceOperation.READ | CoreResourceOperation.LIST | CoreResourceOperation.COUNT | CoreResourceOperation.DELETE | CoreResourceOperation.UPDATE_MANY;
|
|
20
20
|
export declare const platformAccessGrantsResourceConfiguration_InitializationFactory: (resourcesRelationships: ResourceRelationship[]) => import("../..").ResourceConfiguration<typeof PlatformAccessGrants_Operations, PlatformAccessGrantsCoreOperations, z.ZodObject<{
|
|
21
21
|
_id: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodString>>;
|
|
22
22
|
organizationId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodString>>>>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-access-grants.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/security/authorizations/platform-access-grants.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAA6B,yBAAyB,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC;AAChJ,OAAO,EAAE,qBAAqB,EAAwD,MAAM,mDAAmD,CAAC;AAChJ,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"platform-access-grants.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/security/authorizations/platform-access-grants.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAA6B,yBAAyB,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC;AAChJ,OAAO,EAAE,qBAAqB,EAAwD,MAAM,mDAAmD,CAAC;AAChJ,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,0CAA0C,CAAC;AAQlD,KAAK,kCAAkC,GACnC,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,KAAK,GAC3B,qBAAqB,CAAC,MAAM,GAE5B,qBAAqB,CAAC,WAAW,CAAC;AAEtC,eAAO,MAAM,+DAA+D,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;kBAuU1H,CAAC"}
|