However, one downside is the web application availability monitoring template does not have an inherent way to handle websites that require basic authentication logins. The way to overcome this issue is to utilize http headers and use an authorization header with a encoded username and password.
HTTP Headers - Basic Authentication
To access a site that is using basic authentication you will need to encode your username and password as a base64 username|password combination.
*It is suggested to use an account with the least available permissions needed to do the site test. Preferably an account that has limited read-only access. Since the base64 encoded account can be decoded fairly easy.
You can do this from a site such as https://www.base64encode.org/
- Under the Encode section type in your username and password with the following format username:password
- Click encode and viola!
- Copy and save the results.
- Follow the normal steps to create a new web application availability monitor site test, and open the "Change Configuration" settings under the View and Validate Tests tab.
- Scroll down until you see HTTP Headers.
- Click on Add and a new window will open.
- In the HTTP header name: box type in: Authorization
- In the HTTP header value: box type in: basic "base64 encoded user/pass" without the quotes.
- Click OK to close the header window, then click OK to save.
- Click on Run Test to verify the site is passing and not giving a 401.
No comments:
Post a Comment