Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add serverless service type #169

Closed
dbyrns opened this issue Apr 1, 2019 · 3 comments
Closed

Add serverless service type #169

dbyrns opened this issue Apr 1, 2019 · 3 comments
Assignees
Labels
feature New feature to be developed investigate Issue or new component that needs further exploration question
Milestone

Comments

@dbyrns
Copy link
Contributor

dbyrns commented Apr 1, 2019

Magpie starts its journey as a services adapter for twitcher.
All services have a private url proxied by twitcher and magpie keep a resources / permissions database allowing twitcher to authorize or block access to them.

However, Magpie alone provides authentification and has a complete API to handle resources / permissions. So the following question arises : What if I want to use Magpie as a service to handle permissions of my micro-service that doesn't have any public API to be protected by Twitcher?

So the current issue is to bring that possibility to Magpie. We should be able to register a micro-service as a serverless service type. Magpie will not let Twitcher access it. The micro-service would then be responsible of creating its resources and checking itself the permissions.

@dbyrns dbyrns added the feature New feature to be developed label Apr 1, 2019
@fmigneault fmigneault added this to the 0.11.x milestone Apr 8, 2019
@fmigneault fmigneault added question investigate Issue or new component that needs further exploration labels Jul 27, 2020
@fmigneault
Copy link
Collaborator

@dbyrns
Is this still relevant?
How is Twitcher employed in this case if not via Proxy URL?

For the moment we got a ServiceAccess which is all-or-nothing access to some URL.
Its a bit dirty, but this feature can be worked around by giving any random URL to Magpie under such service. Magpie doesn't verify the provided endpoint as it is not guaranteed to have access to it itself.
Then, the applicable service could have a specific user with sufficient permissions that allows it to check whether some user has access to some given resource.

This last part can be a bit tricky at the moment (requires admin permission to get users/resources/perms) but should be much easier with #341. Also, #170 and #340 (or other specific feature) could add 'owned' service permissions, which would remove the need for admin-level access. (note: Magpie already has user-resource and group-resource ownership tables, just not yet employed extensively in the API).

@dbyrns
Copy link
Contributor Author

dbyrns commented Jul 28, 2020

I think it is. A good example is for single page applications that don't have url based restrictions. ServiceAccess is indeed a workaround and was used in the past, but I think Magpie could do better. Removing admin-level access is a needed feature and once available this issue should be as simple as creating a new service type that do not create a new endpoint under twitcher.

@fmigneault
Copy link
Collaborator

Magpie is able to respond with effective permissions using the appropriate effective=true query parameter on relevant API permission retrieval endpoints that support it.
Using a ServiceAPI implementation, one could define their custom structure of "roles" similarly to request paths: eg. a "resource" feature/operation/action.
Using this, the Magpie API can then be queried for such "feature/operation/action" resource, and obtain the access of a given user for that resource.
The ServiceAPI only has read, write permissions for now. A derived service implementation would be needed for more custom "scopes".

Closing this issue since no requirements when needed for a long time.
Could reopen and address as needed if a use case ever occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature to be developed investigate Issue or new component that needs further exploration question
Projects
None yet
Development

No branches or pull requests

2 participants