Commit Graph

5561 Commits

Author SHA1 Message Date
Ricardo Espinoza
7fc560043e
Merge branch 'master' into add-webauth-support 2026-05-18 20:45:46 -04:00
hayden
9d4fc35a5c
fix(core): Align MCP OAuth issued aud with advertised resource URL (#30055)
Signed-off-by: kimsehwan96 <sktpghks138@gmail.com>
Co-authored-by: Ricardo Espinoza <ricardo@n8n.io>
2026-05-18 18:20:41 +00:00
Andreas Fitzek
4e8cb9d475
feat(core): Add globally-registered execution context hooks and inbound-secrets stripper (no-changelog) (#30119)
Some checks are pending
Build: Benchmark Image / build (push) Waiting to run
CI: Master (Build, Test, Lint) / Build for Github Cache (push) Waiting to run
CI: Master (Build, Test, Lint) / Unit tests (22.x) (push) Waiting to run
CI: Master (Build, Test, Lint) / Unit tests (24.15.0) (push) Waiting to run
CI: Master (Build, Test, Lint) / Lint (push) Waiting to run
CI: Master (Build, Test, Lint) / Performance (push) Waiting to run
CI: Master (Build, Test, Lint) / Notify Slack on failure (push) Blocked by required conditions
Util: Sync API Docs / sync-public-api (push) Waiting to run
2026-05-18 16:27:30 +00:00
bjorger
a0864307af
feat(core): Add observation log observer (#30340)
Co-authored-by: Michael Drury <michael.drury@n8n.io>
2026-05-18 16:02:15 +00:00
RomanDavydchuk
722d99e122
feat(core): Persist and periodically fetch MCP servers from a remote API (#30298) 2026-05-18 14:07:27 +00:00
Declan Carroll
f5cc969c7c
build: Bump isolated-vm to 6.1.2 (#30519)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 13:58:04 +00:00
Dimitri Lavrenük
c32591e66c
feat: Computer use tools to safely create credentials (no-changelog) (#30320) 2026-05-18 12:46:17 +00:00
Irénée
d67cef8b25
fix(core): Limit Insights compaction runs (#30503) 2026-05-18 12:24:17 +00:00
Arvin A
315f4d3aba
feat(editor): Productize parallel evaluation execution (#30453)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 11:51:52 +00:00
Jon
70e3e06026
feat(Snowflake Node): Add OAuth2 credential support (#29391)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Michael Kret <88898367+michael-radency@users.noreply.github.com>
2026-05-18 11:30:47 +00:00
Luca Mattiazzi
5325b7c12e
fix(core): Deregister Telegram webhook on agent integration disconnect (no-changelog) (#30552) 2026-05-18 11:03:51 +00:00
Iván Ovejero
dc66f1eecc
fix(core): Update workflow version only on indexable content change (#30521) 2026-05-18 09:01:47 +00:00
Michael Drury
a0c427fbc1
feat(core): Move agents test chat into a preview tab (no-changelog) (#30527) 2026-05-18 08:58:58 +00:00
Albert Alises
07c861adf5
test(core): Re-record instance-ai workflow setup traces (no-changelog) (#30479)
Some checks are pending
Build: Benchmark Image / build (push) Waiting to run
CI: Master (Build, Test, Lint) / Build for Github Cache (push) Waiting to run
CI: Master (Build, Test, Lint) / Unit tests (22.x) (push) Waiting to run
CI: Master (Build, Test, Lint) / Unit tests (24.15.0) (push) Waiting to run
CI: Master (Build, Test, Lint) / Lint (push) Waiting to run
CI: Master (Build, Test, Lint) / Performance (push) Waiting to run
CI: Master (Build, Test, Lint) / Notify Slack on failure (push) Blocked by required conditions
Util: Sync API Docs / sync-public-api (push) Waiting to run
2026-05-18 08:18:33 +00:00
bjorger
28af69a57c
feat(core): Add observation log storage (#30339)
Co-authored-by: Michael Drury <michael.drury@n8n.io>
2026-05-18 08:16:10 +00:00
José Braulio González Valido
83a0b418ed
fix(core): Warn MCP clients that removeNode disconnects sub-nodes (#30491)
Some checks failed
CI: Master (Build, Test, Lint) / Build for Github Cache (push) Has been cancelled
CI: Master (Build, Test, Lint) / Unit tests (22.x) (push) Has been cancelled
CI: Master (Build, Test, Lint) / Unit tests (24.15.0) (push) Has been cancelled
CI: Master (Build, Test, Lint) / Unit tests (26.x) (push) Has been cancelled
CI: Master (Build, Test, Lint) / Lint (push) Has been cancelled
CI: Master (Build, Test, Lint) / Performance (push) Has been cancelled
CI: Master (Build, Test, Lint) / Notify Slack on failure (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Util: Update Node Popularity / approve-and-automerge (push) Has been cancelled
Test: E2E Coverage Weekly / Prepare Docker (coverage) (push) Has been cancelled
Test: E2E Coverage Weekly / E2E (coverage) (push) Has been cancelled
Test: E2E Coverage Weekly / Aggregate Coverage (push) Has been cancelled
Release: Schedule Patch Release PRs / Create patch release PR (${{ matrix.track }}) (beta) (push) Has been cancelled
Release: Schedule Patch Release PRs / Create patch release PR (${{ matrix.track }}) (stable) (push) Has been cancelled
Release: Schedule Patch Release PRs / Create patch release PR (${{ matrix.track }}) (v1) (push) Has been cancelled
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2026-05-15 22:53:28 +00:00
Ricardo Espinoza
6d56c8731a
Merge branch 'master' into add-webauth-support 2026-05-15 15:05:53 -04:00
Declan Carroll
4e1741834a
feat(core): Add EventLoopBlocked rate cap to bound Sentry noise volume (#30485)
Some checks failed
CI: Master (Build, Test, Lint) / Build for Github Cache (push) Waiting to run
CI: Master (Build, Test, Lint) / Unit tests (22.x) (push) Waiting to run
CI: Master (Build, Test, Lint) / Unit tests (24.15.0) (push) Waiting to run
CI: Master (Build, Test, Lint) / Unit tests (26.x) (push) Waiting to run
CI: Master (Build, Test, Lint) / Lint (push) Waiting to run
CI: Master (Build, Test, Lint) / Performance (push) Waiting to run
CI: Master (Build, Test, Lint) / Notify Slack on failure (push) Blocked by required conditions
Build: Benchmark Image / build (push) Has been cancelled
Util: Sync API Docs / sync-public-api (push) Has been cancelled
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 15:09:14 +00:00
Michael Drury
297b61a88e
fix(core): Allow agents to use webhook workflows and remove evaluations tab (no-changelog) (#30534) 2026-05-15 15:03:32 +00:00
James Gee
5b0dc83749
chore(core): Bump OTEL dependencies (#30348) 2026-05-15 13:14:49 +00:00
Iván Ovejero
3bab056b42
fix(core): Bypass archived workflows in activation (#30517) 2026-05-15 13:00:30 +00:00
Ricardo Espinoza
73ec0d0deb
Merge branch 'master' into add-webauth-support 2026-05-15 08:51:16 -04:00
Claire
e7df34ea74
feat(core): Add NVIDIA Nemotron Models with cloud and self-hosted NIM support (#29618) 2026-05-15 12:30:26 +00:00
Ricardo Espinoza
63c3364f1d
Merge branch 'master' into add-webauth-support 2026-05-15 08:18:45 -04:00
yehorkardash
148bc89be9
fix: Move agent types to api-types package (no-changelog) (#30484) 2026-05-15 11:15:07 +00:00
Michael Drury
7f8c0b4604
fix(core): Loading agents test sessions again correctly (no-changelog) (#30457) 2026-05-15 10:01:36 +00:00
Albert Alises
d26a402acc
fix(core): Clean up failed AI workflow shells (#30432) 2026-05-15 09:38:34 +00:00
Michael Drury
dc72a8042c
fix(core): Allow building agents from scratch without using the agent builder (no-changelog) (#30454) 2026-05-15 09:19:13 +00:00
Ricardo Espinoza
db983f0e53
perf(core): Cut redundant work in WebAuthn and MFA hot paths
- `verifyAuthenticationResponse` already loads the credential row to
  derive UV requirements; pass it through to `verifyAssertion` instead
  of repeating the lookup.
- `getAvailableMfaMethods` ran two independent reads sequentially —
  fan them out with `Promise.all`. Hit on every MFA-required login.
- `deleteWebAuthnCredential` only needed to know whether TOTP is set,
  but called `getSecretAndRecoveryCodes` which AES-decrypts the secret
  plus every recovery code. Add a lightweight `hasTotpSecret(userId)`
  and use that instead.
- Replace bare `throw new Error` with `OperationalError`, drop the
  WebAuthn section banner and a couple of comments that just
  paraphrased the surrounding code.
2026-05-14 16:45:05 -04:00
Ricardo Espinoza
430cf4079e
refactor(core): Promote isPlatformCredential to shared api-types
The same predicate lived in `webauthn.service.ts` and was re-declared
inline in `SettingsPersonalView.vue`. Move the single source of truth
into `@n8n/api-types` so FE and BE classify a credential identically.
2026-05-14 16:44:46 -04:00
Ricardo Espinoza
50ddae0ca1
fix(core): Deduplicate MFA method list returned to the frontend
Each WebAuthn credential pushed its kind onto the returned array, so a
user with two passkeys saw `['totp', 'passkey', 'passkey', ...]`. The
change-password switcher walks the list with `indexOf`+1 and ended up
landing on the duplicate, making the next method unreachable.
2026-05-14 16:10:52 -04:00
Ricardo Espinoza
9d39d4eda1
fix(core): Bind password-reset WebAuthn options endpoint to a DTO
The route declared an inline `{ token: string }` body type, which the
controller registry cannot resolve, so the payload arrived `undefined`
and the controller crashed on destructuring. Introduce a DTO class and
add coverage for the bad-body and unauthenticated paths.
2026-05-14 15:45:04 -04:00
Ricardo Espinoza
75b36e97b6
feat(core): Drop recovery-code generation from WebAuthn registration
Recovery codes belong to the TOTP setup flow only. WebAuthn's natural
fallback is registering multiple credentials (passkey + security key +
backup passkey), so generating + presenting recovery codes alongside
the very first webauthn credential mixed two flows and made the setup
wizard inconsistent.

- `verifyWebAuthnRegistration` no longer calls `generateRecoveryCodes`
  or includes them in the response.
- `WebAuthnSetupWizardModal.vue` drops the recovery-codes step (and the
  associated download button, CSS, and unused imports).
- `webauthn.ts` rest-api-client typing drops the optional
  `recoveryCodes` from the verify-registration response.
- The TOTP setup flow (`activateMFA` / `getQRCode` / TotpSetupWizard) is
  unchanged — TOTP still issues recovery codes as before.

Also extends `ApiHelpers.resetDatabaseWith()` so a Playwright spec can
re-seed the owner without a TOTP `mfaSecret` (the webauthn spec uses
this so its MFA login screen only offers webauthn methods).
2026-05-14 12:03:52 -04:00
José Braulio González Valido
9fcd5c5864
feat(ai-builder): Tool-driven eval mock handler with per-API quirks registry (#30135)
Some checks are pending
CI: Master (Build, Test, Lint) / Build for Github Cache (push) Waiting to run
CI: Master (Build, Test, Lint) / Unit tests (22.x) (push) Waiting to run
CI: Master (Build, Test, Lint) / Unit tests (24.14.1) (push) Waiting to run
CI: Master (Build, Test, Lint) / Unit tests (25.x) (push) Waiting to run
CI: Master (Build, Test, Lint) / Lint (push) Waiting to run
CI: Master (Build, Test, Lint) / Performance (push) Waiting to run
CI: Master (Build, Test, Lint) / Notify Slack on failure (push) Blocked by required conditions
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 14:29:10 +00:00
Eugene
bc7075bfdb
feat(core): Add access modes for agent Telegram integration (no-changelog) (#30258)
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: yehorkardash <yehor.kardash@n8n.io>
2026-05-14 14:22:17 +00:00
Ricardo Espinoza
ac67f9decf
fix(core): Constrain security-key registration to cross-platform authenticators
The cross-platform registration options omitted `authenticatorAttachment`,
so Chrome offered the user's existing platform passkey alongside the
security-key prompt. Picking the already-registered passkey triggered an
`InvalidStateError` from the browser via `excludeCredentials`, surfacing
as a generic "Could not register" in the UI.

Set `authenticatorAttachment: 'cross-platform'` so the browser only
offers roaming authenticators during security-key registration, and
surface the underlying error message in the modal so future failures are
debuggable from devtools.
2026-05-14 10:06:12 -04:00
Ricardo Espinoza
52b562fd93
fix(core): Use type-only import for PasswordUpdateRequestDto in tests 2026-05-14 09:32:40 -04:00
Michael Drury
52f11c4f8c
fix(core): Agent sessions present tool errors correctly and inputs to tools when error occurs (no-changelog) (#30337) 2026-05-14 13:32:25 +00:00
Arvin A
e630e7e489
feat(core): Add eval collection service + REST + runner integration (TRUST-72) (#30218) 2026-05-14 10:48:46 +00:00
Elias Meire
7a81a91faa
feat(editor): Move MCP Client Tool into the MCP category (#30441)
Co-authored-by: Roman Davydchuk <roman.davydchuk@n8n.io>
2026-05-14 10:24:33 +00:00
bjorger
853ad40e08
feat(core): Add agent execution count telemetry (no-changelog) (#30354) 2026-05-14 10:14:14 +00:00
Ricardo Espinoza
feda54b4fb
test(core): Update post-password-change token test for tokensValidAfter
Master used to reject stale password-reset tokens via `createJWTHash`,
which embedded the user's password hash in the JWT. This branch replaced
that mechanism with `tokensValidAfter` — a per-user timestamp the server
bumps on any sensitive account change. The corresponding test now mocks
the new mechanism (bumping `tokensValidAfter` past the token's `iat`)
rather than the old one (signing a token against a fake user with a
different password).
2026-05-13 22:55:07 -04:00
Ricardo Espinoza
69396211cb
Merge remote-tracking branch 'origin/master' into add-webauth-support
# Conflicts:
#	packages/@n8n/db/src/migrations/postgresdb/index.ts
#	packages/@n8n/db/src/migrations/sqlite/index.ts
#	pnpm-lock.yaml
2026-05-13 17:51:06 -04:00
Ricardo Espinoza
081b1238ba
test(core): Add WebAuthn kind-filter and controller-branch coverage
Closes the remaining gaps in the WebAuthn test surface.

Integration (`webauthn.api.test.ts`) — 5 new cases for
`POST /mfa/webauthn/authentication-options`:
- no kind → all credentials in `allowCredentials`
- `kind: 'passkey'` → only platform credentials
- `kind: 'security_key'` → only roaming credentials
- missing email → 400
- user has no MFA enabled or doesn't exist → MFA 998 error

Controller (`mfa.controller.test.ts`) — 14 new mock-only branches across
`getWebAuthnRegistrationOptions`, `verifyWebAuthnRegistration`,
`getWebAuthnAuthenticationOptions`, and `updateWebAuthnCredential`. Covers
input validation, the defensive `verified: false` / `registrationInfo: null`
paths, the 998 no-enumeration response, and label trimming.
2026-05-13 17:30:56 -04:00
Ricardo Espinoza
0f6d211daa
test(core): Add real-crypto integration tests for WebAuthn authentication
Extends the helper with `buildAuthenticationResponse` — signs
`sha256(authData || sha256(clientDataJSON))` with the credential's ECDSA
P-256 private key — and adds two test suites driving the real
`@simplewebauthn/server` verifier:

- Per-credential authentication via `/mfa/webauthn/credentials/:id/remove`:
  valid passkey (UV required) and security key (UV optional), missing-UV
  rejection on passkeys, wrong-key signature, tampered-signature byte flip,
  rpId mismatch.
- Passwordless login via `/login/webauthn/options` + `/verify`: success
  with cookie + counter/lastUsedAt update, wrong-key, disabled user,
  unknown credentialId, unknown challengeId.

Together with the earlier registration tests, this exercises both
`verifyAuthenticationResponse` and `verifyPasswordlessAuthentication` —
including the per-credential `requireUserVerification` branch.
2026-05-13 17:26:22 -04:00
Ricardo Espinoza
8d340c8eb0
test(core): Add real-crypto integration tests for WebAuthn registration
Drives `POST /mfa/webauthn/registration-verify` end-to-end through the real
`@simplewebauthn/server` verifier with a small Node-side helper that builds
valid `RegistrationResponseJSON` objects from a freshly generated ECDSA P-256
keypair. Hand-rolled CBOR for the COSE_Key + `fmt:'none'` attestation; no
new npm deps.

Six cases: platform→passkey, cross-platform→security_key, idempotent recovery
codes on a second registration, rpIdHash mismatch (canary that proves the
crypto path runs), missing UP flag, and stale-challenge replay.

First of several chunks — authentication assertion, passwordless login, and
kind-filtered options land in follow-up commits.
2026-05-13 17:16:17 -04:00
Ricardo Espinoza
65a9397e0a
test(core): Add MFA unit tests and update 2FA e2e selectors
Backend unit tests:
- `isPlatformCredential` (transports/deviceType matrix)
- `countMfaProofs` (proof counting incl. empty/null edge cases)
- `MfaService.validateProof` (webauthn vs TOTP routing)
- `AuthService.rotateSession` (ordering + JWT payload)
- `MFAController.deleteWebAuthnCredential` (proof gate, last-credential
  guard, MFA state cleanup, session rotation)

E2E:
- Update `SettingsPersonalPage` to the new `mfa-method-totp-*` test IDs
- Update `MfaSetupModal` to the new `totpSetupWizard-modal` container
  and add the `mfa-continue-button` step in the two-step TOTP wizard
2026-05-13 16:31:15 -04:00
Ricardo Espinoza
6c60578105
refactor(core): Consolidate MFA proof handling and webauthn helpers
Unify the four divergent `isPlatform` heuristics behind a single
`isPlatformCredential` helper, extract a shared `MfaProof` DTO with
`validateProof`/`countMfaProofs`, deduplicate the webauthn assertion
verification between per-user and passwordless flows, and add
`rotateSession`/`completeLogin` helpers to remove repeated
session-rotation and login-finalization boilerplate. Also drops dead
SCSS, the unused `_intent` arg, the duplicate `TwoFactorMethod` type
(reuse `MfaMethod`), and the unsafe `as never` i18n key casts. Trims
redundant DB reads in `updateCurrentUser`, `enableMfa`, and the recovery
code rotation path.
2026-05-13 16:02:55 -04:00
Albert Alises
8489afdcd1
fix(core): Add correct telemetry for resumed Instance AI runs (#30335) 2026-05-13 16:59:30 +00:00
Ricardo Espinoza
0cc659eb99
feat(core): Multi-credential UX + last-used tracking + method-aware reverify
- Track lastUsedAt per webauthn credential (new column + migration)
  and surface it as "Last used X ago" in the credentials list.
- Personal settings restructured to one card per method with a nested
  credentials list, device-aware label pre-fill on the setup wizard,
  and a dashed "Add another …" button.
- Login MFA prompt picks the method the user signed in with last on
  this device (localStorage) and shows a switcher link when both
  TOTP and a webauthn credential are registered.
- Credential removal re-verifies with the same kind of authenticator
  being removed (passkey → passkey, security key → security key) via
  a narrowed allowCredentials, falling back to the TOTP / recovery
  code prompt when the device is unavailable.
- Refuse to delete the last MFA credential while 2FA is enforced.
2026-05-13 12:43:06 -04:00