Proxy authentication is used in multi-tier system. The user/principal authenticates
at the proxy and the proxy provides the authentication information to other services.
This tutorial shows how to configure GeoServer to accept authentication information
passed by HTTP header attribute(s). In this scenario GeoServer will do no actual authentication itself.
The tutorial uses the obscure “sdf09rt2s” name for the header attribute.
Why not use “user” or “username” ?. In a proxy scenario a relationship
of trust is needed between the proxy and GeoServer. An attacker could easily
send an HTTP request with an HTTP header attribute “user” and value “admin”
and operate as an administrator.
One possibility is to configure the network infrastructure preventing such
requests from all IP addresses except the IP of the proxy.
This tutorial uses a obscure header attribute name which should be a shared
secret between the proxy and GeoServer. Additionally, the use of SSL is recommended,
otherwise the shared secret is transported in plain text.
Save.
Back on the authentication page scroll down to the FilterChains panel.
Select “Default” from the Requesttype drop down.
Unselect the basic filter and select the proxy filter. Position the
the proxy filter before the anonymous filter.
In order to test the authentication settings configured in the previous section
a service or resource must be first secured. The Default filter chain is the
chain applied to all OGC service requests so a service security rule must be
configured.
From the GeoServer home page and click the Services link located under the
Security section of the navigation sidebar.
On the Service security page click the Addnewrule link and add a catch all
rule that secures all OGC service requests requiring the ADMIN
role.