Ad Widget

Collapse

Azure Key Vault password to Zabbix login API

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ZabbixUser2020
    Junior Member
    • Jan 2020
    • 13

    #1

    Azure Key Vault password to Zabbix login API

    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!
    Last edited by ZabbixUser2020; 12-02-2020, 18:21.
Working...