SAMLv2 Authentication Filter

This plugin adds to GeoServer the support for SAML based Single Sign On (SSO), a process that allows users to authenticate themselves against an external Identity Provider (such as OneLogin) rather than obtaining and using a separate username and password handled by GeoServer.

The IdP has to be configured to use GeoServer as a Service Provider (SP). GeoServer will be assigned a unique identifier (entityId) in the IdP. This will be used to match the GeoServer configuration with the IdP one.

Configuring the SAML Authentication Filter

  1. Start GeoServer and login to the web admin UI as the admin user.

  2. Click the Authentication link located under the Security section of the navigation sidebar.

  1. Scroll down to the Authentication Filters panel and click the Add new link.

  1. Click the SAMLv2 link.


5. Fill in the fields of the settings form as follows; you can use GeoServer role sources to assign a specific group or role to the SAML user.




any unique name assigned to this filter

Identity provider identifier

The named assigned to GeoServer by the IdP (if you are using OneLogin, this is the same value of Audience field on OneLogin configuration panel)

SAML metadata URL

If the IdP has an entry point to download the Metadata needed to configure GeoServer, put the URL here (if you are using OneLogin, copy the Metadata URL field from the OneLogin configuration panel)

SAML metadata XML

If the IdP does not have an entry point to download the Metadata needed to configure GeoServer, you have to fill this field with a valid SAMLv2 metadata XML, describing both the IdP and the SP properties

Sign requests and responses

Enables signing requests and validating responses signatures (this requires that the AuthnRequestsSigned

Path to KeyStore containing signing certificate

Either a relative path (in the data directory) or an absolute path to a java keystore file where the certificate for the local signature is stored (required if signing is enabled). Here some documentation on how to create these certificates:

Password for KeyStore

Password needed to open the above keystore

Entry id for the certificate in KeyStore

alias (id) of the certificate entry in the keystore

Password for the certificate

Password needed to use the certificate

Role source

role source used to assign roles to users authenticated by the SAMLv2 IdP, it can be Request header (to use an header if the SSO infrastructure adds them to GeoServer requests), a UserGroup service or a Role service

Some documentation on the SAMLv2 protocol can be found here:, while specific info on the Metadata XML is here:

  1. Update the filter chains by adding the new SAMLv2 filter.

  1. Select the SAMLv2 Filter for each filter chain you want to protect with the IdP (for example web)


Using OneLogin as IdP

The first thing you will need is an account in OneLogin: that will handle the sign-in process and will eventually provide the authentication credentials of your users to GeoServer.

GeoServer users authenticated through OneLogin are handled from OneLogin and any change performed on the account is used by GeoServer. The only user data that is necessary for GeoServer is a unique identifier for each user.

User’s email is used by default as a unique identifier for each user. GeoServer does not store passwords.

Actually GeoServer is not present within the OneLogin application catalog so we can use the OneLogin SAML test connector. For more details about configuring the SAML Test Connector follow the guide at:

In the example we assume that GeoServer URL is http://localhost:8080/geoserver, if you have a specific domain for geoserver use it instead.

On the SAML Test Connector (IdP) configuration page, use the following values as parameters:









ACS URL Validator




Single Logout URL


Then, write down the Metadata URL you found in the Issuer URL field of the SSO Configuration page:


Testing with OneLogin

  1. Navigate to the GeoServer home page and log out of the admin account.

  2. Try to login again, you should be able now to see the external OneLogin form.

  1. You can manage users using OneLogin panel located at

Testing with SAMLING

SAMLING is a Servless SAML IDP that can easily be used to test the GeoServer SAMLv2 authentication filter.

You can configure a new SAMLv2 authentication filter, as in the following screenshot.


In particular, you have to create a JKS keystore, using the keytool command, and store it in the geoserver data dir, in a saml subfolder (choose a proper password for the keystore and another one for the certificate)

keytool -genkeypair -alias geoserversaml -keypass <certificate_password> -keystore samlKeystore.jks

Then use the following metadata XML:

<md:EntitiesDescriptor xmlns:ds=""
    <md:EntityDescriptor entityID="geoserver">
       <md:SPSSODescriptor AuthnRequestsSigned="true" WantAssertionsSigned="true" protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
          <md:KeyDescriptor use="signing">
             index="0" />
          <md:AttributeConsumingService index="1">
             <md:RequestedAttribute FriendlyName="mail"
                isRequired="true" />
             <md:RequestedAttribute FriendlyName="eduPersonPrincipalName"
                isRequired="true" />
    <md:EntityDescriptor entityID=""
      <md:IDPSSODescriptor WantAuthnRequestsSigned="false" protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
        <md:KeyDescriptor use="signing">
          <ds:KeyInfo xmlns:ds="">
              <!-- IDP certificate -->
        <md:SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location=""/>
        <md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location=""/>

Finally, properly fill in all the fields in the filter configuration form (in particular the passwords you choose for the store and certificate).

  1. Check that the filter chain where the SAML filter is used does not include the anonymous filter:

  1. Try to login again, you should be able now to see the SAMLING login form.

  1. Enter a username of your choice (e.g. samluser) in the Name Identifier field, then click on the Next button.

  1. Click on the Post Response! button, and you will be redirected to GeoServer, and logged in.