principal

How do I start a thread in a different security context?

六眼飞鱼酱① 提交于 2019-11-27 13:40:35
How to start a thread in the security context of a different user? When a process starts a thread normally the security context is also passed but how to launch a thread in a different security context with the principal of a different user? I believe that you can just set the CurrentPrincipal as first operation of the thread code after the thread has started, and only then begin to execute the code which is supposed to run with the other principal. This should take care of any .NET role-based checks. If you need impersonation as well for calls to the OS, you can impersonate the

Keycloak retrieve custom attributes to KeycloakPrincipal

青春壹個敷衍的年華 提交于 2019-11-26 12:03:18
问题 In my rest service i can obtain the principal information after authentication using KeycloakPrincipal kcPrincipal = (KeycloakPrincipal) servletRequest.getUserPrincipal(); statement. Keycloak principal does\'nt cotain all the information i need about the authenticated user. Is it possibile to customize my own principal type? On the keycloak-server-end i ve developed a user federation provider. I saw that UserModel makes possible to add a set of custom attributes to my user. Is it possibile to