HTTP Authentication

In enterprise networks, a Forward proxy often sits between users and the internet. Before allowing outbound traffic, the proxy checks whether the user is authenticated. If not, the browser is redirected through an Auth Service and a SAML Identity Provider (IdP) to verify credentials, then receives a token or cookie for later requests.

Authentication Flow

%%{init: {'themeVariables': {'fontSize': '16px'}, 'sequence': {'actorMargin': 70, 'messageMargin': 55, 'boxMargin': 30, 'useMaxWidth': true}}}%%
sequenceDiagram
    autonumber

    actor User

    participant Browser
    participant PAC
    participant FP as Netskope Forward Proxy
eproxy-acme-corp.goskope.com:8081 participant Auth participant IdP participant Policy as Policy Engine participant Google User->>Browser: Open browser Browser->>PAC: Download PAC file PAC-->>Browser: FindProxyForURL()
Send every HTTP to eproxy-acme-corp.goskope.com:8081 User->>Browser: Open https://google.com Browser->>FP: CONNECT google.com
eproxy-acme-corp.goskope.com:8081 FP->>FP: Resolve tenant_id from proxy FQDN
FQDN=eproxy-acme-corp is sent in HTTP Host Header
FQDN→tenant_id 1001 resolved
eproxy-acme-corp.goskope.com→1001
eproxy-contoso.goskope.com→2005
eproxy-xyz.goskope.com→3050 FP->>FP: Check session cookie. MISSING FP-->>Browser: 302 Redirect to Auth Service Browser->>Auth: GET /login Auth-->>Browser: Redirect to IdP Browser->>IdP: GET Login Page IdP-->>Browser: Login Form User->>Browser: Enter credentials Browser->>IdP: POST Credentials IdP->>IdP: Authenticate User IdP-->>Browser: SAML Response Browser->>Auth: POST SAML Assertion Auth->>Auth: Validate Assertion Auth->>FP: Create Session FP->>FP: Cache Session FP->>FP: Generate Session Cookie
Session cookie is called UTKN(universal token)
nspatoken is name given by Netskope FP-->>Browser: Set Session-Cookie=XXX FP-->>Browser: Redirect google.com Browser->>FP: CONNECT google.com
Session Cookie=XXX FP->>FP: Resolve tenant_id from proxy FQDN
FQDN=eproxy-acme-corp is sent in HTTP Host Header
FQDN→tenant_id 1001 resolved
eproxy-acme-corp.goskope.com→1001
eproxy-contoso.goskope.com→2005
eproxy-xyz.goskope.com→3050 FP->>FP: User from cookie → bob@acme.com
groups from SAML session FP->>Policy: Evaluate Policy
tenant=1001,domain=google.com
method=CONNECT Policy-->>FP: ALLOW FP->>Google: Establish upstream TLS Connection Google-->>FP: TLS + HTTPS Response FP-->>Browser: Forward Response Browser-->>User: Google search page User->>Browser: Open github.com Browser->>FP: CONNECT github.com:443
SessionCookie=XXX FP->>FP: tenant_id 1001 (FQDN) + bob@acme.com (cookie) FP->>Policy: Evaluate Policy Policy-->>FP: ALLOW/BLOCK FP-->>Browser: Response

Terms

Term Meaning
Proxy Intercepts HTTP/HTTPS traffic. Checks whether the user has a valid session or JWT before forwarding the request to the internet.
Auth Service Handles login, generates a State ID (CSRF protection), validates the SAML response, creates a JWT, and sets a cookie on the browser.
SAML IdP Identity Provider — validates username/password (or MFA) and returns a signed SAML assertion proving the user’s identity and group membership.
State ID Random value tied to the login attempt. Prevents replay and CSRF attacks by ensuring the SAML response matches the original login request.
JWT JSON Web Token created by the Auth Service after successful login. Contains user identity and groups. The proxy sends this to the Auth Service on each request for validation.