- Create Azure Alert Configuration.
- On the Azure side, notice the user name and password in the webhook created.
- On ServiceNow, modify the user name and password.
- The above change is not reflected on Azure
Expectation: The user name and password changes should be reflected on Azure.
1. The below business rule handles the changes to Azure Alert Configuration table.
2. In the handle update BR, the update only happens when value of 'subscription' or 'resource group' or 'active' changes.
- As we are not tracking user name and password, even if the values are updated, a CAPI request is not triggered.
2. The filter conditions of the BR can be modified so that update will be triggered when username and password changes.
Note: For password, the value defined is not passed to Azure. Instead, '****' is passed. So, on Azure side, the endpoint will look like "testuser:****@testinstance.service-now.com". This will not affect the integration as Basic Auth. is disabled for ServiceNow's Azure endpoint.
To pass in the password value to Azure:
- Goto script include: CMPAzureAlertRuleMgr
2. The URI is geenerated on line 79.
3. Notice that the password is passed in as '****'
4. Change the line to look like below:
var serviceUri = match + userName + ":" + password+ "@" + match.substring(0,match.length-1) + path;
In the script, we are fetching the password value but not passing it in the URI. With the above modification, we are passing the password value.
5. Update the script include and create a new Azure Alert Configuration. When configuring the alert configuration, after selecting the user, enter the password configured for the user in "sys_user" table in the password field.
6. You should see the password value in the webhook on Azure side once the rule is activated.
With the above change, Basic Auth. can be re-enabled for ServiceNow's Azure endpoint.