Skip to content

Commit

Permalink
Check for failure to determine default JWT audience
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaso committed Apr 20, 2024
1 parent 832c440 commit 19ccb0a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion vault_oidc_ssh_cert_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,13 @@ def _determine_audience(input_audience: str, vault_server: str) -> str:
return input_audience

vault_fqdn = urllib.parse.urlparse(vault_server).netloc.split(":")[0]
return vault_fqdn
if vault_fqdn:
return vault_fqdn

title = "Default JWT audience error"
message = "Failed to extract a default JWT audience from the vault_server input."
_set_error_message(title, message)
raise VoscaError(title)


def _issue_github_jwt(jwt_aud: str) -> str:
Expand Down

0 comments on commit 19ccb0a

Please sign in to comment.