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 role to result of OESS::DB::User::get_workgroups #1155

Closed
16 tasks done
jonstout opened this issue Jun 24, 2020 · 18 comments
Closed
16 tasks done

Add role to result of OESS::DB::User::get_workgroups #1155

jonstout opened this issue Jun 24, 2020 · 18 comments
Assignees

Comments

@jonstout
Copy link
Member

jonstout commented Jun 24, 2020

  • Add column role to mysql table user_workgroup_membership. Valid values are admin, normal, and read-only.
  • Existing users of type normal should be granted a role of admin in each of their workgroups. Users of type read-only shall be granted a role of read-only.
  • Remove column type from user table.
  • Remove type parameter from admin/admin.cgi?method=add_user
  • Add required parameter role to admin/admin.cgi?method=add_user_to_workgroup
  • Update admin/admin.cgi::authorization to use modified user permissions
  • Update acl.cgi to use modified user permissions
  • Update entity.cgi to use modified user permissions
  • Update circuit.cgi
  • Update vrf.cgi to use modified user permissions
  • Update data.cgi to use modified user permissions
  • Update user.cgi to use modified user permissions
  • Update admin/maintenance.cgi to use modified user permissions
  • Update command.cgi to use modified user permissions
  • Update data.cgi to use modified user permissions
  • Update interface.cgi to use modified user permissions
@DMack98
Copy link
Contributor

DMack98 commented Jun 29, 2020

SQL Script to perform tasks of adding column, modifiying existing connections and removing type column from user all in the scripts folder. Current implementation makes normal users admins, however may switch to normal for security purposes. Parameter removal and addition self explanatory

@DMack98
Copy link
Contributor

DMack98 commented Jun 29, 2020

Authorization separated into two separate functions now housed in OESS::DB::User::authorization_system and OESS::DB::User::authorization_workgroup. Done in an effort to help facilitate the new design goals for workgroup based roles.

@DMack98
Copy link
Contributor

DMack98 commented Jun 30, 2020

Created new functions for adding, editing, and removing a user in the new Database format. Modified the add_user_to_workgroup in new database. In addition added an edit role function to help with new Grouper_ui. Backend work essentially finished at this point moving on to making the changes on the frontend which will be used as API calls in essence.

@DMack98
Copy link
Contributor

DMack98 commented Jul 6, 2020

Finished Writing test cases for all the new User functions.

2 Test cases for add_user and delete_user
12 Test cases for edit_user
7 Test Cases for system access
6 Test cases for workgroup access

@DMack98
Copy link
Contributor

DMack98 commented Jul 6, 2020

Finished Writing test cases for all the new Workgroup functions.

3 test cases add_user
5 test cases remove_user
6 test cases edit_user_role

@DMack98
Copy link
Contributor

DMack98 commented Jul 7, 2020

Noticed decom_workgroup function in admin.cgi is unfinished.

@DMack98
Copy link
Contributor

DMack98 commented Jul 7, 2020

add_workgroup function doesn't require a description, so we can't immediately add it over to the new db function for creating a new workgroup unless we want to define a default description or add the field for description in the form.

@DMack98
Copy link
Contributor

DMack98 commented Jul 7, 2020

acl.cgi does not exist

@DMack98
Copy link
Contributor

DMack98 commented Jul 7, 2020

System Checks added for entity.cgi Used workgroup checks where able. Used for every function other than _,may_modify_entities as it already had some way of checking.

@DMack98
Copy link
Contributor

DMack98 commented Jul 7, 2020

OESS::User needs to be updated to reflect the removal of the type field from the db. Possibly also the OESS::Workgroup

@DMack98
Copy link
Contributor

DMack98 commented Jul 7, 2020

Decided to actually flip what I had originally done in entity.cgi and decided to update the checking in _may_modift_entities instead of refactoring the each processes internal checking. Is Update every called on its own? Its missing the initial checks that most other functions in circuits.cgi have.

@DMack98
Copy link
Contributor

DMack98 commented Jul 7, 2020

Finished making initial modifications to circuits.cgi

@DMack98
Copy link
Contributor

DMack98 commented Jul 7, 2020

Finished making initial modifications to vrf.cgi

@DMack98
Copy link
Contributor

DMack98 commented Jul 7, 2020

Didn't make any changes to data.cgi all access checks weren't affected by the database changes. The file is in need to being refactored away from Database.pm towards using DB.pm and its subfiles, but currently no reason to change anything.

@DMack98
Copy link
Contributor

DMack98 commented Jul 7, 2020

User.cgi didn't have anything that required permissions checking.

@DMack98
Copy link
Contributor

DMack98 commented Jul 7, 2020

Updated the authorization checking in the main function of admin/maintenance.cgi. Assuming there is no reason to check on a individual methods as they all require the same level of admin access.

@DMack98
Copy link
Contributor

DMack98 commented Jul 7, 2020

current authorization check is good enough in command.cgi Uses new DB doesn't check user type.

@DMack98
Copy link
Contributor

DMack98 commented Jul 7, 2020

Interface.cgi has a function register_rw_methods with no code written in it. It also currently has no checking for permissions. So No way to update the checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants