diff --git a/docbook/auth-server-docs/reference/en/en-US/modules/spring-security-adapter.xml b/docbook/auth-server-docs/reference/en/en-US/modules/spring-security-adapter.xml
index 0d3c20c0df..dce3d3d899 100644
--- a/docbook/auth-server-docs/reference/en/en-US/modules/spring-security-adapter.xml
+++ b/docbook/auth-server-docs/reference/en/en-US/modules/spring-security-adapter.xml
@@ -1,7 +1,7 @@
Spring Security Adapter
- To to secure an application with Spring Security and Keyloak, add this adapter as a dependency to your project.
+ To secure an application with Spring Security and Keycloak, add this adapter as a dependency to your project.
You then have to provide some extra beans in your Spring Security configuration file and add the Keycloak security
filter to your pipeline.
@@ -176,6 +176,14 @@ public class SecurityConfig extends KeycloakWebSecurityConfigurerAdapter
For example, an administrator role must be declared in Keycloak as ROLE_ADMIN
or similar, not simply
ADMIN
.
+
+ The class org.keycloak.adapters.springsecurity.authentication.KeycloakAuthenticationProvider
+ supports an optional org.springframework.security.core.authority.mapping.GrantedAuthoritiesMapper
+ which can be used to map roles coming from Keycloak to roles recognized by Spring Security. Use, for example,
+ org.springframework.security.core.authority.mapping.SimpleAuthorityMapper
to insert the
+ ROLE_
prefix and convert the role name to upper case. The class is part of Spring Security
+ Core module.
+