Skip to content
Snippets Groups Projects
Commit 7482e7f5 authored by ThanKarab's avatar ThanKarab
Browse files

Removing deployed on production env variable, not needed.

parent 041681b2
No related branches found
No related tags found
1 merge request!19Feat/186 experiment refactor
...@@ -16,10 +16,6 @@ To use this image, you need a running instance of PostgreSQL and to configure th ...@@ -16,10 +16,6 @@ To use this image, you need a running instance of PostgreSQL and to configure th
* AUTHENTICATION: true for production, false for development. * AUTHENTICATION: true for production, false for development.
### RELEASE STAGE ###
* PRODUCTION: Deployed on production? (True/False) Default is True.
### DATABASE CONFIGURATION ### ### DATABASE CONFIGURATION ###
* PORTAL_DB_URL: JDBC URL to connect to the portal database, default value is "jdbc:postgresql://127.0.0.1:5432/portal". * PORTAL_DB_URL: JDBC URL to connect to the portal database, default value is "jdbc:postgresql://127.0.0.1:5432/portal".
* PORTAL_DB_SCHEMA: Database schema, default value is "public". * PORTAL_DB_SCHEMA: Database schema, default value is "public".
......
...@@ -14,11 +14,6 @@ authentication: ...@@ -14,11 +14,6 @@ authentication:
enabled: {{ default .Env.AUTHENTICATION "true" }} enabled: {{ default .Env.AUTHENTICATION "true" }}
### RELEASE STAGE ###
release_stage:
production: {{ default .Env.PRODUCTION "true" }}
### DATABASE CONFIGURATION ### ### DATABASE CONFIGURATION ###
spring: spring:
portal-datasource: portal-datasource:
......
...@@ -42,9 +42,6 @@ public class SecurityConfiguration extends KeycloakWebSecurityConfigurerAdapter ...@@ -42,9 +42,6 @@ public class SecurityConfiguration extends KeycloakWebSecurityConfigurerAdapter
@Value("#{'${authentication.enabled}'}") @Value("#{'${authentication.enabled}'}")
private boolean authenticationEnabled; private boolean authenticationEnabled;
@Value("#{'${release_stage.production}'}")
private boolean deployedOnProduction;
@Override @Override
protected void configure(HttpSecurity http) throws Exception { protected void configure(HttpSecurity http) throws Exception {
super.configure(http); super.configure(http);
...@@ -56,19 +53,14 @@ public class SecurityConfiguration extends KeycloakWebSecurityConfigurerAdapter ...@@ -56,19 +53,14 @@ public class SecurityConfiguration extends KeycloakWebSecurityConfigurerAdapter
"/v2/api-docs", "/swagger-ui/**", "/swagger-resources/**" // Swagger URLs "/v2/api-docs", "/swagger-ui/**", "/swagger-resources/**" // Swagger URLs
).permitAll() ).permitAll()
.antMatchers("/galaxy*", "/galaxy/*").hasRole("DATA MANAGER") .antMatchers("/galaxy*", "/galaxy/*").hasRole("DATA MANAGER")
.anyRequest().hasRole("RESEARCHER"); .anyRequest().hasRole("RESEARCHER")
.and().csrf().ignoringAntMatchers("/logout").csrfTokenRepository(csrfTokenRepository())
.and().addFilterAfter(csrfHeaderFilter(), CsrfFilter.class);
} else { } else {
http.antMatcher("/**") http.antMatcher("/**")
.authorizeRequests() .authorizeRequests()
.antMatchers("/**").permitAll(); .antMatchers("/**").permitAll()
} .and().csrf().disable();
if (!deployedOnProduction) {
// If deployed for development, csrf can be disabled
http.csrf().disable();
} else {
http.csrf().ignoringAntMatchers("/logout").csrfTokenRepository(csrfTokenRepository())
.and().addFilterAfter(csrfHeaderFilter(), CsrfFilter.class);
} }
} }
......
...@@ -14,11 +14,6 @@ authentication: ...@@ -14,11 +14,6 @@ authentication:
enabled: true enabled: true
### RELEASE STAGE ###
release_stage:
production: true
### DATABASE CONFIGURATION ### ### DATABASE CONFIGURATION ###
spring: spring:
portal-datasource: portal-datasource:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment