Skip to content

Commit

Permalink
Ensure /websocket/tracker/ cant bypass
Browse files Browse the repository at this point in the history
AuthoritiesConstants.ADMIN restriction

Fix #13439
  • Loading branch information
cgravatt committed Jan 8, 2021
1 parent 85081b0 commit 75254b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
.antMatchers("/api/admin/**").hasAuthority(AuthoritiesConstants.ADMIN)
.antMatchers("/api/**").authenticated()
<%_ if (websocket === 'spring-websocket') { _%>
.antMatchers("/websocket/tracker").hasAuthority(AuthoritiesConstants.ADMIN)
.mvcMatchers("/websocket/tracker").hasAuthority(AuthoritiesConstants.ADMIN)
.antMatchers("/websocket/**").permitAll()
<%_ } _%>
.antMatchers("/management/health").permitAll()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public class UaaConfiguration extends AuthorizationServerConfigurerAdapter imple
.antMatchers("/api/account/reset-password/init").permitAll()
.antMatchers("/api/account/reset-password/finish").permitAll()
.antMatchers("/api/**").authenticated()<% if (websocket === 'spring-websocket') { %>
.antMatchers("/websocket/tracker").hasAuthority(AuthoritiesConstants.ADMIN)
.mvcMatchers("/websocket/tracker").hasAuthority(AuthoritiesConstants.ADMIN)
.antMatchers("/websocket/**").permitAll()<% } %>
.antMatchers("/management/health").permitAll()
.antMatchers("/management/health/**").permitAll()
Expand Down

0 comments on commit 75254b3

Please sign in to comment.