Using application configuration objects to access secure data
You can use application configuration objects to access securely stored configuration data from your Teracloud® Streams environment.
About this task
- Database connection data
- Credentials that your applications need to use to access external systems
- Other data, such as the port number of a TCP sink or source operator
An application configuration object enables you to store this type of information in a central location, rather than storing configuration files on each host where a job might be deployed. However, as you create the application, you must configure the operators to call the appropriate application configuration objects by using the getApplicationConfiguration function.
Procedure
-
To use the interactive
streamtool
interface to create the application configuration object, run thestreamtool mkappconfig
command:mkappconfig [-d,--domain-id did] [-i,--instance-id instance] [--description description] [--property name=value] ... [--propfile property-file] [-U,--User user] [-h,--help] [--trace level] [-v,--verbose level] config-name
Replace the config-name variable with the name that you want to use for the application configuration object. This is the name that an application must use to retrieve the application configuration object.
You can specify the properties of the application configuration object by:- Pulling the values from a properties file by specifying the --propfile option.
- Specifying each name-value pair individually by specifying the --propertyoption for each property.
Tip: If you specify a value for both the --propfile option and the --property option, the values that are specified in the --property option override any values that are specified for the same property in the file that is specified by the --propfile option.If you specify each property manually from the interactivestreamtool
interface, your command might look something like this:mkappconfig --property userName=dbUserName --property password=dbPassword dbConnectConfig
-
To use the Teracloud® Streams
Console to create the application configuration object: