Skip to content
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.

Commit

Permalink
Merge pull request #24 from admin-ch/feature/update-spring-boot
Browse files Browse the repository at this point in the history
  • Loading branch information
gstoehld authored Dec 14, 2021
2 parents 333c5ce + 860b154 commit 4ae8381
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.5</version>
<version>0.8.7</version>
<executions>
<execution>
<id>report-aggregate</id>
Expand All @@ -46,4 +46,4 @@
</plugins>
</build>

</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.5</version>
<version>0.8.7</version>
<executions>
<!-- to avoid bugs in some situations -->
<execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
package ch.admin.bag.covidcertificate.backend.verification.check.ws.config;

import ch.admin.bag.covidcertificate.backend.verification.check.ws.config.configbeans.ActuatorSecurityConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.actuate.health.HealthEndpoint;
import org.springframework.boot.actuate.info.InfoEndpoint;
Expand Down Expand Up @@ -49,40 +48,39 @@ ActuatorSecurityConfig passwordDefault() {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.requestMatcher(
org.springframework.boot.actuate.autoconfigure.security.servlet
.EndpointRequest.toAnyEndpoint())
.authorizeRequests()
.requestMatchers(
org.springframework.boot.actuate.autoconfigure.security.servlet
.EndpointRequest.to(HealthEndpoint.class))
.permitAll()
.requestMatchers(
org.springframework.boot.actuate.autoconfigure.security.servlet
.EndpointRequest.to(InfoEndpoint.class))
.permitAll()
.requestMatchers(
org.springframework.boot.actuate.autoconfigure.security.servlet
.EndpointRequest.to(LoggersEndpoint.class))
.hasRole(PROMETHEUS_ROLE)
.requestMatchers(
org.springframework.boot.actuate.autoconfigure.security.servlet
.EndpointRequest.to(PrometheusScrapeEndpoint.class))
.hasRole(PROMETHEUS_ROLE)
.anyRequest()
.denyAll()
.and()
.httpBasic();
org.springframework.boot.actuate.autoconfigure.security.servlet
.EndpointRequest.toAnyEndpoint())
.authorizeRequests()
.requestMatchers(
org.springframework.boot.actuate.autoconfigure.security.servlet
.EndpointRequest.to(HealthEndpoint.class))
.permitAll()
.requestMatchers(
org.springframework.boot.actuate.autoconfigure.security.servlet
.EndpointRequest.to(InfoEndpoint.class))
.permitAll()
.requestMatchers(
org.springframework.boot.actuate.autoconfigure.security.servlet
.EndpointRequest.to(LoggersEndpoint.class))
.hasRole(PROMETHEUS_ROLE)
.requestMatchers(
org.springframework.boot.actuate.autoconfigure.security.servlet
.EndpointRequest.to(PrometheusScrapeEndpoint.class))
.hasRole(PROMETHEUS_ROLE)
.anyRequest()
.denyAll()
.and()
.httpBasic();

http.csrf().ignoringAntMatchers("/actuator/loggers/**");
}

@Autowired
protected void configureGlobal(
AuthenticationManagerBuilder auth, ActuatorSecurityConfig securityConfig)
throws Exception {
AuthenticationManagerBuilder auth, ActuatorSecurityConfig securityConfig)
throws Exception {
auth.inMemoryAuthentication()
.withUser(securityConfig.getUsername())
.password(securityConfig.getPassword())
.roles(PROMETHEUS_ROLE);
.withUser(securityConfig.getUsername())
.password(securityConfig.getPassword())
.roles(PROMETHEUS_ROLE);
}
}
6 changes: 3 additions & 3 deletions ch-covidcertificate-backend-verification-check/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@

<properties>
<java-version>11</java-version>
<kotlin.version>1.4.32</kotlin.version>
<kotlin.version>1.6.0</kotlin.version>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<spring-boot-version>2.5.3</spring-boot-version>
<spring-cloud-sleuth-version>3.0.3</spring-cloud-sleuth-version>
<spring-boot-version>2.6.1</spring-boot-version>
<spring-cloud-sleuth-version>3.1.0</spring-cloud-sleuth-version>
<jackson-version>2.11.1</jackson-version>
<spring-cloud-connectors-version>2.0.7.RELEASE</spring-cloud-connectors-version>

Expand Down

0 comments on commit 4ae8381

Please sign in to comment.