Giter Club home page Giter Club logo

Comments (7)

sventorben avatar sventorben commented on May 30, 2024 1

I think this extension already supports exactly what you want to achieve. I think there is a misunderstanding regarding the role name that you can configure globally. Can you check if the information in #118 helps.

If not, please let me know and I try to explain in more detail.

from keycloak-restrict-client-auth.

sventorben avatar sventorben commented on May 30, 2024

Hello @danifr,

thanks for the feature request.

Are your roles slack_user and role_gitlab realm-level roles or do you have two clients (slack and gitlab) each defining the corresponding role as a client-level role?

Regards
Sven-Torben

from keycloak-restrict-client-auth.

danifr avatar danifr commented on May 30, 2024

@sventorben, thanks for your quick answer.

I guess it can be either of them.
Maybe client-level role will be a bit cleaner for my use-case, but I wouldn't mind adding them as realm roles.

Full disclosure, before I was using this SPI https://github.com/thomasdarimont/keycloak-extension-playground/tree/master/auth-require-role-extension but unfortunately I couldn't make it work with the new version of Keycloak (quarkus distro)

Thanks a lot!

from keycloak-restrict-client-auth.

sventorben avatar sventorben commented on May 30, 2024

Can you elaborate a bit, why you need different names for the roles? If client-level roles work for you, then each role is already client-specific. Why would you want to encode the client name in the role name again?

from keycloak-restrict-client-auth.

danifr avatar danifr commented on May 30, 2024

Sorry for the confusion. I will try to explain my scenario better.

We have 2 different applications protected by Keycloak: GitLab and Slack. They are using 2 different keycloak clients.

Now, of all the users I have in Keycloak I ONLY want the ones that are in the group slack_users
to be able to login to Slack and ONLY the ones that are in gitlab_users to be able to access GitLab.
The users in slack_users and gitlab_users are not the same.

My idea is to implement this restriction via "required roles", so in this case the authentication flow for the Gitlab
client will require the specific role (i.e gitlab_users_role). This role will be mapped to the members of the gitlab_users group.

Likewise for Slack but in this case with the slack_users group and slack_users_role.

But my understanding is that you can only configure one global role. So if I do:
spi-restrict-client-auth-access-provider-client-role-client-role-name=gitlab_users_role

It will be only restricting for the gitlab_users_role.

I hope this makes better sense. Thank you very much.

from keycloak-restrict-client-auth.

danifr avatar danifr commented on May 30, 2024

Do you think this is something that can be achieved? Thanks!!

from keycloak-restrict-client-auth.

danifr avatar danifr commented on May 30, 2024

Indeed #118 (comment) looks like exactly what I need!

Danke schön Steven-Torben!!!

from keycloak-restrict-client-auth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.