Proxy-Authenticate HTTP RequestHeader: Syntax, Directive, Examples

Proxy-Authenticate HTTP Request Header provides credentials for auditing in order to support proxy server verification. The primary function of the Proxy-Authenticate header is to connect the files and folders to the server. The Header is used to keep the server safe from foreign Requests. The related HTTP Status Code for the HTTP Header is “407” which means “Proxy-Authentication Required”, an example is shown below. 

HTTP/1.1 407 Proxy Authorization Required
Date: Mon, 22 Nov 2021 11:13:00 GMT
Proxy-Authenticate: Basic realm="Access to internal site"

Proxy-Authenticate HTTP Response Header can be seen above within the “407” code. As aforementioned, Proxy syntax, Directives, and Uses with examples are to be processed. Proxy-Authenticate allows you to configure the proxy’s authentication method. When clients surf the Internet, this shows how it is validated. To create restrictions for a single person or company, Proxy-authentication must be set up. A default type of Proxy-Authenticate is not recommended. You can only configure new policies establishing IP addresses when the Proxy-Authenticate is disabled.

What is Proxy-Authenticate?

Proxy-Authenticate provides the authentication approach for every request made for the server. The major benefit of the Proxy-Authenticate is providing an extra security measure by giving more control to the server. Proxy-Authenticate HTTP Request Header could be set up for different gateway and back-end technologies like the YaST Proxy Configuration module. The Proxy-Authenticate works within harmony with the Proxy-Authorization. Before entering the proxy server, the configuration of the authentication provides an extra security layer. The HTTP Proxy-Authenticate contains the realm and type directives for the proxy server authentication.

What is the Syntax of Proxy-Authenticate HTTP Request Header?

To use Proxy-Authenticate HTTP Response Header the syntax below should be followed.

Proxy-Authenticate: <type> <realms>

The syntax of the Proxy-Authenticate has three parts. The first part will have the name of the HTTP Response Header which is Proxy-Authenticate. There will be a “:” before the value of the HTTP Response Proxy-Authenticate Header. The last part of the syntax of the Proxy-Authenticate is the value. The value of the Proxy-Authenticate has two sub-parts which are the type and the realms. Proxy-Authenticate value has 11 different types. Proxy-Authenticate types are listed below. Reverse Proxy: Reverse Proxy type is used for more than one server.

  1. Web Proxy Server: used for connection of server and user.
  2. Anonymous Proxy: a common type of proxy.
  3. High Anonymity Proxy: a proxy server with high-security measures.
  4. Transparent Proxy: used by content providers.
  5. CGI Proxy: this is a special software package.
  6. Suffix Proxy: an easy-to-use type of proxy server.
  7. Distorting Proxy: high-security than transparent server.
  8. Tor Onion Proxy: a weak security type of proxy server.
  9. I2P Anonymous high-security type of proxy server.
  10. DNS Proxy: Domain Name System Proxy. Improves the performance of your domain.

The realms for Proxy-Authenticate are formed this way. Username and password are separated with a colon. The outcome binary string will be a binary-to-text code base64, shown below.


What is the Directive of Proxy-Authenticate HTTP Response Header?

The directives of the Proxy-Authenticate HTTP Response Headers are to tell what a browser should understand from the values of the Proxy-Authenticate. There are two different Proxy-Authenticate HTTP Response Header directives.

  • Type: The type value is to determine what type of authorization is used. The most common type for the Proxy-Authenticate is the “Basic” type.
  • Realms: Realms is for the authorization of the user, which usually requires the username and password, separated by a colon. An example syntax for the HTTP-Authorization Realms Directive is “username: password”.

Example usage of the directives of the Proxy-Authenticate can be seen below.

Proxy-Authenticate: Basic YAxhZERpbjpvREVuc34zYW1l

The example used above for the Proxy-Authenticate has the value “Basic” for the type directive, and the “YAxhZERpbjpvREVuc34zYW1l” value is for the realms. It means that the type of authorization is “Basic” and the realms needed by the user are “WIrxYARpbsnqFEVuc12sYZ3l”.

How to use Proxy-Authenticate HTTP Response Header?

To use the HTTP Response Proxy-Authenticate Header, the developer should have a proxy web server, a user-agent, IP Address, and a web server configuration. A proxy server is the most important requirement for using the Proxy-Authenticate, and user-agent, IP Address is for using the realms for making the Response to the web proxy server. To use the Proxy-Authenticate HTTP Response Header, the web server technology is important. For example, to use the HTTP Response Proxy-Authenticate Header within the Apache server, the “mox_proxy_http” module should be used. Within the “mox_proxy_http” module, the “proxy-initial-nor-pooled, and proxy-chain-auth or other specifics can be used for proxy authorization HTTP headers.

Examples of Proxy-Authenticate HTTP Response Header Use

The examples of the Proxy-Authenticate HTTP Response Header use can be found below.

Proxy-Authenticate: Basic realm="Protected"
Proxy-Authenticate: Age = "Age" ":" age-value
Proxy-Authenticate: Accept-Ranges = "Accept-Ranges" ":" acceptable-ranges
Proxy-Authenticate: Warning    = "Warning" ":" 1#warning-value
Proxy-Authenticate: Allow   = "Allow" ":" #Method

The realms commands which authentication pattern will be generated by the proxy server.

The realm directive above shows a pattern that must be followed to establish authentication protocol, connected with the official URL of the server restrictions, this provides exceptional data transfer security. 

What are the Specification Documents for Proxy-Authenticate HTTP Response Header?

The specification documents of the Proxy-Authenticate are found below.

  • RFC 7230: The RFC 7230 states that a proxy web server should start a Proxy-Authenticate process.
  • RFC 7235: The RFC 72355 is to provide an HTTP Transfer Authentication. On the 4.3 section of the 7235, the HTTP Proxy-Authenticate is explained with directives, purposes, and syntax.

What is the type of Proxy-Authenticate HTTP RequestHeader?

The type of Proxy-Authenticate HTTP Header is HTTP Authentication. The HTTP Authentication Headers provide required data about the proxy web server, username, password, and credentials for access control. There are other types of HTTP Headers for HTTP Authentication besides Proxy-Authenticate. The other HTTP Header Types besides HTTP Authentication are listed below.

HTTP Response Header is a type of Proxy-Authenticate HTTP Header, this provides the required data about the subject, such as location, characteristics, a service provider to the server, and client. There are other types of HTTP Headers besides the Proxy-Authenticate. The other types of HTTP Headers from the Proxy-Authenticate are listed below.

  • Request Headers send requests to the server to open a data source or a webpage.
  • Representation Headers provide the general information of the source.
  • Payload Headers are the actual data received after the data transfer.

What are the similar HTTP Headers to Proxy-Authenticate?

There are other similar HTTP Headers to Proxy-Authenticate:

  • WWW-Authenticate: This is included in 401 response codes.
  • Authorization: This consists of the user’s credentials.
  • Proxy-Authorization: This allows special access authorization.
Koray Tuğberk GÜBÜR

Leave a Comment

Proxy-Authenticate HTTP RequestHeader: Syntax, Directive, Examples

by Koray Tuğberk GÜBÜR time to read: 4 min