Configuring Logon with X.509 Certificates with Asymmetric Encryption and Signature (AS Java) 
This procedure provides a detailed process of all necessary steps to secure Web Services with asymmetric encryption and signature and to set up the authentication of the users using the X.509 client certificate. This example uses two AS Java systems and individual SOA Management configuration. Use this procedure to set up the trust relationship between the systems so that the WS provider trusts the WS consumer. To do this, you need to prepare the use of both signatures and encryption as described below.
Note
To prepare the use of signatures and encryption, the certificate System-cert is always exported, by default. In this partner system, this is then imported for signatures into the keystore view WebServiceSecurity and for encryption into the keystore view WebServiceSecurity_Certs.
The systems are set up to use X.509 client certificates, and the prerequisites described in Maintaining the User's Certificate Infomration have been fulfilled.
Prepare the signature for the WS consumer query. Create the trust relationship through which the WS provider trusts the WS consumer.
In the WS consumer, export the System-cert certificate from the keystore view WebServiceSecurity to a file:
In the WS consumer, in SAP NetWeaver Administrator, choose .
Select the keystore view WebServiceSecurity.
Under Details of the Keystore View, select the encryption certificate System-cert.
Choose Export to a File.
Specify Base64 X.509 as the export format.
Choose Download.
Choose Save, and enter a name for the file (such as System_cert_<SID>).
In the WS provider, import the WS consumer's certificate System_cert_<SID> into the keystore view WebServiceSecurity.
In SAP NetWeaver Administrator, choose .
Select the keystore view WebServiceSecurity.
Choose Import from File.
Choose the entry type X.509 certificate.
Specify the path to the certificate file System_cert_<SID>.cert, and choose Import.
Once the certificate has been successfully checked, the user to which the certificate is assigned is looged on.
In the WS provider, in the SAP NetWeaver Administrator choose .
Find the service user to be used, under iwhich the Web service is to be executed, and select it in the results list.
Switch to edit mode, and upload the consumer's certificate (such as System_cert_<Consumer-SID) on the Certificates tab page.
Note
If the Certificates tab page is not displayed, check the UME parameter ume.logon.allow.cert.
To assign the certificate, save the user.
Prepare the signature for the WS provider. Create the trust relationship through which the WS consumer trusts the WS provider.
In the WS provider, export the System-cert certificate from the keystore view WebServiceSecurity to a file:
In the WS provider, in SAP NetWeaver Administrator, choose .
Select the keystore view WebServiceSecurity.
Under Details of the Keystore View, select the encryption certificate System-cert.
Choose Export to a File.
Specify Base64 X.509 as the export format.
Choose Download.
Choose Save, and enter a name for the file (such as System_cert_<SID>).
In the WS consumer, import the WS provider's certificate System_cert_<SID> into the keystore view WebServiceSecurity.
In SAP NetWeaver Administrator, choose .
Select the keystore view WebServiceSecurity.
Choose Import from File.
Choose the entry type X.509 certificate.
Specify the path to the certificate file System_cert_<SID>.cert, and choose Import.
Import the WS provider's certificate (by default, System-cert) into the keystore view WebServiceSecurity_Certs of the WS consumer:
In SAP NetWeaver Administrator, choose .
Select the keystore view WebServiceSecurity_Certs.
Choose Import from File.
Choose the entry type X.509 certificate.
Specify the path to the certificate file System_cert_<SID>.cert, and choose Import.
In the SAP NetWeaver Administrator Administartor of the WS provider, choose , and then the tab page Service Definitions.
Find the service that is to be accessed using an X.509 client certificate and for which you now want an endpoint, and select it in the list of search results.
On the Configuration tab page, select the Runtime Configuration radio button.
Start the configuration assistant by choosing the New button, and enter the following information in the relevant steps:
In step 1, specify the name of the new endpoint (such as ASYM_X509), and choose whether you want to add this to an existing service or to a new service to be created.
In step 2, set the options for security at transport and at message level:
For Transport Protocol, choose the HTTP radio button
For Authentication Message Authentication, check teh X.509 Client Certificate checkbox
Under Message Security, check the Require Signature, Add Signature, Require Encryption, and Add Encryption
Choose Details.
Under Outbound Signature, specify the keystore view (by default, WebServiceSecurity) and the signature certificate (by default, System-key) of your own system, which you have imported into the WS consumer as the basis of the trust relationship.
Under Outbound Encryption, select the option Use the Signature Certificate of the Inbound Request.
Since the WS consumer includes the signature certificate with the signature, the WS provider can use this certificate to encrypt the response.
Note
The additional Assistant steps are not absolutely necessary for this example configuration.
Choose Finish.
On the WSDLs tab page, select the endpoint that you created above (for example, ASYM_X509), and call up its WSDL document.
In the SAP NetWeaver Administrator of the WS consumer, choose , and then the Consumer Proxies tab page.
Find the consumer proxy through which the service endpoint is to be accessed and for which you want to create a logical endpoint, and select the proxy in the list of search results.
On the Configuration tab page, select the Runtime Configuration radio button.
Start the configuration assistant by choosing the New button, and enter the following information in the relevant steps:
In step 1, choose Import from WSDL-URL to import the logical endpoint from the WSDL document that you called in the WS provider.
In step 2, in the WS provider, copy the WSDL of the endpoint that you created above (for example, ASYM_X509) from the WSDLs tab page, and insert this in the WS consumer in the WSDL URL field.
In step 3, specify the endpoint created in the WS provider.
In step 4, specify a name for the logical port.
In step 5, customize the security settings. To do this, under Message Security, choose the Details button.
Under Outbound Signature, specify the keystore view (by default, WebServiceSecurity) and the signature certificate (by default, System-key) of your own system, which you have imported into the WS provider as the basis of the trust relationship.
Under Outbound Encryption, specify the keystore view (by default, WebServiceSecurity_Certs) and the certificate (as imported above, System_cert_<SID>) of the provider system.
Note
The sequence of Assistant steps depends on your entries. For this example configuration, we have made only the necessary settings, and not the optional settings.
Choose Finish.