Answer the question
In order to leave comments, you need to log in
What is the principle of SSO and the distribution of rights on the example of keycloak?
Hello. The task is to implement single sign-on technology based on Keycloak. I ask for help to deal with the processing of rights and roles by the application (client). Google did not give a clear idea of the logic of work. I would be grateful for any comments.
As I see it simplified:
1. The application (client) sends a request to Keycloak with the id of the client and the credentials of the user who is logging in.
2. In case of correct authorization on the SSO server, the client receives a response in the form of a token, refresh token, and other information. Perhaps among them will be the username of the user, his email, etc., but it seems like this after another request.
3. Further, just the essence of my question - it is not clear what to do with this data, or rather where to manage access to different parts of the application. Let's say the admin role has the right to view the "/users" page, while the guest role does not. Where exactly should the permissions handling for a specific role be: on the backend or specifically on Keycloak? Well, or in some other way.
4. Do I need to somehow save the user who has passed authorization in keycloak to the user table of the application?
Please explain where I think wrong and if not difficult, then how it should be in a couple of words. Thanks in advance)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question