Skip to content

Commit

Permalink
Fix top-level when condition test
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Smolar <[email protected]>
  • Loading branch information
Jakub Smolar committed Nov 12, 2024
1 parent c719a9a commit e4b703c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

import pytest

from testsuite.kuadrant.policy.authorization import Pattern
from testsuite.kuadrant.policy import CelPredicate

pytestmark = [pytest.mark.authorino]


@pytest.fixture(scope="module")
def authorization(authorization, module_label):
"""Add rule to the AuthConfig to skip entire authn/authz with certain request header"""
authorization.add_rule([Pattern("context.request.http.headers.key", "neq", module_label)])
authorization.add_rule([CelPredicate(f"request.headers.key != '{module_label}'")])
return authorization


Expand Down

0 comments on commit e4b703c

Please sign in to comment.