Skip to content

Commit

Permalink
Use Key Vault for jumpbox private SSH key
Browse files Browse the repository at this point in the history
  • Loading branch information
vanzod committed Sep 8, 2022
1 parent 97fa1c4 commit 7d02b8e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
Binary file modified examples/bastion/images/jumpbox_bastion_ssh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/bastion/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Locate the `bastion-jumpbox` VM on the Azure portal and click on "Connect" menu

![Alt text](/examples/bastion/images/jumpbox_connect.png?raw=true "Jumpbox Connect menu button")

In the Bastion pane type `hpcadmin` in the "Username" field and select "SSH Private Key from Local File" to provide the `hpcadmin_id_rsa` private key created by AzureHPC in the directory where `azhpc-build` has been executed.
In the Bastion pane type `hpcadmin` in the "Username" field and select "SSH Private Key from Azure Key Vault File". In the three new drop down menus select the Key Vault deployed by AzureHPC and finally `jumpbox-SSHkey-hpcadmin` as secret name.

![Alt text2](/examples/bastion/images/jumpbox_bastion_ssh.png?raw=true "Azure Bastion Linux SSH")

Expand Down
13 changes: 12 additions & 1 deletion examples/bastion/templates/config-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
"vnet_resource_group": "variables.resource_group",
"customdata": "<NOT-SET>",
"key_vault": "<NOT-SET>",
"secret_name": "<NOT-SET>"
"secret_name": "<NOT-SET>",
"jumpbox_sshkey_secret_name": "jumpbox-SSHkey-{{variables.admin_user}}",
"jumpbox_sshkey_file": "./hpcadmin_id_rsa"
},
"global_tags": {},
"vnet": {
Expand Down Expand Up @@ -70,6 +72,15 @@
"variables.bastion_name",
"variables.resource_group"
]
},
{
"type": "local_script",
"script": "add_secret_in_keyvault.sh",
"args": [
"variables.key_vault",
"variables.jumpbox_sshkey_secret_name",
"variables.jumpbox_sshkey_file"
]
}
]
}

0 comments on commit 7d02b8e

Please sign in to comment.