Password-protected drivers require modifications to the application code to unlock the drivers. For end-users of 3rd party applications and BI tools, this can present a problem, since you likely do not have permissions to modify these applications. To circumvent this issue, the Autonomous REST connector also provides a method of branding that allows you to lock the driver so that it issues only API requests to your service. By locking the driver to the API, you prevent unauthorized use of the driver by limiting to requests to only those you have defined, while, at the same time, eliminating the need to change code.

Locking the Autonomous REST Connector to your API is accomplished by running the standalone Branding Tool (BrandingTool.jar) against the driver file, autorest.jar, and your input REST file. When branding is executed, the driver embeds the input REST file into a branded copy of the driver file, locking the driver to use only the requests and endpoints you have defined in the input REST file.

Note: Alternatively, if your application can be modified, you can brand the Autonomous REST Connector to be unlocked via password. See one of the following procedures for detailed instructions:
  • "Branding Using the GUI"
  • "Branding Using the Command Line"
  • "Branding Using a Silent Installation"

Before you begin:

  1. Download the Branding Tool, BrandingTool.jar, from the OEM Partner website.
  2. Install an evaluation copy of the Autonomous REST Connector.

    For more information on installing the product, refer to the Progress DataDirect for JDBC Drivers Installation Guide.

  3. Create an input REST file and populate it with the endpoints and requests used by your service.

    For detailed information on creating an input REST file, refer to the Progress DataDirect Autonomous REST Connector for JDBC User's Guide.

To brand the Autonomous REST connector and lock it to your API:

  1. From a command-line, navigate to the directory containing the BrandingTool.jar file.
  2. Run the Branding Tool using the following syntax.

    java -jar BrandingTool.jar -fp file_prefix -pp package_prefix -sp subprotocol_prefix -mp message_prefix -p password -d driver_directory -bk branding_key -cf rest_config_file

    Note: You must specify valid values for each parameter described below.
    file_prefix
    The 2-character file prefix you registered through the OEM Partners section of the Progress DataDirect Web site. This prefix is added to the Autonomous REST Connector for JDBC jar and file names. For example, if dx is your file prefix, autorest.jar becomes dxautorest.jar.
    package_prefix

    A package prefix for the branded drivers (maximum of 64 characters). To avoid package name conflicts, the package prefix should adhere to the package naming conventions defined in the Java Language Specification. The package prefix replaces the DataDirect prefix of com.ddtek in all the classes within the Autonomous REST Connector for JDBC jar files when you brand the drivers. For example, if com.xyzcompany.xyzdivision is your package prefix, the driver class:

    com.ddtek.jdbc.autorest.AutoRESTDriver

    becomes:

    com.xyzcompany.xyzdivision.jdbc.autorest.AutoRESTDriver
    subprotocol_prefix

    The drivers are registered with a URL subprotocol of the form datadirect:autorest. The value you specify (32-character maximum) replaces the datadirect prefix in the subprotocol of a branded driver. For example, if xyzcompany is your subprotocol prefix, the URL:

    jdbc:datadirect:autorest://server1

    becomes:

    jdbc:xyzcompany:autorest://server1
    Note: To register JDBC subprotocol names, contact Oracle.
    message_prefix
    A message prefix for the branded drivers (maximum of 32 characters). After branding, driver error messages are displayed with this prefix. For example, if XYZCompany is your message prefix, the driver error message:
    [DataDirect][AutoREST JDBC Driver] Object has been closed

    becomes:

    [XYZCompany][AutoREST JDBC Driver] Object has been closed
    Note: If the message prefix contains spaces, you must enclose the prefix with double quotes, for example, -mp "xyz company".
    password
    The password you registered through the OEM Partners section of the Progress DataDirect Web site. The password is case-sensitive. This password is locked into the branded drivers to prevent unauthorized applications from using the branded drivers.
    driver_directory
    The full path to the installed driver. The Branding Tool uses the driver in this directory to make branded copies. The branded copies are placed in this same directory. The default location of the driver jar file is install_dir/lib/xx/, where xx is the version number.
    Note: If the directory path contains spaces, you must enclose the path name with double quotes, for example, -d "jdbc drivers/lib/60".
    branding_key
    The branding key assigned to you for specifically-licensed products and product features, including locking the Autonomous REST connector to an API. If you enter more than one key, you must insert a space between each key. If you do not know the branding key(s) assigned to you, contact your account representative.
    rest_config_file
    The absolute path to the REST configuration file (input REST file). The Branding Tool embeds this file in the driver .jar file, locking the driver to use only the requests and endpoints you have defined in the input REST file. The default location of the input REST file is install_dir/restfiles.

Once the branding operation is finished, the branded file appears in the same directory containing the original file. The default location of the driver jar file is install_dir/lib where install_dir is the installation directory.

Important: After branding the Autonomous REST Connector to lock the API, specifying values for the Config or Sample properties will return an error. The endpoints and requests typically provided by these properties are defined by the input REST File embedded in the branded driver file.