Skip to content

Commit

Permalink
WIP: Strip trailing url slash
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaso committed Mar 30, 2024
1 parent 61d2bd3 commit 52b0c63
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vault_oidc_ssh_cert_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def github_vault_auth() -> None:
input_audience = os.environ["JWT_AUDIENCE"].strip()
oidc_backend = os.environ["OIDC_BACKEND"].strip()
oidc_role = os.environ["OIDC_ROLE"].strip()
vault_server = os.environ["VAULT_SERVER"].strip()
vault_server = os.environ["VAULT_SERVER"].strip("/ ")

jwt_aud: str = _determine_audience(input_audience, vault_server)
jwt_token: str = _issue_github_jwt(jwt_aud)
Expand All @@ -80,7 +80,7 @@ def github_vault_auth() -> None:
def generate_and_sign() -> None:
ssh_backend = os.environ["SSH_BACKEND"].strip()
ssh_role = os.environ["SSH_ROLE"].strip()
vault_server = os.environ["VAULT_SERVER"].strip()
vault_server = os.environ["VAULT_SERVER"].strip("/ ")
vault_token = os.environ["VAULT_TOKEN"].strip()

key_fname = "id_github"
Expand Down Expand Up @@ -118,7 +118,7 @@ def generate_and_sign() -> None:


def revoke_token() -> None:
vault_server = os.environ["VAULT_SERVER"].strip()
vault_server = os.environ["VAULT_SERVER"].strip("/ ")
vault_token = os.environ["VAULT_TOKEN"].strip()

revoke_url = f"{vault_server}/v1/auth/token/revoke-self"
Expand Down

0 comments on commit 52b0c63

Please sign in to comment.