When the TREX name server sends a request to the TREX Web server, it also transmits the public information for its certificate. The TREX Web server uses this information to authenticate the TREX name server.
You must have entered the owner and issuer of the client certificate of the TREX name server into one of the following configuration files, depending on your operating system and Web server:
The TREX Web server compares the information transmitted with the information in the configuration file, and only forwards requests from clients that it recognizes. If the Web server receives a request from a client that it does not recognize, it sends the request back. You can enter more than one client certificate into the relevant configuration file.
Entering the Owner and Issuer of the Client Certificate in the TREXcert.ini File (IIS/Windows)
For security reasons, you should protect the TREXcert.ini configuration file on Windows with operating system methods. For example, you can dictate that only certain users can read the file.
[WEBSERVERCERTIFICATE1]
subject=
issuer=
You can get this information from the SAPSSLS.pse keystore with the following SAPGENPSE command:
sapgenpse get_my_name -p SAPSSLS.pse
[WEBSERVERCERTIFICATE2]
subject=CN=myhost.mydomain, OU=mydepartment, O=mycompany, L=mycity, ST=mystate, C=m country, EMail=myaccount@mydomain
issuer=CN=My Certificate Authority (CA), OU=CertificateCenter, O=CA Company, L=CA City, ST=CA State, C=CA Country, EMail=caaccount@ cacompany.com
You already entered the specifications for subject and issuer for the TREX Java client in the configuration file TREXcert.ini when configuring secure communication between the TREX Web server and the TREX Java client, thereby authenticating the TREX Java client with the TREX Web server (see Authenticating the TREX Java Client). You have now added the TREX name server as an additional communication partner of the TREX Web server in the [WEBSERVERCERTIFICATE2] section.
Several names are permitted for the following information in the configuration file:
Information | Name in TREXcert.ini |
---|---|
State |
ST= and S= |
E-mail Address |
E-Mail= and E= |
The other names need to be entered into the configuration file exactly as they appear in the keystore, that is, 0= is the organization, L= is the location, and so on.
issuer=E=caaccount@ cacompany.com, C=CA Country, ...
Enter the owner and issuer of the client certificate in httpd.conf (Apache/UNIX)
cd <TREX_Directory>/Apache/conf
Make a backup copy of the httpd.conf configuration file in case you decide in the future that you no longer want to run the Apache Web server over a secure connection.
<Location /TREX>
SetHandler trex-handler
# usage of SSLRequire:
# standard apache example:
# SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
# and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
# and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
# and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
# and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \
# or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
# SAP EP example
# SSLRequire (%{SSL_CLIENT_S_DN} eq "/C=DE/ST=BW/L=Walldorf/O=SAP Portals/OU=TREX/CN=p54896 client/Email=andreas.mustermann@sap.com" and \%{SSL_CLIENT_I_DN} eq "/C=DE/ST=BW/L=Walldorf/O=SAP Portals/OU=TREX/CN=CA TREX/Email=andreas.mustermann@sap.com" )
</Location>
Make sure that you use the backslash (\) to divide lines that are too long.
You already entered the specifications for subject and issuer for the TREX Java client in the Apache Web server configuration file httpd.conf when configuring secure communication between the TREX Web server and the TREX Java client, thereby authenticating the TREX Java client with the TREX Web server (see Modifying the Configuration File of the Apache Web Server).
SSLRequire (%{SSL_CLIENT_S_DN} eq "<Owner(Subject)>" and %{SSL_CLIENT_I_DN} eq "<Issuer(Issuer)>")
(Subject/Issuer Java client)or (Subject/Issuer name server)
(%{SSL_CLIENT_S_DN} eq "/C=DE/ST=Baden Wuerttemberg/L=Walldorf/O=SAP AG/OU=TREX/CN=TREX Java Client/Email=my.account@sap.com" and %{SSL_CLIENT_I_DN} eq "/C=DE/ST=BadenWuerttemberg/L=Walldorf/O=CA Company/OU=Certificate Center/CN=My Certificate Authority/Email=ca.account@ca-company.com" )
or\
(%{SSL_CLIENT_S_DN} eq "/C=DE/ST=Baden Wuerttemberg/L=Walldorf/O=SAP AG/OU=TREX/CN=TREX Java Client/Email=my.account@sap.com" and %{SSL_CLIENT_I_DN} eq "/C=DE/ST=BadenWuerttemberg/L=Walldorf/O=CA Company/OU=Certificate Center/CN=My Certificate Authority/Email=ca.account@ca-company.com" )
You find the information on the owner and issuer of the client certificate in the SAPSSLS.pse keystore using the following SAPGENPSE command:
sapgenpse get_my_name -p SAPSSLS.pse
Note that you have to enter the owner and issuer in two different places in httpd.conf. There is a tag <Location /trex> tag (TREX in lowercase) and a <Location /TREX> tag (TREX in uppercase).
Result
You have configured secure communication using HTTPS between the TREX name server and the TREX Web server.