Replicating Using Mutual SSL
Configure AEM so that a replication agent on the author instance uses mutual SSL (MSSL) to connect with the publish instance. Using MSSL, the replication agent and the HTTP service on the publish instance use certificates to authenticate each other.
Configuring MSSL for replication involves performing the following steps:
- Create or obtain private keys and certificates for the author and publish instances.
- Install the keys and certificates on the author and publish instances:
- Author: Author's private key and Publish's certificate.
- Pubish: Publish's private key and Author's certificate. The certificate is associated with the user account that is authenticated with the replication agent.
- Configure the Jetty-Based HTTP Service on the Publish instance.
- Configure the transport and SSL properties of the replication agent.
You must determine which user account is performing the replication. When installing the trusted author certificate on the publish instance, the certificate is associated with this user account.
Obtaining or Creating Credentials for MSSL
You require a private key and public certificate for the author and publish instances:
- Private keys must be contained in pkcs#12 or JKS format.
- Certificates must be contained in pkcs#12 or JKS format. Additionally certificate contained in "CER" format can also be added to Granite Truststore.
- Certificates can be self-signed or signed by a recognized CA.
Generate a private key and a certificate in JKS format. The private key is stored in a KeyStore file, and the certificate is stored in a TrustStore file. Use Java to create both.
Perform the following steps using Java keytool to create the private key and the credential:
- Generate a private-public key pair in a KeyStore.
- Create or obtain the certificate:
- Self-signed: Export the certificate from the KeyStore.
- CA-signed: Generate a certificate request and send it to the CA.
- Import the certificate into a TrustStore.
Use the following procedure to create a private key and a self-signed certificate for both the author and publish instances. Use different values for command options accordingly.
- Open a command-line window or terminal. To create the private-public key pair, enter the following command, using option values from the table below:
keytool -genkeypair -keyalg RSA -validity 3650 -alias alias -keystore keystorename.keystore -keypass key_password -storepass store_password -dname "CN=Host Name, OU=Group Name, O=Company Name,L=City Name, S=State, C=Country_ Code"OptionAuthorPublish-aliasauthorpublish-keystoreauthor.keystorepublish.keystore
- To export the certificate, enter the following command using option values from the table below:
keytool -exportcert -alias alias -file cert_file -storetype jks -keystore keystore -storepass store_passwordOptionAuthorPublish-aliasauthorpublish-fileauthor.cerpublish.cer-keystoreauthor.keystorepublish.keystore
Generate a private key and a certificate in pkcs#12 format. Use openSSL to generate them. Use the following procedure to generate a private key and a certificate request. To obtain the certificate, either sign the request with your private key (self-signed certificate) or send the request to a CA. Then, generate the pkcs#12 archive that contains the private key and the certificate.
- Open a command-line window or terminal. To create the private key, enter the following command, using option values from the table below:
openssl genrsa -out keyname.key 2048OptionAuthorPublish-outauthor.keypublish.key
- To generate a certificate request, enter the following command, using option values from the table below:
openssl req -new -key keyname.key -out key_request.csrOptionAuthorPublish-keyauthor.keypublish.key-outauthor_request.csrpublish_request.csrEither sign the certificate request or send the request to a CA.
- To sign the certificate request, enter the following command, using option values from the table below:
openssl x509 -req -days 3650 -in key_request.csr -signkey keyname.key -out certificate.cerOptionAuthorPublish-signkeyauthor.keypublish.key-inauthor_request.csrpublish_request.csr-outauthor.cerpublish.cer
- To add your private key and the signed certificate to a pkcs#12 file, enter the following command, using option values from the table below:
openssl pkcs12 -keypbe PBE-SHA1-3DES -certpbe PBE-SHA1-3DES -export -in certificate.cer -inkey keyname.key -out pkcs12_archive.pfx -name "alias"OptionAuthorPublish-inkeyauthor.keypublish.key-outauthor.pfxpublish.pfx-inauthor.cerpublish.cer-nameauthorpublish
Install Private Key and TrustStore on Publish
Install the following items on the publish instance:
- The private key of the publish instance.
- The certificate of the author instance. Associate the certificate with the user that is used to execute replication requests.
To perform the following procedure, you must be logged in as an adminstrator of the publish instance.
Install the Publish Private Key
- Open the User Management page for the publish instance. ( http://localhost:4503/libs/granite/security/content/useradmin.html )
- To open the properties of your user account, click or tap your user name.
- If the Create KeyStore link appears in the Account Settings area, click the link. Configure a password and click OK.
- In the Account Settings area, click Manage Keystore.
- Click Add Private Key From Key Store File.
- Click Select Key Store file, then browse for and select the publish.keystore file or the publish.pfx file if using pkcs#12, then click Open.
- Enter an alias and the password for the key store. Enter the alias and password for the private key, then click Submit.
- Close the KeyStore Management dialog box.
Configure the HTTP Service on Publish
Configure the properties of the Apache Felix Jetty Based HTTP Service on the publish instance so that it uses HTTPS while accessing Granite Keystore. The PID of the service is org.apache.felix.http .
The following table lists the OSGi properties that you need to configure whether you are using the Web Console.
Property Name on Web Console
OSGi Property Name
Enable HTTPS To Use Granite KeyStore
8443 (or other desired port)
"Client Certificate Wanted"