|
@ -83,7 +83,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter { |
|
|
.antMatcher(env.getProperty("spring.data.rest.base-path") + "/**") |
|
|
.antMatcher(env.getProperty("spring.data.rest.base-path") + "/**") |
|
|
.authorizeRequests( |
|
|
.authorizeRequests( |
|
|
authorize -> authorize |
|
|
authorize -> authorize |
|
|
.anyRequest().hasAuthority("ADMIN") |
|
|
|
|
|
|
|
|
.anyRequest().hasAuthority(env.getProperty("auth.authority.admin")) |
|
|
) |
|
|
) |
|
|
.httpBasic() |
|
|
.httpBasic() |
|
|
.and() |
|
|
.and() |
|
@ -106,6 +106,11 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter { |
|
|
@Override |
|
|
@Override |
|
|
protected void configure(HttpSecurity httpSecurity) throws Exception { |
|
|
protected void configure(HttpSecurity httpSecurity) throws Exception { |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
|
* Explicitly Permit access to specific end points. |
|
|
|
|
|
* Basic norm is: if the end point access is not permitted here, |
|
|
|
|
|
* public access to it is denied by default. |
|
|
|
|
|
*/ |
|
|
httpSecurity |
|
|
httpSecurity |
|
|
.authorizeRequests() |
|
|
.authorizeRequests() |
|
|
.antMatchers( |
|
|
.antMatchers( |
|
@ -119,7 +124,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter { |
|
|
// "/favicon.ico", |
|
|
// "/favicon.ico", |
|
|
).permitAll() |
|
|
).permitAll() |
|
|
.antMatchers(env.getProperty("page.url.apiref") + "/**") |
|
|
.antMatchers(env.getProperty("page.url.apiref") + "/**") |
|
|
.hasAuthority("ADMIN") |
|
|
|
|
|
|
|
|
.hasAuthority(env.getProperty("auth.authority.admin")) |
|
|
.anyRequest() |
|
|
.anyRequest() |
|
|
.authenticated() |
|
|
.authenticated() |
|
|
.and() |
|
|
.and() |
|
|