Skip to content

Fail fast on bad audit config; migrate webauthn to RPOrigins - #23792

Open
kalverra wants to merge 1 commit into
DX-5066/09-core-rootfrom
DX-5066/09b-webauthn-audit-behavior-changes
Open

kalverra wants to merge 1 commit into
DX-5066/09-core-rootfrom
DX-5066/09b-webauthn-audit-behavior-changes

Conversation

@kalverra

Copy link
Copy Markdown
Collaborator

Requires

Supports

Two deliberate behavior changes split out of the lint-sweep layer
below, so each gets its own review and isolated blast radius.

- audit_logger.go: NewAuditLogger now returns an error when
  config.ForwardToUrl() or config.Headers() fail, instead of silently
  falling back to a disabled no-op logger. A malformed AUDIT_LOGS_*
  config is a real misconfiguration; failing node startup surfaces it
  immediately instead of letting audit logging silently go dark.
- webauthn.go: migrate off the deprecated go-webauthn Config.RPOrigin
  field to Config.RPOrigins, via a small rpOrigins() helper. An empty
  configured RPOrigin still produces a nil/empty RPOrigins slice, so
  webauthn.New's own "must provide at least one value to the
  'RPOrigins' field" validation still fires at construction time,
  exactly as the deprecated single-value field did. Without this
  guard, an empty RPOrigin would instead pass construction as
  RPOrigins: [""] and only fail later, per-request, during origin
  comparison in login/registration - turning a loud startup error into
  a confusing runtime one.

Tests added:
- TestNewAuditLogger_ConfigErrors covers both new error returns.
- TestBeginWebAuthnRegistration_EmptyRPOrigin locks in the
  empty-origin construction-time error.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

✅ No conflicts with other open PRs targeting DX-5066/09-core-root

@github-actions

Copy link
Copy Markdown
Contributor

I see you updated files related to core. Please run make gocs in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

@kalverra
kalverra marked this pull request as ready for review September 22, 2026 00:24
@kalverra
kalverra requested review from a team as code owners September 22, 2026 00:24
@kalverra
kalverra added this pull request to stack #23793 September 22, 2026 00:24
@cl-sonarqube-production

Copy link
Copy Markdown

@trunk-io

trunk-io Bot commented Sep 22, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic Badge

Failed Test Failure Summary Logs
FuzzParse/seed#14 A panic occurred due to logging in a goroutine after the test had completed, caused by a failed connection attempt to a test bridge. Logs ↗︎

View Full Report ↗︎Docs

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