You can create a new key store, get the public certificate signed and get your public certificate exported from the key store and imported to trust store following 1,2 and 3 steps documented in the following blog - Hasini's Blog - Install a New Key store
After you have completed creating the new key store from the above steps next is to configure WSO2 Enterprise Store to work with the new key store.
Change the Configuration Files
1. Change the carbon.xml in [Product_Home]/repository/conf
<KeyStore>
<!-- Keystore file location-->
<Location>${carbon.home}/repository/resources/security/mykeystore.jks</Location>
<!-- Keystore type (JKS/PKCS12 etc.)-->
<Type>JKS</Type>
<!-- Keystore password-->
<Password>mypkpassword</Password>
<!-- Private Key alias-->
<KeyAlias>mycert</KeyAlias>
<!-- Private Key password-->
<KeyPassword>mypkpassword</KeyPassword>
</KeyStore>
<RegistryKeyStore>
<!-- Keystore file location-->
<Location>${carbon.home}/repository/resources/security/mykeystore.jks</Location>
<!-- Keystore type (JKS/PKCS12 etc.)-->
<Type>JKS</Type>
<!-- Keystore password-->
<Password>mypkpassword</Password>
<!-- Private Key alias-->
<KeyAlias>mycert</KeyAlias>
<!-- Private Key password-->
<KeyPassword>mypkpassword</KeyPassword>
</RegistryKeyStore>
2. Change the catalina-server.xml in [Product_Home]/repository/conf/tomcat
This configuration resists under Connector protocl - port 9443
keystoreFile="${carbon.home}/repository/resources/security/mykeystore.jks"
keystorePass="mypkpassword"
3. Change the publisher.json in [Product_Home]/repository/deployment/server/jaggeryapps/publisher/config
You have to change this file in-order to authenticate successfully for the Enterprise Store - Publisher. If these configuration is not done you will not be able to login to publisher. The identityAlias should be the alias you use to import the pem details of your key to the client-trustore.jks"authentication": {
"activeMethod": "sso",
"methods": {
"sso": {
"attributes": {
"issuer": "publisher",
"identityProviderURL": "%https.carbon.local.ip%/samlsso",
"identityAlias": "mynewcert",
"responseSigningEnabled": "true",
"acs": "%https.host%/publisher/acs",
"useTenantKey": false
}
}
4. Change the store.json in [Product_Home]/repository/deployment/server/jaggeryapps/store/config
You have to change this file in-order to authenticate successfully for the Enterprise Store - Store. If these configuration is not done you will not be able to login to store. The identityAlias should be the alias you use to import the pem details of your key to the client-trustore.jks
"authentication": {
"activeMethod": "sso",
"methods": {
"sso": {
"attributes": {
"issuer": "store",
"identityProviderURL": "%https.carbon.local.ip%/samlsso",
"identityAlias": "mynewcert",
"responseSigningEnabled": "true",
"acs": "%https.host%/store/acs",
"useTenantKey": false
}
},
That's it! Now the New key store is installed into WSO2 Enterprise Store. If in any case configurations have changed you can locate all the configuration files that have references to keystores, you can use the grep command as follows:
Open a command prompt and navigate to the <PRODUCT_HOME>/repository/conf/ directory where your product stores all configuration files.
Execute the following command: grep -nr ".jks" .
The configuration files and the keystore files referred to in each file will be listed. You can check what files you have not configured to point to the new key store.