Skip to content

Commit

Permalink
Add prometheus EP security
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita Pavlovskiy committed Aug 13, 2023
1 parent ac282d4 commit b844503
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
.permitAll()
.requestMatchers("/api/*/dashboard/**")
.hasAnyAuthority("manager")
.requestMatchers("/actuator/**", "/open/**", "/api/*/open/**", "/v3/api-docs/**")
.permitAll()
.requestMatchers("/actuator/prometheus")
.hasRole("metrics-scraper");
.hasAnyAuthority("metrics-scraper")
.requestMatchers("/actuator/**", "/open/**", "/api/*/open/**", "/v3/api-docs/**")
.permitAll();
requests.anyRequest().authenticated();
})
.oauth2ResourceServer(oauth2 ->
Expand Down
1 change: 0 additions & 1 deletion apps/api/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ keycloak:
client-secret: someclientsecret

management:
security:
endpoints:
web:
exposure.include: health, prometheus
Expand Down

0 comments on commit b844503

Please sign in to comment.