-
Notifications
You must be signed in to change notification settings - Fork 80
Resources Configuration #184
Comments
Hello @thoism ,
Thanks, although I have a question, do you use Glewlwyd 2.x or still use the version 1.4 from 3 years ago?
Correct me if I'm wrong, but what I understand with your request is to allow then administrator to group scopes into groups of scopes, so it doesn't have to add multiple scopes multiple times for each user. Is that so? If I misunderstand, can you describe a use case on what you expect? Basically, you could use the scopes as they are to reproduce the ACL but I understand it would be painful and time consuming. If we are on the same page, I can consider improving the scopes management to add groups and ACLs but I want to make I got it right, mostly because I won't use it myself so I can't guess what you would need. The database tables But they only existed as a useless information and I never used it myself, nor knew anyone who used it, so I dropped this feature in 2.0. |
We are using 1.4 I guess.
Yes exactly!
Groups and roles are normally considered as two different things meaning:
I believe implementing Roles takes precedence over Groups. Yes actually I am thinking about something along these lines: And as you said use the Scopes (Permissions) to determine the read(subscribe), write(publish) on specific MQTT topics. Example ACLs (for topic patterns e.g. a/#/event/+):
This project for example expects two HTTP endpoints: jwt_getuser_uri - URI for username/password check The code provides more information about the expected parameters and response and there are also different modes of both request and response types. If we take the jwt_aclcheck_uri then the plugin would send to Glewlwyd the following parameters:
The endpoint is expected to respond with a 2.x HTTP code if the mode is set to status which means authorized. What is a bit confusing though is the clientid; which is the OAuth2 client application or the actual user? Remains to be seen I guess. What is also more confusing to me still is if I should consider each micro-service as a client to OAuth2 or consider the whole software system as a client to OAuth2. Due to the nature of MQTT and HTTP though I think both users and services should be using a user since a service should not be able publish a message on another service's topic. Could this be implemented as a new plugin to support this Glewlwyd - mosquitto-go-auth integration? @babelouest thank you for your prompt reply! |
No problem, but note that I don't maintain this version anymore, and all improvements will be in the current 2.x branch. Concerning your feature requests, I see 2 different ones in your message. The first one is to add the concept of scope groups in the application, and users can be linked to those groups. That can be done in a future release, since it's not very complex to implement. The second one is to add a new plugin that will implement an ACL validator. This plugin should provide an API to verify ACLs and credentials. |
Hi @babelouest
I guess defining them as roles will allow for supporting user groups later if the need arises without changing concepts.
I believe the Eclipse Mosquitto - Dynamic Security Plugin implements this feature really nicely but there is also Casbin which is a library dedicated to ACLs.
Totally agreed here. I wish I could avoid it. I am wondering if it would be an option to have the JWT token optionally contain:
as claims; in this way it would be easier to validate authorization even if some disagree. |
@thoism , if you're ok, I'll leave this issue as is and we'll continue it in parralel casbin/casbin-cpp#100 |
Also, you can check Glewlwyd's OIDC plugin implementation of OAuth 2.0 Rich Authorization Requests Draft 03 . See this paragraph for the configuration details of this feature, this may be a solution for your issue See https://medium.com/oauth-2/rich-oauth-2-0-authorization-requests-87870e263ecb for a explanation of the concept for example |
@babelouest to be honest I have already read that and it looks very interesting. I will look into it better in the next few days and see if I can make it work for our case. |
I am amazed how this this turned out. I am really thankful for the efforts from all sides and I hope other users will see the value of this. As I already mentioned, EventStore and Kafka use ACLs as well which might make this feature available for 2 of the most widely used event brokers as well. Thank you! |
Awesome! Don't hesitate to open a new issue of you have problems or questions regarding rich auth requests. I've implemented it without a use case nor the need, "for the cause" I'd say :) |
First of all thank you for the Glewlwyd project! We are using it for 3 years now and it works great for us.
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
Roles based policies with each role containing Scopes would be a nice feature that would make the user's management easier.
Apart from HTTP resources, maybe it would be possible to have other types of resources (e.g. topics, channels)
Describe alternatives you've considered
An alternative solution for us was keycloak but it is really hungry on computer resources and we want to avoid.
https://www.keycloak.org/docs/latest/authorization_services/
Additional context
I haven't found how to administer resources and connect them with scopes from the Glewlwyd UI but I see the tables and connecting table in the database. (g_resource, g_resource_scope, g_scope)
ACLs is something used by many types of applications e.g. message brokers(mosquitto), event brokers (eventstoredb) maybe it is something that should be considered.
The text was updated successfully, but these errors were encountered: