---
title: Auto-Login Feature for Kron PAM HTTP Proxy
slug: kronpam-getting-started-guide/auto-login-feature-for-kron-pam-http-proxy
description: Learn how to configure the HTTP Proxy for auto-login functionality with this comprehensive guide. Enable hidden credentials to effortlessly log into web pages for efficient management of social media pages and various applications. Follow step-by-step ins
docTags: 
createdAt: 2023-09-08T11:58:05.566Z
---

The HTTP Proxy is used mostly for Auto-Login functionality. With the Auto-Login feature, users can log in to the web page with credentials invisible to them and all other users. This helps companies manage their social media web pages or other web applications that need a login procedure.

The Auto-Login function finds the text fields on the web page and fills them with the global username and global password values. These Global credentials need to be configured in the device group properties.&#x20;

To configure the Global credentials, follow the steps below:

1. Navigate to **Devices&#x20;**> **Inventory**.
2. Click the **Options&#x20;**&#x62;utton on the right side of the device group containing the web page.
3. In the pop-up, select the **edit&#x20;**&#x6F;ption. Then skip to the **properties&#x20;**&#x73;ection.
4. Enter the username of the web page user in the **Value** section and **Save**.&#x20;
5. Enter the password of the web page user in the **Value** section and **Save**.&#x20;

To configure Auto-Login:

1. Navigate to **Devices&#x20;**> **Elements**.
2. Use the **Advanced Search&#x20;**&#x62;utton (filter icon) to search for elements or select the related web page element created before.
   a.	If you want to create a new Element, click the add button and fill in the blanks.
3. Click the green button to open a pop-up screen. Then click **edit element type&#x20;**&#x74;o edit the properties of the element type.
4. Fill in the element type properties.

| **Element Type Property**                           | **Explanation**                                                                                                                                                                                                                                                |
| --------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **http.auto.login.password.matcher.template&#x20;** | This parameter is used to find and replace the password with the global password.                                                                                                                                                                              |
| **http.auto.login.post.url&#x20;**                  | Web application/site login URL. Regex can be used to define the URL property. <br />**Example:&#x20;**/login/device-based/regular/login/.\*                                                                                                                    |
| **http.auto.login.username.matcher.template&#x20;** | This parameter is used to find and replace the username with the global username.                                                                                                                                                                              |
| **http.bypass.domain&#x20;**                        | Web applications/sites can use multiple domains for images, chats, emails, etc. If you do not add these domains to the whitelist, the web page will not be shown as is. Some images, videos, etc., will be blocked because of the improper HTTPS certificate.  |

To better understand these element properties, let’s inspect an example of a Facebook login:

1. Open facebook.com in a web browser.
2. Right-click on the screen and click **Inspect**.&#x20;
3. Click the **Network** tab on the top of the screen.&#x20;
4. On the Facebook Login screen, enter a test email and test password, and then click **Login**. Facebook will return an error because the test credentials are incorrect.&#x20;
5. Look in the inspection code to find the test email and password. Check the parameter’s name and configure it in the element type properties.                                             a) On the left column, there are post URLs. These should be configured in the **HTTP.auto.login.post.URL** parameter for Facebook. It is **login** so the **HTTP.auto.login.post.URL&#x20;**&#x70;arameter will be defined as **/login.\***. The regex characters are needed since there could be other sub-pages. Therefore, the post URL always finishes with “**.\***”.                                                                                                               b)  Now, look for the test username and test password in the inspection code post URL. The test username and password are posted under specific containers in the login URL. In Facebook, these parameters are <font color="#ff0044">**email** </font>and <font color="#ff0044">**pass**</font>. These parameters will be defined in the **HTTP.auto.login.username.matcher.template&#x20;**&#x70;arameter as **email=$$value$$(&|$)** and in the **http.auto.login.password.matcher.template&#x20;**&#x70;arameter as **pass=$$value$$(&|$)**. These parameters will be used in the Element type. If these parameters are different, only the red <font color="#ff0044">pass </font>and <font color="#ff0044">email </font>part of the parameter definition should be changed. The other part, “=$$value$$(&|$)” should remain the same in the definition.&#x20;

::Image[]{src="https://api.archbee.com/api/optimize/g9cApVza9NIhSh0pjZYtA/fiAatB_lTMCz0BedHiJTr_image.png" size="46" width="512" height="384" position="center" caption="Test credential parameter name in Facebook web page inspection codes" showCaption="true"}

- To apply all changes made in the element type, you need to restart the HTTP Proxy. Restart the HTTP Proxy from the Kron PAM CLI. Establish an SSH connection to Kron PAM as root and run the command below.                                                                                           systemctl restart http\_prox
- The last element type property is the **HTTP.bypass.domain**. These are external domains from which the main web page loads some data and elements. Use the Firefox browser to find the bypass domains. Open the Facebook web page by using an HTTP Proxy on Firefox. The web page will be loaded incorrectly. Frames can be different, photos will not be shown, etc. It means that some information or data coming from another domain is blocked because they are not allowed. These domains are what we call bypass domains.
- Right-click on the screen and click **Inspect**.
- Click the **Network** tab and check the **Domain** column.&#x20;
- If there are any domains other than facebook.com, you need to add these domains as bypass domains. This step should be repeated after the login page or any other page to find all bypass domains.&#x20;

![](https://api.archbee.com/api/optimize/g9cApVza9NIhSh0pjZYtA/DAFsFEn8ktD7S1L8veUdF_image.png "Bypass domains on the Facebook main page")

- After adding all the bypass domains to **HTTP.bypass.domain**, you must restart again with the command below.                                                                                                     systemctl restart http\_prox
- Configure all these parameters in the **Element Type Property** as outlined in the following figure.&#x20;

::Image[]{src="https://api.archbee.com/api/optimize/g9cApVza9NIhSh0pjZYtA/SSew32JFbjBqV3gNhQQIS_image.png" size="70" width="524" height="407" position="center" caption="All keywords are configured in the Element Type Properties" showCaption="true"}

**Changing the Keyword Password**

The auto-login mechanism works when the username/password field is empty, or an auto-login keyword text is entered. Some websites allow the username/password field prompt to be empty, and you can click the Login button, but other websites do not allow this. The auto-login keyword default value is **!auto**. When entered in the username field, HTTP Proxy gets the credentials from Kron PAM. You can change this keyword as described below:

1. Establish an SSH connection to the Kron PAM server.
2. Run the commands below for the configuration.                                                             cd /u01/sc-HTTP-proxy                                                                                                                        vi proxy.properties

Edit/add the parameter below. Give any desired keyword instead of !auto.        **HTTP.proxy.auto.login.username.specifier=**!auto  Save the file and exit from the vi editor.

3.     Restart the HTTP Proxy with the command below.

