[Design Discussion] Relying Party Configuration for Passkey Support #915
KaveeshaPiumini
started this conversation in
Design
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Related Feature Issue
#610
Problem Summary
Currently POC implementation initializes the WebAuthn library with a static configuration (RPID and RPOrigins). However, as an Identity Provider supporting multiple distinct applications (Relying Parties) via API and native modes, Thunder needs to support different RPIDs and Origins for each client application. We need a strategy to determine and validate these values dynamically per request or determine whether we provide an option to configure them at server level.
Proposed Approach
Implement webauthn configuration as a dynamic, request-scoped instance. Instead of a single webauthn.Config instance, it will resolve the Relying Party (RP) configuration based on the incoming request's context (e.g., the app id or the ou).
Extend the SP_APP/ORGANIZATION_UNIT in the database to store allowed_rp_ids and allowed_origins.
Instantiate or retrieve a cached webauthn configuration specifically for the identified application during the BeginRegistration and BeginLogin phases.
Technical Questions for Discussion
Alternative Approaches
Alternative 1: Global Allowlist (Static)
Description: Configure a massive static list of all allowed RPIDs and Origins in the global config file.
Pros: Simplest implementation; no DB schema changes.
Cons: Requires a server restart/reload to add a new tenant; does not scale for a SaaS-style deployment; creates security risks if one spoofs another's RPID.
Alternative 2: User-Provided Config
Description: The client sends the desired RPID and Origin in the API request body, and Thunder trusts it.
Pros: flexible; zero configuration on the backend.
Cons: security vulnerability; A malicious client could masquerade as any Relying Party.
Architecture and Components
Application Service: API and UI support to allow admins to input Relying Party ID and Allowed Origins when creating an Application.
Authorization Service: Extract the app_id from the request.
Passkey Service: Fetches App config and constructs webauthn.Config on the fly.
Security Considerations
Must ensure that the Origin header sent by the browser strictly matches the allowlist for that specific application, preventing cross-app replay attacks.
Need to validate that the configured RPID is a valid domain suffix of the Origin to comply with WebAuthn specs.
Passkey credentials stored in the database must be scoped to the specific Organization Unit to prevent credential leakage.
Implementation Complexity
Medium (3-6 weeks)
Areas of Thunder that will be impacted
Questions for Community Input
Beta Was this translation helpful? Give feedback.
All reactions