Question
What is the connection flow for the new HTML5 Gateway
Answer

Step-by-Step Connection Sequence
- Remote User Accesses the Privilege Cloud Portal
- Employee or vendor opens a browser and navigates to the Privilege Cloud Portal (e.g., https://<your-subdomain>.privilegecloud.cyberark.com or similar ISPSS portal URL).
- Authenticates (SSO, MFA, etc.).
- This establishes a session cookie used for all subsequent authorized requests.
- User Selects a Target Account and Initiates Connection
- In the portal (Accounts / My Accounts view), the user selects a privileged account/target configured for HTML5 access.
- Clicks Connect (or chooses the HTML5/browser option if multiple protocols are available).
- The portal checks SIA/HTML5 capability (via settings and platform configuration, e.g., AllowSelectHTML5 = Yes on the PSM connector/platform).
- Portal Prepares Connection Metadata
- The portal fetches account details from the vault (credentials are not sent in clear text).
- Determines PSM server details, target hostname/IP, port (usually 3389 for RDP), username format (e.g., secureaccess\...), SSO/alternate shell indicator (e.g., /sso).
- Builds a human-readable title (e.g., target hostname).
- Portal Sends Authenticated Request to Cloud-Hosted HTML5 Gateway
- Constructs inner JSON payload (as seen in traces):

- Base64-encodes it → wraps in { "PSMGWRequest": "<base64>" }.
- Sends HTTPS POST (port 443) to the regional HTML5 Gateway endpoint: https://<region>.webaccess.cyberark.cloud/guac/direct (e.g., us-east-1.webaccess.cyberark.cloud/guac/direct).
- Includes the user's session Cookie for authorization (this is the key auth mechanism).
- HTML5 Gateway Authorizes and Processes the Request
- Validates the session cookie against Privilege Cloud identity backend.
- Decodes the Base64 payload and recognizes "SIA-RDP" → knows this is an SIA-routed session.
- Prepares to initiate a secure, browser-compatible session (using Apache Guacamole backend).
- HTML5 Gateway Requests Session Routing via SIA Backend
- Communicates (HTTPS/443) with the SIA service in the Privilege Cloud environment.
- SIA selects an appropriate SIA Connector pool (based on configured PSM domains/FQDNs and network names).
- SIA Backend Communicates with On-Premises SIA/DPA Connector
- The SIA Connector (installed in customer environment) maintains an outbound-only persistent tunnel to the SIA backend (HTTPS/443).
- SIA backend instructs the connector to establish a session path to the correct PSM server.
- SIA Connector Forwards to PSM Server
- Connector opens outbound connection (typically TCP/3389) to the target PSM server (on-premises or in customer network).
- PSM authenticates the request, retrieves/uses vaulted credentials (or just-in-time access), and connects to the target system (RDP/SSH/other protocol over the appropriate port).
- Full Session Tunnel is Established (Bidirectional Proxying)
- PSM proxies the protocol (RDP/SSH/etc.) to/from the target.
- SIA Connector relays traffic securely back through the outbound tunnel to the SIA backend.
- SIA backend forwards it to the HTML5 Gateway.
- HTML5 Gateway translates the protocol into HTML5/WebSocket (wss:// over 443) for browser rendering.
- Browser Renders the Interactive Session
- After successful POST response (200 OK), the portal opens a new browser tab.
- The tab connects via WebSocket to the HTML5 Gateway (e.g., wss://<region>.webaccess.cyberark.cloud/.../websocket-tunnel).
- User sees and interacts with the target desktop/session directly in the browser (keyboard, mouse, clipboard, optional file transfer).
- Session Lifecycle & Termination
- PSM enforces recording, monitoring, auditing, and policies.
- SIA ensures just-in-time access (no standing privileges).
- Session ends when user closes the tab, disconnects, or timeout occurs → PSM terminates the target connection.
Alignment with the Diagram
- Red arrows/lines → Employee/vendor → Portal → HTML5 Gateway (browser flow via 443).
- Blue lines → Outbound from Connector → PSM (3389) → Target.
- Reverse proxy / HTTPS 443 → All cloud ↔ user and cloud ↔ connector communication.
- DPA Connector → Acts as the secure bridge (reverse tunnel) between customer environment and cloud HTML5GW.
- No direct inbound access from internet to customer PSM/targets.