Beruflich Dokumente
Kultur Dokumente
Tutorial
2. REQUIREMENTS ............................................................................. 2
5. ADVICE .......................................................................................... 28
With the secRT Demonstrator you will receive a preconfigured package for
evaluation of the security solution. Besides the components secRT and the SOA
Security Adapter, additionally there is a sample web service as well as a TCP
Monitor (TCPMon) included in the Demonstrator. This enables the rapid performance
of sample scenarios without set-up of additional infrastructure.
1
2. Requirements
The Demonstrator contains components requiring a Windows environment (e.g. Java
installation). Thus it is not possible to start the Demonstrator on other systems. The
secRT, of course, is platform independent and can be run on any system.
Please kindly ensure, that the following TCP Ports are not used on your test system:
Unpack the ZIP archive directly to C:\. Within the archive there is a predefined file
structure. After extracting the CORISECIO directory should display the following
structure:
2
For the start of all components a Batch file is used (startDemonstrator.cmd). Execute
this file to start the starter kit.
4. Sample scenario
To enable a quick evaluation of the solution, CORISECIO provides a Demo Web
Services as well as a TCP monitor.
The sample scenario protects an order process in a book shop. It sends two requests
to different recipients (Services).
The communication between the shop and the recipients is unencrypted in this initial
constellation.
This scenario is a segment of the example attended to in the BSI’s SOA Security
compendium. The following image displays the whole scenario.
3
Source: SOA Security compendium of the BSI
The order process is protected by the secRT. The protection is done between Web
Shop and merchant as well as between Web Shop and financial services provider.
The connection between Web Shop and warehouse is ignored here.
By using three Security Connectors the complete data set between Web Shop and
merchant as well as the payment information to the financial services provider are
protected.
4
Based on the five TCP monitors contained in the package the protection of the
connection may be simulated. Here the content of the first TCP monitor should
exemplarily be used for demonstration of the SOAP message and the elements to be
encrypted.
The Security connectors protect the connection using SAML authentication, XML
Signature and XML Encryption. In this scenario a message for two different recipients
is protected. On one hand, the whole data set for the merchant is encrypted and
signed and on the other hand the access data for the payment provider is especially
encrypted separately.
5
The first Security Connector (“order + payment encryption” in the diagram)
inserts a SAML authentication to the message. Then „paymentInformation“ is
encrypted using the certificate of the third Security Connector („payment
decryption“ in the diagram).
Subsequently the message (SOAP Envelope) is signed and encrypted. Here the
whole „Order“ element (see SOAP message graphic above) for the second Security
Connector („order decryption“ in the diagram) is encrypted. Then the message
is forwarded to the second Security Connector e.g. via the Internet.
Now the second Security Connector scans the SAML authentication, decrypts the
message and verifies the signature. The „paymentInformation“ data remains
encrypted. The message is forwarded to the merchant.
6
As only the way out is secured, always only the upper part of the TCP monitor is
relevant. In the following image this part is marked in red.
7
To obtain help for the use of the Demo scenario, you may move the mouse over the
button Demo Help ( ) on each page. Here a help for the required steps is
displayed on the respective page.
Start the book order with a click on „Start Demo“ in the middle of the window.
Chose one or more articles from the assortment and then confirm with „Add to
Shopping Cart“ at the end of the page (the maximum amount per item is limited
to 10).
8
Enter sample data in address and payment data request and confirm with „Send
Order“ (the credit card number must be a 16-digit number).
Then you will see the respective messages on the TCP monitors. Here this is shown
exemplarily using excerpts of the individual monitors. The other demo shop sites are
only for information purposes. By clicking on Send Order the operation is completed.
CORISECIO GmbH - Uhlandstr. 9 - 64927 Darmstadt - Germany - www.corisecio.com
9
TCP Monitor #1 (Tab Port 1900):
The message is unencrypted and all order information is visible. In the scenario this
TCP monitor is located between the web shop and the first CORISECIO Security
Connector. No security procedure has been executed yet.
After having been processed by the first CORISECIO Security Connector SAML
authentication information was added, the payment information and the complete
„Order“ element were encrypted. Additionally the message was applied with an
electronic signature. The following images show the individual elements within the
SAOP message.
10
SAML authentication information
Signature
Encryption
The whole „Order“ element has been encrypted. As described in the scenario, also
the „paymentInformation“ element was previously encrypted. This will be shown
in the next TCP monitor.
CORISECIO GmbH - Uhlandstr. 9 - 64927 Darmstadt - Germany - www.corisecio.com
11
TCP Monitor #3 (Tab Port 2300):
12
TCP Monitor #4 (Tab 2400):
Now, the payment data is being decrypted and may be processed by the payment
provider.
13
Finally you may call up a summary of the payment provider under
http://localhost:8080/WSDemo/pp
Please kindly note that the configured TCP monitors are not designed for long-term
usage or load tests. If protection of web services seems to be slow, you may
deactivate the TCP monitors. The required procedure is described in chapter 5.4.
You have successfully completed the prepared scenario. You may now see and edit
the Security Connector settings in the following chapter.
The three Security Connectors are accessible under the following addresses (see
scenario diagram):
https://localhost/consumer
https://localhost/provider
https://localhost/payment
CORISECIO GmbH - Uhlandstr. 9 - 64927 Darmstadt - Germany - www.corisecio.com
14
https://localhost/proxy
You may log-in with the password „secRT“ on the respective Security Connector.
Now choose Workflow Manager from the left-hand menu to see or edit the
respective Security Connectors.
15
Via the Workflow Manager several Workflows within a Connector may be
administrated. Therefore, the overview page of the available workflows is displayed
first. For the sample scenario only one workflow per connector is configured. Click on
the „Edit“ button after the name of the configured workflow each, to view the detail
configuration. The active workflows in the standard configuration are consumer,
provider and payment.
Hereafter the configurations of the individual Security Connectors from the sample
scenario are shown.
CORISECIO GmbH - Uhlandstr. 9 - 64927 Darmstadt - Germany - www.corisecio.com
16
„order + payment encryption“ Security Connector: consumer Workflow
17
„order decryption“ Security Connector: provider Workflow
18
„payment decryption“ Security Connector: payment Workflow
AppServer Listener #1
SetSecRTEntity
• Configuration of the entity name, the private key and the certificate.
ExtractFromRequest
CORISECIO GmbH - Uhlandstr. 9 - 64927 Darmstadt - Germany - www.corisecio.com
19
• Extracting of a SOAP message from an HTTP-Request
encryptXPathForCertificate
SignSOAPEnvelopeWithXPath
EnvelopeInRequest
Proxy
decryptXPath
verifySOAPEnvelope
• Verification of signature
20
2. Log-in at the secRT using the password secRT.
4. Activate the checkbox at the Workflow provider and select Edit from the
action bar.
5. Add the following functions in the area Workflow Sequence using the Drop-
Down Box Function:
• ExtractFromResponse
• EncryptXPathForCertificate
• EnvelopeInResponse
21
8. Copy the following text to the text field Configure XPath (via the XPath is
defined which element will be encrypted):
//*[local-name() = 'OrderingResult']
10. Activate the checkbox at Workflow provider and select Activate / Deactivate
from the action bar. In doing so, the workflow with the updated values is
loaded.
14. Activate the checkbox at the Workflow consumer and select Edit from the
action bar.
15. Add the following functions using the Drop-Down Box Functions:
CORISECIO GmbH - Uhlandstr. 9 - 64927 Darmstadt - Germany - www.corisecio.com
22
• ExtractFromResponse
• DecryptXPath
• EnvelopeInResponse
17. Copy the following text to the text field Configure XPath (via the XPath is
defined which element will be encrypted):
//*[local-name() = 'OrderingResult']
23
19. Activate the checkbox at the workflow consumer and select Activate /
Deactivate from the action bar. With this action the workflow with the updated
values is loaded.
The configuration of the encryption is now completed. With this configuration also
the return path between the secRT entities consumer and provider is protected.
The result can be seen on Port 2100 on the TCP monitor; now attention must be
paid to the lower part of the TCP monitor.
24
2. Click Admin on the menu bar and select Import / Export.
9. After completion of the order process please call up the following address
http://localhost:8080/WSDemo/fa to view the turnover tax advance
return.
25
Short description of the used functions:
ExtractFromRequest
XMLValueToExecutionVariable
• Reading of an XML variable (order value) from the order and saving in a
variable.
26
CreateSOAPMessageFromWSDL
SetValueOfXPath
Envelope in Request
Proxy
27
5. Advice
In this chapter you will find information to solve potential problems.
28
5.1.3. SSL connection with Mozilla Firefox
When accessing the secRT entities or the demo web shop a notification in Firefox
appears that the connection is not to be trusted.
29
The button „Add Exception“ appears in Firefox. Please click this button. A dialog for
Adding of security exception rules is opened.
30
• In the row keystoreFile replace the entry secrt.p12 with the file you
require.
• In the row keystorePass replace the password for the P12 file.
For this open the file with a text editor of your choice and search for the value „set
JAVA_OPTS=%JAVA_OPTS%“. In this row increase the maximum heap size value (-
Xmx1536M) to increase the RAM limit to 1536 Megabyte. Please kindly note that the
limit for 32 bits operating systems is 1600 MB.
Example:
Please ensure that the Xmx entry as well as the MaxPermsize Parameter (-
Xmx1536M -XX:MaxPermSize=256m) are set at your Apache Tomcat entity.
31
For this it is required to terminate the TCP monitors and to activate each workflow
with the add-on (no TCP Monitor) in the three secRT entities.
Additionally you have to terminate the Apache Tomcat and to replace the content of
the file C:\CORISECIO\Tomcat\webapps\WSDemo\config.xml with the content
of the file config_withoutTCPMonitor.xml in the same directory. Afterwards
restart the demonstrator with C:\CORISECIO\startDemonstrator.cmd.
Please kindly note that the TCP monitors are called up automatically at each re-start
of the demonstrator. This can be changed by deleting the row start tcpmon.bat
in the file C:\CORISECIO\startDemonstrator.bat.
To re-use the TCP monitors, act as follows: in the three secRT entities the workflows
have to be reset to the initial state. Please stop the Apache Tomcat entity and
replace the content of the file
C:\CORISECIO\Tomcat\webapps\WSDemo\config.xml with the content of the
file config_withTCPMonitor.xml in the same directory. Then start the demonstrator by
calling the file C:\CORISECIO\startDemonstrator.cmd.
32