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

oidc: configure timeouts for requests #541

Merged
merged 2 commits into from
Mar 11, 2023
Merged
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion sigstore/oidc.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def __init__(self, base_url: str) -> None:
f"{base_url}/", ".well-known/openid-configuration"
)

resp: requests.Response = requests.get(oidc_config_url)
resp: requests.Response = requests.get(oidc_config_url, timeout=30)
try:
resp.raise_for_status()
except requests.HTTPError as http_error:
Expand Down Expand Up @@ -156,6 +156,7 @@ def identity_token( # nosec: B107
self.oidc_config.token_endpoint,
data=data,
auth=auth,
timeout=30,
)

try:
Expand Down