@noodleseed/one 0.63.0 → 0.64.0
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/auth-discovery.d.ts +17 -0
- package/dist/auth-discovery.d.ts.map +1 -0
- package/dist/auth-discovery.js +54 -0
- package/dist/auth-discovery.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +3 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/catalog-data-platform-auth.d.ts +7 -0
- package/dist/commands/catalog-data-platform-auth.d.ts.map +1 -0
- package/dist/commands/catalog-data-platform-auth.js +47 -0
- package/dist/commands/catalog-data-platform-auth.js.map +1 -0
- package/dist/commands/catalog.d.ts.map +1 -1
- package/dist/commands/catalog.js +6 -3
- package/dist/commands/catalog.js.map +1 -1
- package/dist/commands/docs-mcp.d.ts +3 -3
- package/dist/commands/docs-mcp.js +3 -3
- package/dist/commands/platform-auth-finalization-args.d.ts +13 -0
- package/dist/commands/platform-auth-finalization-args.d.ts.map +1 -0
- package/dist/commands/platform-auth-finalization-args.js +29 -0
- package/dist/commands/platform-auth-finalization-args.js.map +1 -0
- package/dist/commands/platform-auth-migration-args.d.ts +71 -0
- package/dist/commands/platform-auth-migration-args.d.ts.map +1 -0
- package/dist/commands/platform-auth-migration-args.js +320 -0
- package/dist/commands/platform-auth-migration-args.js.map +1 -0
- package/dist/commands/platform-auth-migration-ops.d.ts +3 -0
- package/dist/commands/platform-auth-migration-ops.d.ts.map +1 -0
- package/dist/commands/platform-auth-migration-ops.js +369 -0
- package/dist/commands/platform-auth-migration-ops.js.map +1 -0
- package/dist/commands/project-setup.js +1 -1
- package/dist/commands/project-setup.js.map +1 -1
- package/dist/config.d.ts +4 -4
- package/dist/config.d.ts.map +1 -1
- package/dist/control-plane.d.ts +0 -11
- package/dist/control-plane.d.ts.map +1 -1
- package/dist/control-plane.js +1 -8
- package/dist/control-plane.js.map +1 -1
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +3 -5
- package/dist/doctor.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/curated/command-groups.d.ts.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/curated/command-groups.js +4 -0
- package/node_modules/@noodle-borg/agent-kit/dist/curated/command-groups.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/generated/surface.d.ts.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/generated/surface.js +1 -0
- package/node_modules/@noodle-borg/agent-kit/dist/generated/surface.js.map +1 -1
- package/node_modules/@noodle-borg/auth/dist/jwt-issuer.d.ts +2 -2
- package/node_modules/@noodle-borg/auth/dist/jwt-issuer.d.ts.map +1 -1
- package/node_modules/@noodle-borg/auth/dist/jwt-issuer.js +1 -1
- package/node_modules/@noodle-borg/auth/dist/verify.d.ts +1 -1
- package/node_modules/@noodle-borg/auth/dist/verify.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/auth/deploy-gate.d.ts +26 -0
- package/node_modules/@noodle-borg/service/dist/auth/deploy-gate.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/auth/deploy-gate.js +105 -1
- package/node_modules/@noodle-borg/service/dist/auth/deploy-gate.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/control-plane-auth-bootstrap.d.ts +25 -0
- package/node_modules/@noodle-borg/service/dist/control-plane-auth-bootstrap.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/control-plane-auth-bootstrap.js +99 -0
- package/node_modules/@noodle-borg/service/dist/control-plane-auth-bootstrap.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/index.d.ts +15 -0
- package/node_modules/@noodle-borg/service/dist/index.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/index.js +15 -0
- package/node_modules/@noodle-borg/service/dist/index.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/main.js +112 -19
- package/node_modules/@noodle-borg/service/dist/main.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/app.d.ts +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/app.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/app.js +9 -1
- package/node_modules/@noodle-borg/service/dist/oauth/app.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/authorization-initiation.d.ts +24 -0
- package/node_modules/@noodle-borg/service/dist/oauth/authorization-initiation.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/authorization-initiation.js +88 -0
- package/node_modules/@noodle-borg/service/dist/oauth/authorization-initiation.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/branding.d.ts +2 -0
- package/node_modules/@noodle-borg/service/dist/oauth/branding.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/branding.js +3 -2
- package/node_modules/@noodle-borg/service/dist/oauth/branding.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/consent-claims.d.ts +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/consent-claims.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/consent-token.d.ts +5 -0
- package/node_modules/@noodle-borg/service/dist/oauth/consent-token.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/consent-token.js +19 -0
- package/node_modules/@noodle-borg/service/dist/oauth/consent-token.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/consent.js +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/developer-grant-page.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/developer-grant-page.js +216 -28
- package/node_modules/@noodle-borg/service/dist/oauth/developer-grant-page.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/first-party-client.d.ts +13 -0
- package/node_modules/@noodle-borg/service/dist/oauth/first-party-client.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/first-party-client.js +62 -0
- package/node_modules/@noodle-borg/service/dist/oauth/first-party-client.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/metadata.d.ts +4 -0
- package/node_modules/@noodle-borg/service/dist/oauth/metadata.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/metadata.js +20 -0
- package/node_modules/@noodle-borg/service/dist/oauth/metadata.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/paths.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/paths.js +2 -0
- package/node_modules/@noodle-borg/service/dist/oauth/paths.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-guard.d.ts +15 -0
- package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-guard.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-guard.js +58 -0
- package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-guard.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-postgres.d.ts +8 -0
- package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-postgres.js +49 -0
- package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/postgres-time.d.ts +3 -0
- package/node_modules/@noodle-borg/service/dist/oauth/postgres-time.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/postgres-time.js +7 -0
- package/node_modules/@noodle-borg/service/dist/oauth/postgres-time.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/provider.d.ts +20 -25
- package/node_modules/@noodle-borg/service/dist/oauth/provider.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/provider.js +105 -196
- package/node_modules/@noodle-borg/service/dist/oauth/provider.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/service-bootstrap.d.ts +36 -0
- package/node_modules/@noodle-borg/service/dist/oauth/service-bootstrap.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/service-bootstrap.js +157 -0
- package/node_modules/@noodle-borg/service/dist/oauth/service-bootstrap.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/store-postgres-schema.d.ts +4 -0
- package/node_modules/@noodle-borg/service/dist/oauth/store-postgres-schema.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/store-postgres-schema.js +110 -0
- package/node_modules/@noodle-borg/service/dist/oauth/store-postgres-schema.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/store-postgres.d.ts +7 -4
- package/node_modules/@noodle-borg/service/dist/oauth/store-postgres.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/store-postgres.js +63 -120
- package/node_modules/@noodle-borg/service/dist/oauth/store-postgres.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/store.d.ts +19 -6
- package/node_modules/@noodle-borg/service/dist/oauth/store.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/store.js +24 -2
- package/node_modules/@noodle-borg/service/dist/oauth/store.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/tokens.d.ts +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/tokens.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/tokens.js +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/tokens.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-availability.d.ts +4 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-availability.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-availability.js +8 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-availability.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-handler.d.ts +34 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-handler.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-handler.js +109 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-handler.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-support.d.ts +22 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-support.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-support.js +30 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-support.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-consent.d.ts +21 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-consent.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-consent.js +56 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-consent.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-federation.d.ts +30 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-federation.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-federation.js +94 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-federation.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-human.d.ts +33 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-human.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-human.js +27 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-human.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-provider-choice.d.ts +13 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-provider-choice.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-provider-choice.js +63 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-provider-choice.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-rollout-store.d.ts +20 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-rollout-store.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-rollout-store.js +40 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-rollout-store.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/workos-events.d.ts +115 -0
- package/node_modules/@noodle-borg/service/dist/oauth/workos-events.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/workos-events.js +310 -0
- package/node_modules/@noodle-borg/service/dist/oauth/workos-events.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/workos.d.ts +65 -0
- package/node_modules/@noodle-borg/service/dist/oauth/workos.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/workos.js +85 -0
- package/node_modules/@noodle-borg/service/dist/oauth/workos.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/options.d.ts +11 -2
- package/node_modules/@noodle-borg/service/dist/options.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/personal-workspace.d.ts +2 -0
- package/node_modules/@noodle-borg/service/dist/personal-workspace.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/personal-workspace.js +8 -2
- package/node_modules/@noodle-borg/service/dist/personal-workspace.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/platform-auth-configuration.d.ts +67 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-configuration.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-configuration.js +54 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-configuration.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-frozen-candidate-postgres.d.ts +25 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-frozen-candidate-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-frozen-candidate-postgres.js +61 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-frozen-candidate-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-legacy-sources-postgres.d.ts +32 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-legacy-sources-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-legacy-sources-postgres.js +231 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-legacy-sources-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-postgres.d.ts +29 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-postgres.js +350 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-subjects-postgres.d.ts +50 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-subjects-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-subjects-postgres.js +239 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-subjects-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-paging.d.ts +66 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-paging.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-paging.js +77 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-paging.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-postgres.d.ts +40 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-postgres.js +355 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-progress-postgres.d.ts +41 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-progress-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-progress-postgres.js +230 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-progress-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-source-fence-postgres.d.ts +20 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-source-fence-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-source-fence-postgres.js +126 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-source-fence-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-sources.d.ts +8 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-sources.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-sources.js +86 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-sources.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-postgres.d.ts +42 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-postgres.js +368 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-runs-postgres.d.ts +86 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-runs-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-runs-postgres.js +474 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-runs-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-schema.d.ts +17 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-schema.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-schema.js +435 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-schema.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration.d.ts +202 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration.js +313 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-batches.d.ts +48 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-batches.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-batches.js +158 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-batches.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-effects.d.ts +43 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-effects.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-effects.js +92 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-effects.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-operation-postgres.d.ts +31 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-operation-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-operation-postgres.js +94 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-operation-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-ports.d.ts +102 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-ports.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-ports.js +2 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-ports.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-postgres.d.ts +17 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-postgres.js +367 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-remote-status.d.ts +10 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-remote-status.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-remote-status.js +37 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-remote-status.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-rollout.d.ts +36 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-rollout.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-rollout.js +156 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-rollout.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-schema.d.ts +4 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-schema.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-schema.js +162 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-schema.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-postgres.d.ts +92 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-postgres.js +271 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-support.d.ts +13 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-support.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-support.js +67 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-support.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-support.d.ts +15 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-support.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-support.js +47 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-support.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator.d.ts +1569 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator.js +274 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres-support.d.ts +41 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres-support.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres-support.js +163 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres-support.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres.d.ts +34 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres.js +274 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-schema.d.ts +3 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-schema.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-schema.js +120 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-schema.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification.d.ts +79 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification.js +88 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollback-guard.d.ts +6 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollback-guard.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollback-guard.js +38 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollback-guard.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-postgres.d.ts +61 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-postgres.js +292 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-readiness-postgres.d.ts +19 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-readiness-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-readiness-postgres.js +121 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-readiness-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-support.d.ts +119 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-support.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-support.js +194 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-support.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-runtime.d.ts +36 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-runtime.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-runtime.js +93 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-runtime.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-service-bootstrap.d.ts +32 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-service-bootstrap.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-service-bootstrap.js +68 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-service-bootstrap.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-maintenance.d.ts +36 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-maintenance.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-maintenance.js +92 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-maintenance.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-postgres.d.ts +23 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-postgres.js +231 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-schema-postgres.d.ts +13 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-schema-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-schema-postgres.js +399 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-schema-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-enqueue.d.ts +18 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-enqueue.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-enqueue.js +25 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-enqueue.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-evidence-postgres.d.ts +15 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-evidence-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-evidence-postgres.js +74 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-evidence-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-postgres.d.ts +19 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-postgres.js +249 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-recovery-postgres.d.ts +34 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-recovery-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-recovery-postgres.js +275 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-recovery-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync.d.ts +98 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync.js +179 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity.d.ts +110 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity.js +312 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/auth-discovery.d.ts +6 -0
- package/node_modules/@noodle-borg/service/dist/routes/auth-discovery.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/auth-discovery.js +36 -0
- package/node_modules/@noodle-borg/service/dist/routes/auth-discovery.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-read.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/billing-read.js +3 -9
- package/node_modules/@noodle-borg/service/dist/routes/billing-read.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/billing-stripe.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/billing-stripe.js +3 -3
- package/node_modules/@noodle-borg/service/dist/routes/billing-stripe.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/github-run-claim.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/github-run-claim.js +3 -1
- package/node_modules/@noodle-borg/service/dist/routes/github-run-claim.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration-dispatch.d.ts +8 -0
- package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration-dispatch.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration-dispatch.js +40 -0
- package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration-dispatch.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration.d.ts +13 -0
- package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration.js +158 -0
- package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/serve-options.d.ts +21 -3
- package/node_modules/@noodle-borg/service/dist/serve-options.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/serve.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/serve.js +61 -146
- package/node_modules/@noodle-borg/service/dist/serve.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/service-resource-cleanup.d.ts +1 -0
- package/node_modules/@noodle-borg/service/dist/service-resource-cleanup.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/service-resource-cleanup.js +3 -0
- package/node_modules/@noodle-borg/service/dist/service-resource-cleanup.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/service.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/service.js +17 -29
- package/node_modules/@noodle-borg/service/dist/service.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/control-plane.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/control-plane.js +60 -19
- package/node_modules/@noodle-borg/service/dist/store/control-plane.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-control-plane.d.ts +1 -2
- package/node_modules/@noodle-borg/service/dist/store/postgres-control-plane.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-control-plane.js +0 -40
- package/node_modules/@noodle-borg/service/dist/store/postgres-control-plane.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-personal-workspace.d.ts +5 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-personal-workspace.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-personal-workspace.js +176 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-personal-workspace.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-schema.d.ts +2 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-schema.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-schema.js +43 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-schema.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-signup.js +2 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-signup.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/workos-directory.d.ts +71 -0
- package/node_modules/@noodle-borg/service/dist/workos-directory.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/workos-directory.js +175 -0
- package/node_modules/@noodle-borg/service/dist/workos-directory.js.map +1 -0
- package/node_modules/@noodle-borg/service/package.json +1 -0
- package/node_modules/@workos-inc/node/LICENSE +21 -0
- package/node_modules/@workos-inc/node/README.md +140 -0
- package/node_modules/@workos-inc/node/lib/factory-B8vTFojy.d.cts +9727 -0
- package/node_modules/@workos-inc/node/lib/factory-B8vTFojy.d.mts +9727 -0
- package/node_modules/@workos-inc/node/lib/factory-CoKXdPX2.cjs +8426 -0
- package/node_modules/@workos-inc/node/lib/factory-CoKXdPX2.cjs.map +1 -0
- package/node_modules/@workos-inc/node/lib/factory-MKPb5Egh.mjs +8241 -0
- package/node_modules/@workos-inc/node/lib/factory-MKPb5Egh.mjs.map +1 -0
- package/node_modules/@workos-inc/node/lib/index.cjs +449 -0
- package/node_modules/@workos-inc/node/lib/index.cjs.map +1 -0
- package/node_modules/@workos-inc/node/lib/index.d.cts +478 -0
- package/node_modules/@workos-inc/node/lib/index.d.mts +478 -0
- package/node_modules/@workos-inc/node/lib/index.mjs +394 -0
- package/node_modules/@workos-inc/node/lib/index.mjs.map +1 -0
- package/node_modules/@workos-inc/node/lib/index.worker.cjs +60 -0
- package/node_modules/@workos-inc/node/lib/index.worker.cjs.map +1 -0
- package/node_modules/@workos-inc/node/lib/index.worker.d.cts +16 -0
- package/node_modules/@workos-inc/node/lib/index.worker.d.mts +16 -0
- package/node_modules/@workos-inc/node/lib/index.worker.mjs +35 -0
- package/node_modules/@workos-inc/node/lib/index.worker.mjs.map +1 -0
- package/node_modules/@workos-inc/node/lib/webapi-BgpV54gi.mjs +3224 -0
- package/node_modules/@workos-inc/node/lib/webapi-BgpV54gi.mjs.map +1 -0
- package/node_modules/@workos-inc/node/lib/webapi-BzGFatFp.cjs +3271 -0
- package/node_modules/@workos-inc/node/lib/webapi-BzGFatFp.cjs.map +1 -0
- package/node_modules/@workos-inc/node/package.json +96 -0
- package/package.json +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-auth-migration.d.ts","sourceRoot":"","sources":["../src/platform-auth-migration.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,uBAAuB,GAC/B,wBAAwB,GACxB,kCAAkC,GAClC,uBAAuB,GACvB,sBAAsB,GACtB,yBAAyB,GACzB,sCAAsC,CAAC;AAE3C,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,uBAAuB,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IAC9E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,4GAA4G;AAC5G,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,UAAU,EAAE,SAAS;QAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;QAC7B,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;KAC5C,EAAE,CAAC;IACJ,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C,QAAQ,CAAC,mBAAmB,EAAE,SAAS,MAAM,EAAE,CAAC;I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,EAAE,MAAM,CAAC;QACpC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;QAC5B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;QAChC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;KAClC,GAAG,OAAO,CAAC,wBAAwB,CAAC;CA8CtC"}
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import { createHash, randomUUID } from 'node:crypto';
|
|
2
|
+
import { normalizePlatformIdentityEmail } from './platform-identity.js';
|
|
3
|
+
/** Computes aggregate-only inventory. Its return value deliberately cannot be used to enumerate identities. */
|
|
4
|
+
export class PlatformAuthInventoryService {
|
|
5
|
+
async inspect(input) {
|
|
6
|
+
const candidates = new Map(input.principals.map((principal) => [principal.principalId, principal]));
|
|
7
|
+
for (const subject of [
|
|
8
|
+
...input.orgMemberships,
|
|
9
|
+
...input.googleBillingOwners,
|
|
10
|
+
...input.activeRefreshFamilies,
|
|
11
|
+
...input.developerGrants,
|
|
12
|
+
...input.ownerOnlyDeployers
|
|
13
|
+
.filter((actor) => actor.kind === 'human')
|
|
14
|
+
.map((actor) => actor.subject),
|
|
15
|
+
]) {
|
|
16
|
+
if (!candidates.has(subject))
|
|
17
|
+
continue; // Ambiguous evidence is not a license to create a migration root.
|
|
18
|
+
}
|
|
19
|
+
const blockers = {};
|
|
20
|
+
const emails = new Map();
|
|
21
|
+
for (const [principalId, principal] of candidates) {
|
|
22
|
+
const verified = [...new Set(principal.verifiedEmails.map(normalizePlatformIdentityEmail))];
|
|
23
|
+
if (verified.length === 0)
|
|
24
|
+
increment(blockers, 'missing_verified_email');
|
|
25
|
+
if (verified.length > 1)
|
|
26
|
+
increment(blockers, 'multiple_current_verified_emails');
|
|
27
|
+
if (principalId.length > 64)
|
|
28
|
+
increment(blockers, 'external_id_too_long');
|
|
29
|
+
for (const email of verified)
|
|
30
|
+
emails.set(email, (emails.get(email) ?? 0) + 1);
|
|
31
|
+
}
|
|
32
|
+
for (const count of emails.values())
|
|
33
|
+
if (count > 1)
|
|
34
|
+
increment(blockers, 'shared_verified_email');
|
|
35
|
+
for (const user of input.workosUsers) {
|
|
36
|
+
const email = normalizePlatformIdentityEmail(user.normalizedEmail);
|
|
37
|
+
const externalCandidate = user.externalId === undefined ? undefined : candidates.get(user.externalId);
|
|
38
|
+
const externalIdDisagrees = externalCandidate !== undefined &&
|
|
39
|
+
!externalCandidate.verifiedEmails.map(normalizePlatformIdentityEmail).includes(email);
|
|
40
|
+
const emailDisagrees = emails.has(email) &&
|
|
41
|
+
(!user.verified || user.externalId === undefined || externalCandidate === undefined);
|
|
42
|
+
if (externalIdDisagrees || emailDisagrees)
|
|
43
|
+
increment(blockers, 'conflicting_workos_user');
|
|
44
|
+
}
|
|
45
|
+
const safe = {
|
|
46
|
+
candidateCount: candidates.size,
|
|
47
|
+
excludedCount: input.excludedActors.length +
|
|
48
|
+
input.ownerOnlyDeployers.filter((actor) => actor.kind !== 'human').length,
|
|
49
|
+
blockers,
|
|
50
|
+
};
|
|
51
|
+
return { ...safe, checksum: fingerprint(safe) };
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
export class PlatformAuthMigrationError extends Error {
|
|
55
|
+
code;
|
|
56
|
+
constructor(code) {
|
|
57
|
+
super(code);
|
|
58
|
+
this.code = code;
|
|
59
|
+
this.name = 'PlatformAuthMigrationError';
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/** In-memory contract store; the Postgres implementation uses the same lease fencing fields. */
|
|
63
|
+
export class InMemoryPlatformAuthMigrationStore {
|
|
64
|
+
#backfills = new Map();
|
|
65
|
+
#imports = new Map();
|
|
66
|
+
#rolloutOperations = new Map();
|
|
67
|
+
#rollout = {
|
|
68
|
+
generation: 0,
|
|
69
|
+
workosPercentage: 0,
|
|
70
|
+
canaryClientIds: [],
|
|
71
|
+
lifecycle: 'google',
|
|
72
|
+
};
|
|
73
|
+
async recordBackfill(input) {
|
|
74
|
+
const key = `${input.source.provider}\0${input.source.realm}\0${input.source.subject}`;
|
|
75
|
+
const prior = this.#backfills.get(key);
|
|
76
|
+
if (prior !== undefined && prior !== input.principalId)
|
|
77
|
+
throw new PlatformAuthMigrationError('source_remap_forbidden');
|
|
78
|
+
if (prior !== undefined)
|
|
79
|
+
return 'already_backfilled';
|
|
80
|
+
this.#backfills.set(key, input.principalId);
|
|
81
|
+
return 'backfilled';
|
|
82
|
+
}
|
|
83
|
+
async claimImport(input, options = {}) {
|
|
84
|
+
const normalized = normalizeImport(input);
|
|
85
|
+
const key = importKey(normalized);
|
|
86
|
+
const previous = this.#imports.get(key);
|
|
87
|
+
if (previous?.leaseToken !== undefined && !options.forceExpired)
|
|
88
|
+
throw new PlatformAuthMigrationError('stale_lease');
|
|
89
|
+
if (previous?.retryAt !== undefined && previous.retryAt > Date.now())
|
|
90
|
+
throw new PlatformAuthMigrationError('stale_lease');
|
|
91
|
+
if (previous?.state === 'linked' ||
|
|
92
|
+
((previous?.state === 'blocked' || previous?.state === 'failed') &&
|
|
93
|
+
options.terminalRetry !== 'explicit_operator_reconcile'))
|
|
94
|
+
throw new PlatformAuthMigrationError('stale_lease');
|
|
95
|
+
const entry = previous ?? {
|
|
96
|
+
...normalized,
|
|
97
|
+
email: normalized.verifiedEmail,
|
|
98
|
+
state: 'pending',
|
|
99
|
+
attempt: 0,
|
|
100
|
+
};
|
|
101
|
+
entry.attempt += 1;
|
|
102
|
+
entry.leaseToken = randomUUID();
|
|
103
|
+
entry.leaseExpiresAt = Date.now() + 30_000;
|
|
104
|
+
this.#imports.set(key, entry);
|
|
105
|
+
return { key, leaseToken: entry.leaseToken, attempt: entry.attempt };
|
|
106
|
+
}
|
|
107
|
+
async finishImport(lease, result) {
|
|
108
|
+
const entry = this.#imports.get(lease.key);
|
|
109
|
+
if (entry?.leaseToken !== lease.leaseToken || entry.attempt !== lease.attempt)
|
|
110
|
+
throw new PlatformAuthMigrationError('stale_lease');
|
|
111
|
+
entry.state = result.state;
|
|
112
|
+
if (result.remoteUserId === undefined)
|
|
113
|
+
delete entry.remoteUserId;
|
|
114
|
+
else
|
|
115
|
+
entry.remoteUserId = result.remoteUserId;
|
|
116
|
+
if (result.state === 'reconcile_required') {
|
|
117
|
+
const retryAt = result.retryAt === undefined ? Date.now() : Date.parse(result.retryAt);
|
|
118
|
+
if (!Number.isFinite(retryAt))
|
|
119
|
+
throw new PlatformAuthMigrationError('invalid_import');
|
|
120
|
+
entry.retryAt = retryAt;
|
|
121
|
+
}
|
|
122
|
+
else
|
|
123
|
+
delete entry.retryAt;
|
|
124
|
+
delete entry.leaseToken;
|
|
125
|
+
delete entry.leaseExpiresAt;
|
|
126
|
+
return { state: entry.state };
|
|
127
|
+
}
|
|
128
|
+
getRollout() {
|
|
129
|
+
return this.#rollout;
|
|
130
|
+
}
|
|
131
|
+
setRollout(state) {
|
|
132
|
+
this.#rollout = state;
|
|
133
|
+
}
|
|
134
|
+
replayRollout(keyHash, request) {
|
|
135
|
+
const existing = this.#rolloutOperations.get(keyHash);
|
|
136
|
+
if (existing === undefined)
|
|
137
|
+
return undefined;
|
|
138
|
+
if (existing.request !== request)
|
|
139
|
+
throw new PlatformAuthMigrationError('idempotency_conflict');
|
|
140
|
+
return existing.result;
|
|
141
|
+
}
|
|
142
|
+
recordRollout(keyHash, request, result) {
|
|
143
|
+
this.#rolloutOperations.set(keyHash, { request, result });
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
export class PlatformAuthImportService {
|
|
147
|
+
#store;
|
|
148
|
+
#directory;
|
|
149
|
+
constructor(store, directory) {
|
|
150
|
+
this.#store = store;
|
|
151
|
+
this.#directory = directory;
|
|
152
|
+
}
|
|
153
|
+
async backfill(input) {
|
|
154
|
+
if (input.source.provider !== 'google')
|
|
155
|
+
throw new PlatformAuthMigrationError('invalid_import');
|
|
156
|
+
return { state: await this.#store.recordBackfill(input) };
|
|
157
|
+
}
|
|
158
|
+
importOne(input) {
|
|
159
|
+
return this.#run(input);
|
|
160
|
+
}
|
|
161
|
+
reconcileOne(input, options = {}) {
|
|
162
|
+
return this.#run(input, options);
|
|
163
|
+
}
|
|
164
|
+
async #run(input, options = {}) {
|
|
165
|
+
const normalized = normalizeImport(input);
|
|
166
|
+
const lease = await this.#store.claimImport(normalized, options);
|
|
167
|
+
// The lease claim completed above. No directory call is ever made while a database transaction is open.
|
|
168
|
+
let byExternalId;
|
|
169
|
+
try {
|
|
170
|
+
byExternalId = await this.#directory.findUserByExternalId(normalized.principalId);
|
|
171
|
+
}
|
|
172
|
+
catch (error) {
|
|
173
|
+
return this.#finishDirectoryFailure(lease, error);
|
|
174
|
+
}
|
|
175
|
+
if (byExternalId !== undefined)
|
|
176
|
+
return this.#finishMatched(lease, normalized, byExternalId);
|
|
177
|
+
let byEmail;
|
|
178
|
+
try {
|
|
179
|
+
byEmail = await this.#directory.listUsersByNormalizedEmail(normalized.verifiedEmail);
|
|
180
|
+
}
|
|
181
|
+
catch (error) {
|
|
182
|
+
return this.#finishDirectoryFailure(lease, error);
|
|
183
|
+
}
|
|
184
|
+
if (byEmail.length > 0) {
|
|
185
|
+
if (byEmail.length === 1 && byEmail[0] !== undefined)
|
|
186
|
+
return this.#finishMatched(lease, normalized, byEmail[0]);
|
|
187
|
+
return this.#store.finishImport(lease, { state: 'blocked' });
|
|
188
|
+
}
|
|
189
|
+
let created;
|
|
190
|
+
try {
|
|
191
|
+
created = await this.#directory.createVerifiedUser({
|
|
192
|
+
externalId: normalized.principalId,
|
|
193
|
+
normalizedEmail: normalized.verifiedEmail,
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
catch (error) {
|
|
197
|
+
return this.#finishDirectoryFailure(lease, error);
|
|
198
|
+
}
|
|
199
|
+
return this.#finishMatched(lease, normalized, created);
|
|
200
|
+
}
|
|
201
|
+
#finishDirectoryFailure(lease, error) {
|
|
202
|
+
const failure = directoryFailure(error);
|
|
203
|
+
if (failure === undefined)
|
|
204
|
+
throw error;
|
|
205
|
+
return this.#store.finishImport(lease, {
|
|
206
|
+
state: failure.kind === 'permanent' || failure.kind === 'unauthorized'
|
|
207
|
+
? 'failed'
|
|
208
|
+
: 'reconcile_required',
|
|
209
|
+
...(failure.retryAt === undefined ? {} : { retryAt: failure.retryAt }),
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
async #finishMatched(lease, input, user) {
|
|
213
|
+
if (!user.verified ||
|
|
214
|
+
user.externalId !== input.principalId ||
|
|
215
|
+
normalizePlatformIdentityEmail(user.normalizedEmail) !== input.verifiedEmail)
|
|
216
|
+
return this.#store.finishImport(lease, { state: 'blocked' });
|
|
217
|
+
return this.#store.finishImport(lease, { state: 'linked', remoteUserId: user.id });
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
export class PlatformAuthRolloutService {
|
|
221
|
+
#store;
|
|
222
|
+
#buildInfo;
|
|
223
|
+
constructor(store, buildInfo) {
|
|
224
|
+
this.#store = store;
|
|
225
|
+
this.#buildInfo = buildInfo;
|
|
226
|
+
}
|
|
227
|
+
async preview(input) {
|
|
228
|
+
const state = this.#store.getRollout();
|
|
229
|
+
return {
|
|
230
|
+
generation: state.generation,
|
|
231
|
+
checksum: fingerprint({ state, ...input, releaseSha: this.#buildInfo.gitSha }),
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
async mutate(input) {
|
|
235
|
+
if (!/^[0-9a-f]{40}$/.test(input.releaseSha) || input.releaseSha !== this.#buildInfo.gitSha)
|
|
236
|
+
throw new PlatformAuthMigrationError('release_sha_mismatch');
|
|
237
|
+
const request = fingerprint({ ...input, idempotencyKey: undefined });
|
|
238
|
+
const replay = this.#store.replayRollout(fingerprint(input.idempotencyKey), request);
|
|
239
|
+
if (replay !== undefined)
|
|
240
|
+
return replay;
|
|
241
|
+
const state = this.#store.getRollout();
|
|
242
|
+
if (state.generation !== input.expectedGeneration)
|
|
243
|
+
throw new PlatformAuthMigrationError('stale_generation');
|
|
244
|
+
const expected = (await this.preview({
|
|
245
|
+
operation: input.operation,
|
|
246
|
+
percentage: input.percentage,
|
|
247
|
+
canaryClientIds: input.canaryClientIds ?? [],
|
|
248
|
+
})).checksum;
|
|
249
|
+
if (expected !== input.previewChecksum)
|
|
250
|
+
throw new PlatformAuthMigrationError('preview_mismatch');
|
|
251
|
+
if (!Number.isInteger(input.percentage) ||
|
|
252
|
+
input.percentage < 0 ||
|
|
253
|
+
input.percentage > 100 ||
|
|
254
|
+
(input.operation === 'activate' && input.percentage < state.workosPercentage) ||
|
|
255
|
+
(input.operation === 'rollback' && input.percentage !== 0))
|
|
256
|
+
throw new PlatformAuthMigrationError('rollout_transition_invalid');
|
|
257
|
+
if (input.operation === 'finalize' &&
|
|
258
|
+
(state.workosPercentage !== 100 || input.percentage !== 100))
|
|
259
|
+
throw new PlatformAuthMigrationError('finalize_precondition_failed');
|
|
260
|
+
const canaries = input.operation === 'rollback'
|
|
261
|
+
? state.canaryClientIds
|
|
262
|
+
: [...new Set(input.canaryClientIds ?? state.canaryClientIds)].sort();
|
|
263
|
+
const result = {
|
|
264
|
+
generation: state.generation + 1,
|
|
265
|
+
workosPercentage: input.percentage,
|
|
266
|
+
canaryClientIds: canaries,
|
|
267
|
+
lifecycle: input.operation === 'finalize' ? 'finalized' : input.percentage === 0 ? 'google' : 'workos',
|
|
268
|
+
};
|
|
269
|
+
this.#store.setRollout(result);
|
|
270
|
+
this.#store.recordRollout(fingerprint(input.idempotencyKey), request, result);
|
|
271
|
+
return result;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
function normalizeImport(input) {
|
|
275
|
+
if (input.principalId.length === 0 ||
|
|
276
|
+
input.principalId.length > 64 ||
|
|
277
|
+
input.realm.trim().length === 0)
|
|
278
|
+
throw new PlatformAuthMigrationError('invalid_import');
|
|
279
|
+
return {
|
|
280
|
+
...input,
|
|
281
|
+
realm: input.realm.trim(),
|
|
282
|
+
verifiedEmail: normalizePlatformIdentityEmail(input.verifiedEmail),
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
function importKey(input) {
|
|
286
|
+
return `${input.runId}\0${input.realm}\0${input.principalId}`;
|
|
287
|
+
}
|
|
288
|
+
function directoryFailure(error) {
|
|
289
|
+
if (typeof error === 'object' && error !== null && 'kind' in error) {
|
|
290
|
+
const candidate = error;
|
|
291
|
+
const kind = candidate.kind;
|
|
292
|
+
if (kind === 'conflict' ||
|
|
293
|
+
kind === 'rate_limited' ||
|
|
294
|
+
kind === 'transient' ||
|
|
295
|
+
kind === 'permanent' ||
|
|
296
|
+
kind === 'unauthorized')
|
|
297
|
+
return {
|
|
298
|
+
kind,
|
|
299
|
+
...(validRetryAt(candidate.retryAt) ? { retryAt: candidate.retryAt } : {}),
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
return undefined;
|
|
303
|
+
}
|
|
304
|
+
function validRetryAt(value) {
|
|
305
|
+
return typeof value === 'string' && Number.isFinite(Date.parse(value));
|
|
306
|
+
}
|
|
307
|
+
function increment(target, code) {
|
|
308
|
+
target[code] = (target[code] ?? 0) + 1;
|
|
309
|
+
}
|
|
310
|
+
function fingerprint(value) {
|
|
311
|
+
return createHash('sha256').update(JSON.stringify(value)).digest('hex');
|
|
312
|
+
}
|
|
313
|
+
//# sourceMappingURL=platform-auth-migration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-auth-migration.js","sourceRoot":"","sources":["../src/platform-auth-migration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AAmDxE,+GAA+G;AAC/G,MAAM,OAAO,4BAA4B;IACvC,KAAK,CAAC,OAAO,CAAC,KAAiC;QAC7C,MAAM,UAAU,GAAG,IAAI,GAAG,CACxB,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,CACxE,CAAC;QACF,KAAK,MAAM,OAA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,SAAS,CAAC;AACnB,CAAC;AACD,SAAS,YAAY,CAAC,KAAc;IAClC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;AACzE,CAAC;AACD,SAAS,SAAS,CAChB,MAAwD,EACxD,IAA6B;IAE7B,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;AACzC,CAAC;AACD,SAAS,WAAW,CAAC,KAAc;IACjC,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC1E,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { PlatformAuthExecuteInput, PlatformAuthOperationResult, PlatformAuthOperatorSnapshot, PlatformAuthSynchronizationComponent } from './platform-auth-operator.js';
|
|
2
|
+
import type { PlatformAuthImportServicePort, PlatformAuthMigrationStorePort, PlatformAuthOperatorCurrentLineage, PlatformAuthRemoteVerificationWorkerPort } from './platform-auth-operator-ports.js';
|
|
3
|
+
import type { PostgresPlatformAuthOperatorState } from './platform-auth-operator-state-postgres.js';
|
|
4
|
+
export declare function executePlatformAuthStartImport(input: {
|
|
5
|
+
readonly request: Extract<PlatformAuthExecuteInput, {
|
|
6
|
+
readonly operation: 'start_import';
|
|
7
|
+
}>;
|
|
8
|
+
readonly snapshot: PlatformAuthOperatorSnapshot;
|
|
9
|
+
readonly state: PostgresPlatformAuthOperatorState;
|
|
10
|
+
readonly migrationStore: PlatformAuthMigrationStorePort;
|
|
11
|
+
readonly releaseSha: string;
|
|
12
|
+
readonly workosRealm: string;
|
|
13
|
+
readonly realmFingerprint: string;
|
|
14
|
+
readonly inventorySelector: {
|
|
15
|
+
readonly releaseSha: string;
|
|
16
|
+
readonly workosRealmFingerprint: string;
|
|
17
|
+
};
|
|
18
|
+
readonly status: () => Promise<PlatformAuthOperatorSnapshot>;
|
|
19
|
+
}): Promise<PlatformAuthOperationResult>;
|
|
20
|
+
export declare function executePlatformAuthReconcile(input: {
|
|
21
|
+
readonly request: Extract<PlatformAuthExecuteInput, {
|
|
22
|
+
readonly operation: 'reconcile';
|
|
23
|
+
}>;
|
|
24
|
+
readonly snapshot: PlatformAuthOperatorSnapshot;
|
|
25
|
+
readonly state: PostgresPlatformAuthOperatorState;
|
|
26
|
+
readonly migrationStore: PlatformAuthMigrationStorePort;
|
|
27
|
+
readonly importService: PlatformAuthImportServicePort;
|
|
28
|
+
readonly workosRealm: string;
|
|
29
|
+
readonly currentLineage: () => Promise<PlatformAuthOperatorCurrentLineage>;
|
|
30
|
+
readonly outboxProcessor?: {
|
|
31
|
+
processOnce(limit?: number): Promise<{
|
|
32
|
+
readonly attempted: number;
|
|
33
|
+
readonly delivered: number;
|
|
34
|
+
readonly blocked: number;
|
|
35
|
+
readonly retryRequired: number;
|
|
36
|
+
}>;
|
|
37
|
+
};
|
|
38
|
+
readonly eventsProcessor?: {
|
|
39
|
+
processOnce(): Promise<{
|
|
40
|
+
readonly processed: number;
|
|
41
|
+
readonly cursor?: string;
|
|
42
|
+
}>;
|
|
43
|
+
};
|
|
44
|
+
readonly remoteVerificationWorker?: PlatformAuthRemoteVerificationWorkerPort;
|
|
45
|
+
readonly markMaintenanceSuccess: (components: readonly PlatformAuthSynchronizationComponent[]) => Promise<void>;
|
|
46
|
+
readonly status: () => Promise<PlatformAuthOperatorSnapshot>;
|
|
47
|
+
}): Promise<PlatformAuthOperationResult>;
|
|
48
|
+
//# sourceMappingURL=platform-auth-operator-batches.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-auth-operator-batches.d.ts","sourceRoot":"","sources":["../src/platform-auth-operator-batches.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EAC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Q,CAAC,aAAa,EAAE,6BAA6B,CAAC;IACtD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,cAAc,EAAE,MAAM,OAAO,CAAC,kCAAkC,CAAC,CAAC;IAC3E,QAAQ,CAAC,eAAe,CAAC,EAAE;QACzB,WAAW,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;YACnC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;YAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;YAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;YACzB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;SAChC,CAAC,CAAC;KACJ,CAAC;IACF,QAAQ,CAAC,eAAe,CAAC,EAAE;QACzB,WAAW,IAAI,OAAO,CAAC;YAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KAClF,CAAC;IACF,QAAQ,CAAC,wBAAwB,CAAC,EAAE,wCAAwC,CAAC;IAC7E,QAAQ,CAAC,sBAAsB,EAAE,CAC/B,UAAU,EAAE,SAAS,oCAAoC,EAAE,KACxD,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,QAAQ,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,4BAA4B,CAAC,CAAC;CAC9D,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAqFvC"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { PlatformAuthOperationResultSchema, PlatformAuthOperatorError, } from './platform-auth-operator.js';
|
|
2
|
+
import { platformAuthOperatorHash as hash } from './platform-auth-operator-state-postgres.js';
|
|
3
|
+
import { platformAuthPreviewSnapshotFingerprint } from './platform-auth-operator-support.js';
|
|
4
|
+
import { platformAuthRemoteVerificationFreshAfter } from './platform-auth-remote-verification.js';
|
|
5
|
+
export async function executePlatformAuthStartImport(input) {
|
|
6
|
+
const { request } = input;
|
|
7
|
+
await assertPlatformAuthOwnPreview(request, input.snapshot, input.state, {
|
|
8
|
+
percentage: null,
|
|
9
|
+
batchSize: null,
|
|
10
|
+
});
|
|
11
|
+
const inventory = await input.state.latestInventory(input.inventorySelector);
|
|
12
|
+
if (inventory === undefined)
|
|
13
|
+
throw new PlatformAuthOperatorError('inventory_unavailable');
|
|
14
|
+
const suffix = hash(request.idempotencyKey).slice(0, 32);
|
|
15
|
+
const backfillRunId = `backfill-${suffix}`;
|
|
16
|
+
const importRunId = `import-${suffix}`;
|
|
17
|
+
return input.state.withStartImportLock({
|
|
18
|
+
releaseSha: input.releaseSha,
|
|
19
|
+
workosRealmFingerprint: input.realmFingerprint,
|
|
20
|
+
inventoryRunId: inventory.runId,
|
|
21
|
+
backfillRunId,
|
|
22
|
+
importRunId,
|
|
23
|
+
}, async () => {
|
|
24
|
+
const common = {
|
|
25
|
+
releaseSha: input.releaseSha,
|
|
26
|
+
workosRealm: input.workosRealm,
|
|
27
|
+
actorFingerprint: request.actorFingerprint,
|
|
28
|
+
inventoryRunId: inventory.runId,
|
|
29
|
+
inventoryChecksum: inventory.checksum,
|
|
30
|
+
};
|
|
31
|
+
const backfill = await input.migrationStore.createRun({
|
|
32
|
+
...common,
|
|
33
|
+
runId: backfillRunId,
|
|
34
|
+
kind: 'backfill',
|
|
35
|
+
});
|
|
36
|
+
const imports = await input.migrationStore.createRun({
|
|
37
|
+
...common,
|
|
38
|
+
runId: importRunId,
|
|
39
|
+
kind: 'import',
|
|
40
|
+
});
|
|
41
|
+
await input.state.insertCampaign({
|
|
42
|
+
importRunId: imports.runId,
|
|
43
|
+
backfillRunId: backfill.runId,
|
|
44
|
+
inventoryRunId: inventory.runId,
|
|
45
|
+
inventoryChecksum: inventory.checksum,
|
|
46
|
+
importLineageChecksum: imports.lineageChecksum,
|
|
47
|
+
workosRealmFingerprint: input.realmFingerprint,
|
|
48
|
+
releaseSha: input.releaseSha,
|
|
49
|
+
});
|
|
50
|
+
return PlatformAuthOperationResultSchema.parse({
|
|
51
|
+
...(await input.status()),
|
|
52
|
+
operation: request.operation,
|
|
53
|
+
replayed: false,
|
|
54
|
+
batch: null,
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
export async function executePlatformAuthReconcile(input) {
|
|
59
|
+
const { request } = input;
|
|
60
|
+
await assertPlatformAuthOwnPreview(request, input.snapshot, input.state, {
|
|
61
|
+
percentage: null,
|
|
62
|
+
batchSize: request.batchSize,
|
|
63
|
+
});
|
|
64
|
+
const lineage = await input.currentLineage();
|
|
65
|
+
const candidates = (await input.migrationStore.listFrozenCandidateBatch(lineage.campaign.importRunId, {
|
|
66
|
+
limit: request.batchSize,
|
|
67
|
+
eligibility: 'operator_reconcile',
|
|
68
|
+
})).candidates;
|
|
69
|
+
const counts = { attempted: 0, linked: 0, blocked: 0, retryRequired: 0, failed: 0 };
|
|
70
|
+
for (const candidate of candidates) {
|
|
71
|
+
await input.importService.backfill({
|
|
72
|
+
runId: lineage.campaign.backfillRunId,
|
|
73
|
+
source: candidate.source,
|
|
74
|
+
principalId: candidate.principalId,
|
|
75
|
+
verifiedEmail: candidate.verifiedEmail,
|
|
76
|
+
});
|
|
77
|
+
const outcome = await input.importService.reconcileOne({
|
|
78
|
+
runId: lineage.campaign.importRunId,
|
|
79
|
+
realm: input.workosRealm,
|
|
80
|
+
principalId: candidate.principalId,
|
|
81
|
+
verifiedEmail: candidate.verifiedEmail,
|
|
82
|
+
}, { terminalRetry: 'explicit_operator_reconcile' });
|
|
83
|
+
counts.attempted += 1;
|
|
84
|
+
if (outcome.state === 'linked')
|
|
85
|
+
counts.linked += 1;
|
|
86
|
+
else if (outcome.state === 'blocked')
|
|
87
|
+
counts.blocked += 1;
|
|
88
|
+
else if (outcome.state === 'failed')
|
|
89
|
+
counts.failed += 1;
|
|
90
|
+
else
|
|
91
|
+
counts.retryRequired += 1;
|
|
92
|
+
}
|
|
93
|
+
const [outbox, events] = await Promise.all([
|
|
94
|
+
input.outboxProcessor?.processOnce(request.batchSize),
|
|
95
|
+
input.eventsProcessor?.processOnce(),
|
|
96
|
+
]);
|
|
97
|
+
await input.markMaintenanceSuccess([
|
|
98
|
+
...(outbox === undefined ? [] : ['outbox']),
|
|
99
|
+
...(events === undefined ? [] : ['events']),
|
|
100
|
+
]);
|
|
101
|
+
let after = await input.status();
|
|
102
|
+
if (after.import.state === 'completed') {
|
|
103
|
+
await Promise.all([
|
|
104
|
+
input.migrationStore.completeRun(lineage.campaign.backfillRunId),
|
|
105
|
+
input.migrationStore.completeRun(lineage.campaign.importRunId),
|
|
106
|
+
]);
|
|
107
|
+
await input.state.markCampaignComplete(lineage.campaign);
|
|
108
|
+
after = await input.status();
|
|
109
|
+
}
|
|
110
|
+
if (after.import.state === 'completed' && input.remoteVerificationWorker !== undefined) {
|
|
111
|
+
await input.remoteVerificationWorker.verify({
|
|
112
|
+
inventoryRunId: lineage.inventory.runId,
|
|
113
|
+
importRunId: lineage.campaign.importRunId,
|
|
114
|
+
realm: input.workosRealm,
|
|
115
|
+
freshAfter: platformAuthRemoteVerificationFreshAfter(),
|
|
116
|
+
limit: request.batchSize,
|
|
117
|
+
});
|
|
118
|
+
after = await input.status();
|
|
119
|
+
}
|
|
120
|
+
return PlatformAuthOperationResultSchema.parse({
|
|
121
|
+
...after,
|
|
122
|
+
operation: request.operation,
|
|
123
|
+
replayed: false,
|
|
124
|
+
batch: {
|
|
125
|
+
...counts,
|
|
126
|
+
outbox: outbox === undefined
|
|
127
|
+
? {
|
|
128
|
+
status: 'not_configured',
|
|
129
|
+
attempted: 0,
|
|
130
|
+
delivered: 0,
|
|
131
|
+
blocked: 0,
|
|
132
|
+
retryRequired: 0,
|
|
133
|
+
}
|
|
134
|
+
: { status: 'ready', ...outbox },
|
|
135
|
+
events: events === undefined
|
|
136
|
+
? { status: 'not_configured', processed: 0 }
|
|
137
|
+
: { status: 'ready', processed: events.processed },
|
|
138
|
+
},
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
async function assertPlatformAuthOwnPreview(input, snapshot, state, target) {
|
|
142
|
+
await state.assertPreview({
|
|
143
|
+
checksum: input.previewChecksum,
|
|
144
|
+
operation: input.operation,
|
|
145
|
+
expectedGeneration: input.expectedGeneration,
|
|
146
|
+
releaseSha: input.releaseSha,
|
|
147
|
+
targetFingerprint: hash({
|
|
148
|
+
...target,
|
|
149
|
+
cohortMode: null,
|
|
150
|
+
canaryClientSetHash: hash([]),
|
|
151
|
+
canaryClientCount: 0,
|
|
152
|
+
recoveryClientSetHash: hash([]),
|
|
153
|
+
recoveryClientCount: 0,
|
|
154
|
+
}),
|
|
155
|
+
snapshotFingerprint: platformAuthPreviewSnapshotFingerprint(snapshot),
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
//# sourceMappingURL=platform-auth-operator-batches.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-auth-operator-batches.js","sourceRoot":"","sources":["../src/platform-auth-operator-batches.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,iCAAiC,EACjC,yBAAyB,GAC1B,MAAM,6BAA6B,CAAC;AAQrC,OAAO,EAAE,wBAAwB,IAAI,IAAI,EAAE,MAAM,4CAA4C,CAAC;AAC9F,OAAO,EAAE,sCAAsC,EAAE,MAAM,qCAAqC,CAAC;AAC7F,OAAO,EAAE,wCAAwC,EAAE,MAAM,wCAAwC,CAAC;AAElG,MAAM,CAAC,KAAK,UAAU,8BAA8B,CAAC,KAapD;IACC,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAC1B,MAAM,4BAA4B,CAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,KAAK,EAAE;QACvE,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,IAAI;KAChB,CAAC,CAAC;IACH,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC,KAAK,CAAC,eAAe,CAAC,KAAK,CAAC,iBAAiB,C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CAAC;iBACjB;gBACH,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,EAAE;YACpC,MAAM,EACJ,MAAM,KAAK,SAAS;gBAClB,CAAC,CAAC,EAAE,MAAM,EAAE,gBAAgB,EAAE,SAAS,EAAE,CAAC,EAAE;gBAC5C,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE;SACvD;KACF,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,4BAA4B,CACzC,KAA8F,EAC9F,QAAsC,EACtC,KAAwC,EACxC,MAAwE;IAExE,MAAM,KAAK,CAAC,aAAa,CAAC;QACxB,QAAQ,EAAE,KAAK,CAAC,eAAe;QAC/B,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,kBAAkB,EAAE,KAAK,CAAC,kBAAkB;QAC5C,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,iBAAiB,EAAE,IAAI,CAAC;YACtB,GAAG,MAAM;YACT,UAAU,EAAE,IAAI;YAChB,mBAAmB,EAAE,IAAI,CAAC,EAAE,CAAC;YAC7B,iBAAiB,EAAE,CAAC;YACpB,qBAAqB,EAAE,IAAI,CAAC,EAAE,CAAC;YAC/B,mBAAmB,EAAE,CAAC;SACvB,CAAC;QACF,mBAAmB,EAAE,sCAAsC,CAAC,QAAQ,CAAC;KACtE,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { PlatformAuthExecuteInput, PlatformAuthOperationResult, PlatformAuthOperatorSnapshot } from './platform-auth-operator.js';
|
|
2
|
+
import type { PlatformAuthOperatorCurrentLineage, PlatformAuthRolloutStorePort } from './platform-auth-operator-ports.js';
|
|
3
|
+
import type { PostgresPlatformAuthOperatorState } from './platform-auth-operator-state-postgres.js';
|
|
4
|
+
import type { PlatformAuthRolloutLineage, PlatformAuthRolloutMutationInput, PlatformAuthRolloutSafeResult } from './platform-auth-rollout-postgres.js';
|
|
5
|
+
import type { PlatformIdentitySyncRecoveryResult, PlatformIdentitySyncRecoveryStore } from './platform-identity-sync.js';
|
|
6
|
+
type RolloutInput = Extract<PlatformAuthExecuteInput, {
|
|
7
|
+
readonly operation: 'activate' | 'rollback' | 'finalize';
|
|
8
|
+
}>;
|
|
9
|
+
export declare function recoverPlatformAuthOutbox(input: {
|
|
10
|
+
readonly request: Extract<PlatformAuthExecuteInput, {
|
|
11
|
+
readonly operation: 'recover_outbox';
|
|
12
|
+
}>;
|
|
13
|
+
readonly snapshot: PlatformAuthOperatorSnapshot;
|
|
14
|
+
readonly requestFingerprint: string;
|
|
15
|
+
readonly store: PlatformIdentitySyncRecoveryStore;
|
|
16
|
+
readonly state: PostgresPlatformAuthOperatorState;
|
|
17
|
+
readonly status: () => Promise<PlatformAuthOperatorSnapshot>;
|
|
18
|
+
}): Promise<PlatformAuthOperationResult>;
|
|
19
|
+
export declare function platformAuthRecoveryResult(input: Extract<PlatformAuthExecuteInput, {
|
|
20
|
+
readonly operation: 'recover_outbox';
|
|
21
|
+
}>, recovery: PlatformIdentitySyncRecoveryResult, status: () => Promise<PlatformAuthOperatorSnapshot>): Promise<PlatformAuthOperationResult>;
|
|
22
|
+
export declare function executePlatformAuthRollout(input: {
|
|
23
|
+
readonly request: RolloutInput;
|
|
24
|
+
readonly requestFingerprint: string;
|
|
25
|
+
readonly rolloutStore: PlatformAuthRolloutStorePort;
|
|
26
|
+
readonly releaseSha: string;
|
|
27
|
+
readonly workosRealm: string;
|
|
28
|
+
readonly currentLineage: () => Promise<PlatformAuthOperatorCurrentLineage>;
|
|
29
|
+
readonly status: () => Promise<PlatformAuthOperatorSnapshot>;
|
|
30
|
+
}): Promise<PlatformAuthOperationResult>;
|
|
31
|
+
export declare function platformAuthRolloutMutation(input: {
|
|
32
|
+
readonly request: RolloutInput;
|
|
33
|
+
readonly requestFingerprint: string;
|
|
34
|
+
readonly rolloutStore: PlatformAuthRolloutStorePort;
|
|
35
|
+
readonly releaseSha: string;
|
|
36
|
+
readonly workosRealm: string;
|
|
37
|
+
readonly currentLineage: () => Promise<PlatformAuthOperatorCurrentLineage>;
|
|
38
|
+
readonly operation: 'activate' | 'rollback' | 'finalize';
|
|
39
|
+
}): Promise<PlatformAuthRolloutMutationInput>;
|
|
40
|
+
export declare function platformAuthRolloutResult(input: RolloutInput, rollout: PlatformAuthRolloutSafeResult, replayed: boolean, status: () => Promise<PlatformAuthOperatorSnapshot>): Promise<PlatformAuthOperationResult>;
|
|
41
|
+
export declare function resolvePlatformAuthRolloutLineage(operation: 'activate' | 'rollback' | 'finalize', rolloutStore: PlatformAuthRolloutStorePort, currentLineage: () => Promise<PlatformAuthOperatorCurrentLineage>): Promise<PlatformAuthRolloutLineage>;
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=platform-auth-operator-effects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-auth-operator-effects.d.ts","sourceRoot":"","sources":["../src/platform-auth-operator-effects.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,2BAA2B,EAC3B,4BAA4B,EAC7B,MAAM,6BAA6B,CAAC;AAErC,OAAO,KAAK,EACV,kCAAkC,EAClC,4BAA4B,EAC7B,MAAM,mCAAmC,CAAC;AAM3C,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,4CAA4C,CAAC;AAOpG,OAAO,KAAK,EACV,0BAA0B,EAC1B,gCAAgC,EAChC,6BAA6B,EAC9B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EACV,kCAAkC,EAClC,iCAAiC,EAClC,MAAM,6BAA6B,CAAC;AAErC,KAAK,YAAY,GAAG,OAAO,CACzB,wBAAwB,EACxB;IAAE,QAAQ,CAAC,SAAS,EAAE,UAAU,GAAG,UAAU,GAAG,UAAU,CAAA;CAAE,CAC7D,CAAC;AAEF,wBAAsB,yBAAyB,CAAC,KAAK,EAAE;IACrD,QAAQ,CAA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