Skip to content

fix(saml,otel): send new email-verification and start-span settings - #29

Merged
SomeoneWithOptions merged 1 commit into
mainfrom
fix/saml-otel-settings
Oct 22, 2026
Merged

SomeoneWithOptions merged 1 commit into
mainfrom
fix/saml-otel-settings

Conversation

@SomeoneWithOptions

Copy link
Copy Markdown
Owner

Summary

Upstream spec 1.1.1 added fields to two full-replacement PUTs the CLI could not send or round-trip.

SAML (PUT /settings/sso/saml): emailVerifiedRequired and mapping.emailVerified are now required by current n8n (additionalProperties: false). The CLI dropped them on get and rejected them in set --input (strict decode).

  • Added to read + write types (pointers, omitted when absent).
  • New flags --email-verified-required and --email-verified-attribute set or override the --input values (explicit false/empty wins).
  • get --output json | set --input - now round-trips losslessly.
  • Missing fields → stderr warning naming the fields + flags; request still sent (see compatibility below). 400 hint names them.

OTel (PUT /settings/otel): emitWorkflowStartSpan and emitNodeStartSpan default to false when omitted. Every otel set silently turned both off, or hit 409 when env pins one to true.

  • Added to read + write types (pointers, omitted when absent).
  • New flags --emit-workflow-start-span and --emit-node-start-span.
  • Help states omitted = false on the server; 409 hint names env-pinned start spans; stderr warning when the input omits them.
  • Rest of OTel request/response/test-trace schemas re-checked: no other new fields.

Compatibility decision

The new fields are not required locally. Older instances do not know them and likely reject them, so absent stays absent in both get output and set requests. This keeps the union contract (target vs upstream). Making the SAML fields strictly required is a one-line change in SetSAMLConfigurationRequest.Validate.

Evidence

  • Spec-derived: all write-path behavior (required fields, omitted = false, 409 on env-pinned values). No set was run against a live instance.
  • Live-verified (read-only, --context admin): GET /settings/otel on the target does not return emitWorkflowStartSpan/emitNodeStartSpan, so the target predates spec 1.1.1; the dev build's otel get --output json does not invent them. GET /settings/sso/saml answers 403 there, so SAML is unverified live.

Tests

  • Client: new fields in PUT body, decode, older-instance GET leaves them absent, unset fields not sent.
  • CLI: lossless get --output json | set --input - --yes round trip for both groups, older-instance documents warn and omit, flag overrides (fill, explicit false/empty, unset keeps input), 400/409 hints, help for new flags.
  • make docs + make check green locally.

🤖 Generated with Claude Code

@SomeoneWithOptions
SomeoneWithOptions merged commit 39fe3b4 into main Oct 22, 2026
4 checks passed
@SomeoneWithOptions
SomeoneWithOptions deleted the fix/saml-otel-settings branch October 22, 2026 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant