Skip to content

Commit

Permalink
Change variable naming convention for SSH private/public keys.
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamDumpleton committed Feb 2, 2023
1 parent 2a0ab82 commit 1511ee5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions session-manager/handlers/workshopsession.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,9 +701,9 @@ def resolve_security_policy(name):
format=cryptography.hazmat.primitives.serialization.PublicFormat.OpenSSH,
)

ssh_host_key_private = unencrypted_pem_private_key.decode("utf-8")
ssh_host_key_public = pem_public_key.decode("utf-8")
ssh_host_key_rsa_public = rsa_public_key.decode("utf-8")
ssh_private_key_pem = unencrypted_pem_private_key.decode("utf-8")
ssh_public_key_pem = pem_public_key.decode("utf-8")
ssh_public_key_rsa = rsa_public_key.decode("utf-8")

# For unexpected errors beyond this point we will set the status to say
# things Failed since we can't really recover.
Expand Down Expand Up @@ -927,9 +927,9 @@ def resolve_security_policy(name):
ingress_secret=INGRESS_SECRET,
ingress_class=INGRESS_CLASS,
storage_class=CLUSTER_STORAGE_CLASS,
ssh_host_key_private=ssh_host_key_private,
ssh_host_key_public=ssh_host_key_public,
ssh_host_key_rsa_public=ssh_host_key_rsa_public,
ssh_private_key_pem=ssh_private_key_pem,
ssh_public_key_pem=ssh_public_key_pem,
ssh_public_key_rsa=ssh_public_key_rsa,
)

application_variables_list = workshop_spec.get("session").get("variables", [])
Expand Down Expand Up @@ -2377,8 +2377,8 @@ def _apply_environment_patch(patch):
},
},
"data": {
"private.pem": base64.b64encode(ssh_host_key_private.encode("utf-8")).decode("utf-8"),
"public.pem": base64.b64encode(ssh_host_key_public.encode("utf-8")).decode(
"private.pem": base64.b64encode(ssh_private_key_pem.encode("utf-8")).decode("utf-8"),
"public.pem": base64.b64encode(ssh_public_key_pem.encode("utf-8")).decode(
"utf-8"
),
},
Expand Down

0 comments on commit 1511ee5

Please sign in to comment.