Skip to content

Commit 8c035ce

Browse files
committed
Merge pull request #44459 from dmitrysulman
* pr/44459: Update version of Elasticsearch test container image Closes gh-44459
2 parents 825ca76 + c98f9ac commit 8c035ce

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/server/servlet/OAuth2AuthorizationServerWebSecurityConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/server/servlet/OAuth2AuthorizationServerWebSecurityConfigurationTests.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -28,14 +28,15 @@
2828
import org.springframework.context.annotation.Import;
2929
import org.springframework.core.annotation.Order;
3030
import org.springframework.security.config.BeanIds;
31+
import org.springframework.security.config.Customizer;
3132
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
3233
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
3334
import org.springframework.security.oauth2.core.AuthorizationGrantType;
3435
import org.springframework.security.oauth2.core.ClientAuthenticationMethod;
3536
import org.springframework.security.oauth2.server.authorization.client.InMemoryRegisteredClientRepository;
3637
import org.springframework.security.oauth2.server.authorization.client.RegisteredClient;
3738
import org.springframework.security.oauth2.server.authorization.client.RegisteredClientRepository;
38-
import org.springframework.security.oauth2.server.authorization.config.annotation.web.configuration.OAuth2AuthorizationServerConfiguration;
39+
import org.springframework.security.oauth2.server.authorization.config.annotation.web.configurers.OAuth2AuthorizationServerConfigurer;
3940
import org.springframework.security.oauth2.server.authorization.oidc.web.OidcClientRegistrationEndpointFilter;
4041
import org.springframework.security.oauth2.server.authorization.oidc.web.OidcProviderConfigurationEndpointFilter;
4142
import org.springframework.security.oauth2.server.authorization.oidc.web.OidcUserInfoEndpointFilter;
@@ -163,7 +164,11 @@ static class TestSecurityFilterChainConfiguration {
163164
@Bean
164165
@Order(1)
165166
SecurityFilterChain authServerSecurityFilterChain(HttpSecurity http) throws Exception {
166-
OAuth2AuthorizationServerConfiguration.applyDefaultSecurity(http);
167+
OAuth2AuthorizationServerConfigurer authorizationServer = OAuth2AuthorizationServerConfigurer
168+
.authorizationServer();
169+
http.securityMatcher(authorizationServer.getEndpointsMatcher())
170+
.with(authorizationServer, Customizer.withDefaults());
171+
http.authorizeHttpRequests((authorize) -> authorize.anyRequest().authenticated());
167172
return http.build();
168173
}
169174

spring-boot-project/spring-boot-tools/spring-boot-test-support-docker/src/main/java/org/springframework/boot/testsupport/container/TestImage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public enum TestImage {
8585
/**
8686
* A Docker image suitable for Elasticsearch 7.
8787
*/
88-
ELASTICSEARCH("docker.elastic.co/elasticsearch/elasticsearch", "7.17.5", () -> ElasticsearchContainer.class,
88+
ELASTICSEARCH("docker.elastic.co/elasticsearch/elasticsearch", "7.17.28", () -> ElasticsearchContainer.class,
8989
(container) -> ((ElasticsearchContainer) container).withEnv("ES_JAVA_OPTS", "-Xms32m -Xmx512m")
9090
.withStartupAttempts(5)
9191
.withStartupTimeout(Duration.ofMinutes(10))),

0 commit comments

Comments
 (0)