Skip to content
This repository has been archived by the owner on Feb 7, 2025. It is now read-only.

Commit

Permalink
revert private key rename changes
Browse files Browse the repository at this point in the history
Co-authored-by: saquino0827 <[email protected]>
Co-authored-by: James Herr <[email protected]>
Co-authored-by: jcrichlake <[email protected]>
Co-authored-by: halprin <[email protected]>
  • Loading branch information
5 people committed Sep 12, 2024
1 parent c7b4c45 commit 7ce4d23
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
14 changes: 1 addition & 13 deletions operations/template/key.tf
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,6 @@ resource "azurerm_key_vault_access_policy" "allow_container_registry_wrapping" {
}


resource "azurerm_key_vault_secret" "mock_public_health_lab_private_key" {
name = "mock-public-health-lab-private-key-${var.environment}"
value = "dogcow"

key_vault_id = azurerm_key_vault.key_storage.id

lifecycle {
ignore_changes = [value]
}
depends_on = [azurerm_key_vault_access_policy.allow_github_deployer] //wait for the permission that allows our deployer to write the secret
}

resource "azurerm_key_vault_secret" "ca_phl_reportstream_private_key" {
name = "ca-phl-reportstream-private-key-${var.environment}"
value = "dogcow"
Expand Down Expand Up @@ -138,7 +126,7 @@ resource "azurerm_key_vault_secret" "ca_phl_sftp_user" {
}

resource "azurerm_key_vault_secret" "ca_phl_sftp_private_key" {
name = "ca-phl-sftp-key-${var.environment}"
name = "ca-phl-sftp-private-key-${var.environment}"
value = "dogcow"

key_vault_id = azurerm_key_vault.key_storage.id
Expand Down
2 changes: 1 addition & 1 deletion src/sftp/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func getSshClientHostKeyCallback(serverKey string) (ssh.HostKeyCallback, error)

func getPublicKeysForSshClient(credentialGetter secrets.CredentialGetter) (ssh.Signer, error) {

userAuthenticationKeyName := utils.CA_PHL + "-sftp-key-" + utils.EnvironmentName() // pragma: allowlist secret
userAuthenticationKeyName := utils.CA_PHL + "-sftp-key-private-" + utils.EnvironmentName() // pragma: allowlist secret

key, err := credentialGetter.GetSecret(userAuthenticationKeyName)
if err != nil {
Expand Down

0 comments on commit 7ce4d23

Please sign in to comment.