Skip to content

Commit

Permalink
WIP: Start cathing
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaso committed Mar 30, 2024
1 parent 75ee4bb commit ca3cac3
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions vault_oidc_ssh_cert_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,14 @@ def github_vault_auth() -> None:

jwt_aud: str = _determine_audience(input_audience, vault_server)
jwt_token: str = _issue_github_jwt(jwt_aud)
vault_token: str = _issue_vault_token(
vault_server, oidc_backend, oidc_role, jwt_token
)

try:
vault_token: str = _issue_vault_token(
vault_server, oidc_backend, oidc_role, jwt_token
)
except requests.exceptions.HTTPError as http_error:
print(http_error.response.json())
raise SystemExit from http_error

print(f"::add-mask::{vault_token}")
with open(os.environ["GITHUB_OUTPUT"], mode="a", encoding="utf-8") as ghof:
Expand Down

0 comments on commit ca3cac3

Please sign in to comment.