Installing DPS
Also available as:

Configure Knox SSO between DPS and HDP

This topic provides an overview of how to configure Knox SSO in your HDP cluster to work with DPS. Refer to the HDP documentation for details that might be applicable to your specific HDP configuration and setup.

  • You will be configuring Knox SSO in your HDP cluster to work with your DP instance.
  • You must have installed and configured DPS.
  • You must have configured Knox SSO on your clusters.

    See Knox SSO with DPS for details.

  • Knox SSO, LDAP, and Ranger must have been configured for HDP and Ambari.
  • You must have an SSL certificate (such as a .pem file) available and have access to the public key in the file.
  • Knox host FQDN must be DNS addressable and available from your DPS environment.

    If it is not, the Knox IP address must be in the /etc/hosts file on the DP environment. Refer to the DPS Administration Guidefor details on how to add Knox to the DPS environment hosts.

  1. In a terminal, SSH to the DPS host.
  2. Navigate to $DP_INSTALL_HOME/certs/.
    cd /usr/dp/current/core/bin/certs/
  3. Display the content of the ssl-cert.pem file.
    cat ssl-cert.pem
  4. Copy and retain the DPS public key displayed in the certificate between “Begin Certificate” and “End Certificate”, because you need it in a succeeding step.

    The public key looks similar to the following:



    -----END CERTIFICATE-----

  5. On your HDP cluster Knox host, create a token.xml topology file.
    vi /etc/knox/conf/topologies/token.xml
  6. Add the required content to the token.xml file:
    1. Add the basic topology content.

      You can copy and paste the following content into the file and modify the content as needed.

      <?xml version="1.0" encoding="UTF-8"?>

      HadoopGroupProvider enables the Hadoop user-group mapping, which identifies the groups to which users belong.

      The authorization=XASecurePDPKnox parameter and main.ldapRealm.authorizationEnabled=true parameter enable Ranger authorization with the token topologies in Knox.

    2. Replace $KNOX_HOSTNAME_FQDN with the fully qualified domain name of the host.
    3. In the sso.token.verification.pem parameter, paste in the public key value that you copied in a previous step, replacing $ADD_THE_PUBLIC_KEY_HERE.
  7. Perform a secure copy of the token.xml topology file to a Knox-enabled node on the HDP cluster.
  8. Verify that Knox has picked up the files:
    1. Log in to the Knox-enabled node.
    2. Ensure that a directory called token.topo.<number> is present in the path /var/lib/knox/data-<version>/deployments/.
      If the file is not present, verify that the content in the token.xml file is correct. You can check the Knox gateway logs for error information.
  9. Log in to each additional cluster used with DPS and repeat Step 5 (create a token.xml file) through Step 8 (verify copy of the file).
  10. Configure the Knox SSO topology to point to an LDAP instance for DPS to use.
    1. Open the file <knox_gateway_home>/topologies/knoxsso.xml.
    2. Modify the following properties with appropriate values for your environment:
      • main.ldapRealm.userDnTemplate
      • main.ldapRealm.contextFactory.url
      • knoxsso.redirect.whitelist.regex
      Sample configuration for using packaged LDAP: