KEYCLOAK-7821 Enable tomcat-specific features: *
(all roles), **
(authenticated user) in authRoles
constraint
This commit is contained in:
parent
f43519a16e
commit
d88568266f
1 changed files with 4 additions and 1 deletions
|
@ -223,9 +223,12 @@ public class KeycloakBaseSpringBootConfiguration {
|
|||
|
||||
for (KeycloakSpringBootProperties.SecurityConstraint constraint : keycloakProperties.getSecurityConstraints()) {
|
||||
SecurityConstraint tomcatConstraint = new SecurityConstraint();
|
||||
|
||||
for (String authRole : constraint.getAuthRoles()) {
|
||||
tomcatConstraint.addAuthRole(authRole);
|
||||
if(authRole.equals("*") || authRole.equals("**")) {
|
||||
// For some reasons embed tomcat don't set the auth constraint on true when wildcard is used
|
||||
tomcatConstraint.setAuthConstraint(true);
|
||||
}
|
||||
}
|
||||
|
||||
for (KeycloakSpringBootProperties.SecurityCollection collection : constraint.getSecurityCollections()) {
|
||||
|
|
Loading…
Reference in a new issue