Skip to content

Commit

Permalink
OK-735: Poistetaan autentikointivaatimus /healthcheck-endpointilta
Browse files Browse the repository at this point in the history
  • Loading branch information
heidilm committed Dec 2, 2024
1 parent 2870849 commit 91fc751
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import org.springframework.security.web.authentication.HttpStatusEntryPoint

@Configuration
@EnableWebSecurity
class CasConfig {
class SecurityConfig {
@Value("${cas.url}")
val cas_url: String = null

Expand Down Expand Up @@ -116,6 +116,16 @@ class CasConfig {
.build()
}

@Bean
@Order(3)
def healthcheckFilterChain(http: HttpSecurity): SecurityFilterChain = {
http
.securityMatcher("/api/healthcheck")
.authorizeHttpRequests(requests => requests.anyRequest.permitAll)
.csrf(c => c.disable)
.build()
}

@Bean
@Order(1)
def csrfFilterChain(http: HttpSecurity): SecurityFilterChain = {
Expand Down

0 comments on commit 91fc751

Please sign in to comment.