small regression in that the following Resources don't seem to exist when compiling to a graalvm native image


public static DefaultResourcesFilter css() {
    return new DefaultResourcesFilter(AntPathRequestMatcher.antMatcher(HttpMethod.GET, "/default-ui.css"), new ClassPathResource("org/springframework/security/default-ui.css"), new MediaType("text", "css", StandardCharsets.UTF_8));
}

public static DefaultResourcesFilter webauthn() {
    return new DefaultResourcesFilter(AntPathRequestMatcher.antMatcher(HttpMethod.GET, "/login/webauthn.js"), new ClassPathResource("org/springframework/security/spring-security-webauthn.js"), new MediaType("text", "javascript", StandardCharsets.UTF_8));

its easy to fix

@ImportRuntimehints(UiResourcesRuntimeHintsRegistrar.class)

and

static class UiResourcesRuntimeHintsRegistrar implements RuntimeHintsRegistrar {

    @Override
    public void registerHints(RuntimeHints hints, ClassLoader classLoader) {

       var resources = Set.of(new ClassPathResource("org/springframework/security/spring-security-webauthn.js"),
             new ClassPathResource("org/springframework/security/default-ui.css"));

       for (var r : resources)
          hints.resources().registerResource(r);

    }

}

it would be ideal if those hints were furnished as part of spring security, however

Comment From: Kehrlann

Thanks for reporting.

default-ui.css should already be contributed, see WebMvcSecurityRuntimeHints . Testing manually it seems to work. Could you please confirm @joshlong ?

WebAuthn is missing indeed.