I\'m running a KeyCloak server to authenticate users who would like to gain access to a Spring Boot/Spring Web REST API. However, an error occurs while trying to authenticate.
After some research I found the answer to my problem.
The problem is that java.security.acl.Group is being deprecated since JRE 9 and marked for removal in future versions.
java.security.acl.Group is being replaced by java.security.Policy
I was running my Spring-Boot application on JRE 14 in which this class appeared to be no longer available.
So once I changed my Spring-boot application (which hosts the REST-API) to use JRE 11 the error went away.
Note: The pom.xml Java version attibute
<java.version>11</java.version>
needed to change as well as the JDK in the build path in Eclipse (which is the IDE I'm using) JDK Buildpath
Ran into the same issue.
By the way, it's reported in the keycloak issue tracker here: https://issues.redhat.com/browse/KEYCLOAK-13690
Should be fixed in keycloak 11.