Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dinosaur conftest refactor to support AuthPolicy v2 #313

Merged
merged 2 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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