25 lines
822 B
Python
25 lines
822 B
Python
#!/usr/bin/env python3
|
|
# Copyright (C) 2024 Spearhead Systems SRL
|
|
|
|
import cmk.utils.password_store
|
|
|
|
def agent_azure_args(params, hostname, ipaddress):
|
|
# Extract password either from params, or from password store:
|
|
# ('password', '<some password>'): password is in params directly
|
|
# ('store', '<password name>'): password must be looked up in store by name
|
|
password_info = params["password"]
|
|
if password_info[0] == "password":
|
|
password = password_info[1]
|
|
else:
|
|
password = cmk.utils.password_store.extract(password_info[1])
|
|
|
|
return [
|
|
params["tenant"],
|
|
params["username"],
|
|
password
|
|
]
|
|
|
|
special_agent_info["azure_keyvault"] = agent_azure_args
|
|
special_agent_info["azure_firewall"] = agent_azure_args
|
|
special_agent_info["azure_defender"] = agent_azure_args
|