Skip to content

Commit

Permalink
feat(web): enable WebSecurityConfig conditionally by kayenta.security…
Browse files Browse the repository at this point in the history
….enabled property (#748)

Co-authored-by: Justin Field <justin.field@armory.io>
  • Loading branch information
Anastasiia Smirnova and fieldju committed Jun 24, 2020
1 parent c2d7251 commit 235bcb2
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package com.netflix.kayenta.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
Expand All @@ -25,6 +26,10 @@
//
// This allows anything through without authentication or csrf protection.
//
@ConditionalOnProperty(
value = "kayenta.security.enabled",
havingValue = "true",
matchIfMissing = true)
@Configuration
@EnableWebSecurity
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
Expand Down

0 comments on commit 235bcb2

Please sign in to comment.