Add custom descriptor to Apache Knox

How to add a custom descriptor to Apache Knox using Cloudera Manager.

In this example, you add a custom descriptor (MY_SERVICE) in custom-topology with the following attributes:

  • ProviderConfigRef: a string representing a reference of an existing share-provider. We will use the pre-configured pam provider.
  • Version: the service’s version, for example, 1.0.0.
  • URL: the service URL, for example, https://sampleHost:1234.
  • Service parameter: a sample service parameter, for example, myValue.
  1. From Cloudera Manager > Knox > Configuration, add a new entry in Knox Gateway Advanced Configuration Snippet (Safety Valve) for conf/cdp-resources.xml as follows:
    Name = custom-topology //This name is customisable and is used to create a topology file.
    Value =providerConfigRef=pam#
    MY_SERVICE:version=1.0.0#
    MY_SERVICE:url=https://sampleHost:1234#
    MY_SERVICE:myCustomServiceParameter=myValue
    Description = This is a custom descriptor with one service called MY_SERVICE
  2. Save your changes.
  3. The ‘Refresh needed’ stale configuration indicator appears; click it and wait until the refresh process completes.
  4. Validate that the operation was successful by navigating to the following URL: https://$KNOX_GATEWAY_HOST:$PORT/$GATEWAY_PATH/admin/api/v1/topologies/cdp-proxy.