Creating a Keystore With a Username and Password

You can create a keystore that contains a username and password by editing data and build files and running an Ant script.

Procedure

  1. Go to the TIBCO_HOME/administrator/<version_number>/samples/ directory.
  2. Open the keystore_data.xml data file and edit the following attributes of the CredentialEntry element:
    Attribute Description
    alias Alias identifying the keystore entry.
    protectionParam Password that protects the keystore entry.
    username Username.
    secret Password.

Example

<?xml version="1.0" encoding="UTF-8"?>
<amxdata_base:Enterprise
	xmlns:amxdata="http://tibco.com/amxadministrator/command/line/types"
	xmlns:amxdata_base="http://tibco.com/amxadministrator/command/line/types_base"
	xmlns:amxdata_reference="http://tibco.com/amxadministrator/command/line/types_reference"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://tibco.com/amxadministrator/command/line/types_base ../schemas/amxdata_base.xsd http://tibco.com/amxadministrator/command/line/types ../schemas/amxdata.xsd">

	<AMXKeyStore xsi:type="amxdata:AMXKeyStore">
		<CredentialEntry alias="myDatabase" protectionParam="databaseKeyAliasPassword" username="scott" secret="tiger" />
		<CredentialEntry alias="myLDAP" protectionParam="ldapKeyAliasPassword" username="cn=Manager,dc=example,dc=com" secret="password" />
	</AMXKeyStore>
	
</amxdata_base:Enterprise>

<target name="addCredential">
     <AMXKeyStoreTask
         dataFile="keystore_data.xml"
         adminKeyStorelocation = "my_keystore.jceks" 
         adminKeyStorePassword = "password" 
         action="add"/>
</target>
>ant -f keystore_build.xml addCredential
Buildfile: C:\amx320\administrator\<version_number>\samples\keystore_build.xml

addCredential:
[AMXKeyStoreTask]  INFO - Keystore file C:\amx320data\admin\amxadmin\samples\my_keystore.jceks does not exist; creat
ing a new keystore file
[AMXKeyStoreTask] Adding entry for alias 'myDatabase'...
[AMXKeyStoreTask] Adding entry for alias 'myLDAP'...
[AMXKeyStoreTask] Saving to keystore file C:\amx320\administrator\<version_number>\samples\my_keystore.jceks

BUILD SUCCESSFUL
Total time: 12 seconds