Token generation and flow
Initial setup
Before the first authentication, the client has a URL to one of the Controllers and the Certificate Authority (CA) certificate. These are either installed automatically with the client or entered manually by the user, who then downloads the CA certificate. The client uses the CA certificate in all communications to verify the authenticity of the Controller or Gateway.

Authentication
When signing in, the user enters credentials such as a username and password. The Controller verifies the credentials against a user directory. If the client does not already have a random ID, it generates one and sends it along with the credentials.

On successful authentication, the Controller replies with a claims token. The claims token is issued to a Distinguished Name (DN) that includes both the user's DN and the client ID. This DN identifies the session throughout the system.
Entitlement tokens
The client uses the claims token to request entitlement tokens.


The Controller queries its internal database to find all services the user is entitled to and replies with entitlement tokens — one per Site.

The client generates an RSA key pair.

The client sends a certificate signing request to the Controller, based on the claims token and public key.

The Controller replies with a certificate for the client, issued by the CA to the same DN as in the claims token. This DN includes both the user's DN and the client ID.

Connecting to the right Gateway
The client establishes a TLS tunnel to one Gateway in each Site, using the client certificate for client-side TLS authentication.

The client then sends the claims token, a number of untrusted device claims, and a Site-specific entitlement token to each connected Gateway.

Per-user firewalling
Each Gateway translates the claims token, client claims, and entitlement token into a list of firewall rules that apply to that user on that client device at that specific time.

The client can then send IP packets to endpoint servers through the TLS tunnel, provided the firewall rules allow it.

Step-up authentication
A user interaction can be defined within a condition to enforce additional security requirements — for example, requiring the user to re-enter their password before accessing a protected resource.
If the client sends an IP packet that is not currently allowed by the firewall rules but may become allowed depending on run-time conditions, the Gateway detects this and checks whether a user interaction is associated with the destination.

The Gateway sends a user interaction to the client over a WebSocket connection that the client keeps open for the session. The user interaction can display instructions or trigger specific actions in the client, such as initiating a new authentication.

The Controller verifies the user interaction and replies with a new claims token confirming the user has completed the required authentication. The client sends the new claims token to the Gateway, which re-evaluates the conditions in the entitlement token and produces new firewall rules.

With the new firewall rules in place, the Gateway allows packets to the previously blocked destination.

Depending on the type of user interaction, the user is presented with one of the following:
OTP prompt. The user provides a one-time password (OTP), which the Controller verifies using the OTP provider specified in the condition. The Controller issues a new claims token with an updated OTP claim, and the client sends it to the Gateway.
Reason for access prompt. The user enters a reason for access. The text is sent to the Gateway as an untrusted claim.
Password prompt. The user enters their password. The Controller validates it using the identity provider specified in the user interaction, which can be the same identity provider used for authentication or a different one.
Remediation message. The user is shown instructions for gaining access — for example, updating antivirus software. When the user resolves the issue, the client sends an updated value for the relevant client-side claim, such as antivirus status, to the Gateway.
Informational message. The user is shown a message explaining why access cannot be granted at this time.
Updating entitlements by revoking tokens
An administrator can force a user's claims and entitlement tokens to renew in real time. When an immediate token renewal is invoked, the token revocation list is updated and pushed to all Gateways. The Gateway notifies the client that tokens are expiring shortly, and the client retrieves new tokens to replace them. The user is unaware of this renewal process.
