Notifications

20 views

Symptoms

  1. Create Azure Alert Configuration.
  2. On the Azure side, notice the user name and password in the webhook created.
  3. On ServiceNow, modify the user name and password.
  4. The above change is not reflected on Azure

Expectation: The user name and password changes should be reflected on Azure.

Release

Jakarta+

Cause

1. The below business rule handles the changes to Azure Alert Configuration table. 
Ref: https://<YOUR_INSTANCE>.service-now.com/sys_script_list.do?sysparm_query=collectionLIKEsn_cmp_azure_alert 
2. In the handle update BR, the update only happens when value of 'subscription' or 'resource group' or 'active' changes. 

Resolution

  1. 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:

  1. Goto script include: CMPAzureAlertRuleMgr 
    Ref: https://<YOUR_INSTANCE>.service-now.com/sys_script_include.do?sys_id=44a54f53d760320097eb6ccf6e6103be&sysparm_view=&sysparm_domain=null&sysparm_domain_scope=null&sysparm_record_row=1&sysparm_record_rows=1&sysparm_record_list=nameSTARTSWITHCMPAzureAlertRuleMgr%5eORDERBYname 
    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[1] + userName + ":" + password+ "@" + match[2].substring(0,match[2].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.

 

 

Article Information

Last Updated:2019-05-21 11:56:51
Published:2019-04-22