spring-projects / spring-projects/spring-security

Webauthn dynamic origins check

Open
#19,057 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage type: enhancement
Dominant language
Java
Stars
9.6k
Forks
6.3k
Avg merge
2d 11h
Merged PRs (30d)
52

Description

Currently only a fixed set of allowed origins can be supplied when configuring webauthn.

It would be ideal if this could be expanded to be dynamic. In our case webauthn is used on authorization server which has the tenant name in front of the subdomain - e.g. bob.test.com. So the origin includes the tenant name and must be in the list of allowed origins for webauthn.

The authorization server can get a list of known tenants on startup, however tenants can also be registered later on - in which there is no way to update the allowed origins for webauthn.

I am against a pattern matching solution (allowing * in the origin check) as can be tricky to prevent security issues, and not sure if this would go against the webauthn spec.

Would an optional bean that can be registered to purely get the allowed origins be viable?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files or tests. Start by tracing WebAuthn configuration and the current allowed-origin validation, then assess an extension point for retrieving origins dynamically without wildcard matching. Done means newly registered tenant origins can be supplied safely at runtime, with coverage for origin validation and updates.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
authentication, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.