You can use the Jython or Jacl scripting languages to configure key stores with the wsadmin tool. A key store is created by the application server during install and can contain cryptographic keys or certificates. The commands and parameters in the KeyStoreCommands group can be used to create, delete, and manage key stores. The KeyStoreCommands command group for the AdminTask object includes the following commands:
The changeMultipleKeyStorePasswords command updates all of the key stores in the configuration that have a give password and changed them to a new password. This is useful because when you create key store files on the system, they will have WebAS as a password by default.
Parameters and return values
Examples
Batch mode example usage:
$AdminTask changeMultipleKeyStorePasswords {-keyStorePassword WebAS -newKeyStorePassword newpwd -newKeyStorePasswordVerify newpwd}
AdminTask.changeMultipleKeyStorePasswords ('[-keyStorePassword WebAS -newKeyStorePassword newpwd -newKeyStorePasswordVerify newpwd]')
AdminTask.changeMultipleKeyStorePasswords (['-keyStorePassword', 'WebAS', '-newKeyStorePassword', 'newpwd', '-newKeyStorePasswordVerify', 'newpwd'])
Interactive mode example usage:
$AdminTask changeMultipleKeyStorePasswords {-interactive}
AdminTask.changeMultipleKeyStorePasswords ('[-interactive]')
AdminTask.changeMultipleKeyStorePasswords (['-interactive'])
The createKeyStore command creates the key store settings in the configuration and the key store database.
Parameters and return values
Examples
Batch mode example usage:
$AdminTask createKeyStore {-keyStoreName testKS -location c:\temp\testKeyFile.p12 keyStorePassword testpwd -keyStorePasswordVerify testpwd -isKeyStoreFileBased true -keyStoreInitAtStartup true -keyStoreReadOnly false}
AdminTask.createKeyStore ('[-keyStoreName testKS -location c:\temp\testKeyFile.p12 keyStorePassword testpwd -keyStorePasswordVerify testpwd -isKeyStoreFileBased true -keyStoreInitAtStartup true -keyStoreReadOnly false]')
AdminTask.createKeyStore (['-keyStoreName', 'testKS', '-location', 'c:\temp\testKeyFile.p12', 'keyStorePassword', 'testpwd', '-keyStorePasswordVerify', 'testpwd', '-isKeyStoreFileBased', 'true', '-keyStoreInitAtStartup', 'true', '-keyStoreReadOnly', 'false'])
Interactive mode example usage:
$AdminTask createKeyStore {-interactive}
AdminTask.createKeyStore ('[-interactive]')
AdminTask.createKeyStore (['-interactive'])
The createCMSKeyStore command creates a CMS key store database and the key store settings in the configuration.
Parameters and return values
Examples
Batch mode example usage:
Interactive mode example usage:
$AdminTask createCMSKeyStore {-interactive}
AdminTask.createCMSKeyStore ('[-interactive]')
AdminTask.createCMSKeyStore (['-interactive'])
The deleteKeyStore command deletes the settings of a key store from the configuration and the key store file.
Parameters and return values
Examples
Batch mode example usage:
$AdminTask deleteKeyStore {-name testKS}
AdminTask.deleteKeyStore ('[-name testKS]')
AdminTask.deleteKeyStore (['-name', 'testKS'])
Interactive mode example usage:
$AdminTask deleteKeyStore {-interactive}
AdminTask.deleteKeyStore ('[-interactive]')
AdminTask.deleteKeyStore (['-interactive'])
The exchangeSigners command exchange signer certificate between key stores.
Parameters and return values
Examples
Batch mode example usage:
$AdminTask exchangeSigners {-keyStoreName1 testKS -certificateAliasList1 testCert1 -keyStoreName2 secondKS -certificateAlaisList2 certAlis}
AdminTask.exchangeSigners ('[-keyStoreName1 testKS -certificateAliasList1 testCert1 -keyStoreName2 secondKS -certificateAlaisList2 certAlis]')
AdminTask.exchangeSigners (['-keyStoreName1', 'testKS', '-certificateAliasList1', 'testCert1', '-keyStoreName2', 'secondKS', '-certificateAlaisList2', 'certAlis'])
Interactive mode example usage:
$AdminTask exchangeSigners {-interactive}
AdminTask.exchangeSigners ('[-interactive]')
AdminTask.exchangeSigners (['-interactive'])
The getKeyStoreInfo command displays the settings of a particular key store.
Parameters and return values
Examples
Batch mode example usage:
$AdminTask getKeyStore {-name testKS}
AdminTask.getKeyStore ('[-name testKS]')
AdminTask.getKeyStore (['-name', 'testKS'])
Interactive mode example usage:
$AdminTask getKeyStoreInfo {-interactive}
AdminTask.getKeyStoreInfo ('[-interactive]')
AdminTask.getKeyStoreInfo (['-interactive'])
The listKeyFileAliases command lists the certificates in a key store file.
Parameters and return values
Examples
Batch mode example usage:
$AdminTask listKeyFileAliases {-keyFilePath c:\temp\testKeyFile.p12 -keyFilePassword testPwd -keyFileType PKCS12}
AdminTask.listKeyFileAliases ('[-keyFilePaht c:\temp\testKeyFile.p12 -keyFilePassword testPwd -keyFileType PKCS12]')
AdminTask.listKeyFileAliases (['-keyFilePaht', 'c:\temp\testKeyFile.p12', '-keyFilePassword', 'testPwd', '-keyFileType', 'PKCS12'])
Interactive mode example usage:
$AdminTask listKeyFileAliases {-interactive}
AdminTask.listKeyFileAliases ('[-interactive]')
AdminTask.listKeyFileAliases (['-interactive'])
The listKeyStores command lists the key store for a particular scope.
Parameters and return values
Examples
Batch mode example usage:
Interactive mode example usage:
$AdminTask listKeyStores {-interactive}
AdminTask.listKeyStores ('[-interactive]')
AdminTask.listKeyStores (['-interactive'])
The listKeyStoresTypes command lists all valid key store types.
Parameters and return values
Examples
Batch mode example usage:
Interactive mode example usage:
$AdminTask listKeyStoresTypes {-interactive}
AdminTask.listKeyStoresTypes ('[-interactive]')
AdminTask.listKeyStoresTypes (['-interactive'])