Skip To Content

Configure Shibboleth

You can configure Shibboleth 3.2x as your identity provider (IDP) for enterprise logins in Portal for ArcGIS. The configuration process involves two main steps: registering your enterprise identity provider with Portal for ArcGIS and registering Portal for ArcGIS with the enterprise identity provider.

Optionally, you can provide metadata to the portal about the enterprise groups in your identity store. This allows you to create groups in the portal that leverage the existing enterprise groups in your identity store. When members log in to the portal, access to content, items, and data is controlled by the membership rules defined in the enterprise group. If you do not provide the necessary enterprise group metadata, you'll still be able to create groups. However, membership rules will be controlled by Portal for ArcGIS, not the identity store.

Required information

Portal for ArcGIS requires certain attribute information to be received from the identity provider when a user logs in using enterprise logins. NameID is a mandatory attribute that must be sent by your identity provider in the SAML response to make the federation with Portal for ArcGIS work. When a user from the IDP logs in, a new user with the user name NameID will be created by Portal for ArcGIS in its user store. The allowed characters for the value sent by the NameID attribute are alphanumeric, _ (underscore), . (dot), and @ (at sign). Any other characters will be escaped to contain underscores in the user name created by Portal for ArcGIS.

Portal for ArcGIS supports flow-in of the givenName and email address attributes of the enterprise login from the enterprise identity provider. When a user signs in using an enterprise login, and if Portal for ArcGIS receives attributes with the names givenname and email, or mail (in any case), Portal for ArcGIS populates the full name and the email address of the user account with the values received from the identity provider. It's recommended that you pass in the email address from the enterprise identity provider so the user can receive notifications.

Register Shibboleth as the enterprise identity provider with Portal for ArcGIS

  1. Sign in to the portal website as an administrator of your organization and click My Organization > Edit Settings > Security.
  2. In the Enterprise Logins section, click the Set Identity Provider button and enter your organization's name in the window that appears (for example, City of Redlands). When users access the portal website, this text displays as part of the SAML sign in option (for example, Using your City of Redlands account).
    Note:

    You can only register one enterprise identity provider for your portal.

  3. Choose if your users will be able to join the organization Automatically or After you add the accounts to the portal. Selecting the first option enables users to sign in to the organization with their enterprise login without any intervention from an administrator. Their account is registered with the organization automatically the first time they sign in. The second option requires the administrator to register the necessary accounts with the organization using a command line utility or sample Python script. Once the accounts have been registered, users will be able to sign in to the organization.
    Tip:

    It's recommended that you designate at least one enterprise account as an administrator of your portal and demote or delete the initial administrator account. It is also recommended that you disable the Create an account button and sign up page (signup.html) in the portal website so people cannot create their own accounts. For full instructions, see Configuring a SAML-compliant identity provider with your portal.

  4. Provide metadata information for the identity provider using one of the two options below:
    • File—By default, Shibboleth provides the IdP metadata file in SHIBBOLETH_HOME/metadata. If the metadata file is accessible, choose the File option for the metadata of the enterprise identity provider and browse to the file SHIBBOLETH_HOME/metadata/idp-metadata.xml.
    • Parameters—Choose this option if the file is not accessible. Enter the values manually and supply the requested parameters: login URL and certificate. Contact your Shibboleth administrator to obtain these.
  5. Configure the advanced settings as applicable:
    • Encrypt Assertion—Select this option if Shibboleth will be configured to encrypt SAML assertion responses.
    • Enable Signed Request—Select this option to have Portal for ArcGIS sign the SAML authentication request sent to Shibboleth.
    • Entity ID—Update this value to use a new entity ID to uniquely identify your portal to Shibboleth.

    The Encrypt Assertion and Enable Signed Request settings use the certificate samlcert in the portal keystore. To use a new certificate, delete the samlcert certificate, create a new certificate with the same alias (samlcert) following the steps in Import a certificate into the portal, and restart the portal.

    Note:

    Currently, Propagate logout to Identity Provider and Logout URL are not supported.

  6. Optionally provide metadata to the portal about the enterprise groups in the identity store:
    1. Sign in to the ArcGIS Portal Directory as an administrator of your organization. The URL is in the format https://webadaptorhost.domain.com/webadaptorname/portaladmin.
    2. Click Security > Config > Update Identity Store.
    3. Place the group configuration JSON in the Group store configuration (in JSON format) text box.
      • If your identity store is Windows Active Directory, copy the following text and alter it to contain the information specific to your site:

        {
          "type": "WINDOWS",
          "properties": {
            "isPasswordEncrypted": "false",
            "userPassword": "secret",
            "user": "mydomain\\winaccount"
          }
        }

        In most cases, you will only need to alter values for the user and userPassword parameters. Although you type the password in clear text, it will be encrypted when stored in the portal's configuration directory or viewed. The account you use for the user parameter only needs permissions to look up the names of Windows groups on the network. If possible, use an account whose password does not expire.

      • If your identity store is LDAP, copy the following text and alter it to contain the information specific to your site:

        {
          "type": "LDAP",
          "properties": {
            "userPassword": "secret",
            "isPasswordEncrypted": "false",
            "user": "uid=admin,ou=system",
            "ldapURLForUsers": "ldaps://bar2:10636/ou=users,ou=ags,dc=example,dc=com",
            "ldapURLForRoles": "ldaps://bar2:10636/dc=example,dc=com",
            "usernameAttribute": "cn",
            "caseSensitive": "false",
            "userSearchAttribute": "cn",
            "memberAttributeInRoles": "member",
            "rolenameAttribute":"cn"
          }
        }

        In most cases, you'll only need to alter values for the user, userPassword, ldapURLForUsers, and ldapURLForRoles parameters. The URL to your LDAP will need to be provided by your LDAP administrator.

        In the above example, the LDAP URL refers to users within a specific OU (ou=users). If users exist in multiple OUs, the LDAP URL can point to a higher level OU or even the root level if needed. In that case, the URL would instead look like this:

        "ldapURLForUsers": "ldaps://bar2:10636/dc=example,dc=com",

        The account you use for the user parameter needs permissions to look up the names of groups in your organization. Although you type the password in clear text, it will be encrypted when stored in the portal's configuration directory or viewed.

        If your LDAP is configured to be case insensitive, set the caseSensitive parameter to false.

    4. When you finish entering the JSON for the user store configuration, click Update Configuration to save your changes and restart the portal.

Register Portal for ArcGIS as the trusted service provider with Shibboleth

  1. Configure Portal for ArcGIS as a relying party in Shibboleth.
    1. Obtain the metadata file of your portal and save it as an XML file.

      To get the metadata file, sign in as an administrator of your organization and open your organization page. Click the Edit Settings button, click the Security tab, and in the Enterprise Logins section, click the Get Service Provider button.

    2. Configure Portal for ArcGIS as the trusted service provider in Shibboleth by defining a new MetadataProvider element in the SHIBBOLETH_HOME/conf/metadata-providers.xml file.

      Add the snippet below within the root MetadataProvider element. Provide the path to your organization's metadata XML file (saved in step 1.a above).

      <MetadataProvider id="EsriSP" xsi:type="FilesystemMetadataProvider"
      xmlns="urn:mace:shibboleth:2.0:metadata" 
      	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      	xsi:schemaLocation="urn:mace:shibboleth:2.0:metadata http://shibboleth.net/schema/idp/shibboleth-metadata.xsd"
      	failFastInitialization="true"
      	metadataFile=" <PATH_TO_THE_SAVED_METADATA>/esri-sp-metadata.xml" />
  2. Configure user authentication. In the following example, an LDAP Directory Server is configured as the user store by updating the necessary properties in the SHIBBOLETH_HOME/conf/ldap.properties: file.

    idp.authn.LDAP.authenticator = bindSearchAuthenticator

    idp.authn.LDAP.ldapURL = ldaps://myldap.example.org:port

    idp.authn.LDAP.baseDN = ou=People,dc=example,dc=org

    idp.authn.LDAP.userFilter= (uid={user})

    idp.authn.LDAP.bindDN = cn=readonlyuser,dc=example,dc=org

    idp.authn.LDAP.bindDNCredential = userpassword

  3. Configure the user attributes to be returned by Shibboleth.
    1. Edit SHIBBOLETH_HOME/conf/attribute-resolver.xml. Comment or delete all existing example attribute definitions and data connectors.
    2. Copy the definitions for mail and givenName from the SHIBBOLETH_HOME/conf/attribute-resolver-full.xml file to the SHIBBOLETH_HOME/conf/attribute-resolver.xml file. Then add the following entry for the attribute that will be used as the Name ID:

      <resolver:AttributeDefinition xsi:type="ad:Simple" id="<NameID attribute>" sourceAttributeID ="<NameID attribute>">
      			<resolver:Dependency ref="myLDAP" />
      			<resolver:AttributeEncoder xsi:type="SAML2StringNameID" xmlns="urn:mace:shibboleth:2.0:attribute:encoder"
      					nameFormat="urn:oasis:names:tc:SAML:2.0:nameid-format:unspecified" />
      		</resolver:AttributeDefinition>

    3. Copy the LDAP Data Connector section from SHIBBOLETH_HOME/conf/attribute-resolver-ldap.xml to SHIBBOLETH_HOME/conf/attribute-resolver.xml.
    4. Configure the attributes to release to the service provider. Edit the SHIBBOLETH_HOME/conf/attribute-filter.xml file and add the following:
    Note:

    Replace mygis.maps.arcgis.com with the Entity ID of your organization.

    <AttributeFilterPolicy id="ArcGIS">
            <PolicyRequirementRule xsi:type="Requester" value="mygis.maps.arcgis.com" />
    			<AttributeRule attributeID="<NameID Attribute>">
    				<PermitValueRule xsi:type="ANY" />
    			</AttributeRule>
    
    			<AttributeRule attributeID="givenName">
    				<PermitValueRule xsi:type="ANY" />
    			</AttributeRule>
    
    			<AttributeRule attributeID="mail">
    				<PermitValueRule xsi:type="ANY" />
    			</AttributeRule>
    		</AttributeFilterPolicy>
  4. Edit the SHIBBOLETH_HOME/conf/relying-party.xml file.
    1. Copy the XML code below and paste it inside the shibboleth.RelyingPartyOverrides elements to override the default configuration for the Shibboleth Identity Provider:
      <util:list id="shibboleth.RelyingPartyOverrides">
      <bean parent="RelyingPartyByName" c:relyingPartyIds="mygis.maps.arcgis.com">
      <property name="profileConfigurations">
       <list>
        <bean parent="SAML2.SSO" 
         p:nameIDFormatPrecedence="urn:oasis:names:tc:SAML:2.0:nameid-format:unspecified" />
       </list>
      </property>
      </bean>
          </util:list>
      Note:

      Replace mygis.maps.arcgis.com with the Entity ID of your organization.

      The nameIDFormatPrecedence parameter instructs the identity provider to send the SAML name ID attribute in the unspecified format, which is required by ArcGIS Online and Portal for ArcGIS.

    2. Turn off assertion encryption in the Shibboleth Identity Provider by setting the encryptAssertions parameter to false.
      <bean parent="RelyingPartyByName" c:relyingPartyIds="mygis.maps.arcgis.com">
      		<property name="profileConfigurations">
      			<list>
      				<bean parent="SAML2.SSO" 
      					p:nameIDFormatPrecedence="urn:oasis:names:tc:SAML:2.0:nameid-format:unspecified" 
      					p:encryptAssertions="false" />
      			</list>
      		</property>
      		</bean>
  5. Edit the SHIBBOLETH_HOME/conf/saml-nameid.xml file and replace this section:
    <!--
    <bean parent="shibboleth.SAML2AttributeSourcedGenerator"
       p:format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"
       p:attributeSourceIds="#{ {'mail'} }" />
    -->

    with the following:

    <bean parent="shibboleth.SAML2AttributeSourcedGenerator"
                p:format="urn:oasis:names:tc:SAML:2.0:nameid-format:unspecified"
                p:attributeSourceIds="#{ {'your-name-id-attribute'} }" />

  6. Restart the Shibboleth daemon (Linux) or service (Windows).