Skip to content

bfs.py: Fix API issue, add auto org mode#11

Open
tm23 wants to merge 1 commit intodxa4481:masterfrom
tm23:master
Open

bfs.py: Fix API issue, add auto org mode#11
tm23 wants to merge 1 commit intodxa4481:masterfrom
tm23:master

Conversation

@tm23
Copy link

@tm23 tm23 commented Oct 8, 2020

I ran into an API limitation, where one could only send 10 permissions at a time (by default, at least), leading to the following error message:
{"error": {"code": 400, "message": "Some specified value(s) are invalid.", "status": "INVALID_ARGUMENT", "details": [{"@type": "type.googleapis.com/google.rpc.BadRequest", "fieldViolations": [{"field": "access_selector", "description": "In one request, the total number of roles and permissions should be equal or less than 10. If you have more than that, please split your request into multiple ones."}]}]}}

So I added some ugly code to batch up the number of permissions we ask the API and attempt to collate the results on the other side.

I also added an "automatic" mode to step through the entire org's projects. This may hit your API requests rate quota, even with the sleep times included.

(edit to fix typo)

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

Successfully merging this pull request may close these issues.

1 participant