Keystores allow you to manage the keys that are stored in a database. A Keystore must contain a key pair with a certificate signed by a trusted Certification Authority (CA). A CA is an entity trusted by all parties participating in a secure communication. This entity will certify the trusted party's public keys by signing them. Since the certificate authority is trusted, it will accept the public key certificates signed by that particular CA as trusted. WSO2 Carbon uses several keystores to power the HTTPS transport and to encrypt other confidential information such as administrator passwords.
The keystores used to encrypt administrator passwords and other confidential information in Carbon is configured in the <
PRODUCT_HOME>/repository/conf/carbon.xml file (under the <
security> element). Two keystore elements in the
carbon.xml file can be used to configure the keystore: Primary keystore (
Keystore) and Registry Keystore (
The default keystore named
wso2carbon.jks can be found in the <
PRODUCT_HOME>/repository/resources/security directory of your product pack. Other required keystores can be created using the management console of each carbon product.
KeyStore element configured in the
carbon.xml file can be considered as the default Carbon keystore configuration. This is used for the primary keystore, which mainly stores the keys certifying SSL connections to Carbon servers, and for encrypting administrator passwords as well as other confidential information. The keystore configuration in the
carbon.xml file is as given below. Note that in this example, we are using the default key store in the product pack (wso2carbon.jks).
RegistryKeyStore is a separate keystore element configurable in the
carbon.xml file. This configuration applies for the keystore which stores the keys that certify encrypting/decrypting meta data to the registry. Therefore, using this
RegistryKeystore element in addition to the
Keystore element in the
carbon.xml file allows you to maintain a separate keystore for the purpose of encrypting/decrypting meta data to the registry. The registry keystore configuration in the
carbon.xml file is as given below. Note that in this example, we are using the default keystore in the product pack (wso2carbon.jks) as the registry keystore.
Keystore of the HTTPS transport
The keystore of the HTTPS transport is configured in the
axis2.xml file under the HTTPS transport receiver and HTTPS transport sender configurations.
The default keystore named
wso2carbon.jks, can be found in the <
PRODUCT_HOME>/repository/resources/security directory. To change the keystores used by the HTTPS transport, update the HTTPS transport receiver and sender configurations by specifying the paths to keystores files and other attributes of the files such as the keystores passwords.
Under the <
KeyStore> element two password values must be specified.
Password> element should indicate the password of the keystore file.
KeyPassword> element should point to the password required to access the private key.