This question is generic to all XCOM platforms for SSL/secure transfers.
In our environment the server SSL certificates can be shared across multiple XCOM server hosts i.e. the certificate validation appears to work when something like a Common Name Mismatch error would be expected. This is a cyber security risk.
What is the purpose of a server certificate if it is not matching-up the hostname or IP or DNS (even in a SAN certificate). It appears only the root and intermediate (Chain) certificates actually matter.
Is there a simple configuration change to enforce this check?
In what follows please take note of the following points:
Regarding the sample certificates which can be created by the supplied makeca, makeclient and makeserver scripts:
They are in no way fit for a secure production environment. They are provided to get SSL transfers to work with minimal effort. As such, all the fields in the certificates are meaningless for a specific implementation, for example the DNS names given in the cassl.conf, clientssl.conf and serverssl.conf could not possibly reflect an actual user environment. The sample client and server certificates could be used on any machine only validating a common root certificate. Proper configuration of a secure production environment is beyond the scope of this article.
Regarding the configssl.cnf file:
The default values given validate the certificates but turn off any verification of given fields in the certificate like VERIFY_MACHINE, SERIAL_NUMBER, NAME, TITLE etc.
As an example, this article shows the possible verifications for just one field, VERIFY_MACHINE, client side.
XCOM™ Data Transport® for UNIX/Linux
XCOM™ Data Transport® for Windows
XCOM™ Data Transport® for z/OS
XCOM™ Data Transport® for IBM i AS/400
XCOM™ Data Transport® for HP NonStop
Looking at XCOM for Linux and the default $XCOM_HOME/config/configssl.cnf file:
The VERIFY_CERTIFICATE parameter is the overriding parameter controlling all certificate checking.
By default it is set to YES i.e. the configssl.cnf shows:# Mandatory, YES/NO[VERIFY_CERTIFICATE]INITIATE_SIDE = YESRECEIVE_SIDE = YES
Other relevant parameters:
The VERIFY_MACHINE parameter which defaults to NO i.e. # Mandatory, YES/NO[VERIFY_MACHINE]INITIATE_SIDE = NORECEIVE_SIDE = NO
The optional HOST_NAME parameter:
*****# Optional, matches against the Subject Alternative Name DNS: field in the certificate# The wildcard character can be used in the Subject Alternative Name# HOST_NAME can contain one or more INITIATE_SIDEx and RECEIVE_SIDEx (x=1, 2, 3, etc.)# INITIATE_SIDEx host name matches the certificate sent by the receive side# RECEIVE_SIDEx host name matches the certificate sent by the initiate side# example: INITIATE_SIDE1 = hostname.aa.com or INITIATE_SIDE1 = *name.aa.com # RECEIVE_SIDE1 = *.aa.com[HOST_NAME]INITIATE_SIDE1 =RECEIVE_SIDE1 =
*****
These checks apply.
Using a Windows machine to initiate a SSL transfer and a Linux as the target, XCOM Engineering performed tests to confirm the VERIFY_MACHINE behaviour as follows:
[VERIFY_CERTIFICATE]INITIATE_SIDE = YESRECEIVE_SIDE = YES[VERIFY_MACHINE]INITIATE_SIDE = NORECEIVE_SIDE = NO[VERIFY_MACHINE]INITIATE_SIDE = YESRECEIVE_SIDE = NO17:46:00.022 P43412 T43096 TCPcu catoossl 3707: peer_certificate:17:46:00.022 P43412 T43096 TCPcu catoossl 3719: peer_certificate: pSSLhostname.17:46:00.022 P43412 T43096 TCPcu catoossl 3786: peer_certificate: pTxpiSSLParms->pSSLhostname = 0000000000000000.17:46:00.022 P43412 T43096 TCPcu catoossl 3788: peer_certificate: pSSLverifymachine.17:46:00.022 P43412 T43096 TCPcu catoossl 3797: peer_certificate: Name(DNS) <linux.broadcom.com> value(cert) <serverssl @ca.com>.17:46:00.022 P43412 T43096 TCPcu catoossl 3797: peer_certificate: Name(DNS) <linux.broadcom.com> value(cert) <hostname.ca.com>.17:46:00.022 P43412 T43096 TCPcu catoossl 3808: peer_certificate: ret_ok = 0 X509_free.17:46:00.022 P43412 T43096 TCPcu catoossl 3810: Error 31617:46:00.022 P43412 T43096 > TCPcu catoossl 3810: Txpi 316: TxpiSSL peer certificate: Certificate verification failed (DNS verify machine name mismatch) error 4serverssl @ca.com" and a second possibility "hostname.ca.com".emailAddress = linux.broadcom.com19:47:17.616 P40400 T24736 TCPcu catoossl 3788: peer_certificate: pSSLverifymachine.19:47:17.616 P40400 T24736 TCPcu catoossl 3797: peer_certificate: Name(DNS) < linux.broadcom.com > value(cert) < linux.broadcom.com >.This is currently detailed under XCOM for z/OS documentation but not under XCOM for distributed platforms documentation : XCOM™ Data Transport® for z/OS 12.0 > Installing > Complete Configuration Tasks > Implement SSL/TLS > Configure the System SSL Configuration File
The following SSL documentation for other platforms is being currently reviewed for further improvements:
XCOM Data Transport for UNIX/Linux 11.6.1 > Using > Generating TLS/SSL Certificates
XCOM Data Transport for UNIX/Linux 12.0 > Installing > Complete Configuration Tasks > Set Up TLS/SSL Mode
XCOM™ Data Transport® for Windows 12.0 > Installing > Complete Configuration Tasks > Set Up TLS/SSL Mode
XCOM™ Data Transport® for AS/400 11.0 > Administrating > Generating TLS/SSL Certificates
XCOM™ Data Transport® for HP NonStop 11.1 > Administrating > Generating TLS/SSL Certificates