Error: "500 Internal Server Error" during login on a website when SSL decryption is enabled
search cancel

Error: "500 Internal Server Error" during login on a website when SSL decryption is enabled

book

Article ID: 435565

calendar_today

Updated On:

Products

ProxySG Software - SGOS ISG Proxy

Issue/Introduction

When accessing a website through an Edge SWG (ProxySG) with SSL decryption enabled, you encounter an HTTP 500 Internal Server Error. This issue specifically occurs during POST requests while logging into the website. The error prevents you from successfully authenticating to the site even when providing valid credentials.

Environment

  • Edge SWG (ProxySG)
  • SSL Decryption / Interception enabled
  • Proxy-style Authentication
  • OCS is configured for Basic authentication

Cause

Investigation using an HTTP Debug shows that the proxy identifies the website's authentication headers as credentials intended for the proxy itself. This results in the headers being stripped before the request reaches the origin content server (OCS). The issue is caused by Authentication Header Collision. 

The website uses HTTP Basic Authentication for its login process. Because you are already authenticated to the proxy via the initial CONNECT request, the proxy's internal logic identifies the subsequent Authorization: Basic header in the decrypted stream as credentials meant for the proxy. Consequently, the proxy consumes and strips the header before forwarding the request. The OCS or the security manager protecting the site then returns a 500 error because the required credentials are missing.

Resolution

To resolve this issue, you can configure the proxy to pass the authentication headers directly to the origin server instead of intercepting them.

Recommended Fix: Policy-Based Bypass

Apply the following Content Policy Language (CPL) to the specific login URL to prevent the proxy from interpreting the headers:

  1. Launch the VPM from the Edge SWG or Management Center, depending on which you use to manage policy in your environment. 
  2. Create a new CPL layer or use an existing CPL Layer. If preferred, this can also be configured in one of the proxy Policy Files, outside of the VPM.  
  3. Add the following CPL code (replace example.com with the affected domain and replace the path.substring with the path. If you prefer not to use the path that part can be removed):
<Proxy>
url.domain=example.com url.path.substring="portal/api/login" authenticate(no, upstream_authentication)


This policy tells the proxy not to interpret or strip the authentication headers for this specific domain, passing them directly to the OCS.

If the overall policy design allows this traffic based on the user or group results, you may also need to add an "ALLOW" object to the new rule so it doesn't inadvertently deny the traffic now that authentication is disabled for this request.  

Alternative Workarounds

If the primary resolution cannot be applied, consider one of the following options:

  • Disable Authentication: Create a rule to disable authentication entirely for the affected domain.
  • Disable SSL Interception: Bypass SSL decryption for the affected domain. This prevents the proxy from seeing or modifying the inner HTTP headers, allowing them to pass through untouched.