I've been doing some group refactoring lately. Bare bones functionality of c-i-a makes such tasks cumbersome. One missing feature is a way to list all members of a group (recursively).
The following revision refers to this bug: https://chromium.googlesource.com/infra/luci/luci-py.git/+/f5f8bb1568445e0a0a5488aaa505ed557eae4ffc commit f5f8bb1568445e0a0a5488aaa505ed557eae4ffc Author: Vadim Shtayura <vadimsh@chromium.org> Date: Sat Dec 09 01:51:41 2017 [auth] Add 'get_latest_auth_db' private API function. It returns snapshot of the most recent state of all groups. Due to performance and memory pressure concerns, it piggy backs on AuthDB cache used by 'get_process_auth_db', essentially by forcefully updating it. Will be used by REST API layer. R=tandrii@chromium.org BUG= 793516 Change-Id: Ic701fc87e092bd5006aa9772eaba774fce64eaa0 Reviewed-on: https://chromium-review.googlesource.com/818467 Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org> Commit-Queue: Vadim Shtayura <vadimsh@chromium.org> [modify] https://crrev.com/f5f8bb1568445e0a0a5488aaa505ed557eae4ffc/appengine/components/components/auth/api.py [modify] https://crrev.com/f5f8bb1568445e0a0a5488aaa505ed557eae4ffc/appengine/components/components/auth/api_test.py
The following revision refers to this bug: https://chromium.googlesource.com/infra/luci/luci-py.git/+/955249801644f2cd8dd2512533c5534b2207ba76 commit 955249801644f2cd8dd2512533c5534b2207ba76 Author: Vadim Shtayura <vadimsh@chromium.org> Date: Mon Dec 11 20:18:18 2017 [auth] Make 'list_group' also return globs and nested groups. Will be useful in UI. Also make it return lists, not set, since the listing must not be used for membership checks! Sets may give wrong impression that it is OK to recursive fetch the entire group tree and then do checks against it. It is not. R=tandrii@chromium.org BUG= 793516 Change-Id: I8d4ec6fe7283b3ba88a4a9c0a111d7c67254b619 Reviewed-on: https://chromium-review.googlesource.com/818571 Commit-Queue: Vadim Shtayura <vadimsh@chromium.org> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org> [modify] https://crrev.com/955249801644f2cd8dd2512533c5534b2207ba76/appengine/components/components/auth/api.py [modify] https://crrev.com/955249801644f2cd8dd2512533c5534b2207ba76/appengine/components/components/auth/api_test.py [modify] https://crrev.com/955249801644f2cd8dd2512533c5534b2207ba76/appengine/components/components/ereporter2/acl.py [modify] https://crrev.com/955249801644f2cd8dd2512533c5534b2207ba76/appengine/components/components/ereporter2/ui_test.py [modify] https://crrev.com/955249801644f2cd8dd2512533c5534b2207ba76/appengine/config_service/notifications.py [modify] https://crrev.com/955249801644f2cd8dd2512533c5534b2207ba76/appengine/config_service/notifications_test.py
The following revision refers to this bug: https://chromium.googlesource.com/infra/luci/luci-py.git/+/ef03bf36137b11eddcc3a27f9a0b690749f75caf commit ef03bf36137b11eddcc3a27f9a0b690749f75caf Author: Vadim Shtayura <vadimsh@chromium.org> Date: Mon Dec 11 20:51:48 2017 [auth] REST API and UI for group listing. Looks kind of bare, but better than nothing. R=tandrii@chromium.org BUG= 793516 Change-Id: I581061d0862da057433139193afdb546caded80d Reviewed-on: https://chromium-review.googlesource.com/818624 Commit-Queue: Vadim Shtayura <vadimsh@chromium.org> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org> [modify] https://crrev.com/ef03bf36137b11eddcc3a27f9a0b690749f75caf/appengine/components/components/auth/ui/rest_api.py [modify] https://crrev.com/ef03bf36137b11eddcc3a27f9a0b690749f75caf/appengine/components/components/auth/ui/static/js/api.js [modify] https://crrev.com/ef03bf36137b11eddcc3a27f9a0b690749f75caf/appengine/components/components/auth/ui/static/js/common.js [modify] https://crrev.com/ef03bf36137b11eddcc3a27f9a0b690749f75caf/appengine/components/components/auth/ui/static/js/groups.js [add] https://crrev.com/ef03bf36137b11eddcc3a27f9a0b690749f75caf/appengine/components/components/auth/ui/static/js/listing.js [modify] https://crrev.com/ef03bf36137b11eddcc3a27f9a0b690749f75caf/appengine/components/components/auth/ui/templates/groups.html [add] https://crrev.com/ef03bf36137b11eddcc3a27f9a0b690749f75caf/appengine/components/components/auth/ui/templates/listing.html [modify] https://crrev.com/ef03bf36137b11eddcc3a27f9a0b690749f75caf/appengine/components/components/auth/ui/ui.py
The following revision refers to this bug: https://chromium.googlesource.com/infra/luci/luci-py.git/+/35976e2b65dc5a3e3e1843c2de18a898af1001b1 commit 35976e2b65dc5a3e3e1843c2de18a898af1001b1 Author: Vadim Shtayura <vadimsh@chromium.org> Date: Wed Dec 13 01:02:39 2017 [auth] Use auth_db_rev as cache version number instead of entity group version. The entity group version behaves erratically in local unit tests (looks like each sandbox reset switches it to a random value). We used to compare versions only by equality before (and it worked), but recently started to also order them (and this caused breakages). Instead use AuthDB revision numbers that we explicitly maintain. They are monotonic even on dev server. The only downside is that we now have to be careful with handling of AuthDB primary switch, since auth_db_rev from different primaries are not comparable between each other. R=tandrii@chromium.org BUG= 793516 Change-Id: Id5b81eeea787257dbe373e1cf9114b934fec22d8 Reviewed-on: https://chromium-review.googlesource.com/823278 Commit-Queue: Vadim Shtayura <vadimsh@chromium.org> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org> [modify] https://crrev.com/35976e2b65dc5a3e3e1843c2de18a898af1001b1/appengine/components/components/auth/api.py [modify] https://crrev.com/35976e2b65dc5a3e3e1843c2de18a898af1001b1/appengine/components/components/auth/api_test.py [modify] https://crrev.com/35976e2b65dc5a3e3e1843c2de18a898af1001b1/appengine/components/components/auth/version.py
Comment 1 by bugdroid1@chromium.org
, Dec 9 2017