Configuring the administration endpoint to accept connections over TLS
Secure the administration (admin) endpoint on Eclipse Amlen V2.0 so that only connections over TLS are accepted.
The admin endpoint is a special endpoint that listens on the server that handles incoming
connections from administrative REST API clients. By default, the admin endpoint is not secured.
Complete the following steps to secure the admin endpoint so that only connections from clients that
pass in the correct server certificate and key are accepted.
Note: If a problem occurs during the
following process, the admin endpoint might get corrupted and no longer work. Messaging clients
would still work, but you would not be able to administer your Eclipse Amlen server - either by using the REST API or by using
the Web UI. Therefore, you might want to back up your server before securing the admin endpoint. The
only way to recover the admin endpoint is to stop the server, delete all configuration information,
and restart. Resetting the server to the default configuration results in the loss of all custom
data.
The following table shows the files that are required to secure the admin endpoint, and provides names for the files that are used in our example:
File | Example name |
---|---|
CA certificate file | rootCA-crt.pem |
Amlen server certificate file | msserver-crt.pem |
Amlen server key file | msserver-key.pem |
Amlen server certificate file (msserver-cert.pem) combined with the CA certificate file (rootCA-crt.pem) into a single certificate file | server-trust-chain.pem |
Client certificate file | msclient-crt.pem |
Client key file | msclient-key.pem |
Client certificate and key file combined into a pkcs12 file | *.p12 |
Use following commands to create the files that are used in this example. Replace variable names with the appropriate value for your configuration.
Note: Do not use the following commands to create certificates for production environments.
cat > ext.cfg <<EOF
[ req ]
attributes = req_attributes
distinguished_name = req_distinguished_name
req_extensions = v3_ca
prompt = no
[ req_attributes ]
[ v3_ca ]
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always,issuer
basicConstraints = CA:true
[ req_distinguished_name ]
countryName = US
stateOrProvinceName = state_code
localityName = city_name
organizationalUnitName = organization
commonName = descriptive_name
emailAddress = email
EOF
cat > srvext.cfg <<EOF
[ req ]
req_extensions = v3_req
[ v3_req ]
subjectAltName = DNS:server_hostname
EOF
openssl genrsa -out rootCA-key.pem 2048
openssl genrsa -out msCA-key.pem 2048
openssl genrsa -out msserver-key.pem 2048
openssl genrsa -out msclient-key.pem 2048
openssl req -new -x509 -days 3650 -subj subject_CA_dn -extensions v3_ca -set_serial 1 -key rootCA-key.pem -out rootCA-crt.pem
openssl req -new -days 3650 -subj subject_messagegateway_team_dn -key msCA-key.pem -out msCA-crt.csr
openssl x509 -days 3650 -in msCA-crt.csr -out msCA-crt.pem -req -CA rootCA-crt.pem -CAkey rootCA-key.pem -set_serial 3 -extensions v3_ca -extfile ext.cfg
openssl req -new -days 3650 -subj messagegateway_server_subject_dn -key msserver-key.pem -out msserver-crt.csr
openssl x509 -days 3650 -in msserver-crt.csr -out msserver-crt.pem -req -CA rootCA-crt.pem -CAkey rootCA-key.pem -extensions v3_req -extfile srvext.cfg -set_serial 2
openssl req -new -days 3650 -subj messagegateway_client_subject_dn -key msclient-key.pem -out msclient-crt.csr
openssl x509 -days 3650 -in msclient-crt.csr -out msclient-crt.pem -req -CA rootCA-crt.pem -CAkey rootCA-key.pem -extensions v3_req -set_serial 4
openssl pkcs12 -export -inkey msclient-key.pem -in msclient-crt.pem -out msclient.p12 -passout pass:
cat msserver-crt.pem > server-trust-chain.pem
cat rootCA-crt.pem >> server-trust-chain.pem
The following table provides example values for the file names that are required to secure an admin endpoint:
File | Example value |
---|---|
subject_CA_dn | /C=US/ST=TX/L=City/O=Company/OU=Corporate/CN=Company Corporate |
subject_messagegateway_team_dn | /C=US/ST=TX/L=City/O=Company/OU=MessageGateway/CN=MessageGateway
Team |
messagegateway_server_subject_dn | /C=US/ST=TX/L=City/O=Company/OU=MessageGateway/CN=MessageGateway Team
(server) |
messagegateway_client_subject_dn | /C=US/ST=TX/L=City/O=Company/OU=MessageGateway/CN=MessageGateway Team (msclient)
|
where:
- subject_CA_dn
- might be set to the following values:
/C=US/ST=TX/L=City/O=Company/OU=Corporate/CN=Company Corporate
- subject_messagegateway_team_dn
- might be set to the following values:
/C=US/ST=TX/L=City/O=Company/OU=MessageGateway/CN=MessageGateway Team
- messagegateway_server_subject_dn
- might be set to the following values:
/C=US/ST=TX/L=City/O=Company/OU=MessageGateway/CN=MessageGateway Team (server)
- messagegateway_client_subject_dn
- might be set to the following values:
/C=US/ST=TX/L=City/O=Company/OU=MessageGateway/CN=MessageGateway Team (msclient)