Skip to content

Commit 968bf0f

Browse files
Merge pull request #43 from k-svard-ericsson/master
Fix authentication required even when activedirectory.enabled=false
2 parents ce1ef62 + 7ffdb1e commit 968bf0f

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.2.1
2+
- Fix authentication required even when activedirectory.enabled=false
3+
14
## 0.2.0
25
- Added SSL support for the RabbitMq connection.
36
- Improved Cli

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ plugins {
2121

2222
war {
2323
baseName = 'remrem-publish'
24-
version = '0.2.0'
24+
version = '0.2.1'
2525
}
2626

2727
apply plugin: 'spring-boot'
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package com.ericsson.eiffel.remrem.publish.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)