Skip to content

Commit

Permalink
WIP: Try url debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaso committed Mar 30, 2024
1 parent f3f48c9 commit c0bd121
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions vault_oidc_ssh_cert_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ def _issue_github_jwt(jwt_aud: str) -> str:
full_url = f"{req_url}&audience={jwt_aud}"
headers = {"Authorization": f"Bearer {req_token}"}

print(f"::debug::FULL TOKEN REQUEST URL: {full_url}")

response = requests.get(full_url, headers=headers, timeout=10)
response.raise_for_status()

Expand All @@ -33,6 +35,8 @@ def _issue_vault_token(
login_url = f"{vault_server}/v1/auth/{oidc_backend}/login"
payload = {"jwt": jwt_token, "role": oidc_role}

print(f"::debug::LOGIN URL: {login_url}")

response = requests.post(login_url, data=payload, timeout=10)
response.raise_for_status()

Expand All @@ -47,6 +51,8 @@ def _issue_ssh_cert(
headers = {"X-Vault-Token": vault_token}
payload = {"public_key": pubkey}

print(f"::debug::SSH ISSUE URL: {issue_url}")

response = requests.post(issue_url, headers=headers, data=payload, timeout=10)
response.raise_for_status()

Expand Down

0 comments on commit c0bd121

Please sign in to comment.