Skip to content
Snippets Groups Projects
Commit 0940fc51 authored by Lukas Malte Monnerjahn's avatar Lukas Malte Monnerjahn
Browse files

OZG-4717 OZG-5110 Rename environment endpoint

parent 93d997af
No related branches found
No related tags found
No related merge requests found
...@@ -9,12 +9,12 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -9,12 +9,12 @@ import org.springframework.web.bind.annotation.RestController;
import de.ozgcloud.admin.RootController; import de.ozgcloud.admin.RootController;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@RestController @RestController("ozgCloudEnvironmentController")
@RequiredArgsConstructor @RequiredArgsConstructor
@RequestMapping(FrontendEnvironmentController.PATH) @RequestMapping(FrontendEnvironmentController.PATH)
public class FrontendEnvironmentController { public class FrontendEnvironmentController {
static final String PATH = "/api/frontendEnvironment"; // NOSONAR static final String PATH = "/api/environment"; // NOSONAR
private final ProductionProperties environmentProperties; private final ProductionProperties environmentProperties;
......
...@@ -53,7 +53,7 @@ public class SecurityConfiguration { ...@@ -53,7 +53,7 @@ public class SecurityConfiguration {
http.exceptionHandling(eh -> eh.authenticationEntryPoint(authenticationEntryPoint)); http.exceptionHandling(eh -> eh.authenticationEntryPoint(authenticationEntryPoint));
http.authorizeHttpRequests(requests -> requests http.authorizeHttpRequests(requests -> requests
.requestMatchers(HttpMethod.GET, "/api/frontendEnvironment").permitAll() .requestMatchers(HttpMethod.GET, "/api/environment").permitAll()
.requestMatchers("/api").authenticated() .requestMatchers("/api").authenticated()
.requestMatchers("/api/**").authenticated() .requestMatchers("/api/**").authenticated()
.requestMatchers("/actuator").permitAll() .requestMatchers("/actuator").permitAll()
......
...@@ -67,7 +67,7 @@ class SecurityConfigurationITCase { ...@@ -67,7 +67,7 @@ class SecurityConfigurationITCase {
@SneakyThrows @SneakyThrows
@ParameterizedTest @ParameterizedTest
@ValueSource(strings = { @ValueSource(strings = {
"/api/frontendEnvironment", "/api/environment",
"/configserver/name/profile" "/configserver/name/profile"
}) })
void shouldAllow(String path) { void shouldAllow(String path) {
...@@ -145,7 +145,7 @@ class SecurityConfigurationITCase { ...@@ -145,7 +145,7 @@ class SecurityConfigurationITCase {
@SneakyThrows @SneakyThrows
@ParameterizedTest @ParameterizedTest
@ValueSource(strings = { @ValueSource(strings = {
"/api/frontendEnvironment", "/api/environment",
"/configserver/name/profile", "/configserver/name/profile",
"/api", "/api/configuration", "/api/configuration/param", "/api", "/api/configuration", "/api/configuration/param",
}) })
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment