feat: Fine grained authorization rule definition #67
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes:
This change incorporates a new screen to list fine grained constraints on access. A user with a
super-admin
role can manage a set of constraints.Users are mapped to constraints via their group memberships on a new screen. "Groups" are defined by any value mapped from a federated identity provider or other values available in the claim set in VAMS pretokengen.py lambda function. See pretokengen.py for an example customization.
Available permissions include Read, Edit, and Admin. The fine grained authorization rules are based on sets of fields, operators, and values.
Operators can include or exclude assets based on whether the set of fields matches or does not match the criteria.
Finally, a new backend class enables the use of this criteria for filters and aggregations in OpenSearch. See the examples in
backend/tests/handlers/authz/test_opensearch.py
.Note: these new screens do not yet have an effect on the way VAMS authorizes access. That is coming with the anticipated implementation of OpenSearch to support searching large collections of assets and authorization.
Other changes made include the introduction of running unit tests for the python backend and the web app as well as some
data-testid
attributes in the frontend for element selectors supporting the tests.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.