Skip to content

Passkeys documentation missing spring-security-webauthn dependency for JDBC persistence #18377

@tember8003

Description

@tember8003

Description
url -> https://docs.spring.io/spring-security/reference/servlet/authentication/passkeys.html

The Passkeys documentation shows JDBC persistence usage with JdbcPublicKeyCredentialUserEntityRepository and JdbcUserCredentialRepository, but the documented dependencies do not include the module containing these classes.

Steps to Reproduce

  1. Create a new Spring Boot 4.0.1 project
  2. Add dependencies as documented:
   implementation 'org.springframework.boot:spring-boot-starter-security'
   implementation "com.webauthn4j:webauthn4j-core:0.29.7.RELEASE"
  1. Add JDBC Repository beans as shown in documentation:
   @Bean
   JdbcPublicKeyCredentialUserEntityRepository jdbcPublicKeyCredentialRepository(JdbcOperations jdbc) {
       return new JdbcPublicKeyCredentialUserEntityRepository(jdbc);
   }
   
   @Bean
   JdbcUserCredentialRepository jdbcUserCredentialRepository(JdbcOperations jdbc) {
       return new JdbcUserCredentialRepository(jdbc);
   }
  1. Run ./gradlew compileJava

Expected Behavior

Build succeeds with documented dependencies.

Actual Behavior

error: package org.springframework.security.web.webauthn.management does not exist

Environment

  • Spring Boot: 4.0.1
  • Spring Security: 7.0.2
  • Java: 25
  • Gradle: 9.2.1

Solution

Adding spring-security-webauthn resolves the issue:

implementation 'org.springframework.security:spring-security-webauthn'

This dependency is available in start.spring.io but not mentioned in the documentation.

Suggestion

Update the Required Dependencies section to include spring-security-webauthn for JDBC persistence.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions