Use the Provisioning Tool to Create the Truststore

If you are using Oracle Internet of Things Cloud Service version 16.4.1 or earlier, use the provisioning tool to create the trusted assets truststore. The truststore contains the Oracle Internet of Things Cloud Service authentication certificate and the device ID and Shared Secret values.

These are the prerequisites for this procedure:
  1. Run the following command to create a trusted assets store:
    java -cp $CL_HOME/lib/device-library.jar com.oracle.iot.client.impl.trust.TrustedAssetsProvisioner -serverHost <iotserver_url> -serverPort <port> -sharedSecret <device_id_shared_secret> -deviceId  <device_ID>
    A trusted assets store is created in the current directory. The trusted assets store contains the Oracle Internet of Things Cloud Service SSL/TLS authentication certificate, the client ID and shared secret values, and the certificates for code bundle verification.
  2. Run the following command to create a trust store for the enterprise application integration:
    java -cp $CL_HOME/lib/enterprise-library.jar com.oracle.iot.client.impl.trust.TrustedAssetsProvisioner -serverHost <Oracle_IoT_Cloud_Service_instance_url> -serverPort <Oracle_IoT_Cloud_Service_instance_port> -sharedSecret <Enterprise_app_integration_Shared_Secret> -endpointId  <Enterprise_app_integtration_ID>
    Replace endpointID with the enterprise application integration ID you recorded when you were Set Up Your Development Environment to Use the Java SE Client Software Libraries. A trusted assets truststore named Enterprise_app_integtration_ID.jks is created . The trusted assets truststore contains the Oracle Internet of Things Cloud Service SSL/TLS authentication certificate, the client ID and shared secret values.

    Note:

    Provisioning fails if the required certificate is not available in the trusted assets truststore. To correct this issue, create a SERVER_ROOT_CERTIFICATE environment variable with the location of the pem file containing the root certificate . A connectivity attempt will be made to the server using this certificate when the truststore is being created. If the connection cannot be made, the assets are created with a warning message.