Hi there,
how to pass in password to Zbbix API json login script, as password is saved in Azure Key Vault as secret.
$uri = 'http://150.125.52.6/zabbix/api_jsonrpc.php'
$json_login = '
{
"jsonrpc": "2.0",
"method": "user.login",
"params": {
"user": "ZabbixUser",
"password": "Need to parse from Azure Key Vault secret"
},
"id": 1,
"auth": null
}'
$output = Invoke-RestMethod -ContentType application/json -Method Post -Uri $uri -Body $json_login
Write-Output $output
Using below is not secure:
$Password = (Get-AzKeyVaultSecret -VaultName "MyVault" -Name "MySecretName").SecretValueText Calling login from powershell.
thank you!
how to pass in password to Zbbix API json login script, as password is saved in Azure Key Vault as secret.
$uri = 'http://150.125.52.6/zabbix/api_jsonrpc.php'
$json_login = '
{
"jsonrpc": "2.0",
"method": "user.login",
"params": {
"user": "ZabbixUser",
"password": "Need to parse from Azure Key Vault secret"
},
"id": 1,
"auth": null
}'
$output = Invoke-RestMethod -ContentType application/json -Method Post -Uri $uri -Body $json_login
Write-Output $output
Using below is not secure:
$Password = (Get-AzKeyVaultSecret -VaultName "MyVault" -Name "MySecretName").SecretValueText Calling login from powershell.
thank you!