-
Notifications
You must be signed in to change notification settings - Fork 21
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
Permissions rework #5163
Permissions rework #5163
Conversation
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
5bb6136
to
f68163e
Compare
-In branch now -John |
Permissions system pull request + changelist (created by referring to Overarching changes
FlowAPI changes
/flowapi/flowapi/api_spec.py
flowapi/config.py
flowkit/jwt_auth_callbacks.py
flowkit/permissions.py
flowkit/user_model.py
Flowauth backend changes
admin.py
groups.py
main.py
models.py
roles.py
server.py
token_management.py
user_settings.py
users.py
Flowauth frontend changesAdminMenu.jsx Dashboard.jsx
GroupDetails.jsx
Picker.jsx
RoleDetails.jsx
GroupList.jsx/RoleList.jsx
GroupMembersPicker.jsx/RoleMembersPicker.jsx
RoleScopePicker.jsx
ScopeDetails.jsx
ServerAdminDetails.jsx
TokenBuilder.jsx
TokenDetails
TokenList.jsx
TokensRolePicker
UserAdminDetails.jsx
UserRoleList.jsx
UserRolePicker.jsx
UserServer.jsx
api.js
util.js
Still to do:
|
Co-authored-by: Jonathan Gray <[email protected]>
…owKit into permissions_rework
Relocked flowauth Pipfile and package-lock
Closes #5091
I have:
Description
This PR reworks the way FlowAPI and FlowAuth handle query-scoped permissions.
At present, the permissions scopes are generated from a full walk of every set of query trees at every geographic level. This was causing memory issues with the growing number of queries, so this pull request implements a new system.
In this PR,
FlowAuth
consists of four entities; Servers, Users, Roles and Scopes.Scopes are applied at the user level, giving permission to:
Scopes are automatically populated from a Server when it is registered or updated via a new FlowAPI endpoint
Roles are set by the FlowAuth admin, and consist of a set of Scopes. Roles are specific to Servers.
Users are assigned Roles by the FlowAuth admins.
The new auth flow runs as below:
This PR will remove Groups and Capabilities from FlowAuth, being replaced with Roles and Scopes. Tokens will also be removed as a database entitiy; instead, FlowAuth will treat a Token as a view of a combination of a User, a set of Roles and an expiry date.