Web sessions
Register a web application as an asset so the solution opens it in a browser and types the credential for the user, with the session recorded.
What this is and when to use it
A web session gives a user access to a web application — a firewall console, an appliance admin page, a SaaS portal — without ever handing them the password. The solution opens the application's login page in a controlled browser, fills in the stored credential, and records what happens next. The password stays in the vault; the user never sees it.
Use it for any system whose only administrative interface is a web page. What the user gets is a link they can click; what they do not get is the account.
Before you start
A console role with access to the Sysadmin area.
A Windows Server 2022 or 2025 machine to run the browser, with OpenSSH installed and running.
The exact URL of the application's login screen — not its home page, not a landing page that redirects.
The credential the application actually expects, ready to register as a managed account.
If you intend to use autofill: the HTML identifiers of the username field, the password field, and the login button, collected in advance from the page itself.
If the application asks for a second factor (MFA) and login must be fully automatic: the account's second-factor key, obtained when the authenticator is registered in the application. See Login with a second factor (MFA).
The folder of the asset tree the asset will be filed in.
If the application is reached through a proxy or a broker gateway, which of the two it is. See Proxy.
Steps
Open the application's login page in your own browser first, and keep it open. You will need it to read the field identifiers. Then start the registration:
In the console, open Environment › Assets and click Create.
In the platform selection window, scroll to the Web group and select Website.
The Create wizard opens with five stages: Basic, Selector, Protocol, Accounts, and Other settings.
Basic
Fill in the Name. Follow a naming convention someone else can read, such as
FW-HQ-CONSOLE.Fill in the URL of the login screen, including the port when it is not the default one:
https://system.example.local:8443/login. See the two warnings below.Leave Platform as it comes, already set to Website.
In Nodes, choose the folder of the asset tree this asset is filed in. See Folders and tags.
Selector
In Autofill, pick the mode: Disabled, Basic, or Script. The three are described under Autofill modes below.
For Basic, fill in the Username selector, the Password selector, and the Submit selector of the login button. For Script, paste the JSON script into the Script field that appears.
Protocol
Confirm the protocol is
http(s)and check the port shown. It follows the URL entered under Basic.
Protocol settings are inherited from the platform. The gear icon next to the protocol shows them; to change them, edit the platform.
Accounts
Click Add (or Add account) to register the credential the application itself expects: the real username and password used at that login screen.
Fill in the Name, which is how the credential is identified in the console.
Fill in the Username the application expects at its login screen.
Turn on Privileged if the account carries elevated rights in the application.
Leave Secret type on Password, and type the password. The eye icon shows what you typed; the refresh icon generates a password.
Leave Active enabled. If you add Notes, keep them free of secrets.
Click Confirm. Repeat for every credential that belongs to the same asset.
Other settings
Under Proxy or Gateway (Broker), select the path to the application. Choose one of the two, never both: once one is set, the other is hidden. Leave both empty when the application is reached directly.
Optionally add Tags for categorization.
Leave Active enabled so the asset is available.
Optionally add a Comment. Ordinary users see it when they hover over the asset in the asset tree of their access list, so it must never hold sensitive information.
Click Confirm to save the asset.
Grant access
Registering the asset grants access to nobody. Until an authorization covers it, the asset exists and nobody can reach it.
Open Policies › Authorization and either edit an existing policy or create one.
Associate the users or groups with the new website, and save the policy. See Authorizations.
Autofill modes
Disabled
You only want the session audited
The user types the credential themselves. The solution records and monitors, nothing more
Basic
The login is simple — username, password, and button on one screen
The solution locates the three elements by selector and fills them in
Script
Authentication happens in stages — separate screens or sections for username and password, or the form sits inside an iframe
An ordered list of actions is executed, step by step
Basic selectors
Open the login page in your browser.
Right-click the field and choose Inspect.
Read the identifier off the HTML for each of the three elements: username field, password field, login button.
Enter it in the corresponding selector field.
Prefer identifiers in this order:
IDNAMEXPath
Typical values look like id=username, name=password, id=login_button. XPath is last because it describes a position in the page structure, and page structures change.
Script mode
Selecting Script reveals a field for a JSON script. Each entry is one action, executed in the order given.
Command
What it does
target
value
type
Types into a field
The field
The text, with the variables below
click
Clicks a button or link
The element
""
select_frame
Switches into an iframe. index=-1 returns to the main page
id=, name= or index= of the iframe
""
sleep
Waits a fixed time
Seconds, from 0 to 30
""
wait
Waits for an element to appear, without acting on it. Linux isolated browser only
The element
""
open
Navigates to another URL
""
The http or https URL. Does not accept {SECRET} or {TOTP}
The target says which element of the page the step uses, always in the form prefix=value:
id=
id=username
The element with that id
name=
name=password
The element with that name
class_name=
class_name=btn-login
The element with that class
css=
css=input[type="password"]
The first element matching the CSS selector
xpath=
xpath=//button[@id='signin']
The element the XPath points to
type=
type=password
The field with that type. Linux isolated browser only
Three variables carry the account's credential into the script: {USERNAME} for the username, {SECRET} for the password and {TOTP} for the current second-factor code. Never write a literal password into the script.
That script switches into the iframe, types the username, clicks Next, waits five seconds for the second screen to load, types the password, and submits. The sleep step is what makes a staged login work — without it the next type runs against a field that does not exist yet.
When you write your own script:
Keep one object per step, each with the four attributes
step,value,target, andcommand, in the same order every time. The script stays easy to read and to maintain.valueis always present, even when empty (""), onclickandselect_frame.When the next screen is slow to load, add a
sleepstep with the number of seconds intarget.When the form sits inside an
iframe, the first step isselect_frame, pointing at the identifier of theiframe.In an
XPathselector, use single quotes inside the expression, as in//*[@id='app']. A double quote closes the JSON string and invalidates the script.In the Linux isolated browser, each step waits for its element to appear before acting, so
sleepis only needed when the page reuses a field that already existed. On the Windows publishing host the element must exist at the moment of the step; there,sleepbetween screens is mandatory.
Login with a second factor (MFA)
Many applications ask, after the password, for a six-digit code from an authenticator app. The solution types that code too, in one of two ways:
With the OTP registered on the account: the asset's account stores the second-factor key (the OTP code field; see Web account OTP code). On connection the current code is generated and typed with no user interaction. If fewer than three seconds remain before the code expires, the solution waits for the next one.
Without OTP on the account: the
codestep opens a window in the session asking the user for the code, and the solution types it into the field.
Automatic code generation exists in the Linux isolated browser. On the Windows publishing host the code step always asks the user for the code.
Use the code command for the code step. It confirms the page reached the second-factor screen before typing, and picks between the account's OTP and asking the user on its own. The {TOTP} variable inside a type also works, but fails when the account has no OTP.
Example: single sign-on portal with three screens
A typical single sign-on portal, such as AWS IAM Identity Center (https://<company>.awsapps.com/start), asks for the username, then the password and then the MFA code, each on its own screen:
The sleep in step 5 covers the switch from the password screen to the code screen: both have a submit button, and step 6 must find the field of the new screen. Quotes inside the CSS selectors are written as \" because the script is JSON. Use the example as a starting point and check the selectors on your own page: login screens differ from one provider to another, and sometimes from one version to the next.
To have nobody type credentials:
Register the account on the asset with the username, the password and the OTP code.
In the authorization, grant that account, not the anonymous account or the one typed by the user. See Authorizations.
Connect as one of the authorized users and confirm the session reaches the application's home page without any login screen.
What you should see
The saved asset appears in the inventory under the WEB group, with the platform badge Website and the state ACTIVE. Its details show the protocol as http(s) on the port taken from the URL.
How to verify it worked
Registration proves nothing on its own. Verify by connecting:
Sign in as a user the authorization covers — not as the administrator who created the asset. That is the only way to confirm the authorization is right.
Open the website from the device access list. The browser session should land on the application already logged in.
Confirm the session is listed in the audit trail with the account that was used.
Reading the result:
It stops on the login page with the fields filled but not submitted: the button selector is wrong.
It stops on the login page with the fields empty: the field selectors are wrong, or the URL is not the login page.
The session works but is not recorded: the URL is bypassing the authentication screen.
Common errors
Connection fails immediately
The application is not reachable over the configured network path: the Windows host that runs the session has no route to it, or the wrong proxy or gateway is selected
Place that host in a network able to reach the application, and check the Proxy or Gateway (Broker) chosen under Other settings
Session opens on the login page, nothing filled
Autofill is Disabled, or the URL does not land on the login form
Set the mode to Basic or Script, and point the URL directly at the authentication screen
Fields fill but login never submits
The login button selector is wrong
Re-inspect the button and prefer its ID over an XPath
Username is typed, password field is never found
Staged login being handled in Basic mode
Switch to Script and add select_frame and sleep steps
The script does nothing after an XPath step
Double quotes inside the XPath expression closed the JSON string
Use single quotes inside the expression: //*[@id='app']
A window asks for the code although the account has OTP
The session used another account (the anonymous one or the one typed by the user), or the session runs on the Windows publishing host, which always asks for the code
Grant in the authorization the account that has the OTP and connect with it
The code is typed but the application rejects it
The stored key is not the one of the device registered in the application, or the clock of the server running the browser has drifted
Register the authenticator again and store the new key; keep the clock synchronized by NTP
The script stops with "field not found in step N"
Step N's selector matches nothing on the screen, or the screen had not loaded yet
Inspect the field again; if the screen is slow, increase the sleep before the step
Users who should type their own credential see blank fields being filled
The asset is in Script mode and the session uses the anonymous account
Split into two assets: one Disabled and another with Script
Port change has no effect
The port was edited in the Protocol section but not in the URL
Edit the port inside the URL, then confirm the Protocol section shows the same value
The asset exists but no user sees it
No authorization covers it
Create or edit a policy under Policies › Authorization with the users or groups
No web session starts at all
No Windows machine, or OpenSSH not running on it
Provision the Windows Server 2022/2025 host and start OpenSSH
Field reference
Name
Identifier inside the console. Use a readable convention. Required
URL
The application's login page. Also determines the effective port. Required
Platform
Website. Decides the asset's behaviour and protocol restrictions
Nodes
The folder of the asset tree the asset is filed in. Used by authorizations, automations, and sync policies to target groups of assets. Required
Selector
Autofill mode: Disabled, Basic, or Script
Protocol
http(s) plus the port. Follows the URL; may be inherited from the platform
Account › Name
How the credential is identified in the console. Required
Account › Username
The username the application expects
Account › Privileged
Marks the credential as holding elevated rights
Account › Secret type
Set to Password for a website
Proxy / Gateway (Broker)
The path to the application. Choose one, never both
Tags
Optional categorization of the asset
Active
Must stay enabled for the asset to be available
Comment
Informational, and visible to ordinary users in the asset tree. Do not put sensitive information here
Related pages
Last updated
Was this helpful?