We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4a0434 commit baf275cCopy full SHA for baf275c
Modules/CippExtensions/Public/HIBP/Get-HIBPAuth.ps1
@@ -19,8 +19,11 @@ function Get-HIBPAuth {
19
$Secret = $null
20
}
21
22
- if ([string]::IsNullOrEmpty($Secret) -and $ENV:WEBSITE_OWNER_NAME -like '3e625d35-bf18-4e55*' -or $ENV:WEBSITE_OWNER_NAME -like '61e84181-ff2a-4ba3*') {
+ if ([string]::IsNullOrEmpty($Secret) -and $ENV:CIPP_HOSTED -eq 'true') {
23
$VaultName = 'hibp-kv'
24
+ if ($SubscriptionId -ne $ENV:CIPP_HOSTED_KV_SUB -and $ENV:CIPP_HOSTED_KV_SUB -match '^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$') {
25
+ $null = Set-AzContext -SubscriptionId $ENV:CIPP_HOSTED_KV_SUB
26
+ }
27
$Secret = Get-AzKeyVaultSecret -VaultName $VaultName -Name 'HIBP' -AsPlainText
28
29
0 commit comments