Skip to content

Commit

Permalink
chore(tests): Ensure delegate bypass authz & mutators
Browse files Browse the repository at this point in the history
  • Loading branch information
yunier-rojas committed Mar 3, 2024
1 parent 83f4387 commit 2bbd810
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions proxy/request_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,19 @@ func TestRequestHandler(t *testing.T) {
Authenticators: []rule.Handler{{Handler: "delegate"}},
},
},
{
d: "should pass with delegate even with invalid authz and mutators",
setup: func(t *testing.T, config configuration.Provider) {
config.SetForTest(t, configuration.AuthenticatorDelegateIsEnabled, true)
},
expectErr: false,
r: newTestRequest("http://localhost"),
rule: rule.Rule{
Authenticators: []rule.Handler{{Handler: "delegate"}},
Authorizer: rule.Handler{Handler: "invalid-id"},
Mutators: []rule.Handler{{Handler: "invalid-id"}},
},
},
} {
t.Run(fmt.Sprintf("case=%d/description=%s", k, tc.d), func(t *testing.T) {
// log, hook := test.NewNullLogger()
Expand Down

0 comments on commit 2bbd810

Please sign in to comment.