allow self SARs using old policy: #4767
Merged
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.
Backwards compatibility without policy updates is broken without this fix. Without this fix, old registry images against new openshift servers running with old policy (before
oadm policy reconcile-cluster-roles
), will suddenly start failingThere's an extra check in an SAR to ensure that the user can run an SAR against the namespace he's requesting. This is done via an authorization check against the localSAR resource for that namespace. That check should only happen for requests that weren't already authorized via the authorizer before being assigned to a go-restful route.
The integration test was broken because the server starts up with new policy instead of old policy. A new test was added to cover this case.
@sdodson @brenton please evaluate for patch to OSE.