When working with the HTTPS transport the application's certificate is deployed using the XML configuration file.
To deploy an application’s own certificate for the HTTPS transport, perform the following steps:
Obtain an application certificate in Java keystore format,
CertName
.jks
. For instructions on how to create a certificate in Java keystore format, see Use the CA to Create Signed Certificates in a Java Keystore.Note Some HTTPS clients (for example, Web browsers) perform a URL integrity check, which requires a certificate’s identity to match the hostname on which the server is deployed. See Special Requirements on HTTPS Certificates for details.
Copy the certificate’s keystore,
CertName
.jks
, to the certificates directory on the deployment host; for example,X509Deploy
/certs
.The certificates directory should be a secure directory that is writable only by administrators and other privileged users.
Edit the relevant XML configuration file to specify the location of the certificate keystore,
CertName
.jks
. You must include thesec:keyManagers
element in the configuration of the relevant HTTPS ports.For example, you can configure a client port as follows:
<http:conduit id="{
Namespace
}PortName
.http-conduit"> <http:tlsClientParameters> ... <sec:keyManagers keyPassword="CertPassword
"> <sec:keyStore type="JKS" password="KeystorePassword
" file="certs/CertName
.jks"/> </sec:keyManagers> ... </http:tlsClientParameters> </http:conduit>Where the
keyPassword
attribute specifies the password needed to decrypt the certificate’s private key (that is,CertPassword
), thetype
attribute specifes that the truststore uses the JKS keystore implementation, and thepassword
attribute specifies the password required to access theCertName
.jks
keystore (that is,KeystorePassword
).Configure a server port as follows:
<http:destination id="{
Namespace
}PortName
.http-destination"> <http:tlsServerParameters> ... <sec:keyManagers keyPassword="CertPassword
"> <sec:keyStore type="JKS" password="KeystorePassword
" file="certs/CertName
.jks"/> </sec:keyManagers> ... </http:tlsServerParameters> </http:destination>Warning The directory containing the application certificates (for example,
X509Deploy
/certs/
) should be a secure directory (that is, readable and writable only by the administrator).Warning The directory containing the XML configuration file should be a secure directory (that is, readable and writable only by the administrator), because the configuration file contains passwords in plain text.