Skip to content
This repository has been archived by the owner on Nov 21, 2019. It is now read-only.
This repository is currently being migrated. It's locked while the migration is in progress.

modify and add methods & scripts for RBAC #53

Open
lifehackjim opened this issue Apr 27, 2018 · 0 comments
Open

modify and add methods & scripts for RBAC #53

lifehackjim opened this issue Apr 27, 2018 · 0 comments
Assignees
Milestone

Comments

@lifehackjim
Copy link
Contributor

create_user needs full RBAC support
create_user needs full computer group support
create_user needs full content role set / content role set membership support

@lifehackjim lifehackjim added this to the 3.0.0 milestone Apr 27, 2018
@lifehackjim lifehackjim self-assigned this Apr 27, 2018
lifehackjim pushed a commit that referenced this issue Apr 27, 2018
TODO: UNTESTED!
lifehackjim pushed a commit that referenced this issue Apr 27, 2018
lifehackjim pushed a commit that referenced this issue Apr 27, 2018
content set role and content set role membership
lifehackjim pushed a commit that referenced this issue Apr 27, 2018
debugging helper really, but could be generally useful
lifehackjim pushed a commit that referenced this issue Apr 27, 2018
create a new kwargs from kwargs, overwriting keys with new values
lifehackjim pushed a commit that referenced this issue Apr 27, 2018
better str() method
repr() just uses str() now (may break in python 3, figure out later)
_is_list() method
simple_dict() and complex_dict() methods
lifehackjim pushed a commit that referenced this issue Apr 27, 2018
lifehackjim pushed a commit that referenced this issue Apr 27, 2018
used by operations as seconds to wait before deleting where delete
existing = True
lifehackjim pushed a commit that referenced this issue Apr 27, 2018
lifehackjim pushed a commit that referenced this issue Apr 27, 2018
- get_user_group(): new method for figuring out what the group object
should be for a user.. Empty group object, single group object , or a
single group object with a sub group for each group the user should be
in (merged group, aka mrgroup_$1,$2,$3) -- if hidden "merged group"
exists, use that. if not, create it.
- update_props_obj: generic object method for updating the properties
(MetadataList of MetadataItems) for ANY object that has properties.
- add_props_obj(): generic object method for setting the properties
object for ANY object that has properties, calls update_props_obj then
sets the return to the attribute on object that holds the properties
- add_props_user(): user object specific method for adding properties
to a user object using add_props_obj()
- create_user(): mid re-vamp:
  - supports deletion of existing user if exists
  - uses new get_user_group() method to determine the "actual" group id
this user should have set on it
  - uses new add_props_user() method to apply any properties supplied
for this user
  - WIP: uses new add_user_roles() method for adding content set role
names for this user

- obj_in_objlist(): checks if object is in object list. special wrapper
method for taniumpy methods and how they work. converts each object to
json (both object and all objects in objlist) and does a string
comparison of object in json form and objects in object list in json
form to return exists = True/False. can throw a duplication error if
dup_error = True and obj is in objlist.
- find_role_match(): looks for matching role supplied in all content
set roles based on attribute supplied (name/id/etc)
- find_roles(): will find all matching role names in supplied list of
role names. if int or str, will use find_role_match() with either 'id'
or 'name' as attribute and add the matches to the return. if
ContentSetRole will just add that to the return. if ContentSetRoleList,
will add each item in that to the return.
- check_type(): utility method for checking if an object is one of a
number of types (needs to be moved into argtools)
- get_user_obj(): utility method for getting a user object. if a User
object is supplied, returns that. if a string is supplied, gets user by
name, returns that. if an integer is supplied, gets user by id, returns
that.
- argget(): fancy footwork utility method for getting the type of list
object of supplied string from contstants.GET_OBJ_MAP
- WIP: mod_roles_user(): Modify (add or remove) content set roles to
user
- WIP: user_role_memberships(): return 2 content set role lists. one of
all the content set roles assigned to this user, another with all of
the content set roles NOT assigned to this user.
- WIP: add_user_role_membership(): Assign a content set role to a user
by creating a content set role membership
- _find(): modified to have better log messages/error checking
lifehackjim pushed a commit that referenced this issue Apr 27, 2018
removing all properties, deleting a property, and overwriting a
property all supported now
lifehackjim pushed a commit that referenced this issue Apr 27, 2018
lifehackjim pushed a commit that referenced this issue Apr 29, 2018
rbac_examples.py has some examples
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant