Closed nomadmtb closed 1 year ago
@nomadmtb Feel free to tell me to get lost, but any thoughts on creating a new policy.py module (i.e. a sibling of auth/admin/accounts)? Admin is getting a bit crowded.
@nomadmtb Feel free to tell me to get lost, but any thoughts on creating a new policy.py module (i.e. a sibling of auth/admin/accounts)? Admin is getting a bit crowded.
This is a great point actually, and thanks for bringing it up. I had the same gut feeling looking at the admin module and I think creating more separation between those might be a good idea.
Let me take this back to the team since we might have some future plans connecting things from existing adminapi endpoints and it might be a little awkward needing to instantiate two clients.
@AaronAtDuo, I talked to the team and I think for the ease of use for customers and eventual work coming down the pipe for the adminapi at a higher level, we are thinking of just adding these to the existing admin client for now if that's okay! If you do want some context, I'm more than happy to give you more details over slack.
@nomadmtb as of about two hours ago, the admin client will use canonicalization v5 now. that might not play well with your new methods? you can override the algorithm version per-call if you need to; or go all in on using v5 - which should make the json easier to work with I think.
This PR adds some helper functions that can be used to CRUD (create, read, update & delete) Duo Policies. This feature is still in private preview so adding a note about that in the project README.md file.