Disabling authentication if HTTP header is not present
search cancel

Disabling authentication if HTTP header is not present

book

Article ID: 278709

calendar_today

Updated On:

Products

ProxySG Software - SGOS

Issue/Introduction

In rare scenarios Edge SWG administrator may want to disable/enable authentication based on whether HTTP header exists. This article provides CPL code which achieves this goal. 

Resolution

The following CPL code disables authentication if HTTP request does not contain user-agent header

<proxy>
request.header.user-agent.exists=no authenticate(no)

 

Additional Information

$ nc IPADDR 8080
CONNECT www.example.com:443 HTTP/1.1
Host: www.example.com:443

HTTP/1.1 200 Connection established

$ nc IPADDR 8080
CONNECT www.example.com:443 HTTP/1.1
Host: www.example.com:443
User-Agent: Mozilla

HTTP/1.1 407 Proxy Authentication Required
Proxy-Authenticate: NEGOTIATE
Proxy-Authenticate: NTLM
Proxy-Authenticate: BASIC realm="REALMNAME"
Cache-Control: no-cache
X-XSS-Protection: 1
Connection: close
Content-Type: text/html; charset=utf-8
Content-Length: 8452
Pragma: no-cache

This CPL code should be placed in CPL layer below Web authentication layer.