Skip to content

Commit 70b54e7

Browse files
committed
Drop authorizer wrapper
The openshift authorizer was wrapping kube authorizer only to generate Forbidden messages, but upstream already generate similar messages and we cannot intercept and change those. So let's just stop duplicating errors and use the upstream authorizer and error messages as is. Signed-off-by: Simo Sorce <[email protected]>
1 parent fcf6cae commit 70b54e7

14 files changed

+40
-450
lines changed

pkg/authorization/authorizer/authorizer.go

Lines changed: 0 additions & 49 deletions
This file was deleted.

pkg/authorization/authorizer/browsersafe/authorizer_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func TestBrowserSafeAuthorizer(t *testing.T) {
5151
safeAuthorizer := NewBrowserSafeAuthorizer(delegateAuthorizer, "system:authenticated")
5252

5353
authorized, reason, err := safeAuthorizer.Authorize(tc.attributes)
54-
if authorized == authorizer.DecisionAllow || len(reason) != 0 || err != nil {
54+
if authorized == authorizer.DecisionAllow || err != nil {
5555
t.Errorf("%s: unexpected output: %v %s %v", name, authorized, reason, err)
5656
continue
5757
}

pkg/authorization/authorizer/interfaces.go

Lines changed: 0 additions & 10 deletions
This file was deleted.

pkg/authorization/authorizer/messages.go

Lines changed: 0 additions & 128 deletions
This file was deleted.

0 commit comments

Comments
 (0)