In a transparent access method, when configuring policy to block/allow based on request URL category, inconsistent policy behavior is encountered when a client makes a request to a secure [HTTPS] destination and the IP Address of the OCS is associated with a category that is blocked in the policy.
When using WSS Agent or Firewall/VPN, authenticated as DOM\user, requests to box.com are intermittently blocked.
Sometimes the requests are allowed as intended, but the behavior is inconsistent.
- i.e. tcp://x.x.x.x/ - > Category: File Storage/Sharing
- The block rule does not have to be in a different layer, or above the allowed rule in the policy.
In a transparent proxy environment, clients resolve DNS locally and request the server directly; they are not providing the proxy with the request URI /HTTP CONNECT after the TCP 3-Way. Instead, the client will send the client hello upstream, as it normally would, to initiate the TLS handshake.
When the proxy receives this request, it needs to determine if it will be intercepting the traffic and if it will be decrypting the traffic.
The connection will arrive at the proxy in the WSS via WSS Agent, transparently, as: tcp://x.x.x.x:443/ if the proxy is intercepting, it will send the request to the SSL proxy internally to handle TLS Negotiation on both sides of the transaction (server/client). When this happens, the request will again ingress the proxy (at the SSL Proxy) as ssl://x.x.x.x:443/ and the proxy parses the client-hello and if allowed, initiate the TLS negotiation with the server upstream. When the proxy receives the server certificate and is going to decrypt the traffic, it will send the request to its HTTPS service as: https://www.example.com/ The proxy will inject the emulated-intermediary-CA cert in the chain and send that to the client as the server certificate.
If the IP x.x.x.x is associated with a specific category, the proxy can rule a match on a block rule for that category and return an exception to the client, before the client-hello is received with the SNI of the server being requested.
Because the proxy does not (at this time in the transaction) have the client-hello/SNI, it is not able to match on the rule to allow the request-URL or request-application-name above the block rule in the same layer. Because of this behavior does not matter where the block rule exists within the layer/policy as it will never receive the client-hello to rule and allow on the server name since it is already blocking on the request-URL-category of the IP.
The inconsistency in the case of Box.com was caused by some of the destinations' IPs not being associated with any category. When those addresses were resolved/requested by clients, there was no match on the block as above. When this occurs, the proxy will accommodate the connection until the client hello is received where it can more appropriately decide to allow or block.
Universal Policy Enforcement: Management Center
- Policy configured to allow requests based on application name or request URL.
- i.e. Web Access Layer: source: DOM\user -> application-name: Box -> action: Allow
- Policy is configured in a rule below the above rule (in the same layer) to block requests based on the request URL category.
- i.e. WebAccessLayer: source: any -> request.url_category(file storage/sharing) -> action: Block
On-Premise-Protection: ProxySG Appliance - Explicit
- Clients are aware of the proxy.
- Connections to secure sites (HTTPS) will be preceded by a CONNECT request containing the destination URI from the browser.
- i.e. TCP 3-Way - > HTTP: [CONNECT www.example.com:443 HTTP/1.0]
- ProxySG can enforce policy based on application-name/url, url.domain, url.category
- Policy on the above conditions can be evaluated on the initial Client-In request, before making a request upstream to the OCS, because the URI is provided in plaintext.
- This is specific to Explicit Proxy connections.
- As opposed to transparent proxy connections, the explicit-proxy initially identifies the request-URI from the browser: www.example.com
Remote-Protection: WSS Agent - Transparent
- Clients are unaware of the proxy.
- Connections to secure sites (HTTPS) will be negotiated as if the client is communicating directly with the OCS.
- i.e. TCP 3-Way - > Client Hello [sni: www.example.com]
- The ProxySG (on-prem or in WSS) needs to wait for the client hello to attain a server-name/URL for the destination being requested.
- This is required for transparent proxy connections because DNS is done by the client and the request will ingress the Proxy as if the Proxy was the OCS.
- This initial connection would hit the proxies 443\TCP listener: tcp://184.108.40.206:443/
- As opposed to an explicit proxy connection, the transparent proxy initially identifies the OCS IP: 220.127.116.11
There are several ways to improve policy behavior:
Destination Object: REGEX: ^(SSL|TCP):// Action: None
The regex in the rule above will match any handshake that will ingress as ssl://x.x.x.x:443/ or tcp://x.x.x.x:443/ and chose to neither block nor allow the request. This will allow the handshake to complete up to at least attaining a client-hello, before making a block/allow decision.
This policy would only apply to the initial negotiation of requests that ingress the proxy, once the proxy establishes SSL as the protocol and begins intercepting/decrypting, it will be able to appropriately decide on the same request, when it receives the client hello from downstream or the server certificate from upstream.
It would not result in clients being allowed to access sites when they should not be. Instead, those same users will proceed to negotiate SSL/TLS before the proxy makes its ruling. In the example environment above, DOM\user would then be permitted to negotiate SSL until the proxy attains either the SNI from the Client Hello, or the Server Certificate.
To describe it differently; a transparent-proxy environment should see up to 3 requests for each TLS/SSL connection from a client:
The regex rule recommended in step 3 above, will ensure the request is not blocked due to a [denied] category being associated with the request as it exists in step #1 and/or step #2. This will permit the request to proceed through the proxy until we receive the client-hello or server certificate, and we would be able to evaluate and match on any actions respective to the URL, in step #3.