n8n 2.16.0 → 2.17.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/README.md +1 -1
- package/dist/active-workflow-manager.d.ts +3 -1
- package/dist/active-workflow-manager.js +37 -4
- package/dist/active-workflow-manager.js.map +1 -1
- package/dist/auth/auth.service.d.ts +5 -2
- package/dist/auth/auth.service.js +10 -6
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/commands/base-command.js +8 -2
- package/dist/commands/base-command.js.map +1 -1
- package/dist/commands/start.d.ts +1 -0
- package/dist/commands/start.js +7 -0
- package/dist/commands/start.js.map +1 -1
- package/dist/constants.d.ts +2 -0
- package/dist/constants.js +5 -1
- package/dist/constants.js.map +1 -1
- package/dist/controllers/ai.controller.d.ts +11 -2
- package/dist/controllers/ai.controller.js +54 -2
- package/dist/controllers/ai.controller.js.map +1 -1
- package/dist/controllers/auth.controller.js +1 -1
- package/dist/controllers/auth.controller.js.map +1 -1
- package/dist/controllers/e2e.controller.js +3 -0
- package/dist/controllers/e2e.controller.js.map +1 -1
- package/dist/controllers/me.controller.d.ts +1 -0
- package/dist/controllers/me.controller.js +12 -0
- package/dist/controllers/me.controller.js.map +1 -1
- package/dist/controllers/project.controller.d.ts +3 -1
- package/dist/controllers/project.controller.js +9 -2
- package/dist/controllers/project.controller.js.map +1 -1
- package/dist/controllers/role.controller.d.ts +6 -4
- package/dist/controllers/role.controller.js +28 -8
- package/dist/controllers/role.controller.js.map +1 -1
- package/dist/controllers/users.controller.d.ts +4 -1
- package/dist/controllers/users.controller.js +8 -2
- package/dist/controllers/users.controller.js.map +1 -1
- package/dist/credentials/credentials.controller.js +3 -0
- package/dist/credentials/credentials.controller.js.map +1 -1
- package/dist/credentials/credentials.service.d.ts +3 -2
- package/dist/credentials/credentials.service.js +21 -10
- package/dist/credentials/credentials.service.js.map +1 -1
- package/dist/credentials/validation.js +2 -2
- package/dist/credentials/validation.js.map +1 -1
- package/dist/credentials-helper.d.ts +3 -1
- package/dist/credentials-helper.js +14 -2
- package/dist/credentials-helper.js.map +1 -1
- package/dist/eventbus/event-message-classes/index.d.ts +2 -2
- package/dist/eventbus/event-message-classes/index.js +7 -0
- package/dist/eventbus/event-message-classes/index.js.map +1 -1
- package/dist/events/maps/relay.event-map.d.ts +92 -0
- package/dist/events/relays/log-streaming.event-relay.d.ts +7 -0
- package/dist/events/relays/log-streaming.event-relay.js +87 -2
- package/dist/events/relays/log-streaming.event-relay.js.map +1 -1
- package/dist/events/relays/telemetry.event-relay.d.ts +5 -0
- package/dist/events/relays/telemetry.event-relay.js +58 -5
- package/dist/events/relays/telemetry.event-relay.js.map +1 -1
- package/dist/execution-lifecycle/execution-lifecycle-hooks.d.ts +1 -1
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js +22 -9
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js.map +1 -1
- package/dist/instance-settings-loader/instance-settings-loader.service.d.ts +9 -0
- package/dist/instance-settings-loader/instance-settings-loader.service.js +36 -0
- package/dist/instance-settings-loader/instance-settings-loader.service.js.map +1 -0
- package/dist/instance-settings-loader/loaders/owner.instance-settings-loader.d.ts +10 -0
- package/dist/instance-settings-loader/loaders/owner.instance-settings-loader.js +72 -0
- package/dist/instance-settings-loader/loaders/owner.instance-settings-loader.js.map +1 -0
- package/dist/modules/chat-hub/stream-capturer.js +3 -0
- package/dist/modules/chat-hub/stream-capturer.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-introspection-identifier.d.ts +2 -2
- package/dist/modules/external-secrets.ee/external-secrets-settings.controller.ee.d.ts +5 -2
- package/dist/modules/external-secrets.ee/external-secrets-settings.controller.ee.js +10 -3
- package/dist/modules/external-secrets.ee/external-secrets-settings.controller.ee.js.map +1 -1
- package/dist/modules/external-secrets.ee/secrets-providers-connections.controller.ee.js +5 -5
- package/dist/modules/external-secrets.ee/secrets-providers-connections.controller.ee.js.map +1 -1
- package/dist/modules/external-secrets.ee/secrets-providers-connections.service.ee.d.ts +6 -6
- package/dist/modules/external-secrets.ee/secrets-providers-connections.service.ee.js +14 -9
- package/dist/modules/external-secrets.ee/secrets-providers-connections.service.ee.js.map +1 -1
- package/dist/modules/external-secrets.ee/secrets-providers-project.controller.ee.js +3 -3
- package/dist/modules/external-secrets.ee/secrets-providers-project.controller.ee.js.map +1 -1
- package/dist/modules/instance-ai/eval/api-docs.d.ts +1 -0
- package/dist/modules/instance-ai/eval/api-docs.js +78 -0
- package/dist/modules/instance-ai/eval/api-docs.js.map +1 -0
- package/dist/modules/instance-ai/eval/execution.service.d.ts +25 -0
- package/dist/modules/instance-ai/eval/execution.service.js +291 -0
- package/dist/modules/instance-ai/eval/execution.service.js.map +1 -0
- package/dist/modules/instance-ai/eval/mock-handler.d.ts +9 -0
- package/dist/modules/instance-ai/eval/mock-handler.js +264 -0
- package/dist/modules/instance-ai/eval/mock-handler.js.map +1 -0
- package/dist/modules/instance-ai/eval/node-config.d.ts +2 -0
- package/dist/modules/instance-ai/eval/node-config.js +15 -0
- package/dist/modules/instance-ai/eval/node-config.js.map +1 -0
- package/dist/modules/instance-ai/eval/pin-data-generator.d.ts +12 -0
- package/dist/modules/instance-ai/eval/pin-data-generator.js +301 -0
- package/dist/modules/instance-ai/eval/pin-data-generator.js.map +1 -0
- package/dist/modules/instance-ai/eval/request-sanitizer.d.ts +3 -0
- package/dist/modules/instance-ai/eval/request-sanitizer.js +50 -0
- package/dist/modules/instance-ai/eval/request-sanitizer.js.map +1 -0
- package/dist/modules/instance-ai/eval/workflow-analysis.d.ts +16 -0
- package/dist/modules/instance-ai/eval/workflow-analysis.js +217 -0
- package/dist/modules/instance-ai/eval/workflow-analysis.js.map +1 -0
- package/dist/modules/instance-ai/filesystem/index.d.ts +0 -1
- package/dist/modules/instance-ai/filesystem/index.js +1 -3
- package/dist/modules/instance-ai/filesystem/index.js.map +1 -1
- package/dist/modules/instance-ai/filesystem/local-gateway.js +1 -1
- package/dist/modules/instance-ai/instance-ai-memory.service.d.ts +11 -7
- package/dist/modules/instance-ai/instance-ai-memory.service.js +21 -41
- package/dist/modules/instance-ai/instance-ai-memory.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-settings.service.d.ts +4 -0
- package/dist/modules/instance-ai/instance-ai-settings.service.js +26 -6
- package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +8 -3
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +189 -35
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.controller.d.ts +10 -11
- package/dist/modules/instance-ai/instance-ai.controller.js +101 -44
- package/dist/modules/instance-ai/instance-ai.controller.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.module.d.ts +1 -2
- package/dist/modules/instance-ai/instance-ai.module.js +4 -5
- package/dist/modules/instance-ai/instance-ai.module.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.service.d.ts +9 -8
- package/dist/modules/instance-ai/instance-ai.service.js +189 -61
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
- package/dist/modules/instance-ai/internal-messages.js +1 -1
- package/dist/modules/instance-ai/internal-messages.js.map +1 -1
- package/dist/modules/instance-ai/proxy-token-manager.d.ts +15 -0
- package/dist/modules/instance-ai/proxy-token-manager.js +64 -0
- package/dist/modules/instance-ai/proxy-token-manager.js.map +1 -0
- package/dist/modules/instance-ai/snapshot-pruning.service.d.ts +4 -1
- package/dist/modules/instance-ai/snapshot-pruning.service.js +18 -6
- package/dist/modules/instance-ai/snapshot-pruning.service.js.map +1 -1
- package/dist/modules/instance-ai/storage/db-snapshot-storage.d.ts +4 -0
- package/dist/modules/instance-ai/storage/db-snapshot-storage.js +25 -0
- package/dist/modules/instance-ai/storage/db-snapshot-storage.js.map +1 -1
- package/dist/modules/instance-ai/storage/typeorm-memory-storage.js +1 -1
- package/dist/modules/instance-ai/storage/typeorm-memory-storage.js.map +1 -1
- package/dist/modules/instance-ai/web-research/brave-search.d.ts +1 -1
- package/dist/modules/instance-ai/web-research/brave-search.js +2 -1
- package/dist/modules/instance-ai/web-research/brave-search.js.map +1 -1
- package/dist/modules/instance-version-history/database/entities/instance-version-history.entity.d.ts +7 -0
- package/dist/modules/instance-version-history/database/entities/instance-version-history.entity.js +37 -0
- package/dist/modules/instance-version-history/database/entities/instance-version-history.entity.js.map +1 -0
- package/dist/modules/instance-version-history/database/repositories/instance-version-history.repository.d.ts +5 -0
- package/dist/modules/instance-version-history/database/repositories/instance-version-history.repository.js +26 -0
- package/dist/modules/instance-version-history/database/repositories/instance-version-history.repository.js.map +1 -0
- package/dist/modules/instance-version-history/instance-version-history.controller.d.ts +26 -0
- package/dist/modules/instance-version-history/instance-version-history.controller.js +85 -0
- package/dist/modules/instance-version-history/instance-version-history.controller.js.map +1 -0
- package/dist/modules/instance-version-history/instance-version-history.module.d.ts +5 -0
- package/dist/modules/instance-version-history/instance-version-history.module.js +60 -0
- package/dist/modules/instance-version-history/instance-version-history.module.js.map +1 -0
- package/dist/modules/instance-version-history/instance-version-history.service.d.ts +18 -0
- package/dist/modules/instance-version-history/instance-version-history.service.js +120 -0
- package/dist/modules/instance-version-history/instance-version-history.service.js.map +1 -0
- package/dist/modules/instance-version-history/instance-version-history.types.d.ts +12 -0
- package/dist/modules/instance-version-history/instance-version-history.types.js +27 -0
- package/dist/modules/instance-version-history/instance-version-history.types.js.map +1 -0
- package/dist/modules/provisioning.ee/provisioning.service.ee.d.ts +5 -2
- package/dist/modules/provisioning.ee/provisioning.service.ee.js +55 -11
- package/dist/modules/provisioning.ee/provisioning.service.ee.js.map +1 -1
- package/dist/modules/provisioning.ee/role-mapping-rule.controller.ee.d.ts +7 -5
- package/dist/modules/provisioning.ee/role-mapping-rule.controller.ee.js +40 -10
- package/dist/modules/provisioning.ee/role-mapping-rule.controller.ee.js.map +1 -1
- package/dist/modules/provisioning.ee/role-mapping-rule.service.ee.d.ts +3 -1
- package/dist/modules/provisioning.ee/role-mapping-rule.service.ee.js +1 -0
- package/dist/modules/provisioning.ee/role-mapping-rule.service.ee.js.map +1 -1
- package/dist/modules/provisioning.ee/role-resolver-types.d.ts +14 -2
- package/dist/modules/provisioning.ee/role-resolver.service.ee.js +16 -6
- package/dist/modules/provisioning.ee/role-resolver.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-context.factory.d.ts +12 -0
- package/dist/modules/source-control.ee/source-control-context.factory.js +112 -0
- package/dist/modules/source-control.ee/source-control-context.factory.js.map +1 -0
- package/dist/modules/source-control.ee/source-control-export.service.ee.d.ts +2 -2
- package/dist/modules/source-control.ee/source-control-export.service.ee.js +9 -11
- package/dist/modules/source-control.ee/source-control-export.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-git.service.ee.js +3 -3
- package/dist/modules/source-control.ee/source-control-git.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-import.service.ee.d.ts +6 -4
- package/dist/modules/source-control.ee/source-control-import.service.ee.js +29 -85
- package/dist/modules/source-control.ee/source-control-import.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-scoped.service.d.ts +4 -4
- package/dist/modules/source-control.ee/source-control-scoped.service.js +9 -40
- package/dist/modules/source-control.ee/source-control-scoped.service.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-status.service.ee.d.ts +3 -1
- package/dist/modules/source-control.ee/source-control-status.service.ee.js +99 -59
- package/dist/modules/source-control.ee/source-control-status.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control.service.ee.d.ts +3 -1
- package/dist/modules/source-control.ee/source-control.service.ee.js +6 -4
- package/dist/modules/source-control.ee/source-control.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/types/source-control-context.d.ts +12 -4
- package/dist/modules/source-control.ee/types/source-control-context.js +32 -6
- package/dist/modules/source-control.ee/types/source-control-context.js.map +1 -1
- package/dist/modules/sso-saml/saml.controller.ee.d.ts +2 -3
- package/dist/modules/sso-saml/saml.controller.ee.js +3 -15
- package/dist/modules/sso-saml/saml.controller.ee.js.map +1 -1
- package/dist/modules/token-exchange/controllers/embed-auth.controller.d.ts +5 -1
- package/dist/modules/token-exchange/controllers/embed-auth.controller.js +50 -11
- package/dist/modules/token-exchange/controllers/embed-auth.controller.js.map +1 -1
- package/dist/modules/token-exchange/{token-exchange.controller.d.ts → controllers/token-exchange.controller.d.ts} +1 -1
- package/dist/modules/token-exchange/{token-exchange.controller.js → controllers/token-exchange.controller.js} +50 -5
- package/dist/modules/token-exchange/controllers/token-exchange.controller.js.map +1 -0
- package/dist/modules/token-exchange/database/entities/trusted-key-source.entity.d.ts +10 -0
- package/dist/modules/token-exchange/database/entities/trusted-key-source.entity.js +45 -0
- package/dist/modules/token-exchange/database/entities/trusted-key-source.entity.js.map +1 -0
- package/dist/modules/token-exchange/database/entities/trusted-key.entity.d.ts +9 -0
- package/dist/modules/token-exchange/database/entities/trusted-key.entity.js +43 -0
- package/dist/modules/token-exchange/database/entities/trusted-key.entity.js.map +1 -0
- package/dist/modules/token-exchange/database/repositories/trusted-key-source.repository.d.ts +5 -0
- package/dist/modules/token-exchange/database/repositories/trusted-key-source.repository.js +26 -0
- package/dist/modules/token-exchange/database/repositories/trusted-key-source.repository.js.map +1 -0
- package/dist/modules/token-exchange/database/repositories/trusted-key.repository.d.ts +7 -0
- package/dist/modules/token-exchange/database/repositories/trusted-key.repository.js +32 -0
- package/dist/modules/token-exchange/database/repositories/trusted-key.repository.js.map +1 -0
- package/dist/modules/token-exchange/services/identity-resolution.service.d.ts +20 -2
- package/dist/modules/token-exchange/services/identity-resolution.service.js +178 -4
- package/dist/modules/token-exchange/services/identity-resolution.service.js.map +1 -1
- package/dist/modules/token-exchange/services/jti-cleanup.service.js +1 -1
- package/dist/modules/token-exchange/services/jti-cleanup.service.js.map +1 -1
- package/dist/modules/token-exchange/services/jwks-resolver.d.ts +30 -0
- package/dist/modules/token-exchange/services/jwks-resolver.js +190 -0
- package/dist/modules/token-exchange/services/jwks-resolver.js.map +1 -0
- package/dist/modules/token-exchange/services/scoped-jwt.strategy.d.ts +12 -0
- package/dist/modules/token-exchange/services/scoped-jwt.strategy.js +92 -0
- package/dist/modules/token-exchange/services/scoped-jwt.strategy.js.map +1 -0
- package/dist/modules/token-exchange/services/token-exchange.service.d.ts +18 -4
- package/dist/modules/token-exchange/services/token-exchange.service.js +65 -6
- package/dist/modules/token-exchange/services/token-exchange.service.js.map +1 -1
- package/dist/modules/token-exchange/services/trusted-key.service.d.ts +40 -6
- package/dist/modules/token-exchange/services/trusted-key.service.js +374 -32
- package/dist/modules/token-exchange/services/trusted-key.service.js.map +1 -1
- package/dist/modules/token-exchange/token-exchange.config.d.ts +4 -0
- package/dist/modules/token-exchange/token-exchange.config.js +20 -0
- package/dist/modules/token-exchange/token-exchange.config.js.map +1 -1
- package/dist/modules/token-exchange/token-exchange.module.js +7 -2
- package/dist/modules/token-exchange/token-exchange.module.js.map +1 -1
- package/dist/modules/token-exchange/token-exchange.schemas.d.ts +35 -5
- package/dist/modules/token-exchange/token-exchange.schemas.js +16 -7
- package/dist/modules/token-exchange/token-exchange.schemas.js.map +1 -1
- package/dist/modules/token-exchange/token-exchange.types.d.ts +5 -2
- package/dist/modules/token-exchange/token-exchange.types.js +2 -0
- package/dist/modules/token-exchange/token-exchange.types.js.map +1 -1
- package/dist/oauth/oauth.service.d.ts +1 -0
- package/dist/oauth/oauth.service.js +39 -2
- package/dist/oauth/oauth.service.js.map +1 -1
- package/dist/public-api/index.js +32 -4
- package/dist/public-api/index.js.map +1 -1
- package/dist/public-api/types.d.ts +11 -1
- package/dist/public-api/v1/handlers/community-packages/community-packages.handler.d.ts +1 -0
- package/dist/public-api/v1/handlers/community-packages/community-packages.handler.js +5 -5
- package/dist/public-api/v1/handlers/community-packages/community-packages.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/credentials/credentials.handler.js +7 -12
- package/dist/public-api/v1/handlers/credentials/credentials.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/credentials/credentials.service.d.ts +3 -4
- package/dist/public-api/v1/handlers/credentials/credentials.service.js +21 -33
- package/dist/public-api/v1/handlers/credentials/credentials.service.js.map +1 -1
- package/dist/public-api/v1/handlers/data-tables/data-tables.handler.js +5 -5
- package/dist/public-api/v1/handlers/data-tables/data-tables.rows.handler.js +5 -5
- package/dist/public-api/v1/handlers/executions/executions.handler.js +8 -8
- package/dist/public-api/v1/handlers/insights/insights.handler.d.ts +6 -0
- package/dist/public-api/v1/handlers/insights/insights.handler.js +57 -0
- package/dist/public-api/v1/handlers/insights/insights.handler.js.map +1 -0
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js +14 -35
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/workflows/workflows.service.d.ts +6 -4
- package/dist/public-api/v1/handlers/workflows/workflows.service.js +7 -15
- package/dist/public-api/v1/handlers/workflows/workflows.service.js.map +1 -1
- package/dist/public-api/v1/openapi.yml +322 -7
- package/dist/public-api/v1/shared/middlewares/global.middleware.d.ts +1 -1
- package/dist/public-api/v1/shared/middlewares/global.middleware.js +19 -8
- package/dist/public-api/v1/shared/middlewares/global.middleware.js.map +1 -1
- package/dist/security-audit/risk-reporters/credentials-risk-reporter.d.ts +2 -3
- package/dist/security-audit/risk-reporters/credentials-risk-reporter.js +2 -5
- package/dist/security-audit/risk-reporters/credentials-risk-reporter.js.map +1 -1
- package/dist/services/ai-gateway.service.d.ts +44 -0
- package/dist/services/ai-gateway.service.js +228 -0
- package/dist/services/ai-gateway.service.js.map +1 -0
- package/dist/services/api-key-auth.strategy.d.ts +10 -0
- package/dist/services/api-key-auth.strategy.js +71 -0
- package/dist/services/api-key-auth.strategy.js.map +1 -0
- package/dist/services/frontend.service.js +7 -0
- package/dist/services/frontend.service.js.map +1 -1
- package/dist/services/import.service.d.ts +1 -0
- package/dist/services/import.service.js +25 -2
- package/dist/services/import.service.js.map +1 -1
- package/dist/services/ownership.service.d.ts +4 -1
- package/dist/services/ownership.service.js +11 -5
- package/dist/services/ownership.service.js.map +1 -1
- package/dist/services/project.service.ee.js +1 -1
- package/dist/services/project.service.ee.js.map +1 -1
- package/dist/services/pruning/workflow-history-compaction.service.js +4 -4
- package/dist/services/pruning/workflow-history-compaction.service.js.map +1 -1
- package/dist/services/public-api-key.service.d.ts +6 -13
- package/dist/services/public-api-key.service.js +12 -80
- package/dist/services/public-api-key.service.js.map +1 -1
- package/dist/services/user.service.js +6 -0
- package/dist/services/user.service.js.map +1 -1
- package/dist/utils/validate-redirect-url.d.ts +1 -0
- package/dist/utils/validate-redirect-url.js +17 -0
- package/dist/utils/validate-redirect-url.js.map +1 -0
- package/dist/webhooks/webhook-form-data.js +6 -2
- package/dist/webhooks/webhook-form-data.js.map +1 -1
- package/dist/webhooks/webhook.service.js +19 -4
- package/dist/webhooks/webhook.service.js.map +1 -1
- package/dist/workflow-execute-additional-data.js +2 -0
- package/dist/workflow-execute-additional-data.js.map +1 -1
- package/dist/workflow-helpers.d.ts +1 -0
- package/dist/workflow-helpers.js +21 -0
- package/dist/workflow-helpers.js.map +1 -1
- package/dist/workflow-runner.js +25 -1
- package/dist/workflow-runner.js.map +1 -1
- package/dist/workflows/workflow-creation.service.d.ts +8 -5
- package/dist/workflows/workflow-creation.service.js +36 -17
- package/dist/workflows/workflow-creation.service.js.map +1 -1
- package/dist/workflows/workflow.service.ee.js +4 -1
- package/dist/workflows/workflow.service.ee.js.map +1 -1
- package/dist/workflows/workflow.service.js +4 -1
- package/dist/workflows/workflow.service.js.map +1 -1
- package/dist/workflows/workflows.controller.d.ts +2 -2
- package/package.json +25 -26
- package/dist/modules/instance-ai/filesystem/local-fs-provider.d.ts +0 -26
- package/dist/modules/instance-ai/filesystem/local-fs-provider.js +0 -321
- package/dist/modules/instance-ai/filesystem/local-fs-provider.js.map +0 -1
- package/dist/modules/token-exchange/token-exchange.controller.js.map +0 -1
- package/dist/modules/token-exchange/token-exchange.service.d.ts +0 -9
- package/dist/modules/token-exchange/token-exchange.service.js +0 -66
- package/dist/modules/token-exchange/token-exchange.service.js.map +0 -1
|
@@ -15,19 +15,26 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.TokenExchangeService = void 0;
|
|
16
16
|
const backend_common_1 = require("@n8n/backend-common");
|
|
17
17
|
const di_1 = require("@n8n/di");
|
|
18
|
+
const crypto_1 = require("crypto");
|
|
18
19
|
const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
|
|
19
20
|
const auth_error_1 = require("../../../errors/response-errors/auth.error");
|
|
20
21
|
const bad_request_error_1 = require("../../../errors/response-errors/bad-request.error");
|
|
22
|
+
const jwt_service_1 = require("../../../services/jwt.service");
|
|
23
|
+
const token_exchange_config_1 = require("../token-exchange.config");
|
|
21
24
|
const token_exchange_schemas_1 = require("../token-exchange.schemas");
|
|
25
|
+
const token_exchange_types_1 = require("../token-exchange.types");
|
|
22
26
|
const identity_resolution_service_1 = require("./identity-resolution.service");
|
|
23
27
|
const jti_store_service_1 = require("./jti-store.service");
|
|
24
28
|
const trusted_key_service_1 = require("./trusted-key.service");
|
|
25
29
|
const MAX_TOKEN_LIFETIME_SECONDS = 60;
|
|
30
|
+
const MIN_REMAINING_LIFETIME_SECONDS = 5;
|
|
26
31
|
let TokenExchangeService = class TokenExchangeService {
|
|
27
|
-
constructor(logger, trustedKeyStore, jtiStore, identityResolutionService) {
|
|
32
|
+
constructor(logger, trustedKeyStore, jtiStore, identityResolutionService, config, jwtService) {
|
|
28
33
|
this.trustedKeyStore = trustedKeyStore;
|
|
29
34
|
this.jtiStore = jtiStore;
|
|
30
35
|
this.identityResolutionService = identityResolutionService;
|
|
36
|
+
this.config = config;
|
|
37
|
+
this.jwtService = jwtService;
|
|
31
38
|
this.logger = logger.scoped('token-exchange');
|
|
32
39
|
}
|
|
33
40
|
async verifyToken(subjectToken, { maxLifetimeSeconds } = {}) {
|
|
@@ -39,7 +46,14 @@ let TokenExchangeService = class TokenExchangeService {
|
|
|
39
46
|
if (!kid) {
|
|
40
47
|
throw new bad_request_error_1.BadRequestError('Token header missing kid');
|
|
41
48
|
}
|
|
42
|
-
const
|
|
49
|
+
const decodedPayload = decoded.payload;
|
|
50
|
+
const iss = typeof decodedPayload === 'object' && decodedPayload !== null
|
|
51
|
+
? decodedPayload.iss
|
|
52
|
+
: undefined;
|
|
53
|
+
if (typeof iss !== 'string' || !iss) {
|
|
54
|
+
throw new bad_request_error_1.BadRequestError('Token payload missing iss');
|
|
55
|
+
}
|
|
56
|
+
const resolvedKey = await this.trustedKeyStore.getByKidAndIss(kid, iss);
|
|
43
57
|
if (!resolvedKey) {
|
|
44
58
|
throw new auth_error_1.AuthError('Unknown key id');
|
|
45
59
|
}
|
|
@@ -49,6 +63,8 @@ let TokenExchangeService = class TokenExchangeService {
|
|
|
49
63
|
algorithms: resolvedKey.algorithms,
|
|
50
64
|
issuer: resolvedKey.issuer,
|
|
51
65
|
audience: resolvedKey.expectedAudience,
|
|
66
|
+
ignoreExpiration: false,
|
|
67
|
+
ignoreNotBefore: false,
|
|
52
68
|
});
|
|
53
69
|
if (typeof result === 'string' || !('iat' in result)) {
|
|
54
70
|
throw new auth_error_1.AuthError('Unexpected token format');
|
|
@@ -73,13 +89,54 @@ let TokenExchangeService = class TokenExchangeService {
|
|
|
73
89
|
if (!consumed) {
|
|
74
90
|
throw new auth_error_1.AuthError('Token has already been used');
|
|
75
91
|
}
|
|
76
|
-
return claims;
|
|
92
|
+
return { claims, resolvedKey };
|
|
77
93
|
}
|
|
78
94
|
async embedLogin(subjectToken) {
|
|
79
|
-
const claims = await this.verifyToken(subjectToken, {
|
|
95
|
+
const { claims, resolvedKey } = await this.verifyToken(subjectToken, {
|
|
80
96
|
maxLifetimeSeconds: MAX_TOKEN_LIFETIME_SECONDS,
|
|
81
97
|
});
|
|
82
|
-
|
|
98
|
+
const user = await this.identityResolutionService.resolve(claims, resolvedKey.allowedRoles, {
|
|
99
|
+
kid: resolvedKey.kid,
|
|
100
|
+
issuer: resolvedKey.issuer,
|
|
101
|
+
});
|
|
102
|
+
return { user, subject: claims.sub, issuer: resolvedKey.issuer, kid: resolvedKey.kid };
|
|
103
|
+
}
|
|
104
|
+
async exchange(request) {
|
|
105
|
+
const subjectClaims = await this.verifyToken(request.subject_token);
|
|
106
|
+
const actorClaims = request.actor_token
|
|
107
|
+
? await this.verifyToken(request.actor_token)
|
|
108
|
+
: undefined;
|
|
109
|
+
const actor = actorClaims
|
|
110
|
+
? await this.identityResolutionService.resolve(actorClaims.claims, actorClaims.resolvedKey.allowedRoles, actorClaims.resolvedKey)
|
|
111
|
+
: undefined;
|
|
112
|
+
const subject = await this.identityResolutionService.resolve(subjectClaims.claims, subjectClaims.resolvedKey.allowedRoles, subjectClaims.resolvedKey);
|
|
113
|
+
const now = Math.floor(Date.now() / 1000);
|
|
114
|
+
const maxTtl = this.config.maxTokenTtl;
|
|
115
|
+
const exp = Math.min(subjectClaims.claims.exp, actorClaims?.claims.exp ?? Infinity, now + maxTtl);
|
|
116
|
+
if (exp <= now + MIN_REMAINING_LIFETIME_SECONDS) {
|
|
117
|
+
throw new auth_error_1.AuthError('Subject token too close to expiry to issue a new token');
|
|
118
|
+
}
|
|
119
|
+
const resources = request.resource?.split(' ').filter(Boolean);
|
|
120
|
+
const payload = {
|
|
121
|
+
iss: token_exchange_types_1.TOKEN_EXCHANGE_ISSUER,
|
|
122
|
+
sub: subject.id,
|
|
123
|
+
...(actor && { act: { sub: actor.id } }),
|
|
124
|
+
...(request.scope && { scope: request.scope }),
|
|
125
|
+
...(resources?.length && { resource: resources }),
|
|
126
|
+
iat: now,
|
|
127
|
+
exp,
|
|
128
|
+
jti: (0, crypto_1.randomUUID)(),
|
|
129
|
+
};
|
|
130
|
+
const accessToken = this.jwtService.sign(payload);
|
|
131
|
+
return {
|
|
132
|
+
accessToken,
|
|
133
|
+
expiresIn: exp - now,
|
|
134
|
+
subjectUserId: subject.id,
|
|
135
|
+
subject: subjectClaims.claims.sub,
|
|
136
|
+
issuer: subjectClaims.claims.iss,
|
|
137
|
+
actor: actorClaims?.claims.sub,
|
|
138
|
+
actorUserId: actor?.id,
|
|
139
|
+
};
|
|
83
140
|
}
|
|
84
141
|
};
|
|
85
142
|
exports.TokenExchangeService = TokenExchangeService;
|
|
@@ -88,6 +145,8 @@ exports.TokenExchangeService = TokenExchangeService = __decorate([
|
|
|
88
145
|
__metadata("design:paramtypes", [backend_common_1.Logger,
|
|
89
146
|
trusted_key_service_1.TrustedKeyService,
|
|
90
147
|
jti_store_service_1.JtiStoreService,
|
|
91
|
-
identity_resolution_service_1.IdentityResolutionService
|
|
148
|
+
identity_resolution_service_1.IdentityResolutionService,
|
|
149
|
+
token_exchange_config_1.TokenExchangeConfig,
|
|
150
|
+
jwt_service_1.JwtService])
|
|
92
151
|
], TokenExchangeService);
|
|
93
152
|
//# sourceMappingURL=token-exchange.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-exchange.service.js","sourceRoot":"","sources":["../../../../src/modules/token-exchange/services/token-exchange.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,wDAA6C;AAE7C,gCAAkC;AAClC,gEAA+B;AAE/B,oEAAgE;AAChE,kFAA6E;
|
|
1
|
+
{"version":3,"file":"token-exchange.service.js","sourceRoot":"","sources":["../../../../src/modules/token-exchange/services/token-exchange.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,wDAA6C;AAE7C,gCAAkC;AAClC,mCAAoC;AACpC,gEAA+B;AAE/B,oEAAgE;AAChE,kFAA6E;AAC7E,wDAAoD;AAEpD,oEAA+D;AAM/D,sEAAsE;AACtE,kEAIiC;AACjC,+EAA0E;AAC1E,2DAAsD;AACtD,+DAA0D;AAE1D,MAAM,0BAA0B,GAAG,EAAE,CAAC;AACtC,MAAM,8BAA8B,GAAG,CAAC,CAAC;AAGlC,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAGhC,YACC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AE,IAAA,mBAAU,GAAE;SACjB,CAAC;QAEF,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAElD,OAAO;YACN,WAAW;YACX,SAAS,EAAE,GAAG,GAAG,GAAG;YACpB,aAAa,EAAE,OAAO,CAAC,EAAE;YACzB,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG;YACjC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG;YAChC,KAAK,EAAE,WAAW,EAAE,MAAM,CAAC,GAAG;YAC9B,WAAW,EAAE,KAAK,EAAE,EAAE;SACtB,CAAC;IACH,CAAC;CACD,CAAA;AAjKY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,YAAO,GAAE;qCAKA,uBAAM;QACoB,uCAAiB;QACxB,mCAAe;QACE,uDAAyB;QAC5C,2CAAmB;QACf,wBAAU;GAT5B,oBAAoB,CAiKhC"}
|
|
@@ -1,13 +1,47 @@
|
|
|
1
1
|
import { Logger } from '@n8n/backend-common';
|
|
2
|
+
import { DbLockService } from '@n8n/db';
|
|
3
|
+
import { InstanceSettings } from 'n8n-core';
|
|
4
|
+
import { TrustedKeySourceEntity } from '../database/entities/trusted-key-source.entity';
|
|
5
|
+
import { TrustedKeyEntity } from '../database/entities/trusted-key.entity';
|
|
6
|
+
import { TrustedKeySourceRepository } from '../database/repositories/trusted-key-source.repository';
|
|
7
|
+
import { TrustedKeyRepository } from '../database/repositories/trusted-key.repository';
|
|
2
8
|
import { TokenExchangeConfig } from '../token-exchange.config';
|
|
3
9
|
import type { ResolvedTrustedKey } from '../token-exchange.schemas';
|
|
10
|
+
import { JwksResolverService } from './jwks-resolver';
|
|
4
11
|
export declare class TrustedKeyService {
|
|
5
|
-
private readonly
|
|
12
|
+
private readonly config;
|
|
13
|
+
private readonly trustedKeySourceRepository;
|
|
14
|
+
private readonly trustedKeyRepository;
|
|
15
|
+
private readonly instanceSettings;
|
|
16
|
+
private readonly dbLockService;
|
|
17
|
+
private readonly jwksResolverService;
|
|
6
18
|
private readonly logger;
|
|
7
|
-
private
|
|
8
|
-
|
|
19
|
+
private refreshInterval;
|
|
20
|
+
private isShuttingDown;
|
|
21
|
+
private readonly cryptoCache;
|
|
22
|
+
constructor(logger: Logger, config: TokenExchangeConfig, trustedKeySourceRepository: TrustedKeySourceRepository, trustedKeyRepository: TrustedKeyRepository, instanceSettings: InstanceSettings, dbLockService: DbLockService, jwksResolverService: JwksResolverService);
|
|
9
23
|
initialize(): Promise<void>;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
24
|
+
onLeaderTakeover(): Promise<void>;
|
|
25
|
+
private initializeAsLeader;
|
|
26
|
+
startRefresh(): void;
|
|
27
|
+
stopRefresh(): void;
|
|
28
|
+
shutdown(): void;
|
|
29
|
+
getByKidAndIss(kid: string, issuer: string): Promise<ResolvedTrustedKey | undefined>;
|
|
30
|
+
refreshSource(sourceId: string): Promise<void>;
|
|
31
|
+
listAll(): Promise<TrustedKeyEntity[]>;
|
|
32
|
+
listSources(): Promise<TrustedKeySourceEntity[]>;
|
|
33
|
+
private parseConfigSources;
|
|
34
|
+
private generateSourceId;
|
|
35
|
+
private syncSourcesToDb;
|
|
36
|
+
private refreshAllSources;
|
|
37
|
+
private refreshDueSources;
|
|
38
|
+
private getRefreshIntervalMs;
|
|
39
|
+
private refreshSourceInternal;
|
|
40
|
+
private refreshSourceWithinTransaction;
|
|
41
|
+
private resolveKeysForSource;
|
|
42
|
+
private resolveKeysForJwksSource;
|
|
43
|
+
private resolveKeysForStaticSource;
|
|
44
|
+
private resolveStaticKeys;
|
|
45
|
+
private validateKeyMaterial;
|
|
46
|
+
private resolveCryptoKey;
|
|
13
47
|
}
|
|
@@ -12,11 +12,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.TrustedKeyService = void 0;
|
|
13
13
|
const node_crypto_1 = require("node:crypto");
|
|
14
14
|
const backend_common_1 = require("@n8n/backend-common");
|
|
15
|
+
const constants_1 = require("@n8n/constants");
|
|
16
|
+
const db_1 = require("@n8n/db");
|
|
17
|
+
const decorators_1 = require("@n8n/decorators");
|
|
15
18
|
const di_1 = require("@n8n/di");
|
|
19
|
+
const typeorm_1 = require("@n8n/typeorm");
|
|
20
|
+
const n8n_core_1 = require("n8n-core");
|
|
16
21
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
17
22
|
const zod_1 = require("zod");
|
|
23
|
+
const trusted_key_source_entity_1 = require("../database/entities/trusted-key-source.entity");
|
|
24
|
+
const trusted_key_entity_1 = require("../database/entities/trusted-key.entity");
|
|
25
|
+
const trusted_key_source_repository_1 = require("../database/repositories/trusted-key-source.repository");
|
|
26
|
+
const trusted_key_repository_1 = require("../database/repositories/trusted-key.repository");
|
|
18
27
|
const token_exchange_config_1 = require("../token-exchange.config");
|
|
19
28
|
const token_exchange_schemas_1 = require("../token-exchange.schemas");
|
|
29
|
+
const jwks_resolver_1 = require("./jwks-resolver");
|
|
20
30
|
const ALGORITHM_FAMILY = {
|
|
21
31
|
RS256: 'RSA',
|
|
22
32
|
RS384: 'RSA',
|
|
@@ -29,17 +39,110 @@ const ALGORITHM_FAMILY = {
|
|
|
29
39
|
ES512: 'EC',
|
|
30
40
|
EdDSA: 'EdDSA',
|
|
31
41
|
};
|
|
42
|
+
const STATIC_SOURCE_ID = 'static';
|
|
43
|
+
const REFRESH_POLL_INTERVAL_MS = 30 * constants_1.Time.seconds.toMilliseconds;
|
|
32
44
|
let TrustedKeyService = class TrustedKeyService {
|
|
33
|
-
constructor(logger,
|
|
34
|
-
this.
|
|
35
|
-
this.
|
|
45
|
+
constructor(logger, config, trustedKeySourceRepository, trustedKeyRepository, instanceSettings, dbLockService, jwksResolverService) {
|
|
46
|
+
this.config = config;
|
|
47
|
+
this.trustedKeySourceRepository = trustedKeySourceRepository;
|
|
48
|
+
this.trustedKeyRepository = trustedKeyRepository;
|
|
49
|
+
this.instanceSettings = instanceSettings;
|
|
50
|
+
this.dbLockService = dbLockService;
|
|
51
|
+
this.jwksResolverService = jwksResolverService;
|
|
52
|
+
this.isShuttingDown = false;
|
|
53
|
+
this.cryptoCache = new Map();
|
|
36
54
|
this.logger = logger.scoped('token-exchange');
|
|
37
55
|
}
|
|
38
56
|
async initialize() {
|
|
39
|
-
|
|
57
|
+
if (!this.instanceSettings.isLeader) {
|
|
58
|
+
this.logger.debug('Worker instance — skipping trusted key initialization');
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
await this.initializeAsLeader();
|
|
62
|
+
}
|
|
63
|
+
async onLeaderTakeover() {
|
|
64
|
+
await this.initializeAsLeader();
|
|
65
|
+
}
|
|
66
|
+
async initializeAsLeader() {
|
|
67
|
+
const sources = this.parseConfigSources();
|
|
68
|
+
await this.syncSourcesToDb(sources);
|
|
69
|
+
await this.refreshAllSources();
|
|
70
|
+
this.startRefresh();
|
|
71
|
+
}
|
|
72
|
+
startRefresh() {
|
|
73
|
+
if (this.isShuttingDown || this.refreshInterval)
|
|
74
|
+
return;
|
|
75
|
+
this.refreshInterval = setInterval(async () => await this.refreshDueSources(), REFRESH_POLL_INTERVAL_MS);
|
|
76
|
+
this.logger.debug('Trusted key refresh poller started');
|
|
77
|
+
}
|
|
78
|
+
stopRefresh() {
|
|
79
|
+
clearInterval(this.refreshInterval);
|
|
80
|
+
this.refreshInterval = undefined;
|
|
81
|
+
}
|
|
82
|
+
shutdown() {
|
|
83
|
+
this.isShuttingDown = true;
|
|
84
|
+
this.stopRefresh();
|
|
85
|
+
}
|
|
86
|
+
async getByKidAndIss(kid, issuer) {
|
|
87
|
+
const entities = await this.trustedKeyRepository.findAllByKid(kid);
|
|
88
|
+
if (entities.length === 0)
|
|
89
|
+
return undefined;
|
|
90
|
+
for (const entity of entities) {
|
|
91
|
+
let data;
|
|
92
|
+
try {
|
|
93
|
+
const parsed = token_exchange_schemas_1.TrustedKeyDataSchema.safeParse(JSON.parse(entity.data));
|
|
94
|
+
if (!parsed.success) {
|
|
95
|
+
this.logger.warn('Skipping corrupted trusted key entity', {
|
|
96
|
+
kid,
|
|
97
|
+
sourceId: entity.sourceId,
|
|
98
|
+
error: parsed.error.message,
|
|
99
|
+
});
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
data = parsed.data;
|
|
103
|
+
}
|
|
104
|
+
catch {
|
|
105
|
+
this.logger.warn('Skipping corrupted trusted key entity', {
|
|
106
|
+
kid,
|
|
107
|
+
sourceId: entity.sourceId,
|
|
108
|
+
error: 'invalid JSON',
|
|
109
|
+
});
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
if (data.issuer !== issuer)
|
|
113
|
+
continue;
|
|
114
|
+
const cryptoKey = this.resolveCryptoKey(`${entity.sourceId}:${kid}`, data.keyMaterial);
|
|
115
|
+
if (!cryptoKey)
|
|
116
|
+
continue;
|
|
117
|
+
return {
|
|
118
|
+
kid,
|
|
119
|
+
algorithms: data.algorithms,
|
|
120
|
+
key: cryptoKey,
|
|
121
|
+
issuer: data.issuer,
|
|
122
|
+
expectedAudience: data.expectedAudience,
|
|
123
|
+
allowedRoles: data.allowedRoles,
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
return undefined;
|
|
127
|
+
}
|
|
128
|
+
async refreshSource(sourceId) {
|
|
129
|
+
const source = await this.trustedKeySourceRepository.findOneBy({ id: sourceId });
|
|
130
|
+
if (!source) {
|
|
131
|
+
throw new n8n_workflow_1.UnexpectedError(`Trusted key source not found: ${sourceId}`);
|
|
132
|
+
}
|
|
133
|
+
await this.refreshSourceInternal(source);
|
|
134
|
+
}
|
|
135
|
+
async listAll() {
|
|
136
|
+
return await this.trustedKeyRepository.find();
|
|
137
|
+
}
|
|
138
|
+
async listSources() {
|
|
139
|
+
return await this.trustedKeySourceRepository.find();
|
|
140
|
+
}
|
|
141
|
+
parseConfigSources() {
|
|
142
|
+
const raw = this.config.trustedKeys;
|
|
40
143
|
if (!raw) {
|
|
41
144
|
this.logger.info('No trusted keys configured');
|
|
42
|
-
return;
|
|
145
|
+
return [];
|
|
43
146
|
}
|
|
44
147
|
let parsed;
|
|
45
148
|
try {
|
|
@@ -49,32 +152,237 @@ let TrustedKeyService = class TrustedKeyService {
|
|
|
49
152
|
this.logger.error('Failed to parse trusted keys JSON', { error });
|
|
50
153
|
throw new n8n_workflow_1.UnexpectedError('Failed to parse trusted keys JSON');
|
|
51
154
|
}
|
|
52
|
-
const
|
|
53
|
-
if (!
|
|
54
|
-
this.logger.error('Trusted keys JSON has invalid format', { error:
|
|
155
|
+
const result = zod_1.z.array(token_exchange_schemas_1.TrustedKeySourceSchema).safeParse(parsed);
|
|
156
|
+
if (!result.success) {
|
|
157
|
+
this.logger.error('Trusted keys JSON has invalid format', { error: result.error });
|
|
55
158
|
throw new n8n_workflow_1.UnexpectedError('Trusted keys JSON has invalid format');
|
|
56
159
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
160
|
+
return result.data;
|
|
161
|
+
}
|
|
162
|
+
generateSourceId(source) {
|
|
163
|
+
if (source.type === 'static')
|
|
164
|
+
return STATIC_SOURCE_ID;
|
|
165
|
+
return (0, node_crypto_1.createHash)('sha256').update(source.url).digest('hex').slice(0, 36);
|
|
166
|
+
}
|
|
167
|
+
async syncSourcesToDb(sources) {
|
|
168
|
+
await this.dbLockService.withLock(1002, async (tx) => {
|
|
169
|
+
this.logger.debug('Syncing sources to the database', { sources });
|
|
170
|
+
const staticSources = sources.filter((s) => s.type === 'static');
|
|
171
|
+
const jwksSources = sources.filter((s) => s.type === 'jwks');
|
|
172
|
+
const expectedSourceIds = new Set();
|
|
173
|
+
if (staticSources.length > 0) {
|
|
174
|
+
const sourceId = STATIC_SOURCE_ID;
|
|
175
|
+
expectedSourceIds.add(sourceId);
|
|
176
|
+
await tx.save(trusted_key_source_entity_1.TrustedKeySourceEntity, {
|
|
177
|
+
id: sourceId,
|
|
178
|
+
type: 'static',
|
|
179
|
+
config: JSON.stringify(staticSources),
|
|
180
|
+
status: 'pending',
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
for (const jwks of jwksSources) {
|
|
184
|
+
const sourceId = this.generateSourceId(jwks);
|
|
185
|
+
expectedSourceIds.add(sourceId);
|
|
186
|
+
await tx.save(trusted_key_source_entity_1.TrustedKeySourceEntity, {
|
|
187
|
+
id: sourceId,
|
|
188
|
+
type: 'jwks',
|
|
189
|
+
config: JSON.stringify(jwks),
|
|
190
|
+
status: 'pending',
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
if (expectedSourceIds.size > 0) {
|
|
194
|
+
await tx.delete(trusted_key_source_entity_1.TrustedKeySourceEntity, {
|
|
195
|
+
id: (0, typeorm_1.Not)((0, typeorm_1.In)([...expectedSourceIds])),
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
await tx.delete(trusted_key_source_entity_1.TrustedKeySourceEntity, {});
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
async refreshAllSources() {
|
|
204
|
+
try {
|
|
205
|
+
const sources = await this.trustedKeySourceRepository.find();
|
|
206
|
+
for (const source of sources) {
|
|
207
|
+
await this.refreshSourceInternal(source);
|
|
62
208
|
}
|
|
63
|
-
this.validateAndStoreStaticKey(source);
|
|
64
209
|
}
|
|
65
|
-
|
|
210
|
+
catch (error) {
|
|
211
|
+
this.logger.error('Failed to run trusted key refresh cycle', { error });
|
|
212
|
+
}
|
|
66
213
|
}
|
|
67
|
-
async
|
|
68
|
-
|
|
214
|
+
async refreshDueSources() {
|
|
215
|
+
try {
|
|
216
|
+
this.logger.debug('Refreshing due sources');
|
|
217
|
+
const sources = await this.trustedKeySourceRepository.find();
|
|
218
|
+
const now = Date.now();
|
|
219
|
+
for (const source of sources) {
|
|
220
|
+
const intervalMs = this.getRefreshIntervalMs(source);
|
|
221
|
+
const lastRefresh = source.lastRefreshedAt?.getTime() ?? 0;
|
|
222
|
+
if (now - lastRefresh >= intervalMs) {
|
|
223
|
+
await this.refreshSourceInternal(source);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
catch (error) {
|
|
228
|
+
this.logger.error('Failed to run trusted key refresh cycle', { error });
|
|
229
|
+
}
|
|
69
230
|
}
|
|
70
|
-
|
|
71
|
-
|
|
231
|
+
getRefreshIntervalMs(source) {
|
|
232
|
+
if (source.type === 'jwks') {
|
|
233
|
+
try {
|
|
234
|
+
const config = (0, n8n_workflow_1.jsonParse)(source.config);
|
|
235
|
+
if (typeof config.cacheTtlSeconds === 'number' && config.cacheTtlSeconds > 0) {
|
|
236
|
+
return config.cacheTtlSeconds * constants_1.Time.seconds.toMilliseconds;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
catch (e) {
|
|
240
|
+
this.logger.warn('Failed to parse source configuration for jwks source', {
|
|
241
|
+
id: source.id,
|
|
242
|
+
error: e,
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
return this.config.keyRefreshIntervalSeconds * constants_1.Time.seconds.toMilliseconds;
|
|
247
|
+
}
|
|
248
|
+
async refreshSourceInternal(source) {
|
|
249
|
+
try {
|
|
250
|
+
await this.dbLockService.withLock(1002, async (tx) => {
|
|
251
|
+
const freshSource = await tx.findOneBy(trusted_key_source_entity_1.TrustedKeySourceEntity, { id: source.id });
|
|
252
|
+
if (!freshSource)
|
|
253
|
+
return;
|
|
254
|
+
await this.refreshSourceWithinTransaction(freshSource, tx);
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
catch (error) {
|
|
258
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
259
|
+
this.logger.error('Failed to refresh trusted key source', {
|
|
260
|
+
sourceId: source.id,
|
|
261
|
+
error: message,
|
|
262
|
+
});
|
|
263
|
+
await this.trustedKeySourceRepository.update(source.id, {
|
|
264
|
+
status: 'error',
|
|
265
|
+
lastError: message,
|
|
266
|
+
lastRefreshedAt: new Date(),
|
|
267
|
+
});
|
|
268
|
+
}
|
|
72
269
|
}
|
|
73
|
-
|
|
74
|
-
const
|
|
75
|
-
if (
|
|
76
|
-
|
|
270
|
+
async refreshSourceWithinTransaction(source, tx) {
|
|
271
|
+
const result = await this.resolveKeysForSource(source);
|
|
272
|
+
if (!result) {
|
|
273
|
+
await tx.update(trusted_key_source_entity_1.TrustedKeySourceEntity, source.id, {
|
|
274
|
+
status: 'healthy',
|
|
275
|
+
lastRefreshedAt: new Date(),
|
|
276
|
+
});
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
const keys = result.keys;
|
|
280
|
+
const cacheTtlSeconds = result.cacheTtlSeconds;
|
|
281
|
+
await tx.delete(trusted_key_entity_1.TrustedKeyEntity, { sourceId: source.id });
|
|
282
|
+
for (const key of keys) {
|
|
283
|
+
await tx.save(trusted_key_entity_1.TrustedKeyEntity, {
|
|
284
|
+
sourceId: source.id,
|
|
285
|
+
kid: key.kid,
|
|
286
|
+
data: JSON.stringify(key.data),
|
|
287
|
+
createdAt: new Date(),
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
const updatePayload = {
|
|
291
|
+
status: 'healthy',
|
|
292
|
+
lastError: null,
|
|
293
|
+
lastRefreshedAt: new Date(),
|
|
294
|
+
};
|
|
295
|
+
if (cacheTtlSeconds !== undefined) {
|
|
296
|
+
const config = (0, n8n_workflow_1.jsonParse)(source.config);
|
|
297
|
+
config.cacheTtlSeconds = cacheTtlSeconds;
|
|
298
|
+
updatePayload.config = JSON.stringify(config);
|
|
299
|
+
}
|
|
300
|
+
await tx.update(trusted_key_source_entity_1.TrustedKeySourceEntity, source.id, updatePayload);
|
|
301
|
+
}
|
|
302
|
+
async resolveKeysForSource(source) {
|
|
303
|
+
switch (source.type) {
|
|
304
|
+
case 'static':
|
|
305
|
+
return this.resolveKeysForStaticSource(source);
|
|
306
|
+
case 'jwks':
|
|
307
|
+
return await this.resolveKeysForJwksSource(source);
|
|
308
|
+
default:
|
|
309
|
+
this.logger.warn('Unknown key source type, skipping', {
|
|
310
|
+
sourceId: source.id,
|
|
311
|
+
type: source.type,
|
|
312
|
+
});
|
|
313
|
+
return undefined;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
async resolveKeysForJwksSource(source) {
|
|
317
|
+
let jwksConfig;
|
|
318
|
+
try {
|
|
319
|
+
jwksConfig = (0, n8n_workflow_1.jsonParse)(source.config);
|
|
320
|
+
}
|
|
321
|
+
catch {
|
|
322
|
+
throw new n8n_workflow_1.UnexpectedError('Invalid JWKS source config: malformed JSON');
|
|
323
|
+
}
|
|
324
|
+
const result = await this.jwksResolverService.resolveKeys(jwksConfig);
|
|
325
|
+
if (result.skipped.length > 0) {
|
|
326
|
+
this.logger.debug(`JWKS "${jwksConfig.url}": skipped ${result.skipped.length} key(s)`, {
|
|
327
|
+
skipped: result.skipped,
|
|
328
|
+
});
|
|
77
329
|
}
|
|
330
|
+
return {
|
|
331
|
+
keys: result.keys.map((key) => ({
|
|
332
|
+
kid: key.kid,
|
|
333
|
+
data: {
|
|
334
|
+
algorithms: key.algorithms,
|
|
335
|
+
keyMaterial: key.keyMaterial,
|
|
336
|
+
issuer: key.issuer,
|
|
337
|
+
expectedAudience: key.expectedAudience,
|
|
338
|
+
allowedRoles: key.allowedRoles,
|
|
339
|
+
expiresAt: new Date(Date.now() + result.ttlSeconds * 1000).toISOString(),
|
|
340
|
+
},
|
|
341
|
+
})),
|
|
342
|
+
cacheTtlSeconds: result.ttlSeconds,
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
resolveKeysForStaticSource(source) {
|
|
346
|
+
let rawConfig;
|
|
347
|
+
try {
|
|
348
|
+
rawConfig = JSON.parse(source.config);
|
|
349
|
+
}
|
|
350
|
+
catch {
|
|
351
|
+
throw new n8n_workflow_1.UnexpectedError('Invalid static source config: malformed JSON');
|
|
352
|
+
}
|
|
353
|
+
const configResult = zod_1.z.array(token_exchange_schemas_1.TrustedKeySourceSchema).safeParse(rawConfig);
|
|
354
|
+
if (!configResult.success) {
|
|
355
|
+
throw new n8n_workflow_1.UnexpectedError(`Invalid static source config: ${configResult.error.message}`);
|
|
356
|
+
}
|
|
357
|
+
const staticConfigs = configResult.data.filter((s) => s.type === 'static');
|
|
358
|
+
return {
|
|
359
|
+
keys: this.resolveStaticKeys(staticConfigs),
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
resolveStaticKeys(configs) {
|
|
363
|
+
const result = [];
|
|
364
|
+
const seenKids = new Set();
|
|
365
|
+
for (const config of configs) {
|
|
366
|
+
const { kid, algorithms, key: pemString, issuer, expectedAudience, allowedRoles } = config;
|
|
367
|
+
if (seenKids.has(kid)) {
|
|
368
|
+
throw new n8n_workflow_1.UnexpectedError(`Trusted key "${kid}": duplicate kid`);
|
|
369
|
+
}
|
|
370
|
+
seenKids.add(kid);
|
|
371
|
+
this.validateKeyMaterial(kid, algorithms, pemString);
|
|
372
|
+
result.push({
|
|
373
|
+
kid,
|
|
374
|
+
data: {
|
|
375
|
+
algorithms,
|
|
376
|
+
keyMaterial: pemString,
|
|
377
|
+
issuer,
|
|
378
|
+
expectedAudience,
|
|
379
|
+
allowedRoles,
|
|
380
|
+
},
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
return result;
|
|
384
|
+
}
|
|
385
|
+
validateKeyMaterial(kid, algorithms, pemString) {
|
|
78
386
|
const families = new Set();
|
|
79
387
|
for (const alg of algorithms) {
|
|
80
388
|
const family = ALGORITHM_FAMILY[alg];
|
|
@@ -104,20 +412,54 @@ let TrustedKeyService = class TrustedKeyService {
|
|
|
104
412
|
if (!expectedTypes[family].includes(keyType ?? '')) {
|
|
105
413
|
throw new n8n_workflow_1.UnexpectedError(`Trusted key "${kid}": key type "${keyType}" does not match algorithm family "${family}"`);
|
|
106
414
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
415
|
+
}
|
|
416
|
+
resolveCryptoKey(cacheKey, keyMaterial) {
|
|
417
|
+
const hash = (0, node_crypto_1.createHash)('sha256').update(keyMaterial).digest('hex');
|
|
418
|
+
const cached = this.cryptoCache.get(cacheKey);
|
|
419
|
+
if (cached && cached.keyMaterialHash === hash) {
|
|
420
|
+
return cached.cryptoKey;
|
|
421
|
+
}
|
|
422
|
+
try {
|
|
423
|
+
const cryptoKey = (0, node_crypto_1.createPublicKey)(keyMaterial);
|
|
424
|
+
this.cryptoCache.set(cacheKey, { keyMaterialHash: hash, cryptoKey });
|
|
425
|
+
return cryptoKey;
|
|
426
|
+
}
|
|
427
|
+
catch (error) {
|
|
428
|
+
this.logger.warn('Failed to parse key material from DB', {
|
|
429
|
+
cacheKey,
|
|
430
|
+
error: error instanceof Error ? error.message : String(error),
|
|
431
|
+
});
|
|
432
|
+
return undefined;
|
|
433
|
+
}
|
|
115
434
|
}
|
|
116
435
|
};
|
|
117
436
|
exports.TrustedKeyService = TrustedKeyService;
|
|
437
|
+
__decorate([
|
|
438
|
+
(0, decorators_1.OnLeaderTakeover)(),
|
|
439
|
+
__metadata("design:type", Function),
|
|
440
|
+
__metadata("design:paramtypes", []),
|
|
441
|
+
__metadata("design:returntype", Promise)
|
|
442
|
+
], TrustedKeyService.prototype, "onLeaderTakeover", null);
|
|
443
|
+
__decorate([
|
|
444
|
+
(0, decorators_1.OnLeaderStepdown)(),
|
|
445
|
+
__metadata("design:type", Function),
|
|
446
|
+
__metadata("design:paramtypes", []),
|
|
447
|
+
__metadata("design:returntype", void 0)
|
|
448
|
+
], TrustedKeyService.prototype, "stopRefresh", null);
|
|
449
|
+
__decorate([
|
|
450
|
+
(0, decorators_1.OnShutdown)(),
|
|
451
|
+
__metadata("design:type", Function),
|
|
452
|
+
__metadata("design:paramtypes", []),
|
|
453
|
+
__metadata("design:returntype", void 0)
|
|
454
|
+
], TrustedKeyService.prototype, "shutdown", null);
|
|
118
455
|
exports.TrustedKeyService = TrustedKeyService = __decorate([
|
|
119
456
|
(0, di_1.Service)(),
|
|
120
457
|
__metadata("design:paramtypes", [backend_common_1.Logger,
|
|
121
|
-
token_exchange_config_1.TokenExchangeConfig
|
|
458
|
+
token_exchange_config_1.TokenExchangeConfig,
|
|
459
|
+
trusted_key_source_repository_1.TrustedKeySourceRepository,
|
|
460
|
+
trusted_key_repository_1.TrustedKeyRepository,
|
|
461
|
+
n8n_core_1.InstanceSettings,
|
|
462
|
+
db_1.DbLockService,
|
|
463
|
+
jwks_resolver_1.JwksResolverService])
|
|
122
464
|
], TrustedKeyService);
|
|
123
465
|
//# sourceMappingURL=trusted-key.service.js.map
|