Skip to content

Commit 7e0b561

Browse files
Merge pull request #44 from k-svard-ericsson/master
Fix authentication required even when activedirectory.enabled=false
2 parents 0ce0702 + a864348 commit 7e0b561

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 0.7.1
2+
- Fix authentication required even when activedirectory.enabled=false
3+
14
## 0.7.0
25
- Added functiolaity to list endpoint versions
36

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ apply plugin: 'war'
1919

2020
war {
2121
baseName = 'remrem-generate'
22-
version = '0.7.0'
22+
version = '0.7.1'
2323
}
2424

2525

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package com.ericsson.eiffel.remrem.generate.config;
2+
3+
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
4+
import org.springframework.context.annotation.Configuration;
5+
import org.springframework.context.annotation.Profile;
6+
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
7+
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
8+
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
9+
10+
@Profile("!integration-test")
11+
@ConditionalOnProperty(prefix = "activedirectory.", value = "enabled", havingValue = "false")
12+
@Configuration
13+
@EnableWebSecurity
14+
public class DisabledSecurityConfig extends WebSecurityConfigurerAdapter {
15+
@Override
16+
protected void configure(HttpSecurity http) throws Exception {
17+
http
18+
.authorizeRequests()
19+
.anyRequest()
20+
.permitAll()
21+
.and()
22+
.csrf()
23+
.disable();
24+
}
25+
}

0 commit comments

Comments
 (0)