mirror of
https://github.com/jeffknupp/sandman2.git
synced 2026-04-25 08:35:49 +03:00
[GH-ISSUE #114] Add role based security or any kind of access control #58
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
pull-request
question
refactoring
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/sandman2-jeffknupp#58
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @supersexy on GitHub (Jul 11, 2019).
Original GitHub issue: https://github.com/jeffknupp/sandman2/issues/114
Interesting project, but I can not find any hint about how to control access to data, also the documentation does not provide any concept regarding data security.
Some kind of access control system seems like a very basic requirement for any data access software - is this something that is planned for the future?
@dkatz23238 commented on GitHub (Oct 12, 2019):
This would be a killer feature. Currently using nginx as a proxy.
@Carelvd commented on GitHub (Nov 5, 2019):
If one cracks open the code one finds the following for the create application method
Which one can restructure as follows
Once this is done it becomes rather trivial to add security to the application.
Then add the endpoints one wants as necessary. Similarly it is possible to secure ones administration interface by adding say
Flask-Loginbut one must also then subclass theAdminViewandAdminIndexViewand pass these through the theAdmininvocation in the "new"sandmanmethod.I have submitted a PR that already does this refactoring and am awaiting its acceptance.
@zeluspudding commented on GitHub (Jan 28, 2020):
Yes, authentication is a must. I believe
sandman1had it. Was expectingsandman2to do it better... not less... But I as a beggar cannot be a boss. But we can choose another approach, such as dreamfactory. Will start playing with that now... hopefully it's not crazy hard to setup.@Carelvd commented on GitHub (Jan 28, 2020):
@zeluspudding My example above was meant to illustrate that forcing a security solution upon the user is unnecessary and that, with minor refactoring of the code, it becomes trivial for persons using the library to set this up.
To setup security layer for the interim one need only copy the
create_app/get_appcode and extend it yourself, as I have above. There are multiple libraries that deal with this e.g. flask_jwt, flask_jwt_extended, flask-login and the like.@jeffknupp When my PR is accepted/rejected I will push up my documentation for the changes and I can happily document the methods by which security can be added.