Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): bump springBootVersion from 3.3.4 to 3.4.0 #1574

Merged
merged 3 commits into from
Dec 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
buildscript {
ext{
//Plugins
springBootVersion = '3.3.4'
springBootVersion = '3.4.0'
sonarqubeVersion = '6.0.1.5171'
asciidoctorGradleVersion = "4.0.3"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import org.springframework.web.servlet.handler.HandlerMappingIntrospector;

import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;

@RunWith(SpringRunner.class)
public class WebAuthnAuthenticationProviderConfigurerSpringTest {
Expand All @@ -55,8 +56,10 @@ public void test() {
@EnableWebSecurity
static class Config {

@MockBean
private WebAuthnCredentialRecordService authenticatorService;
@Bean
public WebAuthnCredentialRecordService webAuthnCredentialRecordService(){
return mock(WebAuthnCredentialRecordService.class);
}

@Bean
public ChallengeRepository challengeRepository() {
Expand Down Expand Up @@ -100,8 +103,8 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
}

@Bean
public AuthenticationManager authenticationManager(){
return new ProviderManager(new WebAuthnAuthenticationProvider(authenticatorService, WebAuthnManager.createNonStrictWebAuthnManager()));
public AuthenticationManager authenticationManager(WebAuthnCredentialRecordService webAuthnCredentialRecordService) {
return new ProviderManager(new WebAuthnAuthenticationProvider(webAuthnCredentialRecordService, WebAuthnManager.createNonStrictWebAuthnManager()));
}

@Bean(name = "mvcHandlerMappingIntrospector")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void attestationOptionsEndpointPath_with_anonymous_user_test() throws Exc
mvc
.perform(get("/webauthn/attestation/options").with(anonymous()))
.andExpect(unauthenticated())
.andExpect(content().json("{\"rp\":{\"id\":\"example.com\",\"name\":\"example\"},\"challenge\":\"aFglXMZdQTKD4krvNzJBzA\",\"pubKeyCredParams\":[{\"type\":\"public-key\",\"alg\":-7},{\"type\":\"public-key\",\"alg\":-65535}],\"timeout\":10000,\"excludeCredentials\":[],\"authenticatorSelection\":{\"authenticatorAttachment\":\"cross-platform\",\"requireResidentKey\":false,\"residentKey\":\"preferred\",\"userVerification\":\"preferred\"},\"attestation\":\"direct\",\"extensions\":{\"uvm\":true,\"credProps\":true,\"extensionProvider\":\"/webauthn/attestation/options\",\"unknown\":true}}", true))
.andExpect(content().json("{\"rp\":{\"id\":\"example.com\",\"name\":\"example\"},\"challenge\":\"aFglXMZdQTKD4krvNzJBzA\",\"pubKeyCredParams\":[{\"type\":\"public-key\",\"alg\":-7},{\"type\":\"public-key\",\"alg\":-65535}],\"timeout\":10000,\"excludeCredentials\":[],\"authenticatorSelection\":{\"authenticatorAttachment\":\"cross-platform\",\"requireResidentKey\":false,\"residentKey\":\"preferred\",\"userVerification\":\"preferred\"},\"attestation\":\"direct\",\"extensions\":{\"uvm\":true,\"credProps\":true,\"extensionProvider\":\"/webauthn/attestation/options\",\"unknown\":true}}"))
.andExpect(status().isOk());
}

Expand All @@ -111,7 +111,7 @@ public void assertionOptionsEndpointPath_with_anonymous_user_test() throws Excep
mvc
.perform(get("/webauthn/assertion/options").with(anonymous()))
.andExpect(unauthenticated())
.andExpect(content().json("{\"challenge\":\"aFglXMZdQTKD4krvNzJBzA\",\"timeout\":20000,\"rpId\":\"example.com\",\"allowCredentials\":[],\"userVerification\":\"preferred\",\"extensions\":{\"appid\":\"appid\",\"appidExclude\":\"appidExclude\",\"uvm\":true,\"extensionProvider\":\"/webauthn/assertion/options\",\"unknown\":true}}", true))
.andExpect(content().json("{\"challenge\":\"aFglXMZdQTKD4krvNzJBzA\",\"timeout\":20000,\"rpId\":\"example.com\",\"allowCredentials\":[],\"userVerification\":\"preferred\",\"extensions\":{\"appid\":\"appid\",\"appidExclude\":\"appidExclude\",\"uvm\":true,\"extensionProvider\":\"/webauthn/assertion/options\",\"unknown\":true}}"))
.andExpect(status().isOk());
}

Expand All @@ -138,7 +138,7 @@ public void attestationOptionsEndpointPath_with_authenticated_user_test() throws
mvc
.perform(get("/webauthn/attestation/options").with(user("john")))
.andExpect(authenticated())
.andExpect(content().json("{\"rp\":{\"id\":\"example.com\",\"name\":\"example\"},\"user\":{\"id\":\"am9obg\",\"name\":\"john\",\"displayName\":\"john\"},\"challenge\":\"aFglXMZdQTKD4krvNzJBzA\",\"pubKeyCredParams\":[{\"type\":\"public-key\",\"alg\":-7},{\"type\":\"public-key\",\"alg\":-65535}],\"timeout\":10000,\"excludeCredentials\":[],\"authenticatorSelection\":{\"authenticatorAttachment\":\"cross-platform\",\"requireResidentKey\":false,\"residentKey\":\"preferred\",\"userVerification\":\"preferred\"},\"attestation\":\"direct\",\"extensions\":{\"uvm\":true,\"credProps\":true,\"extensionProvider\":\"/webauthn/attestation/options\",\"unknown\":true}}", true))
.andExpect(content().json("{\"rp\":{\"id\":\"example.com\",\"name\":\"example\"},\"user\":{\"id\":\"am9obg\",\"name\":\"john\",\"displayName\":\"john\"},\"challenge\":\"aFglXMZdQTKD4krvNzJBzA\",\"pubKeyCredParams\":[{\"type\":\"public-key\",\"alg\":-7},{\"type\":\"public-key\",\"alg\":-65535}],\"timeout\":10000,\"excludeCredentials\":[],\"authenticatorSelection\":{\"authenticatorAttachment\":\"cross-platform\",\"requireResidentKey\":false,\"residentKey\":\"preferred\",\"userVerification\":\"preferred\"},\"attestation\":\"direct\",\"extensions\":{\"uvm\":true,\"credProps\":true,\"extensionProvider\":\"/webauthn/attestation/options\",\"unknown\":true}}"))
.andExpect(status().isOk());
}

Expand All @@ -154,7 +154,7 @@ public void assertionOptionsEndpointPath_with_authenticated_user_test() throws E
.andDo(item ->
item.getResponse().getContentAsString()
)
.andExpect(content().json("{\"challenge\":\"aFglXMZdQTKD4krvNzJBzA\",\"timeout\":20000,\"rpId\":\"example.com\",\"allowCredentials\":[],\"userVerification\":\"preferred\",\"extensions\":{\"appid\":\"appid\",\"appidExclude\":\"appidExclude\",\"uvm\":true,\"extensionProvider\":\"/webauthn/assertion/options\",\"unknown\":true}}", true))
.andExpect(content().json("{\"challenge\":\"aFglXMZdQTKD4krvNzJBzA\",\"timeout\":20000,\"rpId\":\"example.com\",\"allowCredentials\":[],\"userVerification\":\"preferred\",\"extensions\":{\"appid\":\"appid\",\"appidExclude\":\"appidExclude\",\"uvm\":true,\"extensionProvider\":\"/webauthn/assertion/options\",\"unknown\":true}}"))
.andExpect(status().isOk());
}

Expand Down