Skip to content

Commit

Permalink
Merge pull request #313 from azgabur/dinosaur_refactor
Browse files Browse the repository at this point in the history
Dinosaur conftest refactor to support AuthPolicy v2
  • Loading branch information
pehala authored Jan 3, 2024
2 parents 89dfb98 + 4c4b494 commit 1c7fd72
Show file tree
Hide file tree
Showing 4 changed files with 154 additions and 346 deletions.
6 changes: 4 additions & 2 deletions testsuite/policy/authorization/sections.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,13 @@ def add_kubernetes(self, name: str, audiences: list[str], **common_features):
self.add_item(name, {"kubernetesTokenReview": {"audiences": audiences}}, **common_features)

@modify
def add_oidc(self, name, endpoint, *, credentials: Credentials = None, **common_features):
def add_oidc(self, name, endpoint, *, ttl: int = 0, credentials: Credentials = None, **common_features):
"""Adds OIDC identity"""
if credentials is None:
credentials = Credentials("authorizationHeader", "Bearer")
self.add_item(name, {"jwt": {"issuerUrl": endpoint}, "credentials": asdict(credentials)}, **common_features)
self.add_item(
name, {"jwt": {"issuerUrl": endpoint, "ttl": ttl}, "credentials": asdict(credentials)}, **common_features
)

@modify
def add_api_key(
Expand Down
292 changes: 0 additions & 292 deletions testsuite/resources/dinosaur_config.yaml

This file was deleted.

Loading

0 comments on commit 1c7fd72

Please sign in to comment.