Skip to content

Commit

Permalink
Pass-thru secure strings as-is until ready for use (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
SenthuranSivananthan authored May 10, 2022
1 parent a9c9419 commit 799ad52
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions scripts/deployments/Functions/HubNetworkWithNVA.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ function Set-HubNetwork-With-NVA {
[String]$LogAnalyticsWorkspaceResourceId,

[Parameter(Mandatory = $false)]
[String]$NvaUsername = $null,
[SecureString]$NvaUsername = $null,

[Parameter(Mandatory = $false)]
[String]$NvaPassword = $null
[SecureString]$NvaPassword = $null
)

Set-AzContext -Subscription $SubscriptionId
Expand Down Expand Up @@ -67,7 +67,7 @@ function Set-HubNetwork-With-NVA {
Write-Output "NVA username is provided. Setting NVA username in configuration."
$NvaUsernameElement = @{
fwUsername = @{
value = $NvaUsername
value = ($NvaUsername | ConvertFrom-SecureString -AsPlainText)
}
}
$Configuration.parameters | Add-Member $NvaUsernameElement -Force
Expand All @@ -77,7 +77,7 @@ function Set-HubNetwork-With-NVA {
Write-Output "NVA password is provided. Setting NVA password in configuration."
$NvaPasswordElement = @{
fwPassword = @{
value = $NvaPassword
value = ($NvaPassword | ConvertFrom-SecureString -AsPlainText)
}
}
$Configuration.parameters | Add-Member $NvaPasswordElement -Force
Expand Down
4 changes: 2 additions & 2 deletions scripts/deployments/RunWorkflows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ if ($DeployHubNetworkWithNVA) {
-SubscriptionId $Context.Variables['var-hubnetwork-subscriptionId'] `
-ConfigurationFilePath "$($Context.NetworkingDirectory)/$($Context.Variables['var-hubnetwork-nva-configurationFileName'])" `
-LogAnalyticsWorkspaceResourceId $LoggingConfiguration.LogAnalyticsWorkspaceResourceId `
-NvaUsername (ConvertFrom-SecureString -SecureString $NvaUsername -AsPlainText) `
-NvaPassword (ConvertFrom-SecureString -SecureString $NvaPassword -AsPlainText)
-NvaUsername $NvaUsername `
-NvaPassword $NvaPassword
}

# Hub Networking with Azure Firewall
Expand Down

0 comments on commit 799ad52

Please sign in to comment.