PCD-8663: add rego_hook seam for server-side computed policy - #3
Open
tyler-pf9 wants to merge 3 commits into
Open
PCD-8663: add rego_hook seam for server-side computed policy#3tyler-pf9 wants to merge 3 commits into
tyler-pf9 wants to merge 3 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
https://platform9.atlassian.net/browse/PCD-8663
https://platform9.atlassian.net/browse/PCD-8653
neutron_lib resolves server-side computed policy on its own
_ROLE_ENFORCER, which theservice does not own, so the service cannot route it without a seam here.
Inert on its own. Returns to the existing
_ROLE_ENFORCER.authorizepath unless aservice installs a hook and that hook returns non-None.
register_defaultraisesDuplicatePolicyErrorfrom outside, so overriding the rulefrom pf9-neutron is not an option. This seam is the minimum change.
Tests: 3 cases covering True, False and None.
Consumed by pf9-neutron. Supersedes #2.
Related PRs and merge order
https://github.com/platform9/pf9-watchman/pull/90
#3
https://github.com/platform9/pf9-nova/pull/488
https://github.com/platform9/pf9-cinder/pull/207
https://github.com/platform9/pf9-glance/pull/149
https://github.com/platform9/pf9-neutron/pull/189
Supersedes pf9-watchman #86, pf9-nova #473, pf9-cinder #203, pf9-glance #146,
pf9-neutron #181, neutron-lib #2. Note #86 also carries
opa_out/keystone/admin_required.rego, which fixes an unrelated live 403 and shouldbe salvaged before that PR closes.