0 votes
asked in RapidClipse Programmierung by (2.8k points)
Leider fehlt in der Doku ein passendes Beispiel. Das speichern in der Role Klasse reicht nicht aus.

Man bekommt ein "Resource not found: MY_ACCESS" Error beim Login

Stacktrace:
    at com.rapidclipse.framework.security.authorization.AuthorizationManager$Default.lambda$resolvePermissions$0(AuthorizationManager.java:692)
    at java.base/java.util.HashMap.forEach(HashMap.java:1336)
    at com.rapidclipse.framework.security.authorization.AuthorizationManager$Default.resolvePermissions(AuthorizationManager.java:688)
    at com.rapidclipse.framework.security.authorization.AuthorizationManager$Default.lambda$buildRoleTable$5(AuthorizationManager.java:812)
    at java.base/java.util.HashMap.forEach(HashMap.java:1336)
    at com.rapidclipse.framework.security.authorization.AuthorizationManager$Default.buildRoleTable(AuthorizationManager.java:810)
    at com.rapidclipse.framework.security.authorization.AuthorizationManager$Default.build(AuthorizationManager.java:569)
    at com.rapidclipse.framework.security.authorization.AuthorizationManager$Default.ensureInitialized(AuthorizationManager.java:538)
    at com.rapidclipse.framework.security.authorization.AuthorizationManager$Default.subject(AuthorizationManager.java:483)
    at com.rapidclipse.framework.server.security.authentication.Authentication.tryLogin(Authentication.java:91)

1 Answer

0 votes
answered by (2.8k points)
 
Best answer

die Problematik entsteht bei Verwendung von Microstream DB in Verbindung mit der "enum AuthorizationResources". Diese muss vor Verwendung einmalig in die im Microstream.Root abgelegte Pojo Klasse "Permission implements java.io.Serializable, AuthorizationResource" ├╝bertragen werden.

        for(final AuthorizationResources value : AuthorizationResources.values())
        {
            DB.root().getPermissions().add(new Permission(value.ordinal(), value.name()));
        }

Danach kann man die Role/Group Klasse mit AuthorizationResources.ADMIN etc. best├╝cken

       group.getAuthResources().add(AuthorizationResources.ADMIN);

Welcome to Rapidclipse Q&A, where you can ask questions and receive answers from other members of the community.
Powered by Question2Answer
...