23.02.2013 Views

TEC Workbook - IBM

TEC Workbook - IBM

TEC Workbook - IBM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>IBM</strong> Software<br />

__17. For Incoming WSS, select: DecryptAndVerify<br />

__18. Click the Aut button to hide the authorization security settings.<br />

__19. Click the green submit button to submit the request to ProductServiceProxy. Look closely at the<br />

response. This time, soapUI was able to decrypt the contents of the SOAP body.<br />

__20. Look back at the probe window; click the Refresh button. You should see two transactions in the<br />

list. Feel free to inspect the new transactions that include the encryption steps.<br />

3.3.2 Field Level Encryption<br />

In the previous steps, you saw how to encrypt the entire SOAP body. In some circumstances, it may be<br />

preferable to encrypt only specific elements.<br />

Now you’ll modify the encrypt action so that only the tag will be encrypted.<br />

__1. Reopen the policy editor by clicking on the ellipsis button in the Multi-Protocol Gateway Policy<br />

field.<br />

__2. In the configured rules section at the bottom, click on the Server to Client rule to make it the<br />

active rule in the editor.<br />

__3. Double click the encrypt action to open its configuration settings.<br />

__4. In the Message Type section, choose Selected Elements (Field-Level). When you make this<br />

selection, a new field, Document Crypto Map will appear.<br />

The Document Crypto Map is used to tell the encrypt action which element(s) are to be encrypted. Since<br />

the document will be in XML, the most natural way of selecting the target elements is with XPath<br />

expressions. The Document Crypto Map represents a collection of XPath expressions which identify the<br />

elements to be encrypted.<br />

__5. Click the plus (+) button next to the Document Crypto Map dropdown.<br />

__6. For the Name field, type: MyCryptoMap<br />

__7. For the Operation, make sure Encrypt (WS-Security) is selected.<br />

__8. In the XPath Expression field, type: //*[local-name()='benefits']<br />

__9. Click the Add button to add this XPath to the list of expressions.<br />

__10. Click the Apply button.<br />

Page 66 WebSphere Lab Jam

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!