Creating a Keystore Containing a User Name 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
- Go to the CONFIG_HOME/admin/enterpriseName/samples/ directory.
-
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 -
Open the
keystore_build.xml build file and edit the following attributes of the
AMXKeyStoreTask element in the addCredential target:
Attribute Description adminKeyStorelocation The name of the file to contain the keystore. adminKeyStorePassword The password protecting the keystore. - Run ant -f keystore_build.xml addCredential.
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:\amx3xdata\admin\amxadmin\samples\keystore_build.xml addCredential: [AMXKeyStoreTask] INFO - Keystore file C:\amx3xdata\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:\amx3xdata\admin\amxadmin\samples\my_keystore.jceks BUILD SUCCESSFUL Total time: 12 seconds
Copyright © 2022. Cloud Software Group, Inc. All Rights Reserved.