09.12.2012 Views

Download PDF - IBM Redbooks

Download PDF - IBM Redbooks

Download PDF - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Security in WebSphere<br />

Application Server Version 6.1<br />

and J2EE 1.4 on z/OS<br />

WAS and J2EE security concepts and<br />

their implementation on z/OS<br />

Security integration scenarios,<br />

including SPNEGO and CSIv2<br />

Web services security<br />

and SSL in WAS V6.1<br />

ibm.com/redbooks<br />

Front cover<br />

Alex Louwe Kooijmans<br />

Yukari Hanya<br />

Keith Jabcuga<br />

Marc van der Meer<br />

Eran Yona<br />

Gabriel Mogos<br />

Foulques de Valence


International Technical Support Organization<br />

Security in WebSphere Application Server Version<br />

6.1 and J2EE 1.4 on z/OS<br />

December 2007<br />

SG24-7384-00


Note: Before using this information and the product it supports, read the information in<br />

“Notices” on page xi.<br />

First Edition (December 2007)<br />

This edition applies to WebSphere Application Server Version 6.1 for z/OS.<br />

© Copyright International Business Machines Corporation 2007. All rights reserved.<br />

Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP<br />

Schedule Contract with <strong>IBM</strong> Corp.


Contents<br />

Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi<br />

Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii<br />

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii<br />

The team that wrote this book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii<br />

Become a published author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi<br />

Comments welcome. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi<br />

Chapter 1. Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1<br />

1.1 Securing WAS for z/OS simplified. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2<br />

1.2 WAS and security layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3<br />

1.2.1 Security terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3<br />

1.2.2 Security layering overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4<br />

1.2.3 z/OS security overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6<br />

1.2.4 Java security overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9<br />

1.2.5 WebSphere security overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11<br />

1.3 Securing WAS and applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12<br />

1.3.1 WAS and security checkpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12<br />

1.3.2 Web client authentication overview. . . . . . . . . . . . . . . . . . . . . . . . . . 15<br />

1.3.3 EJB client authentication overview . . . . . . . . . . . . . . . . . . . . . . . . . . 18<br />

1.3.4 MQ client authentication overview . . . . . . . . . . . . . . . . . . . . . . . . . . 19<br />

1.3.5 Web services security overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20<br />

1.3.6 Backend connectivity security overview . . . . . . . . . . . . . . . . . . . . . . 22<br />

1.3.7 User registry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24<br />

1.3.8 Authorization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25<br />

Chapter 2. WebSphere security design. . . . . . . . . . . . . . . . . . . . . . . . . . . . 27<br />

2.1 Chapter objectives. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28<br />

2.2 Network protocol architecture overview . . . . . . . . . . . . . . . . . . . . . . . . . . 29<br />

2.3 SSL overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30<br />

2.3.1 SSL handshake. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30<br />

2.4 Authorization and EJB roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33<br />

2.5 Our scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33<br />

2.5.1 Scenario 1 - authentication in HTTP server . . . . . . . . . . . . . . . . . . . 34<br />

2.5.2 Scenario 2 - authentication in reverse proxy security server . . . . . . 37<br />

2.5.3 Scenario 3 - J2EE client authentication using CSIv2 . . . . . . . . . . . . 40<br />

2.5.4 Scenario 4 - J2EE server authentication using CSIv2 . . . . . . . . . . . 43<br />

2.5.5 Scenario 5 - JCA custom principal mapping . . . . . . . . . . . . . . . . . . . 46<br />

2.5.6 Scenario 6 - Web services authentication. . . . . . . . . . . . . . . . . . . . . 51<br />

© Copyright <strong>IBM</strong> Corp. 2007. All rights reserved. iii


2.5.7 Scenario 7 - WMQ client authentication . . . . . . . . . . . . . . . . . . . . . . 53<br />

2.5.8 Scenario 8 - authorization using external authorization server . . . . . 56<br />

2.5.9 Scenario 9 - bridged security between z/OS and distributed using JAAS<br />

58<br />

2.5.10 Scenario 10 - centralized user registry using LDAP on z/OS . . . . . 60<br />

Chapter 3. Web container security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63<br />

3.1 Web authentication improvements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64<br />

3.1.1 Separate Web authentication and authorization . . . . . . . . . . . . . . . . 64<br />

3.1.2 Web authentication enhanced control. . . . . . . . . . . . . . . . . . . . . . . . 64<br />

3.2 Implementation with the admin console . . . . . . . . . . . . . . . . . . . . . . . . . . 65<br />

3.2.1 General settings at the cell level . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65<br />

3.2.2 Control server level Web authentication behavior. . . . . . . . . . . . . . . 67<br />

3.3 Why you should use these options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69<br />

Chapter 4. Application security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71<br />

4.1 Administrative security enablement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72<br />

4.2 Application security enablement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72<br />

Chapter 5. Web services security introduction . . . . . . . . . . . . . . . . . . . . . 75<br />

5.1 SOA, Web services, z/OS, and security . . . . . . . . . . . . . . . . . . . . . . . . . . 76<br />

5.2 Web services security exposures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77<br />

5.3 Web services message and transport security . . . . . . . . . . . . . . . . . . . . . 78<br />

5.3.1 When to use message layer security . . . . . . . . . . . . . . . . . . . . . . . . 80<br />

5.3.2 When to use transport layer security. . . . . . . . . . . . . . . . . . . . . . . . . 80<br />

5.4 Web services message layer security with WS-Security. . . . . . . . . . . . . . 81<br />

5.4.1 End-to-end security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81<br />

5.4.2 WS-Security standard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82<br />

5.4.3 WS-Security support in WebSphere . . . . . . . . . . . . . . . . . . . . . . . . . 83<br />

5.4.4 WS-I basic security profile support . . . . . . . . . . . . . . . . . . . . . . . . . . 84<br />

5.4.5 WS-Security high-level architecture . . . . . . . . . . . . . . . . . . . . . . . . . 85<br />

5.4.6 Message authentication, integrity, confidentiality, ID assertion. . . . . 86<br />

5.5 Web services transport layer security . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90<br />

5.5.1 Web services transports introduction . . . . . . . . . . . . . . . . . . . . . . . . 90<br />

5.5.2 Point-to-point security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93<br />

5.5.3 The HTTP(S) transport protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93<br />

5.5.4 JMS transport security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97<br />

5.5.5 RMI-IIOP security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98<br />

5.5.6 Enterprise Service Bus security . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98<br />

5.6 Our SecurityInfo Web service application and environment . . . . . . . . . . . 98<br />

5.6.1 SecurityInfo J2EE architecture in our environment . . . . . . . . . . . . . . 99<br />

5.6.2 Our test environment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100<br />

5.6.3 SecurityInfo Web service implementation . . . . . . . . . . . . . . . . . . . . 100<br />

5.6.4 SecurityInfo deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101<br />

iv Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


5.6.5 SecurityInfo in action. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104<br />

Chapter 6. Web services message layer security . . . . . . . . . . . . . . . . . . 107<br />

6.1 How to configure Web services message layer security . . . . . . . . . . . . . 108<br />

6.1.1 Web services message layer security and WS-Security. . . . . . . . . 108<br />

6.1.2 Web services message layer security configuration tools. . . . . . . . 109<br />

6.1.3 Web services message layer security configuration files . . . . . . . . 110<br />

6.1.4 Web services message-layer security configuration components . 114<br />

6.2 Authentication with a security token . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115<br />

6.2.1 Authentication support with WS-Security . . . . . . . . . . . . . . . . . . . . 116<br />

6.2.2 Authentication scenario description . . . . . . . . . . . . . . . . . . . . . . . . 117<br />

6.2.3 Authentication configuration overview. . . . . . . . . . . . . . . . . . . . . . . 118<br />

6.2.4 Configuring the Web service requestor for security token . . . . . . . 119<br />

6.2.5 Configuring the z/OS Web service provider for security token . . . . 123<br />

6.2.6 Validating authentication with a security token . . . . . . . . . . . . . . . . 129<br />

6.3 Integrity with XML digital signature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131<br />

6.3.1 Integrity support with WS-Security . . . . . . . . . . . . . . . . . . . . . . . . . 131<br />

6.3.2 Integrity scenario description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132<br />

6.3.3 Integrity configuration overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . 133<br />

6.3.4 Configuring the requestor for request XML digital signature. . . . . . 135<br />

6.3.5 Configuring the z/OS provider for request XML digital signature . . 146<br />

6.3.6 Configuring the z/OS provider for response XML digital signature . 154<br />

6.3.7 Configuring the requestor for response XML digital signature . . . . 159<br />

6.3.8 Validating integrity with XML digital signature. . . . . . . . . . . . . . . . . 159<br />

6.4 Confidentiality with XML encryption . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164<br />

6.4.1 Confidentiality support with WS-Security . . . . . . . . . . . . . . . . . . . . 165<br />

6.4.2 Confidentiality scenario description. . . . . . . . . . . . . . . . . . . . . . . . . 165<br />

6.4.3 Confidentiality scenario key prerequisites. . . . . . . . . . . . . . . . . . . . 167<br />

6.4.4 Confidentiality configuration overview. . . . . . . . . . . . . . . . . . . . . . . 171<br />

6.4.5 Configuring the requestor for request XML encryption . . . . . . . . . . 172<br />

6.4.6 Configuring the z/OS provider for request XML encryption. . . . . . . 178<br />

6.4.7 Configuring the z/OS provider for response XML encryption . . . . . 183<br />

6.4.8 Configuring the z/OS requestor for response XML encryption . . . . 185<br />

6.4.9 Validating confidentiality with XML encryption . . . . . . . . . . . . . . . . 188<br />

6.4.10 Confidentiality using hardware cryptography . . . . . . . . . . . . . . . . 192<br />

6.5 Identity assertion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192<br />

6.5.1 Identity assertion support with WS-Security . . . . . . . . . . . . . . . . . . 193<br />

6.5.2 Identity assertion scenario description . . . . . . . . . . . . . . . . . . . . . . 194<br />

6.5.3 Identity assertion configuration overview . . . . . . . . . . . . . . . . . . . . 195<br />

6.5.4 Configuring the Web service requestor for identity assertion . . . . . 196<br />

6.5.5 Configuring the z/OS Web service provider for identity assertion. . 199<br />

6.5.6 Configuring the trust relationship for identity assertion . . . . . . . . . . 203<br />

6.5.7 Validating identity assertion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204<br />

Contents v


Chapter 7. Secure Sockets Layer (SSL) . . . . . . . . . . . . . . . . . . . . . . . . . . 209<br />

7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210<br />

7.2 Centrally managed SSL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210<br />

7.3 WebSphere V6.1 for z/OS SSSL to JSSE changes . . . . . . . . . . . . . . . . 213<br />

7.4 SSL RACF certificate management . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214<br />

7.4.1 Viewing certificates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215<br />

7.4.2 Monitoring certificate expiration . . . . . . . . . . . . . . . . . . . . . . . . . . . 218<br />

7.4.3 Importing certificates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220<br />

7.4.4 Exporting certificates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220<br />

7.4.5 Deleting certificates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221<br />

7.4.6 Deleting keystores and truststores . . . . . . . . . . . . . . . . . . . . . . . . . 222<br />

7.5 Hardware crypto and Java crypto providers . . . . . . . . . . . . . . . . . . . . . . 222<br />

7.5.1 Choosing a JCE provider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223<br />

7.5.2 Admin console keystore types . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224<br />

7.5.3 Keystores and truststores . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226<br />

7.6 <strong>IBM</strong>JCECCA and <strong>IBM</strong>JCE characteristics . . . . . . . . . . . . . . . . . . . . . . . 227<br />

7.7 SSL and JCERACFKS keystore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229<br />

7.7.1 Keyring and certificate setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229<br />

7.7.2 WebSphere admin console setup . . . . . . . . . . . . . . . . . . . . . . . . . . 230<br />

7.8 Hardware crypto using a JCECCARACFKS keystore. . . . . . . . . . . . . . . 233<br />

7.8.1 Keyring and certificate setup with keys in hardware . . . . . . . . . . . . 234<br />

7.8.2 Installing the unrestricted Java policy jars. . . . . . . . . . . . . . . . . . . . 236<br />

7.8.3 Update the java.security file with the <strong>IBM</strong>JCECCA provider. . . . . . 236<br />

7.8.4 Admin console setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237<br />

7.9 SSL troubleshooting and traces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239<br />

7.9.1 Diagnostic steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240<br />

7.9.2 SSL traces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241<br />

7.9.3 Common errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242<br />

Chapter 8. Web services transport security . . . . . . . . . . . . . . . . . . . . . . . 245<br />

8.1 Authentication with HTTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246<br />

8.1.1 HTTP basic authentication scenario description . . . . . . . . . . . . . . . 246<br />

8.1.2 Configuring the z/OS Web service provider with authentication . . . 247<br />

8.1.3 Configuring the Web service requestor to authenticate . . . . . . . . . 249<br />

8.1.4 Validating transport security using HTTP basic authentication . . . . 250<br />

8.2 Integrity with SSL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252<br />

8.2.1 Integrity with SSL scenario description . . . . . . . . . . . . . . . . . . . . . . 252<br />

8.2.2 Integrity scenario prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253<br />

8.2.3 Configuring the z/OS Web service provider SSL configuration. . . . 255<br />

8.2.4 Configuring the Web service requestor SSL configuration . . . . . . . 261<br />

8.2.5 Configuring the z/OS Web service provider for integrity . . . . . . . . . 264<br />

8.2.6 Configuring the Web service requestor for integrity . . . . . . . . . . . . 264<br />

8.2.7 Validating integrity with SSL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265<br />

vi Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


8.3 Confidentiality with SSL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268<br />

8.3.1 Confidentiality with SSL scenario description . . . . . . . . . . . . . . . . . 268<br />

8.3.2 Configuring the z/OS Web service provider SSL configuration. . . . 269<br />

8.3.3 Configuring the Web service requestor SSL configuration . . . . . . . 269<br />

8.3.4 Configuring the z/OS Web service provider for confidentiality . . . . 269<br />

8.3.5 Configuring the Web service requestor for confidentiality. . . . . . . . 269<br />

8.3.6 Validating confidentiality with SSL . . . . . . . . . . . . . . . . . . . . . . . . . 271<br />

8.4 Confidentiality with SSL using hardware crypto . . . . . . . . . . . . . . . . . . . 272<br />

8.4.1 Confidentiality with SSL using hardware crypto prerequisites . . . . 272<br />

8.4.2 Installing the unrestricted Java policy jars. . . . . . . . . . . . . . . . . . . . 275<br />

8.4.3 Updating the JVM to use the <strong>IBM</strong>JCECCA provider . . . . . . . . . . . . 275<br />

8.4.4 Configuring the z/OS Web service provider SSL configuration. . . . 276<br />

8.4.5 Configuring the Web service requestor SSL configuration . . . . . . . 280<br />

8.4.6 Configuring the z/OS Web service provider for confidentiality . . . . 281<br />

8.4.7 Configuring the Web service requestor for confidentiality. . . . . . . . 281<br />

8.4.8 Validating confidentiality with SSL using hardware crypto . . . . . . . 281<br />

8.5 Confidentiality and basic authentication . . . . . . . . . . . . . . . . . . . . . . . . . 282<br />

8.6 Confidentiality and client certificate authentication . . . . . . . . . . . . . . . . . 282<br />

8.6.1 Confidentiality and client certificate scenario description . . . . . . . . 283<br />

8.6.2 Confidentiality and client certificate prerequisites . . . . . . . . . . . . . . 283<br />

8.6.3 Configuring the z/OS Web service provider SSL configuration. . . . 287<br />

8.6.4 Configuring the Web service requestor SSL configuration . . . . . . . 288<br />

8.6.5 Configuring z/OS Web service provider for authentication . . . . . . . 289<br />

8.6.6 Validating client certificate authentication . . . . . . . . . . . . . . . . . . . . 291<br />

Chapter 9. Security attribute propagation and CSIv2 . . . . . . . . . . . . . . . 293<br />

9.1 Introduction, logins, and tokens. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294<br />

9.1.1 Security attribute propagation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294<br />

9.1.2 Initial login versus propagation login . . . . . . . . . . . . . . . . . . . . . . . . 295<br />

9.1.3 Token framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297<br />

9.2 Horizontal attribute propagation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298<br />

9.2.1 Horizontal attribute propagation description . . . . . . . . . . . . . . . . . . 298<br />

9.2.2 Horizontal attribute propagation in action . . . . . . . . . . . . . . . . . . . . 300<br />

9.2.3 Horizontal attribute propagation implementation. . . . . . . . . . . . . . . 301<br />

9.2.4 Cross-cell considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302<br />

9.3 CSIv2 standard identity assertion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305<br />

9.3.1 CSIv2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305<br />

9.3.2 CSIv2 standard identity assertion description . . . . . . . . . . . . . . . . . 307<br />

9.3.3 CSIv2 standard identity assertion in action . . . . . . . . . . . . . . . . . . . 309<br />

9.3.4 CSIv2 standard identity assertion implementation . . . . . . . . . . . . . 310<br />

9.3.5 Our CSIv2 identity assertion scenario. . . . . . . . . . . . . . . . . . . . . . . 321<br />

9.4 Vertical attribute propagation with CSIv2 . . . . . . . . . . . . . . . . . . . . . . . . 328<br />

9.4.1 Vertical attribute propagation with CSIv2 description . . . . . . . . . . . 328<br />

Contents vii


9.4.2 Vertical attribute propagation versus CSIv2 identity assertion . . . . 329<br />

9.4.3 Vertical attribute propagation with CSIv2 in action . . . . . . . . . . . . . 330<br />

9.4.4 Vertical attribute propagation with CSIv2 implementation. . . . . . . . 331<br />

9.4.5 Cross-cell considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334<br />

Chapter 10. User registries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335<br />

10.1 Introduction to user registries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336<br />

10.2 Our scenario and our environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339<br />

10.3 Standalone LDAP registry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340<br />

10.3.1 WebSphere and z/OS LDAP SDBM back end (RACF). . . . . . . . . 341<br />

10.3.2 WebSphere and z/OS LDAP TDBM back end (DB2) . . . . . . . . . . 350<br />

10.3.3 WebSphere and z/OS LDAP TDBM native authentication . . . . . . 359<br />

10.4 Federated repositories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363<br />

10.4.1 What federated repositories are . . . . . . . . . . . . . . . . . . . . . . . . . . 363<br />

10.4.2 Our federated repositories scenario . . . . . . . . . . . . . . . . . . . . . . . 366<br />

10.4.3 Federated z/OS LDAP with TDBM back end (DB2) . . . . . . . . . . . 368<br />

10.4.4 Federated z/OS LDAP TDBM native authentication . . . . . . . . . . . 373<br />

10.4.5 Federated <strong>IBM</strong> Tivoli Directory Server . . . . . . . . . . . . . . . . . . . . . 375<br />

10.5 z/OS local operating system registry. . . . . . . . . . . . . . . . . . . . . . . . . . . 382<br />

10.5.1 System Authorization Facility (SAF) authorization . . . . . . . . . . . . 383<br />

10.5.2 OS thread security support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386<br />

10.5.3 Thread identity support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389<br />

Chapter 11. SPNEGO and Windows single sign-on. . . . . . . . . . . . . . . . . 391<br />

11.1 Introducing the SPNEGO TAI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392<br />

11.1.1 An introduction to Kerberos. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392<br />

11.1.2 An introduction to trust association interceptor (TAI) . . . . . . . . . . 395<br />

11.1.3 An introduction to SPNEGO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396<br />

11.1.4 The WebSphere SPNEGO TAI . . . . . . . . . . . . . . . . . . . . . . . . . . . 396<br />

11.2 Designing single sign-on with Microsoft Windows domain . . . . . . . . . . 397<br />

11.2.1 Single sign-on with Microsoft Windows KDC only. . . . . . . . . . . . . 397<br />

11.2.2 Single sign-on with z/OS KDC and Microsoft Windows KDC . . . . 399<br />

11.3 Implementing single sign-on using SPNEGO TAI . . . . . . . . . . . . . . . . . 400<br />

11.3.1 Our environment and our scenario . . . . . . . . . . . . . . . . . . . . . . . . 401<br />

11.3.2 Configuring the Microsoft Windows server . . . . . . . . . . . . . . . . . . 404<br />

11.3.3 Configuring WebSphere Application Server for z/OS . . . . . . . . . . 412<br />

11.3.4 Configuring the Web browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419<br />

11.3.5 Tips for troubleshooting the SPNEGO TAI configuration . . . . . . . 422<br />

11.4 Validating single sign-on using the SPNEGO TAI. . . . . . . . . . . . . . . . . 424<br />

Chapter 12. Operating system security. . . . . . . . . . . . . . . . . . . . . . . . . . . 429<br />

12.1 Out-of-the-box administrative security. . . . . . . . . . . . . . . . . . . . . . . . . . 430<br />

12.1.1 Cell-wide common user groups and IDs . . . . . . . . . . . . . . . . . . . . 430<br />

12.1.2 Security configuration options . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432<br />

viii Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


12.1.3 Security customization jobs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438<br />

12.1.4 Comparison of security settings . . . . . . . . . . . . . . . . . . . . . . . . . . 440<br />

12.2 Automatically generated server IDs . . . . . . . . . . . . . . . . . . . . . . . . . . . 441<br />

12.3 RACF - mixed-case password support . . . . . . . . . . . . . . . . . . . . . . . . . 443<br />

12.4 Sync-to-OS thread update. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444<br />

Chapter 13. WAS administrative security . . . . . . . . . . . . . . . . . . . . . . . . . 447<br />

13.1 Security configuration and administration . . . . . . . . . . . . . . . . . . . . . . . 448<br />

13.1.1 Simplified security administration . . . . . . . . . . . . . . . . . . . . . . . . . 448<br />

13.1.2 Administrative security implementation. . . . . . . . . . . . . . . . . . . . . 449<br />

13.1.3 Administrative security with SAF authorization . . . . . . . . . . . . . . . 450<br />

13.1.4 Administrative security with default authorization provider . . . . . . 455<br />

13.2 Role-based administrative security . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460<br />

13.2.1 Administrative roles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460<br />

13.2.2 Fine-grained administrative security . . . . . . . . . . . . . . . . . . . . . . . 462<br />

13.3 Naming service security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467<br />

13.3.1 CosNaming roles description . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467<br />

13.3.2 Mapping users or groups to CosNaming roles . . . . . . . . . . . . . . . 468<br />

Appendix A. Additional material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471<br />

Locating the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471<br />

Using the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472<br />

How to use the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472<br />

Related publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473<br />

<strong>IBM</strong> <strong>Redbooks</strong> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473<br />

Other publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474<br />

Online resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474<br />

How to get <strong>IBM</strong> <strong>Redbooks</strong> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475<br />

Help from <strong>IBM</strong> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476<br />

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477<br />

Contents ix


x Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Notices<br />

This information was developed for products and services offered in the U.S.A.<br />

<strong>IBM</strong> may not offer the products, services, or features discussed in this document in other countries. Consult<br />

your local <strong>IBM</strong> representative for information about the products and services currently available in your<br />

area. Any reference to an <strong>IBM</strong> product, program, or service is not intended to state or imply that only that<br />

<strong>IBM</strong> product, program, or service may be used. Any functionally equivalent product, program, or service that<br />

does not infringe any <strong>IBM</strong> intellectual property right may be used instead. However, it is the user's<br />

responsibility to evaluate and verify the operation of any non-<strong>IBM</strong> product, program, or service.<br />

<strong>IBM</strong> may have patents or pending patent applications covering subject matter described in this document.<br />

The furnishing of this document does not give you any license to these patents. You can send license<br />

inquiries, in writing, to:<br />

<strong>IBM</strong> Director of Licensing, <strong>IBM</strong> Corporation, North Castle Drive, Armonk, NY 10504-1785 U.S.A.<br />

The following paragraph does not apply to the United Kingdom or any other country where such<br />

provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION<br />

PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR<br />

IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,<br />

MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer<br />

of express or implied warranties in certain transactions, therefore, this statement may not apply to you.<br />

This information could include technical inaccuracies or typographical errors. Changes are periodically made<br />

to the information herein; these changes will be incorporated in new editions of the publication. <strong>IBM</strong> may<br />

make improvements and/or changes in the product(s) and/or the program(s) described in this publication at<br />

any time without notice.<br />

Any references in this information to non-<strong>IBM</strong> Web sites are provided for convenience only and do not in any<br />

manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the<br />

materials for this <strong>IBM</strong> product and use of those Web sites is at your own risk.<br />

<strong>IBM</strong> may use or distribute any of the information you supply in any way it believes appropriate without<br />

incurring any obligation to you.<br />

Information concerning non-<strong>IBM</strong> products was obtained from the suppliers of those products, their published<br />

announcements or other publicly available sources. <strong>IBM</strong> has not tested those products and cannot confirm<br />

the accuracy of performance, compatibility or any other claims related to non-<strong>IBM</strong> products. Questions on<br />

the capabilities of non-<strong>IBM</strong> products should be addressed to the suppliers of those products.<br />

This information contains examples of data and reports used in daily business operations. To illustrate them<br />

as completely as possible, the examples include the names of individuals, companies, brands, and products.<br />

All of these names are fictitious and any similarity to the names and addresses used by an actual business<br />

enterprise is entirely coincidental.<br />

COPYRIGHT LICENSE:<br />

This information contains sample application programs in source language, which illustrate programming<br />

techniques on various operating platforms. You may copy, modify, and distribute these sample programs in<br />

any form without payment to <strong>IBM</strong>, for the purposes of developing, using, marketing or distributing application<br />

programs conforming to the application programming interface for the operating platform for which the<br />

sample programs are written. These examples have not been thoroughly tested under all conditions. <strong>IBM</strong>,<br />

therefore, cannot guarantee or imply reliability, serviceability, or function of these programs.<br />

© Copyright <strong>IBM</strong> Corp. 2007. All rights reserved. xi


Trademarks<br />

The following terms are trademarks of the International Business Machines Corporation in the United States,<br />

other countries, or both:<br />

<strong>Redbooks</strong> (logo) ®<br />

developerWorks®<br />

eServer<br />

iSeries®<br />

z/OS®<br />

zSeries®<br />

CICS®<br />

Domino®<br />

DB2®<br />

<strong>IBM</strong>®<br />

IMS<br />

Lotus®<br />

MQSeries®<br />

MVS<br />

Rational®<br />

<strong>Redbooks</strong>®<br />

The following terms are trademarks of other companies:<br />

RACF®<br />

RMF<br />

System z<br />

Tivoli®<br />

VTAM®<br />

WebSphere®<br />

Enterprise JavaBeans, EJB, Java, Java Naming and Directory Interface, JavaBeans, JavaServer,<br />

JavaServer Pages, JDBC, JDK, JMX, JSP, JVM, J2EE, and all Java-based trademarks are trademarks of<br />

Sun Microsystems, Inc. in the United States, other countries, or both.<br />

Active Directory, Expression, Internet Explorer, Microsoft, Windows Server, Windows, and the Windows logo<br />

are trademarks of Microsoft Corporation in the United States, other countries, or both.<br />

UNIX is a registered trademark of The Open Group in the United States and other countries.<br />

Linux is a trademark of Linus Torvalds in the United States, other countries, or both.<br />

Other company, product, or service names may be trademarks or service marks of others.<br />

xii Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Preface<br />

This <strong>IBM</strong>® <strong>Redbooks</strong>® publication was written with the objective to provide a<br />

technical description of some of the most important security scenarios available<br />

with WebSphere® Application Server Version 6.1 for z/OS®. We chose<br />

scenarios that are not really documented elsewhere and that have had<br />

significant changes in Version 6.1.<br />

In the first two chapters we provide an overview of security with WAS on z/OS for<br />

those readers who are unfamiliar with the security landscape on z/OS. From<br />

Chapter 3, “Web container security” on page 63, onwards we go into more<br />

technical depth.<br />

The team that wrote this book<br />

This book was produced by a team of specialists from around the world working<br />

at the International Technical Support Organization, Poughkeepsie Center.<br />

Alex Louwe Kooijmans is a Project Leader with the International Technical<br />

Support Organization (ITSO) in Poughkeepsie, NY, and specializes in<br />

WebSphere, Java, and SOA on System z with a focus on integration,<br />

security, high availability, and application development. Previously, he worked as<br />

a Client IT Architect in the Financial Services sector with <strong>IBM</strong> in The<br />

Netherlands, advising financial services companies on IT issues such as<br />

software and hardware strategy and on demand. Alex has also worked at the<br />

Technical Marketing Competence Center for zSeries® and Linux® in<br />

Boeblingen, Germany, providing support to customers starting up with Java and<br />

WebSphere on zSeries. From 1997 to 2002, Alex completed a previous<br />

assignment with the ITSO, managing various <strong>IBM</strong> <strong>Redbooks</strong> projects and<br />

delivering workshops around the world.<br />

Foulques de Valence is a System z security IT Architect with <strong>IBM</strong> STG and is<br />

currently based in Poughkeepsie, NY, where he works for the Lab Services<br />

team. Previously, he was a Web infrastructure IT Architect in France focusing on<br />

SOA and z/OS. Foulques instructed about end-to-end security solutions for<br />

WebSphere on z/OS worldwide. He is a co-author of several <strong>IBM</strong> <strong>Redbooks</strong><br />

publication dealing with security and WebSphere Application Server for z/OS. He<br />

received a Master’s Degree in Computer Science and Engineering from Ensimag<br />

in France. He furthered his education at the State University of New York at<br />

Buffalo and at Stanford University.<br />

© Copyright <strong>IBM</strong> Corp. 2007. All rights reserved. xiii


Yukari Hanya is an IT Specialist with the WebSphere for z/OS team in Design<br />

Center Makuhari in AP Advanced Technical Support (ATS). She has been<br />

involved in a WebSphere Application Server project for z/OS for the last two<br />

years and is responsible for providing technical support for WebSphere for z/OS<br />

customers.<br />

Keith Jabcuga is a Software Support Specialist working in the <strong>IBM</strong> Support<br />

Center in Poughkeepsie, New York. He has worked on the WebSphere for z/OS<br />

support team for five years, and his areas of expertise include defect support and<br />

application diagnostics. Keith holds an M.S. in Computer Science from the<br />

University of Buffalo.<br />

Marc van der Meer is a z/OS IT Specialist with <strong>IBM</strong> GTS/ITS in the Netherlands.<br />

He has been specializing in security and WebSphere on z/OS for several years.<br />

His current assignments include high-availability WebSphere infrastructures on<br />

z/OS through sysplex functionality, security migrations, and J2EE security<br />

implementations.<br />

Gabriel Mogos has been working on the z/OS platform for many years in the<br />

areas of VTAM® and TCP/IP products. He worked as a VTAM change team<br />

member in troubleshooting and fixing internal and external reported problems.<br />

He also worked as a services consultant assisting customers migrate from SNA<br />

to IP network infrastructure and custom application programming. He holds a<br />

Msc. degree in Mechanical/Industrial Engineering from the University of<br />

Cincinnati. Currently, he is working in Enterprise Network Transformation<br />

Solutions (ENTS) support and development.<br />

Eran Yona is an IT Architect from the Israeli Ministry of Defense. He has 15<br />

years of experience in IT. He has a B.A. in business from the College of<br />

Management in Israel. His areas of expertise include data center management,<br />

data center infrastructure, disaster recovery solutions, and virtualization.<br />

xiv Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Figure 1 The team (left to right): Gabriel Mogos, Keith Jabcuga, Foulques de Valence, Yukari<br />

Hanya, and Eran Yona (Alex Louwe Kooijmans and Marc van der Meer not pictured)<br />

Thanks to the following people for their contributions to this project (In<br />

alphabetical order):<br />

Paola Bari<br />

Rich Conway<br />

Franck Injey<br />

Al Schwab<br />

International Technical Support Organization, Poughkeepsie Center<br />

Tom Hackett<br />

<strong>IBM</strong> System z, Poughkeepsie, NY<br />

Tim Hefele<br />

WebSphere z/OS Performance<br />

Preface xv


Ut V. Le<br />

WebSphere Security Development, Austin, TX<br />

Bill O’Donnell<br />

WebSphere Security Development, Madison, WI<br />

Gary Puchkoff<br />

WebSphere Application Server for z/OS Design and Development<br />

Ben Rogers<br />

<strong>IBM</strong> STG System z Lab Services, Poughkeepsie, NY<br />

Wade Wallace<br />

International Technical Support Organization, Austin Center<br />

Nigel Williams<br />

<strong>IBM</strong> Montpellier<br />

Become a published author<br />

Join us for a two- to six-week residency program! Help write an <strong>IBM</strong> Redbook<br />

dealing with specific products or solutions, while getting hands-on experience<br />

with leading-edge technologies. You'll have the opportunity to team with <strong>IBM</strong><br />

technical professionals, Business Partners, and Clients.<br />

Your efforts will help increase product acceptance and customer satisfaction. As<br />

a bonus, you will develop a network of contacts in <strong>IBM</strong> development labs, and<br />

increase your productivity and marketability.<br />

Find out more about the residency program, browse the residency index, and<br />

apply online at:<br />

ibm.com/System Authorization Facilitys/residencies.html<br />

Comments welcome<br />

Your comments are important to us!<br />

We want our <strong>Redbooks</strong> to be as helpful as possible. Send us your comments<br />

about this or other <strong>Redbooks</strong> in one of the following ways:<br />

► Use the online Contact us review book form found at:<br />

ibm.com/System Authorization Facilitys<br />

xvi Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


► Send your comments in an e-mail to:<br />

System Authorization Facilitys@us.ibm.com<br />

► Mail your comments to:<br />

<strong>IBM</strong> Corporation, International Technical Support Organization<br />

Dept. HYTD Mail Station P099<br />

2455 South Road<br />

Poughkeepsie, NY 12601-5400<br />

Preface xvii


xviii Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Chapter 1. Introduction<br />

Because of the rapid growth of e-business and the integration of different<br />

organizations, securing and managing information technology (IT) infrastructures<br />

has become very complex and demanding. Protecting sensitive and confidential<br />

data from malicious intruders, deadly viruses, and worms is not an easy task. It<br />

requires constant monitoring of the daily IT business operations and deploying<br />

the latest security technology.<br />

WAS for z/OS security and the underlying operating system infrastructure<br />

security can provide customers running enterprise applications with secure and<br />

reliable services.<br />

In this chapter, we introduce new and upgraded security features that are<br />

implemented in WebSphere Application Server WAS for z/OS V6.1 to secure<br />

WAS and e-business applications.<br />

This chapter contains the following sections:<br />

► “Securing WAS for z/OS simplified” on page 2<br />

► “WAS and security layers” on page 3<br />

► “Securing WAS and applications” on page 12<br />

1<br />

© Copyright <strong>IBM</strong> Corp. 2007. All rights reserved. 1


1.1 Securing WAS for z/OS simplified<br />

Securing an e-business application on the z/OS platform demands good<br />

knowledge of the underlying infrastructure and the areas that could be exposed<br />

to security attacks. It requires periodic review of the security system put in place<br />

to protect the network resources (files, databases, user accounts, and so on) and<br />

you to take the necessary action to improve the overall system operations.<br />

Needless to say, it is very tough out there. The competition has never been more<br />

intense than today. To survive in this highly competitive global market, companies<br />

must be innovative and come up with new ways of doing things within a short<br />

period of time. If they do not, they become obsolete and fade away.<br />

The product life cycle has now been shortened. To beat the competition,<br />

companies must invent, re-invent, and upgrade their products every six months<br />

to a year in order to stay in business and be successful.<br />

As <strong>IBM</strong> strategic middleware, WebSphere Application Server has been going<br />

through many changes, starting from Lotus® Go Domino® Webserver V4.6.1 in<br />

the late 1990s to what we have now (WebSphere Application Server for z/OS<br />

Version 6.1). In each version milestone achievements have been made, and like<br />

the previous versions, Version 6.1 has made great enhancements in securing<br />

WAS and the applications running in WAS. These enhancements are in the<br />

areas of ease of use, manageability, interoperablity, and compatibility.<br />

What is new in V6.1 can be summarized as follows:<br />

► For ease of use, the administrative security is simplified and enhanced.<br />

► RACF® enhancements such as mixed password support and sync to OS<br />

thread control.<br />

► Simplified key and certificate management.<br />

► New user registry - federated repository.<br />

► Web authentication enhancements.<br />

► Interoperability support - protected GSS-API Negotiation Mechanism Protocol<br />

support.<br />

► Web services security - messaging and transport security.<br />

► JCA 1.5 connectivity to back-end applications support.<br />

► Java 2 security - greater control over permissions (authorization).<br />

► Securing applications - identity assertion with trust validation.<br />

2 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Note that these new and enhanced v6.1 security features have been made<br />

available to the public in the WebSphere Application Server for z/OS InfoCenter.<br />

In addition, these features are described in detail in this book in later chapters.<br />

1.2 WAS and security layers<br />

1.2.1 Security terms<br />

Layering is a fine method of building software products. It helps connect pieces<br />

of functions together to build a large system. In this section, we describe the<br />

following:<br />

► Security terms<br />

► Security layering overview<br />

► An overview of security layering in z/OS<br />

► An overview of Java security<br />

► An overview of application security<br />

Security could mean many things to many people these days, but what we mean<br />

by security is the terms and standards given by ISO 7498-2. The terms that<br />

describe security are:<br />

► Integrity refers to the assurance that the data sent from one party to another<br />

has not been tampered with by a third party before it arrives at its destination.<br />

If such a breach occurred, it can be detected. This is typically achieved by the<br />

use of digital signatures.<br />

► Confidentiality refers to information that is classified as confidential and<br />

should not be seen by any body other than the two connection partners. The<br />

information must be fully encrypted using TLS/SSL or any other reliable<br />

encryption algorithm. WAS for z/OS uses SSL for encrypting messages.<br />

► Authentication refers to the obtainment of an acceptable identity for the<br />

execution of a specific service. This identity can then be delegated to other<br />

systems that in turn might require authentication as well. There are many<br />

implementation-specific ways to accomplish the enforcement of this security<br />

aspect. For example, WebSphere for z/OS allows for basic, form-based,<br />

client certificate, and JAAS authentication.<br />

► Authorization refers to any user who has been authenticated having the<br />

permission to access a specific resources. This type of control is usually<br />

managed by specialized software, either from a sub-system perspective like<br />

z/OS RACF or from an application layer like Tivoli® Access Manager.<br />

Chapter 1. Introduction 3


► Non-repudiation means that in the case of a transaction between two parties<br />

(a provider and a consumer), both parties can provide legal proof to a third<br />

party that the provider delivered and the consumer received the services.<br />

► Auditing refers to the ability to discern from gathered data who did what,<br />

when, and for what reason. This is usually made possible by the usage of<br />

monitoring tools and traces, which are then analyzed for patterns. This type of<br />

activity has been engaged in for several hundred years, across many fields,<br />

so most of the general concepts applied in other fields apply. A robust<br />

auditing and traceability implementation could dissuade potential attackers.<br />

In this chapter and in the rest of the book, we discuss security terms while<br />

introducing the new security features of WebSphere Application Server v6.1<br />

1.2.2 Security layering overview<br />

Figure 1-1 shows a high-level topological view of how security is layered in the<br />

z/OS platform.<br />

WebSphere/Application<br />

Resources<br />

WebSphere Security<br />

Java Security<br />

Platform Security<br />

Figure 1-1 Security layers<br />

Naming,<br />

Admin<br />

Access Control<br />

WebSphere Security<br />

J2EE Security API<br />

CORBA Security / CSIv2<br />

Java 2 Security<br />

JVM 5 Security<br />

Operating System Security<br />

In WAS Version 4 there was security in many different layers. In WAS Versions 5<br />

and 6, the security options and capabilities in many of these layers were<br />

enhanced. In WAS Version 5 on the System z platform and later, the WAS<br />

security layers are intended to work like those on any other platform. What is<br />

unique to each platform is the operating system security.<br />

4 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS<br />

HTML,<br />

Servlet/JSPs,<br />

EJBs


Operating system (OS) security<br />

The security infrastructure of the underlying operating system provides certain<br />

security services to the WebSphere security application. This includes the file<br />

system security support to secure sensitive files in WebSphere product<br />

installation. The WebSphere system administrator can configure the product to<br />

obtain authentication information directly from the operating system user registry,<br />

for example, the NT Security Access Manager (SAM). On z/OS, we refer to that<br />

as SAF, which stands for System Authorization Facility. SAF is a common set of<br />

APIs being used to access RACF, Computer Associates’ Top Secret or ACF2<br />

security software and security databases that are present on the z/OS operating<br />

environment. These security products contain information about users, groups of<br />

users, resources, and user or group access to those resources. The purpose of<br />

these products is to provide authentication and access control for the z/OS<br />

environment.<br />

Java security<br />

The Java security is based on a few security elements:<br />

► The JVM in the SDK 1.5<br />

The JVM security model provides a layer of security above the operating<br />

system layer. For example, JVM security protects the memory from<br />

unrestricted access, creates exceptions when errors occur within a thread,<br />

and defines array types.<br />

► J2EE security<br />

The security collaborator enforces J2EE-based security policies and supports<br />

J2EE security APIs.<br />

► Java 2 security<br />

The Java 2 security model offers access control to system resources<br />

including file systems, system property, socket connection, threading, class<br />

loading, and so on. Application code must explicitly grant the required<br />

permission to access a protected resource.<br />

► CSIv2<br />

Any calls made among secure object request brokers (ORBs) are invoked<br />

over the Common Secure Interoperability Version 2 (CSIv2) security protocol,<br />

which sets up the security context and the necessary quality of protection.<br />

After the session is established, the call is passed up to the enterprise bean<br />

layer. CSIv2 is an IIOP-based, three-tiered, security protocol that is<br />

developed by the object management group (OMG). This protocol provides<br />

message protection, interoperable authentication, and delegation. The three<br />

layers include a base transport security layer, a supplemental client<br />

authentication layer, and a security attribute layer.<br />

Chapter 1. Introduction 5


WebSphere Security<br />

WebSphere Application Server security relies on and enhances all the<br />

above-mentioned layers. It enforces security policies and services in a unified<br />

manner on access to Web resources and enterprise beans. It consists of<br />

WebSphere security technologies and features to support the needs of a secure<br />

enterprise environment.<br />

Individual servers can override a subset of the security configuration. When<br />

using mixed z/OS and distributed nodes, the security domain features are<br />

merged.<br />

1.2.3 z/OS security overview<br />

Resource Access Control Facility (RACF) is z/OS’s security component that<br />

implements System Access Facility (SAF) APIs. SAF is an interface that provides<br />

security services to many other subsystems on z/OS such as CICS®, DB2®,<br />

IMS, Unix Services Systems, and so on.<br />

In summary, RACF has the following capabilities and functionality. It allows the<br />

administrator to:<br />

► Create and manage digital certificates.<br />

► Protect data sets and UNIX® System Services HFS files.<br />

► Protect system resources and services.<br />

► Manage a large user database, and add, delete, list, and change user<br />

profiles.<br />

Authentication and authorization in RACF is very straight forward. When a user<br />

requests a service from the system, first RACF checks whether the user is<br />

defined to RACF. If yes, then it checks whether the user is authorized to access<br />

that resource. A user can be in a suspended or revoked state and will not be<br />

given any system privilege until the suspension or revocation is resolved.<br />

RACF keeps a profile for each system resource user that it knows, and the profile<br />

is kept in storage in the format shown in Figure 1-2.<br />

User ID Owner Password<br />

Attributes Security Groups Segments<br />

Classifications<br />

Figure 1-2 RACF profile<br />

6 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS<br />

OMVS TCP/IP TSO


As you can see in Figure 1-2 on page 6, the RACF profile contains:<br />

► User ID and password. The password is encrypted.<br />

► Owner of the profile. The owner can be a group or a single user.<br />

► Attributes, which allow users to do specific tasks with RACF. Four attributes<br />

that can be specified are special, auditor, operations, and protected.<br />

► Security classifications. This is optional, but it gives an additional way of<br />

controlling user authority.<br />

► Segments. Z./OS process or address spaces such as TSO, OMVS, and CICS<br />

can be added to a user profile.<br />

Finally, RACF provides a way to record what is done on the system. It keeps<br />

track of what happens on the system so that an organization can monitor who is<br />

logged on the system at any time. RACF reports whether anyone has attempted<br />

to perform unauthorized actions. For example, RACF can record that someone<br />

has tried to access or change data to which they do not have the correct<br />

authority.<br />

Access Control Element (ACEE)<br />

The Access Control Element is storage (a control block) that contains profile<br />

information of a user who is currently active. This control block is only valid in the<br />

address space task control block in which it was created.<br />

RACO (ENVR object)<br />

This is a mechanism by which RACF can pass a user’s credential from an<br />

address space to another address space. Once the new address space receives<br />

the RACO, RACF can then create a new ACEE for that user that is valid within<br />

the new address space.<br />

RACF GROUP<br />

Groups are a way to categorize subjects and objects. The types of groups used<br />

are administrative, resource control, and functional.<br />

RACF Administration EJB roles and their respective capabilities are classified<br />

as follows:<br />

Monitor View configuration files and status but not anything else.<br />

Configurator A monitor that can modify a configuration information but<br />

cannot change runtime states.<br />

Operator Can trigger runtime state changes, such as start/stop an<br />

application server, but cannot change configuration files.<br />

Administrator An operator as well as a configurator.<br />

Chapter 1. Introduction 7


RACF CLASS<br />

This section describes the pertinent RACF classes that are applicable to<br />

implementing WebSphere Application Server for Version 6 on z/OS. These<br />

classes represent a small subset of all available classes in RACF.<br />

► APPL - used for VTAM application ID (APPLID) access. The APPL class<br />

controls access to applications.<br />

► CBIND - controls the client’s ability to bind to the server. WebSphere uses the<br />

CBIND class to control access to the server.<br />

► DIGTCERT - contains digital certificates and related information.<br />

► DSNR - controls access to DB2 subsystems.<br />

► EJBROLE and GEJBROLE - These classes are used to register Enterprise<br />

JavaBeans (EJB) roles that will be used by WebSphere Application Server<br />

applications. EJBROLE is the member class for EJB authorization roles. The<br />

APPLDATA field in an EJBROLE profile defines the target Java identity when<br />

running in RunAs ROLE mode. GEJBROLE is the grouping class for EJB<br />

authorization roles. EJBROLE profiles have to be added for the required roles<br />

and for users to be given access to these profiles when SAF authorization is<br />

used.<br />

► FACILITY - miscellaneous uses. Profiles are defined in this class so that<br />

resource managers can check users’ access to the profiles when the users<br />

take some action. Here is where we place profiles for Digital Certificate, DCE,<br />

and Kerberos, plus UNIX System Services profiles (for example,<br />

BPX.DAEMON).<br />

► KERBLINK - mapping class for user identities of local and foreign principals.<br />

Used in Kerberos to map a unique RACF user ID to each foreign principal.<br />

► LOGSTRM - controls which applications can access the system logger<br />

resources.<br />

► SERVER - controls the server’s ability to register with the daemon. This class<br />

is used in WebSphere to control whether a servant can call authorized<br />

programs in the controller.<br />

► SERVAUTH - contains profiles that are used by servers to check a client’s<br />

authorization to use the server or to use the resources managed by the<br />

server. Use this class to protect TCP/IP ports. If you are using this class, you<br />

must give WebSphere and Kerberos access.<br />

► STARTED - used for identifying authorized system started procedures.<br />

WebSphere Application Server normally starts as a system task and would<br />

need an entry in the STARTED class to associate a valid RACF user ID and<br />

connected group to be able to access protected resources. This is used in<br />

preference to the started procedures table to assign an identity during the<br />

8 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


processing of an MVS START command. For example, WebSphere and<br />

Kerberos are defined as started tasks in this profile.<br />

► SURROGAT - whether surrogate submission or login is allowed, and if<br />

allowed, which user IDs can act as surrogates. SURROGAT is used here in<br />

conjunction with BPX.SRV profiles in the SURROGAT class to allow security<br />

context switches for unauthenticated user IDs.<br />

RACF cosnaming EJB roles<br />

These roles are:<br />

CosNaming Read Allowed to query WAS name space (JNDI)<br />

Cosnaming Write Allowed to do write operations (JNDI bind, re-bind, and<br />

unbind in the WAS name space)<br />

CosNameCreate Allowed to create objects to the WAS name space<br />

CosNamedelete Allowed to remove objects from WAS name space<br />

1.2.4 Java security overview<br />

Java is a programming language that is supposed to be platform independent<br />

and should run on any given operating system. Like any other software package,<br />

Java also has its own layering architecture. Therefore, Java 2 is above the<br />

operating system layer and J2EE is above the Java 2 layer.<br />

Java 2 security<br />

Java 2 security provides a policy-based, fine-grained access control mechanism<br />

that increases overall system integrity by checking for permissions before<br />

allowing access to certain protected system resources. Java 2 security guards<br />

access to system resources such as file I/O, sockets, and properties, while Java<br />

2 Platform, Enterprise Edition (J2EE) security guards access to Web resources<br />

such as servlets, JavaServer Pages (JSP) files, and Enterprise<br />

JavaBeans (EJB) methods.<br />

Many existing or even new applications might not be prepared for the very<br />

fine-grained access control programming model that Java 2 security is capable<br />

of enforcing. Administrators need to understand the possible consequences of<br />

enabling Java 2 security if applications are not prepared for Java 2 security. Java<br />

2 security places some new requirements on application developers and<br />

administrators.<br />

You can configure Java 2 security and administrative security independently of<br />

one another. Disabling administrative security does not disable Java 2 security<br />

automatically. You need to explicitly disable it.<br />

Chapter 1. Introduction 9


Attention: Java 2 security is very CPU consuming and therefore not<br />

recommended for a production environment.<br />

J2EE security<br />

The J2EE specification defines the building blocks and elements of a J2EE<br />

application that builds an enterprise application. The specification also provides<br />

details about security related to the different elements. A typical J2EE application<br />

consists of an application client tier, a Web tier, and an EJB tier. When designing<br />

a security solution, you need to be aware of the connections between each of the<br />

modules.<br />

It is possible that the J2EE application can control its own security issues<br />

programmatically, but with WAS, the J2EE application can be configured to<br />

enforce security features during deployment time. When an administrator installs<br />

the application, he can give the required users access to the application based<br />

on the roles as defined in the applications’s EJBROLES profiles. The permission<br />

given to the users is based on their roles and needs.<br />

There are two ways of enforcing security under J2EE:<br />

► Declarative security<br />

Declarative security is the means by which an application’s security policies<br />

can be expressed externally to the application code. At application assembly<br />

time, security policies are defined in an application’s deployment descriptor. A<br />

deployment descriptor is an XML file that includes a representation of an<br />

application’s security requirements, including the application’s security roles,<br />

access control, and authentication requirements. When using declarative<br />

security, application developers can write component methods that are<br />

completely unaware of security. By making changes to the deployment<br />

descriptor, an application’s security environment can be radically changed<br />

without requiring any changes in application code.<br />

► Programmatic security<br />

Programmatic security is useful when the application server provided security<br />

infrastructure cannot supply all the functions that are needed for the<br />

application. Using the Java APIs for security can be the way to implement<br />

security for the whole application without using the application server security<br />

functions at all. Programmatic security also gives you the option to implement<br />

dynamic security rules for your applications. Generally, the developer does<br />

not have to code for security because WebSphere Application Server<br />

provides a very robust security infrastructure, which is transparent to the<br />

developer. However, there are cases where the security provided is not<br />

sufficient and the developer wants greater control over to what the user has<br />

10 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


access. For such cases, there are a few security APIs that the developers can<br />

implement.<br />

1.2.5 WebSphere security overview<br />

One of the goals of the Java 2 Platform Enterprise Edition (J2EE) security<br />

architecture is isolating the application developer from issues of security.<br />

Application component providers should not have to know anything about<br />

security to write an application.<br />

Based on the J2EE container-based security architecture, the Web container and<br />

the EJB container can provide security without application code having to be<br />

written to provide security. Not all applications, however, can be designed in<br />

such a way that the application programmer is completely isolated from issues of<br />

security. But there are cases where WAS declarative security alone cannot<br />

provide security to application programs that require some functions. In this<br />

situation programmatic security can be done by the application.<br />

Programmatic security includes actions taken by application program code to<br />

authenticate users, test for authorization to resources, or change the effective<br />

user in the current execution context. WebSphere Application Server offers<br />

opportunities for applications to perform programmatic security.<br />

J2EE provides an API with two methods for the Web container and two methods<br />

for the EJB container.<br />

Web applications use these methods:<br />

► getUserPrincipal<br />

► isUserInRole<br />

EJB applications use these methods:<br />

► getCallerPrincipal<br />

► isCallerInRole<br />

The user ID related methods getUserPrincipal() and getCallerPrincipal()<br />

(respectively) are used to retrieve the user ID associated with the current Web<br />

application (servlet or JavaServer Page) or EJB:<br />

getUserPrincipal() For applications running in a Web container, this<br />

method, defined on HTTPServletRequest, can be<br />

used to retrieve a principal object for the user<br />

identity. The user ID can be retrieved from this<br />

principal object.<br />

getCallerPrincipal() For applications running in an EJB container, this<br />

method, defined on EJBContext, can be used to<br />

Chapter 1. Introduction 11


etrieve a principal object for the caller’s identity. The<br />

user ID can be retrieved from this principal object.<br />

The application can use the returned user ID or principal object for decisions in<br />

its program flow. For example, a program might have a private authorization<br />

protocol and use the principal name to search an authorization table. Another<br />

possibility would be if data is being retrieved from a relational database, and the<br />

principal name forms part of a key field.<br />

1.3 Securing WAS and applications<br />

In this section, first we describe access points to WAS and then we provide a<br />

high level of security features to implement authentication and authorization<br />

functions.<br />

1.3.1 WAS and security checkpoints<br />

Let us look at a classic example that is done everyday in the real world.<br />

A certain country with all its territorial boundaries puts into effect an immigration<br />

law to enforce that entry to its territory is not breached. To protect its territory, the<br />

country places checkpoints in all its entry points. The possible entry points would<br />

be sea ports, airports, border towns, and other ground entry points. So, the<br />

country places its immigration offices in all the entry points to allow or reject entry<br />

visas based on its rules and regulations. For example, if a person tries to enter<br />

the country using a falsified document, then he would be in trouble for breaking<br />

the law to enter the country.<br />

If we apply the same analogy to enforcing security in WAS, it requires identifying<br />

all entry points to the server. WAS, as it is rightfully called, is a server, and most<br />

of its work is driven by clients requesting access to resources such as J2EE<br />

enterprise applications and back-end enterprise information systems (EIS). In<br />

this case, different clients could be using different communication protocols and<br />

coming in through different entry points. WAS should be able to understand the<br />

different protocols and handle all incoming requests in such a manner that no<br />

security is breached.<br />

12 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


To demonstrate the entry checkpoint concept, we present Figure 1-3. Figure 1-3<br />

externalizes the communication channels between WAS and the outside world,<br />

and it represents the most common connections into and out of WAS. We also<br />

believe that knowing the entry checkpoints helps IT architects and designers<br />

consider the security issues during an overall network design phase and<br />

implementation.<br />

Figure 1-3 WAS security checkpoints<br />

Looking at Figure 1-3, the connections to WAS on z/OS can be categorized as<br />

front end and back end. The front end connections are:<br />

► Connecting from a browser or Web client via HTTPs<br />

There are two TCP/IP ports, one for unsecure connections and the other for<br />

secure connections.<br />

► Connecting from a J2EE client via RMI/IIOP<br />

There are two TCP/IP ports, one for unsecure and the other one for secure<br />

connections.<br />

► Connecting from an MQ client via TCP/IP<br />

► Commands originating from wsadmin via TSO or Telnet via native TCP/IP<br />

Chapter 1. Introduction 13


Similarly, the back end connections are:<br />

► Connecting to DB2 via Java DataBase Connectivity (JDBC), either using a<br />

local connection (T2) or a remote connection (T4).<br />

► Connecting to CICS and IMS via J2C connectors. Those connectors can also<br />

be used in local (cross-memory) or remote mode (over TCP/IP).<br />

► Connecting to an MQ Queue Manager, again, either in local (cross-memory)<br />

mode or remote mode (TCP/IP).<br />

There are more possibilities, but for the purpose of this introduction we do not<br />

discuss all of the options.<br />

After identifying the various access points to WAS for z/OS, the next step is<br />

handling security issues at these entry points.<br />

WAS on z/OS, like any TCP/IP application, obtains sockets and binds them to<br />

several defined or defaulted ports and IP addresses. In fact, WAS uses the<br />

INADDR_ANY parameter for all its listening ports by default. This means that it<br />

can accept requests from any IP address used by any client. By doing that, the<br />

gate is wide open for a security attack.<br />

To WAS and its clients, TCP/IP is just an underlying transport protocol. The real<br />

communication occurs on the application layer protocols (HTTPs, IIOP) that run<br />

on top of the TCP layer. The HTTP protocol is very well known and is much<br />

easier to use than the IIOP. The IIOP is more complex than the HTTP since it<br />

deals with objects and inter-communication between programs.<br />

The details follow in later chapters, but let us see how security is handled when<br />

an end-to-end communication is established between two endpoints. The two<br />

endpoints are a Web client and CICS on z/OS in one case, and a J2EE client and<br />

CICS on the same z/OS in the other case.<br />

14 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


J2EE<br />

Client<br />

0<br />

Web<br />

Client<br />

0<br />

In Figure 1-4, we show numbers for each stop the Web client and the J2EE client<br />

make as they go through the connection path to reach CICS.<br />

Web<br />

Server<br />

1<br />

Figure 1-4 Security checkpoint internal flow<br />

Web<br />

Container<br />

In each case the number zero (0) represents the initial point before doing<br />

anything, and WAS and CICS are local to each other, meaning that they are on<br />

the same LPAR on z/OS.<br />

For the Web client, authentication would be attempted at 1, 2, 4, and 5.<br />

Authorization would be attempted at 2, 3, 4, and 5.<br />

For the J2EE client, authentication would be attempted at 1, 2, 3, and similarly<br />

authorization would be attempted at 1, 2, and 3.<br />

To fully understand the security flow on the HTTP(s) and IIOP layers, it requires<br />

deep understanding of the specification and architecture of these protocols.<br />

Once TCP/IP delivers the data, the HTTP(s) and the IIOP code must parse and<br />

interpret the HTTP and GIOP (IIOP) headers in order to take an appropriate<br />

security action.<br />

We do not discuss the HTTP(s) and IIOP internal flow here in this book, but the<br />

security mechanisms implemented to secure HTTP and IIOP protocols are<br />

discussed later on.<br />

1.3.2 Web client authentication overview<br />

2<br />

EJB<br />

Container<br />

Authentication is performed using user information stored in a user account<br />

repository and based on the protocol the user uses to access WAS.<br />

3<br />

1<br />

4<br />

2<br />

J2C<br />

CICS<br />

Chapter 1. Introduction 15<br />

3<br />

5


In this section, we describe the mechanisms to authenticate Web clients. The<br />

Web authentication mechanisms are:<br />

► Single sign-on (SSO)<br />

– Lightweight Third Party Authentication (LTPA)<br />

The security token is created by WAS using configured keys.<br />

– Simple WebSphere Authentication Mechanism (SWAM)<br />

The security token is not created by WAS. If the authentication is needed<br />

to go from server to server, then the LTPA mechanism should be used.<br />

Important: SWAM is deprecated as of WAS V6.1.<br />

► Trust Association Interceptor (TAI)<br />

The Web authentication options are:<br />

► Basic<br />

► Form based<br />

► Client certificate<br />

Single sign-on<br />

Single sign-on is a mechanism where a principal can log in to multiple servers<br />

without being required to resubmit his credentials. Single sign-on is supported<br />

only when Lightweight Third Party Authentication protocol is being used.<br />

When using SSO, at initial login a cookie is returned in the HTTP response.<br />

Then, when the user accesses other servers that are in the same domain name<br />

service (DNS), she is not prompted to re-enter the credentials again for<br />

re-authentication.<br />

If you need to interoperate with network distributed servers you must use LTPA.<br />

Attribute propagation<br />

With security attribute propagation, WebSphere Application Server can transport<br />

security attributes (authenticated subject contents and security context<br />

information) from one server to another in your configuration. WebSphere<br />

Application Server might obtain these security attributes from either an enterprise<br />

user registry, which queries static attributes, or a custom login module, which can<br />

query static or dynamic attributes. Dynamic security attributes, which are custom<br />

in nature, might include the authentication strength that is used for the<br />

connection, the identity of the original caller, the location of the original caller, the<br />

IP address of the original caller, and so on.<br />

16 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Security attribute propagation provides propagation services using Java<br />

serialization for any objects that are contained in the subject. WebSphere<br />

Application Server also offers a token framework that enables custom<br />

serialization functionality.<br />

When a request is being authenticated, a determination is made by the login<br />

modules as to whether this request is an initial login or a propagation login. An<br />

initial login is the process of authenticating the user information, typically a user<br />

ID and password, and then calling the application programming interfaces (APIs)<br />

for the remote user registry to look up secure attributes that represent the user<br />

access rights. A propagation login is the process of validating the user<br />

information, typically a Lightweight Third Party Authentication token, and then<br />

deserializing a series of tokens that constitute both custom objects and token<br />

framework objects known to WebSphere Application Server.<br />

Identity assertion<br />

Identity assertion is one of the most important areas of RMI-IIOP security. When<br />

coding EJBs and setting up the infrastructure, a key goal is to allow for access to<br />

a remote EJB with total transparency to the user while maintaining security.<br />

Common Secure Inter operability Version 2 (CSIv2) allows for an identity from<br />

one server to be passed to a downstream EJB call.<br />

Trust Association Interceptor (TAI)<br />

Trust association is a method that enables the integration of WAS security and<br />

third-party security servers. More specifically, a reverse proxy server can act as a<br />

front-end authentication server while the WAS applies its own authorization<br />

policy onto the resulting credentials that are passed to it by the proxy server.<br />

In a trust association setup, the back-end server accepts HTTP requests that<br />

pass through the front-end server. The back-end server is configured to receive<br />

HTTP requests only from the trusted server. HTTP requests that come in through<br />

other servers are rejected.<br />

The trust association function could be used with configurations that provide<br />

ways to demilitarize zones.<br />

The products that implement Trust Association Interceptors include:<br />

► <strong>IBM</strong> Tivoli Access Manager for e-business<br />

► WebSeal<br />

► Caching proxy<br />

Chapter 1. Introduction 17


1.3.3 EJB client authentication overview<br />

For EJB client authentication, two technologies are important to mention:<br />

► Common Secure Interoperability Specification v2 (CSIv2) can be used to<br />

enter a J2EE server on z/OS remotely from a J2EE client and authenticate to<br />

an EJB running in that server.<br />

► Java Authentication and Authorization Service (JAAS) can be used in any<br />

J2EE application to perform authentication functions.<br />

Common Secure Inter operability Specification V2 (CSIv2)<br />

The Common Secure Interoperability Specification v2 (CSIv2) is a specification<br />

adopted by the Object Management Group (OMG) to use the IIOP security<br />

protocol to authenticate and to provide message protection between client and<br />

server. CSIv2 is enabled in WAS via security administration configuration. Note<br />

that the CSIv2 protocol is applicable only on communication between a J2EE<br />

client and an EJB.<br />

Briefly, CSIv2 provides the following security features:<br />

► SSL client certification authentication<br />

The authentication occurs during the initial connection handshake using SSL<br />

certificates.<br />

► Message layer authentication<br />

This uses a token or basic authentication to store and exchange credential<br />

information with the receiving server.<br />

► Identity assertion<br />

This uses a CSIv2 identity token to identify the client to the downstream<br />

without providing authentication data. Identity assertion requires a trusted<br />

channel between the asserting server and the one that receives the identity.<br />

► Security attribute propagation<br />

This enables authenticated subject contents and security context to be<br />

passed from one server to another.<br />

► Stateful and stateless<br />

Since CSIv2 is a communication between two J2EE partners, the<br />

authentication follows depending the session state, statefull, or stateless.<br />

Statefull authentication is supposed to produce better performance since it is<br />

done during initial contact.<br />

18 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Java Authentication and Authorization Service (JAAS)<br />

Briefly, JAAS is a J2EE standard and pluggable Java code (stub) that enables<br />

J2EE-compliant applications to authenticate and enforce access controls upon<br />

users. JAAS provides two interfaces:<br />

► An application-level programming interface (API) for use by J2EE applications<br />

► A service programming interface (SPI) for the providers of its functionality<br />

JAAS uses the concept of a subject in which a principal and credential are<br />

created for a user request to log in.<br />

1.3.4 MQ client authentication overview<br />

Message queuing, which was founded on queuing theory, is a communication<br />

vehicle where two application programs can exchange messages using<br />

predefined queues. The application programs simply do read/write messages to<br />

these queues, and the message is handled by other message queue processors.<br />

<strong>IBM</strong> award-winning messaging queuing, formerly known as MQSeries®, has<br />

been renamed as WebSphere MQ (WMQ). WebSphere MQ can communicate<br />

with JMS-based applications running in WAS. This can be either a JMS client<br />

application (WAS outbound) or a message-driven bean (MDB) (WAS inbound).<br />

There are two ways WAS and WMQ can communicate. If WMQ is local (that is,<br />

on the same LPAR as WAS), then the communication is via cross memory. If<br />

WMQ is remote to WAS, then the communication is over TCP/IP.<br />

MQ clients and other WMQ queue managers communicate with WMQ queue<br />

managers over channels. When WAS applications use direct JMS connections to<br />

a WebSphere MQ queue manager, not using the Service Integration Bus, the<br />

WAS applications appear as MQ clients. When communication is done via the<br />

Service Integration Bus, the MQ link appears as another queue manager to<br />

WebSphere MQ. Regardless of what method is used, communication is done<br />

over one or more channels. SSL properties on the channel allow for selection of<br />

which Cipher Spec to use and which clients, based on DN, to accept connections<br />

from. Enabling SSL on the channel is as simple as selecting the Cipher Spec and<br />

restarting the channel.<br />

For more information about configuring SSL between WebSphere Application<br />

Server and WebSphere MQ as the JMS provider, review the following articles in<br />

the WebSphere Developer Technical Journal:<br />

► Securing connections between WebSphere Application Server and<br />

WebSphere MQ: Part 1: Using the WebSphere MQ JMS provider at:<br />

http://www-128.ibm.com/developerworks/websphere/techjournal/0601_<br />

ratnasinghe/0601_ratnasinghe.html<br />

Chapter 1. Introduction 19


► Securing connections between WebSphere Application Server and<br />

WebSphere MQ: Part 2: Secure the WebSphere MQ link using the service<br />

integration bus at:<br />

http://www-128.ibm.com/developerworks/websphere/techjournal/0601_<br />

smithson/0601_smithson.html<br />

For more information about security related to the usage of JMS and WAS on<br />

z/OS, refer to Java Message Service (JMS) Security on z/OS, REDP-4203, at:<br />

http://www.System Authorization<br />

Facilitys.ibm.com/abstracts/redp4203.html?Open<br />

1.3.5 Web services security overview<br />

In the traditional way of client-server communication, anything above the TCP<br />

layer is considered as user data that needs to be delivered to the application<br />

layer for the running application to add, change, update, or delete a record in a<br />

file. But with Web- based communication, there are other protocols that are<br />

added on top of the TCP layer. One of these protocols is HTTP. Again on top of<br />

the HTTP layer, there is the SOAP protocol that is added for service-based<br />

communication.<br />

Web services and service-oriented architecture (SOA) are being used by most<br />

people synonymously lately, but are in fact not the same things. When we talk<br />

about Web services, we refer to the usage of a set of protocols that make it<br />

easier to transparently access a component from anywhere else. SOA is much<br />

more a way of architecting the entire IT landscape in such a way that it becomes<br />

easier to use and manage.<br />

20 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


As depicted in Figure 1-5, there are two ways of securing Web services<br />

communication. They are:<br />

► Message level security<br />

► Transport level security (TLS/SSL)<br />

TCP<br />

IP<br />

LINK<br />

HTTP<br />

SOAP<br />

SSL<br />

Socket<br />

IP address<br />

Mac address<br />

Requestor<br />

JMS<br />

Figure 1-5 Web services security layers<br />

The SOAP Message Security 1.0 (WS-Security 2004) is proposed by the OASIS<br />

WSS Technical Committee.<br />

This specification proposes a standard set of SOAP extensions. This<br />

specification is flexible and is designed to be used as the basis for securing Web<br />

services within a wide variety of security models including PKI, Kerberos, and<br />

SSL. It provides support for multiple security token formats, multiple trust<br />

domains, multiple signature formats, and multiple encryption technologies based<br />

on XML Signature and XML Encryption to provide integrity or confidentiality.<br />

The specification includes security token propagation, message integrity, and<br />

message confidentiality. However, these mechanisms by themselves do not<br />

address all the aspects of complete security solution. Therefore, WS-Security<br />

represents only one of the layers in a complex secure Web services solution<br />

design. The WS-Security specification defines the usage of XML Signature and<br />

XML Encryption. Message integrity is provided by XML Signature in conjunction<br />

with security tokens to ensure that modifications to messages are detected. See:<br />

http://www.w3c.org/Signature<br />

Message confidentiality leverages XML Encryption in conjunction with security<br />

tokens to keep portions of a SOAP message confidential. See:<br />

http://www.w3c.org/Encryption<br />

Message Level Security<br />

Transport level security (TLS/SSL)<br />

HTTP<br />

SOAP<br />

Socket<br />

Port<br />

IP address<br />

Mac address<br />

The Web services security model introduces a set of individual interrelated<br />

specifications to form a layering approach to security. It includes several aspects<br />

SSL<br />

JMS<br />

Service Provider<br />

Chapter 1. Introduction 21


of security: identification, authentication, authorization, integrity, confidentiality,<br />

auditing, and non-repudiation. It is based on the WS-Security specification,<br />

co-developed by <strong>IBM</strong>, Microsoft®, and VeriSign.<br />

The Web services security model is based on:<br />

► WS-Policy<br />

This describes the capabilities and constraints of the security (and other<br />

business) policies on intermediaries and endpoints (for example, required<br />

security tokens, supported encryption algorithms, and privacy rules).<br />

► WS-Trust<br />

This describes a framework for trust models that enables Web services to<br />

securely interoperate. This specification is responsible for managing trusts<br />

and establishing trust relationships.<br />

► WS-Privacy<br />

This describes a model for how Web services and requestors state privacy<br />

preferences and organizational privacy practice statements.<br />

► WS-Federation<br />

This describes how to manage and broker the trust relationships in a<br />

heterogeneous federated environment, including support for federated<br />

identities.<br />

► WS-Authorization<br />

This describes how to manage authorization data and authorization policies.<br />

► WS-SecureConversation<br />

This describes how to manage and authenticate message exchanges<br />

between parties, including security context exchange and establishing and<br />

deriving session keys.<br />

The combination of these security specifications enables many scenarios that<br />

are difficult or impossible to implement with today's more basic security<br />

mechanisms such as transport securing or XML document encryption.<br />

1.3.6 Backend connectivity security overview<br />

Enterprise Information Systems (EIS) such as CICS, IMS, and DB2 are known as<br />

back-end systems from a connectivity point of view. The standard way to access<br />

DB2 is to use Java DataBase Connectivity (JDBC). CICS and IMS can be<br />

accessed in a number of different ways. The J2EE way of accessing CICS and<br />

IMS is by using either a J2C connector or Web services.<br />

22 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


J2C connector components<br />

J2C defines contracts between the application, the connector, and the<br />

application server where the application will be deployed:<br />

► Container contract<br />

The container contract defines what the application server expects to find in a<br />

deployed application. This is the standard contract between an EJB and its<br />

container. It consists of the bean callback methods, such as ejbCreate(),<br />

ejbLoad(), and ejbActivate().<br />

► Application contract<br />

The application contract defines what the connector expects to receive from<br />

the application. It is defined by the Common Client Interface (CCI) API.<br />

► System contract<br />

The system contract specifies the behavior that every J2C resource adapter<br />

must support. The contract components are:<br />

– Connection management contract<br />

This allows the application server, with the assistance of the adapter, to<br />

pool connections to the EIS.<br />

– Transaction management contract<br />

Transactions are a key concept needed to support distributed computing.<br />

– Security management contract<br />

This details the sign-on procedures that are carried out when the client in<br />

WebSphere establishes a connection to the resource adapter or EIS.<br />

These contracts imply that all participating components are J2EE connector<br />

architecture-compliant. The application, connector, and application server must<br />

all be compliant with the J2EE architecture.<br />

CICS authorization and authentication support<br />

Each application that accesses a JCA resource has a resource deployment<br />

descriptor (res-auth) that determines the authentication behavior when<br />

accessing the resource.<br />

Authentication can be done using:<br />

Container authentication When container authentication is specified,<br />

the user ID and password used on the<br />

connection are provided by the container.<br />

Application authentication When application authentication is specified,<br />

the user ID and password used on the<br />

connection are provided explicitly by the<br />

Chapter 1. Introduction 23


1.3.7 User registry<br />

application or the J2C connection factory in<br />

the component-managed authentication<br />

alias entry.<br />

IMS authorization and authentication support<br />

IMS J2C connection factories support the assignment of the current thread<br />

identifier as the owner of a connection for authentication purposes when global<br />

security is enabled. Thread identity assignment is performed when the following<br />

conditions are met:<br />

► Container-managed resource authority (res-auth=Container) is specified in<br />

the application deployment descriptors.<br />

► The J2C connection factory uses a local connection (no TCP/IP), and no<br />

container-managed authentication alias is specified.<br />

Back-end connectivity has been discussed in detail in The <strong>IBM</strong> <strong>Redbooks</strong><br />

publication WebSphere for z/OS connectivity Handbook, SG24-7064-00.<br />

Redpaper J2C security on z/OS, REDP-4204, addresses J2C security aspects in<br />

detail.<br />

User registry is a mechanism to organize user information, such as user ID,<br />

password, and other identity information, and store it in a repository. WAS for<br />

z/OS uses a registry to authenticate users and retrieve user account information.<br />

Currently, there are four user registry types in WAS for z/OS:<br />

► LocalOS<br />

► LDAP<br />

► Custom<br />

► Federated repository<br />

Each registry has its own way of registering and saving user information. Usually,<br />

users are added into groups based on their roles:<br />

► LocalOS<br />

In was for z/OS, this implements a SAF-based user registry used for<br />

authentication and group information lookup.<br />

► LDAP<br />

The Lightweight Directory Access Protocol is used as the user registry for<br />

authentication and group information lookup. WAS supports a wide range of<br />

directory solutions.<br />

24 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


1.3.8 Authorization<br />

► Custom<br />

This registry mechanism is user customized and can use relational database<br />

files, flat files, and others to organize and store user information<br />

► Federated Repository<br />

This is new in WAS Version 6.1 and supports multiple registry chaining. Its<br />

most popular use is the ability to chain LDAP directories. In addition,<br />

federated repository supports identity management capabilities.<br />

How are registries used in WebSphere Application Sever for z/OS? Here we<br />

present how authentication is performed using registries in WAS for z/OS. These<br />

steps are performed in sequential order:<br />

1. The client’s credentials (usually, user ID/password) are passed to an<br />

authenticating module.<br />

2. The authenticating login module then passes on the credentials to a login<br />

module that determines what protocol to use to process the request, for<br />

example, LTPA.<br />

3. The user data is received by the protocol processor (LTPA in this case) and<br />

performs authentication against the current active registry.<br />

4. After authentication is successfully done, the login module generates a JAAS<br />

subject and credential list for the user and passes control back to the<br />

authentication module.<br />

5. The authenticating module then saves the credentials for future use.<br />

WebSphere Application Server provides many different methods for authorizing<br />

accessing resources. For example, you can assign roles to users and configure a<br />

built-in or external authorization provider. The default authorization uses<br />

application deployment descriptors for authorization rules. As an alternative to<br />

WebSphere Application Server default authorization, security authorization<br />

facility (SAF)-based authorization (for example, using the RACF EJBROLE<br />

profile) can be used to control access by a client to Java 2 Platform, Enterprise<br />

Edition (J2EE) roles in EJB and Web applications. When SAF authorization is<br />

enabled, SAF EJBROLE profiles are used to authorize J2EE roles. WebSphere<br />

Application Server supports authorization that is based on the Java<br />

Authorization Contract for Containers (JACC) specification. JACC is a new<br />

specification in Java 2 Platform, Enterprise Edition (J2EE) 1.4. It enables<br />

third-party security providers to manage authorization in the application server.<br />

Authorization has also been covered in WebSphere Application Server for z/OS<br />

V5 and J2EE 1.3 Security Handbook, SG24-6086.<br />

Chapter 1. Introduction 25


26 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


2<br />

Chapter 2. WebSphere security design<br />

This chapter contains a high-level security design that can be used to make the<br />

correct decisions about customizing the WAS for z/OS security implementation.<br />

The objective of the design is to show the reader various ways of using security<br />

in WAS on z/OS and integrating security with the outside world. The design can<br />

also be beneficial to IT architects and security specialists when they perform<br />

initial network solution proposals for customers.<br />

Security design depends on the requirements and business objectives of an<br />

organization. An organization can be small, medium, or large size, and the type<br />

of business it runs can make a big difference in designing its IT infrastructure.<br />

For example, designing an IT infrastructure for a bank can be a challenging task<br />

when making sure that there will be no security issue that is not adequately<br />

addressed.<br />

Here we provide the most common security design scenarios that can be used in<br />

the real world. Each configuration is designed to address specific security<br />

implementation scenarios. The purpose of being specific is to simplify the<br />

complexity of using various security methodologies in a single configuration.<br />

Using the configurations we show in this chapter, users can build their own<br />

security solutions based on their overall network topologies and requirements.<br />

© Copyright <strong>IBM</strong> Corp. 2007. All rights reserved. 27


2.1 Chapter objectives<br />

This chapter is structured to give you the information needed to be able to:<br />

► Design a secure end-to-end solution using WAS on z/OS.<br />

► Diagnose security caveats in your solution design.<br />

► Make sure that you can manage the security in your environment.<br />

We compiled this chapter to prepare you to successfully perform the above three<br />

tasks. Briefly, what this chapter attempts to address are the following areas:<br />

► End-to-end security design/configuration.<br />

► Connection protocols and their security aspects. The protocols addressed are<br />

HTTP, RMI-IIOP, SOAP, CSIv2, and MQ messaging.<br />

► SSL handshake communication flows. This is very important information to<br />

diagnose security-related problems.<br />

► Authentication via LDAP or RACF and authentication flows during initial<br />

sign-on and thereafter.<br />

► Authorization via RACF, J2EE roles, or through an external authorization<br />

server.<br />

We advise the reader to use this chapter as a starting point before getting into a<br />

more detailed security implementation and analysis.<br />

After a brief overview of network protocol layering, SSL handshake, and<br />

authorization EJB roles, the security designs that we discuss in this chapter are<br />

listed below. However, we recommend that the reader go through the brief<br />

overviews first.<br />

► “Scenario 1 - authentication in HTTP server” on page 34<br />

► “Scenario 2 - authentication in reverse proxy security server” on page 37<br />

► “Scenario 3 - J2EE client authentication using CSIv2” on page 40<br />

► “Scenario 4 - J2EE server authentication using CSIv2” on page 43<br />

► “Scenario 5 - JCA custom principal mapping” on page 46<br />

► “Scenario 6 - Web services authentication” on page 51<br />

► “Scenario 7 - WMQ client authentication” on page 53<br />

► “Scenario 8 - authorization using external authorization server” on page 56<br />

► “Scenario 9 - bridged security between z/OS and distributed using JAAS” on<br />

page 58<br />

► “Scenario 10 - centralized user registry using LDAP on z/OS” on page 60<br />

28 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


2.2 Network protocol architecture overview<br />

TCP<br />

IP<br />

LINK<br />

SOAP<br />

HTTP<br />

MSG<br />

SSL<br />

Socket<br />

IP address<br />

Mac address<br />

Client/Requester<br />

Figure 2-1 Protocol layering<br />

`<br />

The foundation of network communication has been based on the architecture of<br />

protocol layering. The two most widely known network architectures are the<br />

Open System Interconnection (OSI) model and System Network Architecture<br />

(SNA), and they both have seven layers, the link layer at the bottom, and the<br />

application layer at the top. At each layer there is a protocol that must be<br />

followed before a full communication between two endpoints can be made, in<br />

any given network configuration.<br />

The TCP/IP architecture is based on the OSI model. Originally, it was limited to<br />

the United States Department of Defense and universities to do simple mail<br />

transfer and file transfer type of operations. But, after the emergence of the<br />

Internet and World Wide Web (WWW), it became the dominant network transport<br />

provider. Even though it is based on the OSI model, the TCP/IP architecture is<br />

much more simple than the OSI or SNA layers. From an architectural point of<br />

view, there are two layers besides the link layer: the IP/UDP layer and the TCP<br />

layer. Anything above the TCP layer is considered an application layer, and it is<br />

the responsibility of the application to handle any protocol beyond the TCP layer.<br />

WAS for z/OS is just another application to TCP/IP. This means that the HTTP,<br />

IIOP, and MQ message headers and protocols are handled by WAS front-end<br />

processing modules.<br />

The discussions of the various security designs are based on the protocol<br />

architecture illustrated in Figure 2-1.<br />

IIOP<br />

WS – Security ( Authentication)<br />

IP address IP address<br />

IP address<br />

Mac address<br />

Authentication<br />

SSL (Integrity,Confidentiality)<br />

Mac address<br />

Router Router<br />

SOAP<br />

HTTP<br />

MSG<br />

SSL<br />

Socket<br />

Port<br />

Mac address<br />

IIOP<br />

Server/Service Provider<br />

Chapter 2. WebSphere security design 29


2.3 SSL overview<br />

2.3.1 SSL handshake<br />

For our discussion, we use HTTP for Web clients, IIOP for J2EE clients, MSG for<br />

message queue (MQ) clients, and SOAP for Web services requestor. These are<br />

the protocols that would be implicated in the design, and in each protocol header,<br />

there may be security-related information, such as user ID, password, token,<br />

cookie, key, and digital certificate, that is exchanged between the endpoints<br />

during communication. The security information that flows depends on the stage<br />

of communication. For example, during the initial phase of the communication, a<br />

user ID and password is exchanged if SSL is not enabled. If SSL is enabled then<br />

a user ID/password or other security information flows after a successful<br />

completion of a SSL handshake.<br />

Also, sometimes protocols are stacked on top of each other and the<br />

security-related information may be in any or all of the levels. A good example of<br />

this is the usage of SOAP over HTTP. There may be a user ID/password at the<br />

HTTP level, but there might also be security artifacts in the SOAP message.<br />

Secure Sockets Layer (SSL) is a protocol developed by the Netscape<br />

Communications Corporation that uses encryption to provide privacy and<br />

authentication between two applications in TCP/IP. SSL uses asymmetric cipher<br />

algorithms (RSA is normally used) to authenticate users and sign messages,<br />

and symmetric algorithms to ensure confidentiality and integrity. SSL is used for<br />

protecting connections between application users.<br />

This allows Web clients and servers to pass confidential or sensitive data<br />

through the Internet or intranet. SSL is also used by the Lightweight Directory<br />

Access Protocol (LDAP) for secure connections between LDAP clients and LDAP<br />

servers.<br />

When a secure connection is initiated by any of the partners, the first flow that<br />

occurs is the handshake. This is done after the port number of the destination is<br />

located, in which the port is defined as secured. Once the handshake is<br />

successfully completed, then the connection is secured for the entire duration of<br />

the communication.<br />

30 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Referring to Figure 2-2, the steps are as follows:<br />

1. First, the client sends a Client Hello message that lists the cryptographic<br />

capabilities of the client (sorted in client preference order) and contains the<br />

SSL/TLS protocol version desired. It also contains a random value.<br />

Client/Requester<br />

Figure 2-2 SSL handshake<br />

1. Client Hello<br />

2. Server Hello<br />

3. Server certificate<br />

4. Certificate Request<br />

5. Certificate done<br />

6. Client certificate<br />

7. Client key exchange<br />

8. Certificate verify<br />

9. Change cipher spec<br />

10. Finished<br />

11. Change cipher spec<br />

12. Finished<br />

Server/Service Provider<br />

2. The server responds with a Server Hello message, which contains the<br />

cryptographic method (cipher suite) selected by the server, the session ID,<br />

another random number, and the acceptable SSL/TLS protocol version. The<br />

client and server must support at least one common cipher suite or the<br />

handshake will fail.<br />

3. Following the Server Hello message, the server sends its certificate. With<br />

Secure Sockets Layer (SSL), X.509 V.3 certificates are used.<br />

4. If SSL Version 3 is used and the server application (for example, the Web<br />

server) requires a certificate for client authentication, the server sends a<br />

certificate request message. In the certificate request message, the server<br />

sends a list of the types of certificates supported and the distinguished names<br />

of acceptable certification authorities.<br />

5. The server then sends a Server Hello done message and waits for a client<br />

response. Upon receipt of the Server Hello done message, the client (the<br />

Web browser) verifies the validity of the server’s certificate and checks that<br />

the server hello parameters are acceptable.<br />

6. If the server requested a client certificate, the client sends a certificate or, if no<br />

suitable certificate is available, a no certificate alert. This alert is only a<br />

warning, but the server application can fail the session if client authentication<br />

is mandatory.<br />

Chapter 2. WebSphere security design 31


7. The client then sends a client key exchange message. This message<br />

contains the so-called pre-master secret, a 46-byte random number that is<br />

used in the generation of the symmetric encryption keys and the message.<br />

8. Authentication keys are encrypted with the public key of the server. If the<br />

client sent a certificate to the server, the client will now send a certificate<br />

verify message, which is signed with the client’s private key. By verifying the<br />

signature of this message, the server can explicitly verify the ownership of the<br />

client certificate. A similar process to verify the server certificate is not<br />

necessary. If the server does not have the private key that belongs to the<br />

certificate, it cannot decrypt the pre-master secret nor create the correct keys<br />

for the symmetric encryption algorithm, and the handshake must fail.<br />

9. The client uses a series of cryptographic operations to convert the pre-master<br />

secret into a master secret, from which all key material required for encryption<br />

and message authentication is derived. Then the client sends a change cipher<br />

spec message to make the server switch to the newly negotiated cipher suite.<br />

10.The finished message immediately following is the first message encrypted<br />

with this cipher method and keys.<br />

11.After the server responds with a change cipher spec and a finished message<br />

of its own, the SSL handshake is completed and encrypted application data<br />

can be sent.<br />

The SSL record protocol transfers application data using the encryption<br />

algorithm and keys agreed upon during the handshake phase.<br />

As explained above, symmetric encryption algorithms are used, since they<br />

provide much better performance than asymmetric algorithms.<br />

For SSL information visit:<br />

http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/<br />

com.ibm.websphere.zseries.doc/info/welcome_nd.html<br />

32 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


2.4 Authorization and EJB roles<br />

In Chapter 1, “Introduction” on page 1, we said that the servant region of the<br />

server is the address space (task/thread) that does the real work, executing<br />

servlet or EJB code. The servlet and the EJB both have two identities associated<br />

with them:<br />

► A security identity, which is used for controlling access to J2EE resources and<br />

downstream processing (calling another EJB or J2C resource). The default<br />

identity is the calling entity (user ID or another program’s process ID).<br />

► An execution identity, which is associated with the operating system<br />

task/thread during run time. The default identity is the servant region’s<br />

address space (process ID). This is supposed to be always trusted.<br />

To better control the security identity part, the J2EE authorization model provides<br />

for the usage of security roles for each servlet and EJB that is deployed to WAS<br />

for z/OS. The security role is determined at deployment time and is located in the<br />

deployment descriptor. The security role is then defined in RACF using the<br />

EJBROLE class in which the profile is checked against the role name to verify<br />

authority to access code.<br />

Furthermore, the default caller identity can be changed using the RunAs identity<br />

mechanism. The RunAs can be:<br />

► Run as the caller (which is just like the default).<br />

► Run as server (servant region’s user ID).<br />

► Run as based on role (role provided by the deployment descriptor) and<br />

mapped to an EJBROLE in RACF.<br />

2.5 Our scenarios<br />

In previous three sections set the tone for the next sections. Regardless of the<br />

title of the design or the flow of the client and server communication, the main<br />

goal of this chapter is to describe how security is handled at each stage during<br />

communication between two endpoints. Therefore, the security issues<br />

addressed are:<br />

► Client authentication<br />

► Client authorization<br />

► Data confidentiality<br />

► Data integrity<br />

Data confidentiality and integrity are secured when SSL is enabled. This means<br />

that when we say SSL, both confidentiality and integrity are implied. So, by doing<br />

Chapter 2. WebSphere security design 33


that, all security issues are discussed in each design that we present in the<br />

subsequent sections. For each scenario, we present the following:<br />

► Description<br />

► Logical flow<br />

► Configuration tasks and references<br />

2.5.1 Scenario 1 - authentication in HTTP server<br />

This scenario is intended to assist those who are z/OS-centric users whose main<br />

business is still running SNA and TCP/IP based applications, but at the same<br />

time want to use WAS for z/OS on a small scale with a simple configuration. This<br />

can be, for example, one HTTP server and one or several application servers.<br />

In addition, this scenario can be used as a starting point to develop, secure, and<br />

deploy simple J2EE applications for testing and some small-scale production.<br />

Description<br />

Figure 2-3 describes what this design provides. The HTTP server is on z/OS and<br />

it uses RACF facilities for its authentication requests. Since RACF is already<br />

used for other security purposes, it can also be used for securing the Web<br />

applications with minimum effort. The user registry used in WAS is LocalOS<br />

(SAF-based).<br />

Keep in mind that this design does not cover the back-end systems such as<br />

CICS, IMS, and DB2. Connectivity to the back-end systems is addressed<br />

separately.<br />

Web<br />

Client<br />

HTTP(s)<br />

HTTP<br />

Server<br />

z/OS<br />

Authentication Authorization DB2<br />

RACF<br />

Figure 2-3 Scenario 1 - authenticating on HTTP server<br />

WebSphere<br />

Application Server<br />

The configuration illustrated in Figure 2-3 assumes that the user is a Web client<br />

and that all client requests start with sending an HTTP request from the browser<br />

34 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS<br />

SSO<br />

CICS<br />

IMS


to the HTTP server on z/OS. The server redirects all HTTP requests to WAS after<br />

having done an authentication.<br />

Single sign-on (SSO) is enabled in WAS, and the user’s security credentials are<br />

propagated from the HTTP server to WAS. We assume that the user ID with<br />

which a user authenticates to the HTTP server is the same user ID that will be<br />

used to access WAS. The HTTP server sends the user’s credentials (certificate,<br />

basic authentication headers) to WAS when making requests. In this case, the<br />

HTTP server only operates as a proxy server. It forwards credentials at the HTTP<br />

protocol layer level. There is no propagation of a user’s identity, but only<br />

propagation of the user’s security credentials.<br />

Important: Note that form-based authentication is not possible for this<br />

configuration.<br />

We would like to inform the reader that data integrity and confidentiality is implied<br />

by the fact that the connection is over SSL.<br />

Chapter 2. WebSphere security design 35


Logical flow<br />

The flow deals mostly with authentication and to some degree authorization.<br />

Figure 2-4 describes the sequence of events that occur during client basic<br />

authentication and authorization using RACF.<br />

1. If SSL is requested, first the hello handshake is performed. Then, once the<br />

channel is secured, the client sends an HTTP request looking for an<br />

application (servlet/JSP or EJB) deployed in WebSphere Application Server.<br />

Client<br />

1<br />

HTTP<br />

Server<br />

WAS<br />

(sso, TAI)<br />

Figure 2-4 Scenario 1 - authenticating on HTTP server - logical flow<br />

2. The HTTP server receives the request from the client, retrieves the client user<br />

ID and password from the HTTP header, and calls RACF to verify the client’s<br />

identity.<br />

3. RACF verifies the identity of the client in its database and replies with a<br />

positive/negative response.<br />

4. If the response from RACF is negative, the HTTP server sends a request to<br />

the client to provide a valid user ID and password. If the response was<br />

positive, the HTTP server forwards the request to WAS.<br />

5. WAS looks at the HTTP request and, since single sign-on is enabled,<br />

bypasses the client authentication step and calls RACF to verify whether the<br />

client is authorized to execute the operation.<br />

6. RACF, based on its security definitions, either authorizes the request or<br />

rejects it. The URI needs to be defined as a protected resource for this<br />

purpose.<br />

36 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS<br />

2<br />

4<br />

7<br />

5<br />

3<br />

6<br />

RACF


7. If the response from RACF for the authorization request was yes, then the<br />

application requested by the client is executed and a reply is sent back to the<br />

client with the results.<br />

Configuration tasks<br />

Here we provide the list of tasks that need to be done to configure security for<br />

this design. The main task items are as follows:<br />

► Enable single sign-on (SSO) via the WebSphere administrative console, as<br />

follows: secure administration, applications, and infrastructure > single<br />

sign-on (SSO).<br />

► Add user ID/password of client to RACF.<br />

► Define EJBROLES in RACF to enable application authorization.<br />

► Configure SSL in each endpoint.<br />

References<br />

Refer to:<br />

► <strong>IBM</strong> HTTP Server Web site at:<br />

http://www-306.ibm.com/software/webservers/httpservers/doc/v51/icswg<br />

003.html<br />

► WebSphere Application Server on z/OS and Security Integration, REDP-4161<br />

2.5.2 Scenario 2 - authentication in reverse proxy security server<br />

This design is intended to assist users who are positioning to increase their<br />

e-business transactions using WAS on z/OS. The design can provide secure<br />

e-business by putting a Reverse Proxy Security Server (RPSS) outside the z/OS<br />

domain. That way z/OS and its domain would be within an intranet and anything<br />

beyond the RPSS would be in the Internet.<br />

In addition to the RPSS, a firewall can be placed to further tighten the security.<br />

Therefore, the goal is to have a tightly secured z/OS environment.<br />

Chapter 2. WebSphere security design 37


Description<br />

The scenario illustrated in Figure 2-5 also assumes (as in the previous scenario)<br />

that the user interface is inside a Web browser and that all transactions start with<br />

sending an HTTP request from the browser to an HTTP server on z/OS. This<br />

scenario includes a separate authentication server running outside the z/OS<br />

platform, and a single HTTP server and WAS running on z/OS.<br />

Web client<br />

HTTP(s)<br />

RPSS<br />

Authentication<br />

RPSS = Reverse Proxy Security Server<br />

HTTP(s)<br />

Web<br />

Server<br />

LDAP<br />

z/OS<br />

Native<br />

Authentication<br />

WebSphere<br />

Application<br />

Server<br />

Figure 2-5 Scenario 2 - authentication in reverse proxy security server<br />

Authentication is initially handled by the Reverse Proxy Security Server. Each<br />

Web client request has to go through this server first before going anywhere else.<br />

The RPSS’s user registry is an LDAP server on z/OS. The LDAP server on its<br />

turn is tied to RACF via the native authentication feature of LDAP on z/OS. This<br />

configuration makes it possible to authenticate outside z/OS using the RACF<br />

user ID and password. The HTTP server and application server always receive<br />

an authenticated user ID from the RPSS in a format that the HTTP server can<br />

understand. This user ID is used for authorization further on in the application<br />

server and is checked against RACF. There are two available mechanisms to<br />

forward the user ID:<br />

► LTPA tokens<br />

► HTTP headers and the Trust Association Interceptor (TAI)<br />

Privacy is implemented by using SSL/TLS between the Web client and HTTP<br />

server. Similarly, SSL can be used between the HTTP server and the application<br />

server.<br />

In this design, the RPSS is outside z/OS and it is using the LDAP registry located<br />

inside z/OS to carry out the authentication of the client. The RPSS and the LDAP<br />

communication is secured via SSL.<br />

38 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS<br />

SSO<br />

RACF<br />

Authorization<br />

CICS<br />

IMS<br />

DB2


This design does not cover the back-end systems such as CICS, IMS, and DB2.<br />

Connectivity to the back-end systems is addressed separately.<br />

Logical flow<br />

Data integrity and confidentiality is implied by the fact that the connection is over<br />

SSL. The flow deals mostly with authentication and to some degree<br />

authorization.<br />

Figure 2-6 shows a flow of the authentication from end to end. The flow<br />

describes a Web client accessing a Web-based application that resides in WAS<br />

for z/OS.<br />

Client RPSS LDAP<br />

1<br />

6<br />

2<br />

5<br />

3<br />

Web<br />

Server<br />

WAS<br />

(sso, TAI) RACF<br />

Figure 2-6 Scenario 2 - authenticating in reverse proxy security server - logical flow<br />

The flow given in Figure 2-6 describes an event that takes place at each step as<br />

clients initiate a connection to a J2EE application that is deployed to WAS. The<br />

sequence of events is:<br />

1. The client initiates a connection via HTTP to the Reverse Proxy Security<br />

Server. The connection goes through a three-way handshake and the<br />

connection is secured if SSL is enabled. Then the client sends the user ID<br />

and password in a secure communication.<br />

2. The RPSS receives the client request, looks at the HTTP header, and finds a<br />

user ID and password. To authenticate the user ID/password, the RPSS<br />

queries the LDAP server.<br />

3. The LDAP server is tied to RACF for native authentication and queries RACF<br />

if the specified user ID is known and valid to RACF.<br />

7<br />

10<br />

Chapter 2. WebSphere security design 39<br />

8<br />

4<br />

9


4. RACF verifies the validity of the user ID and positively replies to LDAP.<br />

5. LDAP also positively replies to RPSS.<br />

6. RPSS then forwards the HTTP request to the Web server in z/OS via a<br />

secure connection if SSL is enabled.<br />

7. The Web server receives the HTTP request and passes it on to WAS.<br />

8. If the Since single sign-on (SSO) mechanism is turned on, WAS does not<br />

need to do another authentication, but queries RACF to see whether the user<br />

is authorized to execute the work.<br />

9. RACF checks whether the user is authorized to execute the code (method).<br />

10.If the response from RACF is positive, the connection is complete, the work is<br />

done, and a reply is sent back to the client with the results of the operation.<br />

Configuration tasks<br />

Here we provide the list of tasks that need to be done to configure security for<br />

this design. This list may not be complete, but the main task items are:<br />

► Enable single sign-on (SSO) via the WebSphere Administrative console as<br />

follows: secure administration, applications, and infrastructure > single<br />

sign-on (SSO).<br />

► Set up LDAP with SDBM configuration.<br />

► Add user ID/password of client to RACF.<br />

► Define EJBROLES in RACF to enable application authorization.<br />

► Configure SSL in each endpoint.<br />

References<br />

For more information see:<br />

► WebSphere Application Server on z/OS and Security Integration, REDP-4161<br />

► Secure Production Deployment of B2B Solutions using WebSphere Business<br />

Integration Connect, SG24-6457<br />

2.5.3 Scenario 3 - J2EE client authentication using CSIv2<br />

Our objective here is to demonstrate a simple security aspect between a J2EE<br />

client and a J2EE application deployed to WAS on z/OS. This design is intended<br />

to assist users who are beginners to the J2EE (IIOP) communication in how to<br />

secure IIOP using CSIv2 security. A simple JavaBean program can be<br />

developed for the client to invoke a method (an EJB) on z/OS and verify that the<br />

connection is secured with CSv2 protocol.<br />

40 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Description<br />

Figure 2-7 is very simple. The J2EE client communicates directly with the<br />

application server on z/OS using the J2EE Remote Method Invocation over<br />

Internet Inter-Orb Protocol (RMI-IIOP). There is no HTTP server involved. Again,<br />

the user registry used in WAS is LocalOS (SAF-based).<br />

J2EE<br />

Client<br />

CSIv2<br />

RMI/IIOP<br />

Authentication<br />

WebSphere<br />

Application<br />

Server<br />

RACF<br />

z/OS<br />

Authorization<br />

Figure 2-7 Scenario 3 - J2EE client authentication with CSIv2<br />

CICS<br />

IMS<br />

At the WAS V6.1 level, there is only one available protocol for communicating<br />

securely between a J2EE client and WAS for z/OS: Common Secure<br />

Interoperability Version 2 (CSIv2). CSIv2 is a standard protocol that should be<br />

used for any new implementations. CSIv2 enables user ID propagation between<br />

J2EE environments. Using CSIv2, this user ID can be an LDAP distinguished<br />

name, a client certificate, a basic user ID, and so on. The user ID that is retrieved<br />

from the CSIv2 protocol can either be a RACF user ID or be mapped to a RACF<br />

user ID. The transport layer can be secured using SSL/TLS.<br />

Keep in mind that this design does not cover the back-end systems, such as<br />

CICS, IMS, and DB2. Connectivity to the back-end systems is addressed<br />

separately.<br />

Furthermore, the data integrity and confidentiality aspect of the security is<br />

handled by CSIv2, which we assume that the reader is aware of.<br />

Logical flow<br />

Data integrity and confidentiality is implied by the fact that the connection is over<br />

CSIv2/SSL. The flow deals mostly with authentication and to some degree<br />

authorization.<br />

DB2<br />

Chapter 2. WebSphere security design 41


Figure 2-8 shows a flow of a J2EE client accessing WAS on z/OS and the events<br />

that take place at each step.<br />

J2EE<br />

Client<br />

1<br />

WAS<br />

Figure 2-8 Scenario 3 - J2EE client using CSIv2 - logical flow<br />

The J2EE client initiates the communication using the CSIv2 protocol. By default,<br />

SSL ports for Common Secure Interoperability Version 2 are dynamically<br />

generated. The WAS port being used is a secured ORB port.<br />

1. Once the SSL handshake is complete, the J2EE client sends the internal IIOP<br />

(GIOP) request to WAS with security information added to the GIOP header.<br />

2. WAS receives the IIOP (GIOP) request, retrieves the security information,<br />

and queries RACF to authenticate the client.<br />

3. RACF checks the database to verify that the client is valid and known, and<br />

replies to WAS.<br />

4. WAS receives a positive or negative response for the authentication and, if<br />

the response from RACF is positive, queries RACF again to verify that the<br />

client is authorized to execute the code.<br />

5. RACF checks its profiles to see whether the client is authorized to access and<br />

execute the requested method and replies to WAS with positive or negative.<br />

6. WAS receives the response from RACF and, if the reply is yes, the method is<br />

executed and the reply is sent back to the client with the results.<br />

Note that all communication between WAS (servlet, EJB) and RACF is internal<br />

via interprocess communication.<br />

42 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS<br />

4<br />

2<br />

3<br />

RACF


Configuration tasks<br />

Here we provide a list of tasks that need to be done to configure security for this<br />

design. This list may not be complete, but the main task items are as follows:<br />

► Add the user ID/password of client to RACF.<br />

► Define EJBROLES in RACF to enable application authorization.<br />

► Enable CSIv2 (inbound/outbound) via the WebSphere administrative console<br />

on z/OS.<br />

► CSIv2 is considered enabled on the client with the existence of the<br />

com.ibm.CORBA.ConfigURL Java property. If the property is not specified or<br />

the property does not exist, CSIv2 is not enabled.<br />

References<br />

Refer to:<br />

► <strong>IBM</strong> <strong>Redbooks</strong> Technote: Configuration of WebSphere Application Server<br />

Security, TIPS0206, at:<br />

http://www.System Authorization<br />

Facilitys.ibm.com/abstracts/TIPS0206.html?Open<br />

► <strong>IBM</strong> Education Assistant at:<br />

http://publib.boulder.ibm.com/infocenter/ieduasst/v1r1m0/index.jsp?<br />

topic=/com.ibm.iea.doc/welcome.htm&tab=search&searchWord=csiv2&maxHi<br />

ts=50<br />

► WebSphere Application Server on z/OS and Security Integration, REDP-4161<br />

2.5.4 Scenario 4 - J2EE server authentication using CSIv2<br />

The objective of this design is to expand the previous design that dealt with a<br />

J2EE client directly connecting to z/OS. In this design the J2EE client is attached<br />

to an intermediate box that has a J2EE server running on it. The main goal with<br />

this design is to show users how authentication can be done using an identity<br />

assertion mechanism. Once the client is authenticated by the J2EE server<br />

running machine, there is no need to re-authenticate the client in WAS for z/OS,<br />

if an identity assertion mechanism is enabled.<br />

This is the most commonly used J2EE application connectivity, where two J2EE<br />

servers talk to each other over a secure connection using CSIv2.<br />

The integrity and confidentiality of data aspect of the security has been taken<br />

care of by CSIv2 internally and there is no need to describe it.<br />

Chapter 2. WebSphere security design 43


Description<br />

Figure 2-9 shows what this design is all about. The client to the J2EE server<br />

connection can be secured or not secured, but the J2EE server to WAS z/OS is a<br />

secure connection. The authentication registry being used in this case is LDAP<br />

attached to RACF via SDBM.<br />

J2EE<br />

Server<br />

Identity<br />

assertion<br />

CSIv2<br />

Client RMI/IIOP<br />

Authentication<br />

z/OS<br />

WebSphere<br />

Application Server<br />

LDAP<br />

Native<br />

Authentication<br />

Authorization<br />

Figure 2-9 Scenario 4 - J2EE server authentication using CSIv2<br />

The Common Secure Interoperability Version 2 protocol is designed to exchange<br />

its protocol elements in the service context of General Inter-ORB Protocol<br />

(GIOP) request and reply messages that are communicated over a<br />

connection-based transport. The protocol is intended for use in environments<br />

where transport layer security, such as that available through Secure Sockets<br />

Layer (SSL) and Transport Layer Security (TLS), is used for providing message<br />

protection (that is, integrity and or confidentiality) and server-to-client<br />

authentication. The protocol provides client authentication, delegation, and<br />

privilege functionality that might be applied to overcome security deficiencies in<br />

an underlying transport.<br />

CSIv2 authentication protocols used by WebSphere Application Server are<br />

add-on Interoperable Inter-ORB Protocol (IIOP) services. IIOP is a<br />

request-and-reply communications protocol used to send messages between<br />

two object request brokers (ORBs).<br />

For each request made by a client ORB to a server ORB, an associated reply is<br />

made by the server ORB back to the client ORB. Prior to any request flowing, a<br />

connection between the client ORB and the server ORB must be established<br />

over secured TCP/IP transport (SSL is a secure version of TCP/IP).<br />

An identity assertion is a way for one server to trust another server without the<br />

need to re-authenticate or re-validate the originating client. In this case, WAS for<br />

44 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS<br />

RACF<br />

CICS<br />

IMS<br />

DB2


z/OS is the server configured as the identity asserting server. The server being<br />

trusted is the J2EE server.<br />

Also note that this design does not cover back-end systems such as CICS, IMS,<br />

and DB2. Connectivity to the back-end systems is addressed separately.<br />

Logical flow<br />

The numbers shown in Figure 2-10 represent security actions taken at each step<br />

during a connection setup process.<br />

1. Initially, the client requests that it wants to access an object that resides on<br />

WAS for z/OS. Then the client starts its connection request via HTTP or IIOP.<br />

The connection is secured if SSL is enabled.<br />

Client<br />

1<br />

J2EE<br />

z/OS<br />

Server LDAP<br />

WAS<br />

RACF<br />

10<br />

2<br />

6<br />

Figure 2-10 Scenario 4 - J2EE server authentication - logical flow<br />

2. The J2EE server receives the client request and binds to LDAP to see<br />

whether the client can be authenticated. The binding to LDAP is over a secure<br />

connection using SSL.<br />

3. LDAP, which is connected to RACF via SDBM, then queries RACF to see<br />

whether the client can be authenticated.<br />

4. RACF checks its database profiles to verify that the client in question has a<br />

UID/GID defined for him and replies back to LDAP with the results of the client<br />

being authenticated or rejected.<br />

5. LDAP looks at the response from RACF and if the client cannot be<br />

authenticated, it sends a negative response back to the J2EE server. If the<br />

response is positive, then connection continues.<br />

5<br />

3<br />

9<br />

Chapter 2. WebSphere security design 45<br />

7<br />

4<br />

8


6. The J2EE server passes the client request to WAS on z/OS via IIOP (GIOP)<br />

with the security credentials.<br />

7. At this stage, authentication is complete, the requested object is located, and<br />

WAS checks to see whether the user is authorized to access and execute the<br />

method indicated in the object. To verify authorization, WAS queries RACF.<br />

8. RACF responds to WAS positively or negatively.<br />

9. If the response from RACF is positive, then the method is executed and<br />

results are sent back to the J2EE server. If the response from RACF is<br />

negative, the method is not executed.<br />

10.Finally, the outcome of the original operation is sent back to the client.<br />

Configuration tasks<br />

Here we provide the list of tasks that need to be done to configure security for<br />

this design. This list may not be complete, but the main task items are as follows:<br />

► Add the user ID/password of the client to RACF.<br />

► Define EJBROLES in RACF to enable application authorization.<br />

► Enable CSIv2 (inbound/outbound) via the admin console on z/OS.<br />

► Enable identity assertion via the WebSphere administrative console on z/OS.<br />

References<br />

Refer to:<br />

► <strong>IBM</strong> <strong>Redbooks</strong> Technote: Configuration of WebSphere Application Server<br />

Security, TIPS0206, at:<br />

http://www.System Authorization<br />

Facilitys.ibm.com/abstracts/TIPS0206.html?Open<br />

► <strong>IBM</strong> Education Assistant at:<br />

http://publib.boulder.ibm.com/infocenter/ieduasst/v1r1m0/index.jsp?<br />

topic=/com.ibm.iea.doc/welcome.htm&tab=search&searchWord=csiv2&max<br />

Hits=50<br />

2.5.5 Scenario 5 - JCA custom principal mapping<br />

WAS Version 6.0.x supports the J2EE Connector architecture (JCA) Version 1.5<br />

specification, which provides new features such as the inbound resource<br />

adapter.<br />

The demand to do more business online has forced companies to find ways to<br />

integrate their back-end systems such as CICS, IMS, and DB2 to the Internet. To<br />

integrate the back-end system to the Internet, one of the available solutions is to<br />

use J2C connectors. But with the J2C security architecture integrated with the<br />

46 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


ack-end rigid security system, accessing applications running on these systems<br />

may not be trivial.<br />

Log in to any of the back-end systems via the Internet t requires the user provide<br />

to his user ID/password several times. The requirement to re-authenticate a user<br />

is repetitive to some clients. In addition, it is not efficient to use many login<br />

passwords to access a single application in a system. The requirement to<br />

re-authenticate users must be minimized to a single sign-on, or at the most two<br />

sign-ons.<br />

The Java Connector Architecture (JCA) 1.5 has enhanced its connection factory<br />

specification to use JAAS for customizing principal login capability. This<br />

enhanced custom mapping capability allows users accessing the back-end<br />

system through the connectors to not have to resubmit their user ID/password<br />

information.<br />

From a security perspective, WebSphere Application Server Version 6.0.x<br />

provides an enhanced custom principal and credential mapping programming<br />

interface and custom mapping properties at the resource reference level.<br />

Therefore, our objective is to describe a scenario that can be used for<br />

implementing J2C custom principal mapping.<br />

Description<br />

Figure 2-11 to shows J2C custom principal mapping.<br />

Web Client<br />

TAM<br />

WebSEAL<br />

sso<br />

Authentication<br />

LDAP<br />

z/OS z/OS<br />

WebSphere<br />

Application Server<br />

JCA<br />

Mapping<br />

Module<br />

TAM<br />

Policy<br />

Server<br />

SAF user ID /<br />

password<br />

Figure 2-11 Scenario 5 - JCA custom principal mapping authentication<br />

CTG CICS<br />

Authentication<br />

RACF<br />

Authorization<br />

Chapter 2. WebSphere security design 47


As you can see, Web clients are first authenticated by Tivoli Access Manager<br />

and WebSeal before they can continue to access WAS on z/OS. TAM WebSeal<br />

is a trusted server to WAS on z/OS and provides the single sign-on. Therefore,<br />

there is no need for client re-authentication in WAS on z/OS, except for<br />

authorization.<br />

Note also that the CICS Transaction Gateway (CTG) and CICS reside in a<br />

separate z/OS system, and there is a big difference between the CTG being local<br />

to WAS or remote. We cover the difference later in the flow.<br />

With GSO principal mapping, a special-purpose JAAS login module inserts a<br />

credential into the subject header. This credential is used by the resource<br />

adapter (a pluggable J2C code) to authenticate to the EIS. The JAAS login<br />

module used is configured on a per-connection factory basis. The default<br />

principal mapping module retrieves the user name and password information<br />

from XML configuration files. The JACC provider for Tivoli Access Manager<br />

bypasses the credential that is stored in the Extensible Markup Language (XML)<br />

configuration files and uses the Tivoli Access Manager Global Sign-On (GSO)<br />

database instead to provide the authentication information for the EIS security<br />

domain.<br />

WebSphere Application Server provides a default principal mapping module that<br />

associates user credential information with EIS resources. The default mapping<br />

module is defined in the WebSphere Application Server Administrative console<br />

on the Application login panel. To access the panel, click Security → Secure<br />

administration, applications, and infrastructure. Under Java Authentication<br />

and Authorization Service, click Application logins. The mapping module name<br />

is DefaultPrincipalMapping.<br />

The EIS security domain user ID and password are defined under each<br />

connection factory by an authDataAlias attribute. The authDataAlias attribute<br />

does not contain the user name and password. This attribute contains an alias<br />

that refers to a user name and password pair that is defined elsewhere.<br />

The Tivoli Access Manager principal mapping module uses the authDataAlias<br />

attribute to determine the GSO resource name and the user name that is<br />

required to perform the lookup on the Tivoli Access Manager GSO database.<br />

The Tivoli Access Manager Policy Server retrieves the GSO data from the user<br />

registry.<br />

Tivoli Access Manager stores authentication information about the Tivoli Access<br />

Manager GSO database against a resource and user name pair.<br />

48 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Logical flow<br />

The logical shown in Figure 2-12 describes the steps taken at each stage during<br />

end-to-end communication with an enterprise information systems (EIS), in this<br />

case CICS. The flow is very high level but can be useful for indentifying the key<br />

areas when considering securing an application that communicates with an EIS,<br />

namely CICS and IMS.<br />

Client<br />

1<br />

TAM<br />

WebSeal<br />

4<br />

2<br />

3<br />

LDAP<br />

WAS<br />

(sso, TAI)<br />

5<br />

J2C<br />

Principal<br />

Mapping<br />

Module<br />

TAM Policy<br />

server CTG CICS RACF<br />

Figure 2-12 Scenario 5 - J2C custom principal mapping authentication - logical flow<br />

The flow is:<br />

1. The client opens a browser and mouse-clicks to access a bank account, and<br />

as a result an HTTP request is sent to TAM WebSeal over a secure<br />

connection, using SSL.<br />

2. TAM receives an HTTP request from the client over a secured connection,<br />

and accesses LDAP to verify whether the client is a known user.<br />

3. LDAP verifies that the client is a valid user.<br />

4. TAM WebSeal forwards the HTTP request over a secure connection to WAS<br />

on z/OS, after having authenticated the client.<br />

5. WAS for z/OS receives the HTTP request over a secure connection, and the<br />

Web container passes control to the EJB container to invoke the service.<br />

6. The service being requested is built based on accessing CICS using a J2C<br />

connector. Then the principal mapping module calls TAM to provide a<br />

16<br />

6<br />

8<br />

7<br />

Chapter 2. WebSphere security design 49<br />

15<br />

9<br />

11<br />

14<br />

12<br />

13<br />

10


mapping user ID to the user ID and password provided by the J2C resource<br />

adapter.<br />

7. The TAM policy server accepts the request and provides a mapped version of<br />

the user ID and returns control back to principal mapping module.<br />

8. Once the user ID mapping is done, connection continues, and since CTG is<br />

not local, the connection is sent over a TCP/IP connection to the destination<br />

z/OS system running the CTG daemon.<br />

9. CTG gets control and needs to authenticate the user and queries RACF for<br />

authentication.<br />

10.RACF finishes authentication and passes control back to CTG.<br />

11.CTG calls CICS via an interprocess signal since CICS is local.<br />

12.CICS needs to check whether the user is authorized to access CICS<br />

resources and queries RACF for authorization.<br />

13.RACF verifies that the user is authorized and passes control back to CICS.<br />

14.The service code is executed and a response with the results is sent back to<br />

CTG.<br />

15.CTG sends the response back on the same TCP/IP connection to the J2C<br />

persistent connection.<br />

16.From here the result is directly sent to the user.<br />

Configuration tasks<br />

To enable the J2C custom principal mapping scenario, at least the following<br />

configurations are required:<br />

► CTG configuration<br />

► J2C adapter resource configuration<br />

► TAM configuration<br />

► JAAS login module<br />

References<br />

The following resources are helpful in enabling J2EE connectors and the Tivoli<br />

Access Manager implementation:<br />

► WebSphere for z/OS V6 Connectivity Handbook, SG24-7064<br />

► WebSphere Application Server V6.1 InfoCenter<br />

► Security with <strong>IBM</strong> Tivoli Access Manager V6 and <strong>IBM</strong> WebSphere Application<br />

Server V6 on <strong>IBM</strong> z/OS, REDP-4205<br />

50 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


2.5.6 Scenario 6 - Web services authentication<br />

Web services is being touted to be the next Web communication protocol. It uses<br />

the service-oriented architecture model where one partner is the service<br />

consumer and the other one is the service provider. Web services uses SOAP for<br />

its communication, and SOAP is carried over by either HTTP or JMS.<br />

The objective of this design is to describe a scenario where a Web client<br />

requests a service that is deployed to WAS on z/OS. The Web client is attached<br />

to WAS on distributed. See Figure 2-13.<br />

Web<br />

Client<br />

HTTP(s)<br />

WAS<br />

Distributed<br />

Web Service<br />

ID assertion<br />

SOAP/HTTP<br />

Authentication<br />

Figure 2-13 Scenario 6 - Web services authentication<br />

WebSphere<br />

Application<br />

Server<br />

LDAP<br />

z/OS<br />

Authentication<br />

The user name and password information is stored in the SOAP message<br />

header as a username Token. When the username token is received by the Web<br />

service provider, the user name and password are extracted from the username<br />

token and are verified. Only when both user name and password are valid is the<br />

message accepted and processed at the server.<br />

Using the username token is just one of the ways of implementing authentication.<br />

This mechanism is also known as basic authentication. Other forms of<br />

authentication are digital signature, ID assertion, LTPA, and custom tokens.<br />

Chapter 2. WebSphere security design 51


Logical flow<br />

The high-level sequence of events that occur at each step is described as follows<br />

(Figure 2-14):<br />

1. The Web client requests access to a service deployed on WAS for z/OS, and<br />

sends an HTTP request over a secure connection to WAS on distributed.<br />

Client<br />

1<br />

WAS<br />

z/OS<br />

Distributed LDAP<br />

WAS<br />

RA<br />

Figure 2-14 Scenario 6 - Web services authentication - logical flow<br />

2. WAS on distributed binds to LDAP to authenticate the client.<br />

3. LDAP authenticates the client and returns the reply to WAS on distributed.<br />

4. WAS on distributed (EJB) builds a SOAP message and sends it over HTTP to<br />

WAS on z/OS.<br />

5. WAS on z/OS looks at the SOAP header and retrieves the client security<br />

information, then binds to LDAP to authenticate the client.<br />

6. LDAP authenticates the client and returns a reply to WAS on z/OS. Then the<br />

service provider executes the client’s request.<br />

7. WAS on z/OS passes the results back to WAS on distributed.<br />

8. WAS on distributed receives the results and sends back the results to the<br />

client.<br />

Configuration tasks<br />

Web services message security configuration is described in Chapter 6, “Web<br />

services message layer security” on page 107.<br />

Web services transport security configuration is described in Chapter 8, “Web<br />

services transport security” on page 245.<br />

52 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS<br />

2<br />

6<br />

8<br />

5<br />

3<br />

7<br />

4


References<br />

Refer to WebSphere Version 6 Web Services Handbook Development and<br />

Deployment, SG24-6461.<br />

2.5.7 Scenario 7 - WMQ client authentication<br />

WebSphere Message Queueing (WMQ), formerly known as MQSeries, is a<br />

product developed based on queuing theory. A queue has two endpoints, one for<br />

putting something into the queue and the other for taking something out of the<br />

queue. So WMQ provides a queuing mechanism for applications to exchange<br />

messages. In WMQ, queues are managed by a queue manager. To send and<br />

receive a message to or from the queue, the applications must first be connected<br />

to the queue manager through a channel. The channel can be local or remote.<br />

A WMQ client is an application that can be installed with no local queue<br />

manager, but can be connected to a remote queue manager via a TCP/IP.<br />

It would be efficient to run the queue managers on z/OS and the clients running<br />

WMQ on a different machine. In this case the application doing the MQI calls is a<br />

WMQ client, and there are benefits in doing that. The benefits can be:<br />

► There is no need for a full WebSphere MQ implementation on the client<br />

machine.<br />

► System administration requirements are reduced.<br />

► A WebSphere MQ application running on the client machine can connect to<br />

multiple queue managers on different systems.<br />

► Alternative channels using different transmission protocols can be used.<br />

Chapter 2. WebSphere security design 53


Description<br />

The configuration described below (Figure 2-15) focuses on security-related<br />

issues regarding messages that trigger a message-driven bean (MDB).<br />

MQ<br />

Client<br />

MDB = Message Driven Bean<br />

EJB = Enterprise JavaBean<br />

Message<br />

WebSphere<br />

Application<br />

Server<br />

Authentication<br />

Figure 2-15 Scenario 7 - MQ client authentication<br />

z/OS<br />

MDB EJB<br />

Authorization<br />

RACF<br />

When a JMS listener port passes on a message with a JMS or MQ format header<br />

to the MDB asynchronous processor, there is no password provided in the<br />

message header and there is no trust relationship established.<br />

Messages received asynchronously by the MDB are, in many cases, automated<br />

return messages from some kind of process, such as order received, handled,<br />

shipped, or delivered. In those cases it is unlikely that the message has<br />

originated from a user application, or a user, but from a system or process. So, in<br />

this kind of message processing, the presence of a password in the message<br />

header is not likely.<br />

After receiving the message from the listener port, the MDB analyzes the<br />

message and calls an EJB (stateless session bean), which runs under a system<br />

user. When the EJB is called, it might be desirable to run it under a user ID<br />

different from this system user ID in order to use standard J2EE role-based<br />

security at the user level, and eventually propagate the user ID downstream.<br />

If you have this requirement, you can have the EJB run under a meaningful user<br />

ID by performing a JAAS login, with the JMSX user ID. This way the EJB can be<br />

scheduled with this user ID, and the user information from the MQ message can<br />

be propagated further.<br />

Authorization on the provider side, MQ in this case, should be thoroughly<br />

planned. The listener port that triggers the MDB has a one-on-one relationship<br />

with a queue as defined in the queue destination. MQQUEUE SAF class profile<br />

54 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS<br />

CICS<br />

IMS<br />

Authorization


permits should reflect the identities related to the work being done after a<br />

message has been processed by an MDB.<br />

Logical flow<br />

By default, WMQ does not provide secure access when using client mode (see<br />

JMS transport security part 1 and 2 at developerWorks®), which communicates<br />

over TCP/IP. So, the client mode is unsecure unless SSL is configured and the<br />

JMS port is secured.<br />

WMQ 1<br />

Application Server<br />

Client MDB EJB<br />

CICS<br />

RACF<br />

1<br />

2<br />

4<br />

Figure 2-16 Scenario 7 - WMQ client authentication and authorization - logical flow<br />

The flow of this solution can be described as follows:<br />

1. The MQ client issues an MQI call and an SSL handshake is done to secure<br />

the connection. The client message is sent via the secured channel to the<br />

remote queue manager on WMQ on z/OS.<br />

2. The message is received on the WMQ port on z/OS and a message-driven<br />

bean is triggered. The bean extracts the user ID and password and queries<br />

RACF to check whether the user can be authenticated.<br />

3. RACF replies to the MDB after the client is authenticated.<br />

4. The MDB generates a passticket for the RACF user ID, using special code<br />

that can generate the passticket, or by calling a JAAS login module with the<br />

(RACF) user ID sent in the message and the password and the passticket<br />

generated in the previous step. Then the (stateless) session EJB is called<br />

with RunAs set to the (RACF) user ID used in the previous step.<br />

7<br />

5<br />

Chapter 2. WebSphere security design 55<br />

8<br />

3<br />

6<br />

9


5. WAS calls RACF to see whether the RunAs user is authorized to execute the<br />

EJB.<br />

6. RACF replies with the results and, if there is a positive response, the flow<br />

continues.<br />

7. The EJB then passes the message on to CICS via a message queue<br />

channel.<br />

8. CICS then calls RACF to check whether the passed user ID is authorized to<br />

execute code in its region.<br />

9. RACF responds with positive or negative.<br />

10.If the response from RACF is positive, the message is delivered to CICS, and<br />

at this time the message is said to be delivered.<br />

Reference<br />

Refer to:<br />

► WebSphere MQ Security, SC34-6588<br />

► WebSphere MQ Clients, GC34-6590<br />

► <strong>IBM</strong> WebSphere Developer Technical Journal: Securing connections<br />

between WebSphere Application Server and WebSphere MQ -- Part 1 at:<br />

http://www-128.ibm.com/developerworks/websphere/techjournal/0601_rat<br />

nasinghe/0601_ratnasinghe.html<br />

2.5.8 Scenario 8 - authorization using external authorization server<br />

Traditionally, authorization on the z/OS platform is done via the Resource<br />

Access Control Facility. But time has changed and technology has also changed.<br />

Many originally z/OS applications have a Web front-end nowadays and may<br />

even have a new tier in the middle. Many times, those new layers and front ends<br />

use Java, J2EE, and open source code and provide APIs to perform<br />

authorization functions, either locally or remotely (external to z/OS).<br />

Externalizing authorization can be cost effective, but at the same time it can be<br />

costly in terms of authorization response time. It can also introduce additional<br />

complexity, when multiple registries (on z/OS and on distributed) are being used<br />

and have to be kept in-sync. We cannot say that externalizing authorization is<br />

good for everyone. It depends on the end-to-end configuration of the systems<br />

that require user authorization.<br />

Description<br />

Java Contract for Containers (JACC) support allows the use of third-party<br />

authorization providers for access decisions. The default JACC provider for WAS<br />

56 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


is the Tivoli Access Manager. Tivoli Access Manager client functions are<br />

integrated in WAS.<br />

The configuration shown in Figure 2-17 has an external authorization server that<br />

has access to WAS on z/OS.<br />

Web Client<br />

HTTP(s)<br />

RPSS<br />

RPSS = Reverse Proxy Security Server<br />

HTTP(s)<br />

Authentication<br />

Web<br />

Server<br />

z/OS<br />

WebSphere<br />

Application<br />

Server<br />

Authorization<br />

Server<br />

Figure 2-17 Scenario 8 - authorization using external authorization server<br />

Authorization with<br />

JACC<br />

First the authentication is done through propagation of the client user ID using<br />

two possible mechanisms: LTPA tokens or the Trust Association Interceptor,<br />

which both provide single sign-on capability. Then WAS communicates with the<br />

external authorization server to verify that the user has been authorized to<br />

access the requested object.<br />

Configuration tasks<br />

To configure an external authorization server, use the WAS admin console:<br />

1. Select Secure administration, applications, and infrastructure →<br />

External authorization providers.<br />

2. Then select External authorization using a JACC provider.<br />

3. Select Secure administration, applications, and infrastructure →<br />

External authorization providers → Tivoli Access Manager.<br />

4. Fill out the general properties and Tivoli Access Manager properties. The<br />

general properties are:<br />

– Name (This is the name of the external authorization server name.)<br />

– Policy class name<br />

– Policy configuration factory class name<br />

– Role configuration factory class name<br />

– Provider initialization class name<br />

LDAP<br />

HTTP(s)<br />

SSO<br />

User Registry<br />

Chapter 2. WebSphere security design 57


References<br />

Refer to:<br />

► <strong>IBM</strong> WebSphere Application Server V6.1 Security Handbook, SG24-6316<br />

► WebSphere Application Server on z/OS and Security Integration, REDP-4161<br />

2.5.9 Scenario 9 - bridged security between z/OS and distributed<br />

using JAAS<br />

This section describes how a non-z/OS server can be bridged to WAS for z/OS<br />

via JAAS.<br />

JAAS has been defined in many books in many ways, but in the simplest terms<br />

JAAS is pluggable code used by WAS to authenticate and authorize users. In<br />

fact, JAAS means a user exit.<br />

When using JAAS to authenticate a user, a subject is created to represent the<br />

authenticated user. A subject comprises a set of principals, where each principal<br />

represents an identity for that user. You can grant permissions in the policy to<br />

specific principals. After the user is authenticated, the application can associate<br />

the subject with the current access control context. So, basically, the control is in<br />

the JAAS login module as to whether to authenticate or reject user requests<br />

coming in through WAS on distributed.<br />

This configuration describes a scenario where two existing security domains that<br />

operate in two different platforms can be consolidated.<br />

58 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Description<br />

Bridging, as defined in networking, is to join two or more different network<br />

platforms so that there is communication between users residing in either side of<br />

network. The distributed world and the z/OS world are two different platforms,<br />

and JAAS can be used for securing communication between them.<br />

Client<br />

Authentication<br />

WAS<br />

Distributed<br />

Authorization<br />

LDAP<br />

CSIv2<br />

RMI/IIOP<br />

JAAS<br />

Login<br />

Module<br />

z/OS<br />

WebSphere<br />

Application<br />

Server<br />

RACF<br />

Authentication<br />

Authorization<br />

Figure 2-18 Scenario 9 - bridged security between z/OS and distributed<br />

CICS<br />

IMS<br />

The challenge for a large enterprise is to leverage its existing security<br />

mechanisms on all of its platforms and to create an end-to-end security context<br />

flow. For example, if WAS is used as a layer to give a large number of users<br />

access to data that is kept in DB2, there would be security issues that need to be<br />

addressed. Some of these issues would be:<br />

► How to define all those potential users in RACF<br />

► If not defined in RACF, how to secure access to DB2 or other back-end<br />

systems in a sufficient manner<br />

► How to synchronize all existing user registries<br />

The suggested scenario illustrated in Figure 2-18 describes a combination of<br />

distributed security making use of a JAAS login module for authentication and<br />

authorization purposes and z/OS security for checking back-end access by<br />

means of RACF.<br />

► The user ID must be verified based on the user ID and password.<br />

► The message has to be encrypted to guarantee transport security, using<br />

SSL/TLS.<br />

► All Web-related parts of the enterprise application are deployed to WAS on<br />

distributed in this scenario. The user is allowed to access the application part<br />

(servlet, JSP) that calls an EJB in WebSphere on z/OS (WAS on z/OS being<br />

the J2EE server). WAS on distributed acts as a J2EE client to WAS on z/OS.<br />

DB2<br />

Chapter 2. WebSphere security design 59


► The user’s credentials are sent over RMI-IIOP using the CSIv2 security<br />

protocol to WAS on z/OS.<br />

► A custom-built JAAS login module is configured on z/OS to retrieve the tag<br />

from the credentials, map it to a system user, and set it as a principal for<br />

downstream authorizations. WAS on z/OS is configured to use localOS as an<br />

active user registry. Role-based security constraint decisions are handled by<br />

the security server (RACF) on z/OS. EJBROLE/GEJBROLE profiles are<br />

checked for that purpose.<br />

► Accessibility to z/OS back ends is handled by RACF in the usual manner.<br />

In this scenario there is no need to synchronize user registries. The addition of a<br />

tag to the user’s credentials and the mapping of that tag to a z/OS system user is<br />

the key for back-end access on z/OS. The amount of mapped RACF IDs in this<br />

way can be relatively limited, depending on the different types of access you wish<br />

to give to the Internet user. To block an unknown user coming in through the<br />

Internet, you could use a WebSEAL in front to the WAS distributed server.<br />

References<br />

Refer to <strong>IBM</strong> WebSphere Application Server V6.1 Security Handbook,<br />

SG24-6316.<br />

2.5.10 Scenario 10 - centralized user registry using LDAP on z/OS<br />

This scenario is to show users how LDAP and RACF can cooperate to provide a<br />

flexible user registry.<br />

60 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


The objective of this scenario is to describe the benefits of running an LDAP with<br />

SDBM. See Figure 2-19.<br />

Web<br />

Client<br />

HTTP(s)<br />

Web<br />

Server<br />

z/OS<br />

HTTP(s)<br />

WebSphere<br />

Application<br />

Server<br />

Authorization<br />

z/OS<br />

LDAP<br />

Authentication<br />

WAS distributed<br />

Web<br />

Client<br />

Figure 2-19 Scenario 10 - centralized z/OS LDAP user registry<br />

SDBM<br />

Authentication<br />

RACF<br />

The Lightweight Directory Access Protocol is an open industry standard that has<br />

evolved to meet these needs. LDAP defines a standard method for accessing<br />

and updating information in a directory. LDAP has gained wide acceptance as<br />

the directory access method of the Internet.<br />

Understanding LDAP design and implementation is becoming strategic within<br />

corporate intranets. It is being supported by a growing number of software<br />

vendors and is being incorporated into a growing number of applications. For<br />

example, the two most popular Web browsers, Netscape<br />

Navigator/Communicator and Microsoft Internet Explorer®, as well as application<br />

middleware, such as the <strong>IBM</strong> WebSphere Application Server or the <strong>IBM</strong> HTTP<br />

server, support LDAP functionality as a base feature.<br />

Chapter 2. WebSphere security design 61


References<br />

To learn more about LDAP and RACF integration on z/OS, refer to:<br />

► Understanding LDAP - Design and Implementation, SG24-4986<br />

► Implementation and Practical Use of LDAP on the <strong>IBM</strong> eServer iSeries<br />

Server, SG24-6193<br />

► Using LDAP for Directory Integration, SG24-6163<br />

62 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Chapter 3. Web container security<br />

The Web container processes servlets, JSPs, and other types of server-side<br />

includes. Requests are sent by the Web client. Web clients use the HTTP or<br />

HTTPS protocol to send the authentication information. Web authentication is<br />

required for Web clients when they access protected resources and is performed<br />

by the Web authentication module.<br />

In WAS V6.1, Web container security is improved. We introduce the Web<br />

authentication improvements in this chapter:<br />

► “Web authentication improvements” on page 64<br />

► “Implementation with the admin console” on page 65<br />

► “Why you should use these options” on page 69<br />

3<br />

© Copyright <strong>IBM</strong> Corp. 2007. All rights reserved. 63


3.1 Web authentication improvements<br />

An authentication mechanism defines rules about security information, for<br />

example, whether a credential is forwardable to another process, and the format<br />

security information is stored in.<br />

In V6.1, the Web authentication mechanism is improved. We introduce the<br />

following Web authentication improvements in this chapter:<br />

► Separate Web authentication and authorization, discussed in “Separate Web<br />

authentication and authorization” on page 64<br />

► Enhanced control over Web authentication behavior, discussed in “Web<br />

authentication enhanced control” on page 64<br />

3.1.1 Separate Web authentication and authorization<br />

In WebSphere Application Server V6.1, Web authentication and authorization<br />

are separated.<br />

Before supporting this new function, in order for a request to be authenticated, it<br />

had to be a Uniform Resource Identifier (URI) requiring authorization, too.<br />

Now, Web authentication can be performed with or without Web authorization,<br />

and the Web client’s authenticated identity is available whether or not Web<br />

authorization is required. An authenticated identity is persisted both for protected<br />

and unprotected resources. Without the separation of Web authentication and<br />

Web authorization, a Web authenticated identity is not available when Web<br />

authorization is not required, and programmatic security cannot work<br />

independently without container declarative security.<br />

3.1.2 Web authentication enhanced control<br />

WebSphere Application Server provides enhanced control over the<br />

authentication behavior of a Web client.<br />

Depending upon the option that you select, WebSphere Application Server can<br />

retain the authentication data for future use. This adds flexibility to the handling<br />

of authentication for Web applications:<br />

► To allow failed certificate authentication to fall back to basic authentication<br />

(user ID/password challenge).<br />

► To allow the retention of an authenticated identity and make it available to<br />

Web applications running under an unprotected URI. Without this capability,<br />

64 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


such Web applications would not be able to use getRemoteUser(),<br />

isUserInRole(), or getUserPrincipal().<br />

3.2 Implementation with the admin console<br />

You can configure the Web authentication behavior with the WebSphere<br />

administrative console.<br />

3.2.1 General settings at the cell level<br />

Through the following setting, Web authentication behavior is controlled. This<br />

setting affects the entire cell. Remember that it affects all applications deployed<br />

to the cell.<br />

In order to set up the Web authentication behavior:<br />

1. Click Security → Secure administration and applications.<br />

2. Under Authentication, select Web security → General settings (Figure 3-1).<br />

Figure 3-1 Web security settings in WebSphere admin console<br />

The following options exist to change the behavior of Web authentication when<br />

accessing a URI:<br />

► Authenticate only when the URI is protected.<br />

This is a default option, and is the same as in the previous version of<br />

WebSphere. The Web client can retrieve an authenticated identity only when<br />

it accesses a protected URI. WebSphere Application Server challenges the<br />

Chapter 3. Web container security 65


Web client to provide authentication data when the Web client accesses a<br />

URI that is protected by a J2EE role.<br />

► Authenticate when any URI is accessed.<br />

The Web client must provide authentication data regardless of whether the<br />

URI is protected.<br />

Figure 3-2 URI access authentication behavior<br />

The following options are available for Web authentication enhanced control:<br />

► Use available authentication data when an unprotected URI is accessed.<br />

The Web client is authorized to call the getRemoteUser, isUserInRole, and<br />

getUserPrincipal methods. It retrieves an authenticated identity from either a<br />

protected or an unprotected URI. Although the authentication data is not used<br />

when you access an unprotected URI, the authentication data is retained for<br />

future use. This option is available when you select the “Authenticate only<br />

when the URI is protected” check box.<br />

► Default to basic authentication when certificate authentication for the HTTPS<br />

client fails.<br />

The WebSphere Application Server challenges the Web client for a user ID<br />

and password when the required HTTPS client certificate authentication fails.<br />

66 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Figure 3-3 Web authentication enhanced control<br />

3.2.2 Control server level Web authentication behavior<br />

The settings introduced in 3.2.1, “General settings at the cell level” on page 65<br />

control Web authentication behavior on the cell level. If you wish to control it on<br />

the server level, you can specify the system properties given in Table 3-1.<br />

Table 3-1 Web authentication system property values<br />

Property name Value Description<br />

com.ibm.wsspi.security.web.webA<br />

uthReq<br />

com.ibm.wsspi.security.web.webA<br />

uthReq<br />

com.ibm.wsspi.security.web.webA<br />

uthReq<br />

lazy equiv.<br />

Authenticate only when the URI is<br />

protected option<br />

persisting equiv.<br />

Use available authentication data<br />

when an unprotected URI is<br />

accessed option<br />

always equiv.<br />

Authenticate when any URI is<br />

accessed option<br />

Chapter 3. Web container security 67


Property name Value Description<br />

com.ibm.wsspi.security.web.failO<br />

verToBasicAuth<br />

true equiv.<br />

Default to basic authentication<br />

when certificate authentication for<br />

the HTTPS client fails option<br />

To specify the system property, complete the following steps:<br />

1. Click Servers → Application servers → server_name.<br />

2. Under Server Infrastructure, click Java and Process Management →<br />

Process Definition → Servant → Java Virtual Machine.<br />

3. Under Additional properties, click Custom properties → New.<br />

4. Specify property name and value, as shown in Figure 3-4.<br />

Figure 3-4 Configuration of Web security for server level control<br />

68 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Figure 3-5 shows that a new property has been added.<br />

Figure 3-5 Example of server level control for Web security<br />

You can override the general settings of Web security by specifying a system<br />

property on the server level.<br />

3.3 Why you should use these options<br />

The following are good reasons to use the options discussed:<br />

► As an alternative to using a role with all authenticated.<br />

All authenticated specifies whether to map all of the authenticated users to a<br />

specified role. When you map all authenticated users to a specified role, all of<br />

the valid users in the current registry who have been authenticated can<br />

access resources that are protected by this role.<br />

► Do your own authorization with no role.<br />

► Use SAF EJBROLEs.<br />

Chapter 3. Web container security 69


70 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Chapter 4. Application security<br />

4<br />

One of the features of WebSphere is the ability to enable or disable global<br />

security. Global security acts as a switch that enables various security settings in<br />

WebSphere. For WebSphere V6.1 for z/OS, security enablement has been<br />

extended to allow enabling or disabling of application security while leaving<br />

administrative security enabled. By separating the two, application security can<br />

be disabled to diagnose application-related setup problems, while still leaving<br />

administrative security enabled to protect the administrative console. Application<br />

security is disabled by default.<br />

To enable application security, both administrative security and application<br />

security must be enabled. This brief chapter explains how to do this.<br />

© Copyright <strong>IBM</strong> Corp. 2007. All rights reserved. 71


4.1 Administrative security enablement<br />

Turning on administrative security activates the settings that protect your server<br />

from unauthorized users. The settings include the authentication of users, the<br />

use of Secure Sockets Layer (SSL), and the choice of user account repository.<br />

Administrative security protects the following:<br />

► Authentication of HTTP clients<br />

► Authentication of IIOP clients<br />

► Administrative console security<br />

► Naming security<br />

► Use of SSL transports<br />

► Role-based authorization checks of servlets, enterprise beans, and mbeans<br />

► Propagation of identities (RunAs)<br />

► CBIND checks<br />

► The common user registry<br />

► The authentication mechanism<br />

► Other security information that defines the behavior of a security domain<br />

includes:<br />

– The authentication protocol (remote method invocation over the Internet<br />

Inter-ORB Protocol (RMI/IIOP) security)<br />

– Other miscellaneous attributes<br />

4.2 Application security enablement<br />

Application security enables security for the applications in your environment.<br />

This type of security provides application isolation and requirements for<br />

authenticating application users.<br />

For Web resources, when application security is disabled, security constraints on<br />

those resources in the web.xml located in the Web application archive (WAR) file<br />

are not enforced. When accessing a protected resource, a Web client is not<br />

prompted for authentication, and the resources protected by the security<br />

constraint can be accessed by anyone. For example, authentication methods<br />

such as form-based authentication, basic authentication, and client certificate<br />

authentication are not in affect when application security is disabled. Resources<br />

such as HTML pages, images, or other files are accessible by everyone. In<br />

72 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


addition, transport settings that guarantee integrity or confidentiality are also not<br />

in effect, and the application can be accessed from a non-SSL port.<br />

For enterprise bean resources, when application security is disabled, the client<br />

Common Secure Interoperability Version 2 (CSIv2) code ignores the CSIv2<br />

security tags for objects that are unknown system objects. When pure clients see<br />

that application security is disabled, these clients prompt for naming lookups, but<br />

do not prompt for enterprise bean operations.<br />

Attention: Administrative security must be enabled in order to enable<br />

application security.<br />

Application security can be enabled or disabled in the administrative console by<br />

following the path Security → Secure administration, applications, and<br />

infrastructure.<br />

Chapter 4. Application security 73


Figure 4-1 illustrates the application security enablement check box in the<br />

administrative console.<br />

Figure 4-1 Enabling application security<br />

74 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Chapter 5. Web services security<br />

introduction<br />

5<br />

This chapter provides an introduction for Chapter 6, “Web services message<br />

layer security” on page 107 and Chapter 8, “Web services transport security” on<br />

page 245. Here we discuss security for Web services as part of a<br />

service-oriented architecture (SOA). We introduce the message and the<br />

transport layers where security can be enforced. Then we further describe<br />

security features available for each layer. Finally, we present our test application<br />

in our test environment.<br />

This chapter focuses on presenting Web services security concepts, whereas the<br />

following two chapters focus on the practical implementation of these concepts in<br />

WebSphere Application Server for z/OS.<br />

The following topics are discussed here:<br />

► “SOA, Web services, z/OS, and security” on page 76<br />

► “Web services security exposures” on page 77<br />

► “Web services message and transport security” on page 78<br />

► “Web services message layer security with WS-Security” on page 81<br />

► “Web services transport layer security” on page 90<br />

► “Our SecurityInfo Web service application and environment” on page 98<br />

© Copyright <strong>IBM</strong> Corp. 2007. All rights reserved. 75


5.1 SOA, Web services, z/OS, and security<br />

About 50% of WebSphere Application Server for z/OS applications running in<br />

production are used as an “integration layer in Service-Oriented Architecture”<br />

(Gartner 2005). This integration layer for SOA is composed of Web services or<br />

EJBs. For example, it may integrate services deployed in core-business<br />

transaction processors such as CICS or IMS, or services deployed in<br />

WebSphere Application Server for z/OS itself.<br />

WebSphere Application Server for z/OS is a central component in an SOA for the<br />

following purposes:<br />

► SOA-enable, extend, and reuse existing mainframe assets.<br />

► Execute business critical services requiring the highest quality of service.<br />

► Connect and integrate services or composite applications across disparate<br />

information systems.<br />

WebSphere Application Server for z/OS is also the foundation of strong SOA<br />

building blocks such as WebSphere ESB for z/OS (Enterprise Service Bus) and<br />

WebSphere Process Server for z/OS. WebSphere ESB for z/OS provides a<br />

flexible connectivity infrastructure for integrating services. WebSphere Process<br />

Server for z/OS forms processes and orchestrates services.<br />

Web services is the most common technology standard used to implement SOA.<br />

However, it is not the only technology one can use to develop the parts of an<br />

SOA. Many SOAs involve the integration of legacy data, which is contained in<br />

systems that use technology such as MQSeries and CORBA. However, Web<br />

services is rapidly becoming the de facto standard used to support SOA.<br />

As companies are transforming towards SOA, information systems reach an<br />

unprecedented level of integration and flexibility. SOA is about integration inside<br />

or across enterprises. In such an environment, non functional requirements<br />

become increasingly important. Performance, scalability, availability,<br />

manageability, and so on, must be taken into account. But, because SOA<br />

involves the core business applications, because SOA impacts the handling of<br />

critical business data, one of the major non functional requirements to consider is<br />

security.<br />

In this chapter we introduce Web services security features relating to<br />

WebSphere Application Server for z/OS.<br />

76 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


5.2 Web services security exposures<br />

Generally, an end-to-end security solution addresses the security issues found<br />

along the path of a request from an end client to a target service, including any<br />

intermediary services that route, or participate in, the service request.<br />

Potential security exposures are illustrated in Figure 5-1.<br />

Figure 5-1 Potential security exposures with Web services<br />

These potential security exposures are of three kinds:<br />

► When there is no authentication, spoofing can happen. An attacker can send<br />

a modified SOAP message to the service provider, pretending to be a bank<br />

teller, to obtain confidential information, or to withdraw money from another<br />

customer’s account.<br />

► When there is no integrity, tampering can happen. The SOAP message can<br />

be intercepted between the Web service requester and provider. An attacker<br />

can modify the message, for example, to deposit the money into another<br />

account by changing the account number. Because there is no integrity<br />

constraint, the Web service provider does not verify whether the message is<br />

valid, and accepts the modified transaction.<br />

► When there is no confidentiality, eavesdropping can happen. Without data<br />

encryption, SOAP messages are sent in clear text, and the information<br />

contained in the message can be intercepted or read by an attacker.<br />

Confidential customer or bank information can get into the wrong hands.<br />

Chapter 5. Web services security introduction 77


5.3 Web services message and transport security<br />

In order to protect against the risk of the above-mentioned security exposures, it<br />

is possible to use a combination of two types of security to secure the Web<br />

services environment:<br />

► Message layer security<br />

In the Web services context, the message layer is the SOAP layer. The<br />

WS-Security specifications indicate how SOAP Extensible Markup Language<br />

(XML) messages can carry security contexts.<br />

► Transport layer security<br />

In the Web services context, the transport layer can be of different types:<br />

Hypertext Transfer Protocol (HTTP), Remote Method Invocation/Internet<br />

Inter-ORB Protocol (RMI/IIOP), and WebSphere MQSeries. Hence, transport<br />

layer security relies on the security features offered by the chosen transport<br />

protocol. These transport layers typically carry authentication information in<br />

headers, with optional additional security provided by encapsulation in the<br />

Secure Sockets Layer (SSL)/Transport Layer Security (TLS) protocol.<br />

Because TLS establishes security context that is meaningful only to the two<br />

physical endpoints of a connection, it does not fully meet typical Web services<br />

end-to-end security requirements. For example, an HTTP connection can be<br />

protected by SSL/TLS. However, the security context resulting from the partners’<br />

mutual authentication, and the negotiation of cryptographic parameters, cannot<br />

be propagated from the user to the final service if intermediary services or<br />

gateways have to be traversed.<br />

On the other hand, the WS-Security specifications allow for the propagation of<br />

security context, using SOAP messages.<br />

78 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Figure 5-2 illustrates the differences between message and transport layer<br />

security.<br />

Figure 5-2 Web services message and transport layer security<br />

Transport layer security (such as basic authentication and SSL client<br />

authentication) is a point-to-point security that identifies one server to another but<br />

does not allow for security context information to be passed through<br />

intermediaries or gateways.<br />

WS-Security addresses this problem by allowing security credentials to be<br />

passed within the SOAP message, so that the credentials of the service<br />

requester can be passed via an intermediate gateway, and can still be used to<br />

identify the requester to the service provider. This is end-to-end security.<br />

It is possible to implement Web services security at two levels: the message<br />

layer level and the transport layer level. If the Web services environment is<br />

simple (for example, it does not span multiple nodes), a security solution based<br />

on transport level security alone may be all that is needed. For more complex<br />

scenarios, however, it may not be enough on its own.<br />

In the two following sections, we provide general guidelines to help decide what<br />

type of security solution to implement.<br />

Chapter 5. Web services security introduction 79


5.3.1 When to use message layer security<br />

A security solution might choose to use message layer security with WS-Security<br />

when:<br />

► Intermediaries are used. Intermediaries is a generic word for any server,<br />

gateway, appliance, or ESB that can handle SOAP messages. Intermediaries<br />

might provide services or mediations to the SOAP requests. For example, a<br />

gateway might provide an authentication service and then forward credentials<br />

or an asserted identity to the Web service provider.<br />

► Multiple transport protocols or middleware are being used. Message layer<br />

security with WS-Security is transport independent. This gives a lot of<br />

flexibility and allows you to change the transport protocol without having to<br />

change the security architecture.<br />

► The Web service partners support WS-Security, and a general decision has<br />

been made to flow security tokens in accordance with the WS-Security<br />

specification. This decision may also be made so that the security design is<br />

based on open standards.<br />

► Multiple parts of the message have to be secured in different ways. You can<br />

apply multiple different security requirements, such as integrity, on the<br />

security token (user ID and password), and confidentiality on the SOAP body.<br />

► Identity assertion or attribute propagation is required. If an already<br />

authenticated user needs to access a Web service that has to know the user<br />

identity, then it is necessary to propagate the user identity and maybe the<br />

security context to the Web service provider. WS-Security implements identity<br />

assertion.<br />

Message layer security can be used with or without transport security.<br />

5.3.2 When to use transport layer security<br />

A security solution might choose to use transport layer security when:<br />

► No intermediaries are used in the Web service environment or, if there are<br />

intermediaries, you can guarantee that once the data is decrypted, it cannot<br />

be accessed by an untrusted node or process.<br />

► The transport is only based on one protocol or middleware such as HTTP,<br />

RMI/IIOP, messaging middleware, and so on.<br />

► The complete SOAP message integrity and confidentiality need to be<br />

ensured. WS-Security allows you to ensure integrity and confidentiality for<br />

parts of the SOAP message. Some security architecture might find easier or<br />

more secure to ensure full SOAP message integrity and confidentiality.<br />

80 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


► The Web service client or provider does not support the WS-Security<br />

specification.<br />

► A trust relationship needs to be created between two parties. This is<br />

particularly useful to build up the trust relationship for identity assertion. In<br />

that case, identity assertion occurs at the message layer and the trust<br />

relationship occurs at the transport layer.<br />

Transport layer security can be used with or without message layer security.<br />

5.4 Web services message layer security with<br />

WS-Security<br />

In this section we introduce Web services security at the message layer level.<br />

We describe the WS-Security standard and how WebSphere Application Server<br />

for z/OS supports it.<br />

5.4.1 End-to-end security<br />

End-to-end security is about ensuring integrity, confidentiality, authentication,<br />

and authorization along the path between the user’s initial authentication, across<br />

intermediaries, and the for final use of the authenticated identity for the purpose<br />

of access control or auditing.<br />

Because the WS-Security specifications allow for the propagation of security<br />

context using SOAP messages, Web service message layer security provides<br />

the ability to enforce end-to-end security.<br />

Chapter 5. Web services security introduction 81


5.4.2 WS-Security standard<br />

SOAP messaging security is defined in the WS-Security standard. The other<br />

specifications define security services that themselves are implemented as Web<br />

services. See Figure 5-3.<br />

Figure 5-3 WS-Security standard<br />

The WS-Security specifications evolve to standards as a process driven by the<br />

Organization for the Advancement of Structured Information Standards (OASIS).<br />

OASIS is a not-for-profit, international consortium that drives the development,<br />

convergence, and adoption of On Demand business standards. Members<br />

themselves set the OASIS technical agenda, using a lightweight, open process<br />

expressly designed to promote industry consensus and unite disparate efforts.<br />

The consortium produces open standards for Web services, security, On<br />

Demand business, and standardization efforts in the public sector and for<br />

application-specific markets.<br />

WS-Security defines a set of extensions to the SOAP standards, which are used<br />

to:<br />

► Provide message integrity and confidentiality for SOAP messages.<br />

► Associate a security token to a SOAP message.<br />

► Provide for the propagation of a security context.<br />

Other WS-Security specifications are introduced briefly in the following list:<br />

► WS-Policy<br />

This addresses the capabilities and constraints of security or business<br />

policies on intermediaries and endpoints, for instance, required security<br />

tokens, supported encryption algorithms, and privacy rules.<br />

82 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


► WS-Trust<br />

This describes a framework for trust models that enable Web services to<br />

securely interoperate.<br />

► WS-Privacy<br />

This describes a model for how Web service providers and requestors state<br />

privacy preferences and organizational privacy practice statements.<br />

► WS-Secure Conversation<br />

This describes how to manage and authenticate message exchanges<br />

between parties, including security context exchange and establishing and<br />

deriving session keys.<br />

► WS-Federation<br />

This describes how to manage and broker the trust relationships in a<br />

heterogeneous federated environment, including support for federated<br />

identities.<br />

► WS-Authorization<br />

This describes how to manage authorization data and authorization policies.<br />

WS-Security provides a general purpose mechanism for associating security<br />

tokens with messages. Typical examples of security tokens in<br />

WebSphere-based Web services are user name and password, X.509<br />

certificates, and LTPA tokens.<br />

5.4.3 WS-Security support in WebSphere<br />

The WS-Security support is provided in WebSphere 5.0.2 and later. Each<br />

version of WebSphere is based on different versions of the Web services<br />

security language.<br />

The first version of the WS-Security specification was proposed by <strong>IBM</strong>,<br />

Microsoft, and VeriSign in April 2002. After the formalization of the April 2002<br />

specifications, the specification is transferred to the OASIS consortium. In OASIS<br />

activities, core specification and many profiles that describe the use of a specific<br />

token framework in WS-Security have been discussed. The latest specification<br />

and profiles of WS-Security were proposed in March 2004 as the OASIS<br />

standard. The latest core specification, Web Services Security: SOAP Message<br />

Security 1.0 (WS-Security 2004) was standardized in March 2004. The two<br />

profiles, Web Services Security Username Token Profile 1.0 and Web Services<br />

Security X.509 Certificate Token Profile 1.0, were standardized at the same time.<br />

There are other token profiles that OASIS is currently working on: Web Services<br />

Security: SAML Token Profile, Web Services Security: Rights Expression®<br />

Chapter 5. Web services security introduction 83


Language (REL) Token Profile, Web Services Security: Kerberos Token Profile,<br />

Web Services Security: Minimalist Profile (MProf), and Web Services Security:<br />

SOAP Message with Attachments (SwA) Profile.<br />

The support of the April 2002 specification is provided in WebSphere 5.0.2 and<br />

5.1. WebSphere Application Server Versions 6.0 and 6.1 support the<br />

WS-Security 1.0 specification and two profiles (UserName-Token 1.0, x.509<br />

Token 1.0).<br />

WebSphere Application Server for z/OS supports most of the WS-Security<br />

specifications and profiles. Web services security is still fairly new, and some of<br />

the standards are still being defined or standardized. Some functionalities are not<br />

supported in WebSphere Application Server for z/OS.<br />

For more details about what precisely is supported with WebSphere Application<br />

Server for z/OS, refer to the InfoCenter:<br />

http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/<br />

com.ibm.websphere.zseries.doc/info/zseries/ae/cwbs_supportfunction.html<br />

http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/<br />

com.ibm.websphere.zseries.doc/info/zseries/ae/cwbs_welcwebsvcsec.html<br />

5.4.4 WS-I basic security profile support<br />

Web services Interoperability Organization (WS-I) is an open industry effort<br />

promoting Web services interoperability across vendors, platforms, programming<br />

languages, and applications. One of WS-I’s major deliverables to date is WS-I<br />

Basic Profile, which provides implementation guidelines for how the profiled Web<br />

services specifications should be used together for best interoperability. WS-I<br />

Basic Profile V1.1 (BP1.1) is supported in WebSphere v6.0 and later.<br />

WS-I Basic Security Profile (BSP) v1.0 is a working group draft that consists of a<br />

set of non-proprietary Web services specifications that clarifies and amplifies<br />

those specifications to promote Web services security interoperability across<br />

different vendor implementations.<br />

WebSphere Application Server for z/OS v6.1 now supports applications to<br />

comply with the WS-I Basic Security Profile V1.0. It provides configuration<br />

options to ensure that the BSP recommendations and security considerations<br />

can be enabled to ensure interoperability.<br />

84 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


5.4.5 WS-Security high-level architecture<br />

Figure 5-4 shows the WS-Security high-level architecture of how WebSphere<br />

applies WS-Security information to the SOAP message.<br />

Figure 5-4 WS-Security high-level architecture<br />

WS-Security is designed and implemented as message level handlers of the<br />

Web services engine. A WS-Security handler is a system handler (called security<br />

handler in the figure) and is registered to the Web service run time.<br />

► On the client side (assuming a WebSphere J2EE client), the WS-Security<br />

handler is invoked to generate the required security headers in the SOAP<br />

message before the message is sent out to the wire. The security handler<br />

generates the security constraint defined in the deployment descriptor and<br />

packages the security information (digital signature, encrypted data, and<br />

security tokens) in the SOAP message.<br />

► On the server side, the WS-Security handler is called to enforce the declared<br />

security constraint in the deployment descriptor prior to dispatching the<br />

request to the Web service EJB or JavaBeans implementation.<br />

This is similar to security interceptors with CSIv2.<br />

The security constraints of the request sender and the request receiver must<br />

match. Also, the security constraints of the response sender and response<br />

Chapter 5. Web services security introduction 85


eceiver must match. For example, if you specify integrity as a constraint in the<br />

request receiver, then you must configure the request sender to have integrity<br />

applied to the SOAP message. Otherwise, the request is denied because the<br />

SOAP message does not include the integrity specified in the request constraint.<br />

5.4.6 Message authentication, integrity, confidentiality, ID assertion<br />

Using WS-Security, the authentication mechanism, integrity, confidentiality, and<br />

identity assertion can be applied at the message level.<br />

Authentication<br />

Web services security provides a general-purpose mechanism to associate<br />

security tokens with messages for single message authentication. A specific type<br />

of security token is not required by Web services security. Web services security<br />

is designed to be extensible and support multiple security token formats to<br />

accommodate a variety of authentication mechanisms.<br />

WS-Security supports the following authentication mechanisms via the insertion<br />

of a security token:<br />

► Basic authentication: The security token includes the user name and<br />

password information, and is generated as with<br />

and .<br />

► Signature: The security token includes the X.509 certificate of the signer of<br />

the data and is generated as with<br />

.<br />

► ID assertion: ID assertion includes a user name only, since the identity is<br />

asserted, and is generated as with<br />

only.<br />

► Custom: This mechanism includes a custom-defined token.<br />

► LTPA: Use of an LTPA token is a WebSphere-specific customer token,<br />

generating a with .<br />

When using WS-Security for authentication, a security token is embedded in the<br />

SOAP header and is propagated from the message sender to the intended<br />

message receiver. On the receiving side, it is the responsibility of the server<br />

security handler to authenticate the security token and to set up the caller identity<br />

for the request.<br />

Section 6.2, “Authentication with a security token” on page 115, describes in<br />

detail how to configure WS-Security authentication with WebSphere Application<br />

Server for z/OS.<br />

86 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Integrity<br />

Integrity is applied to a message to ensure that no one modifies the message<br />

while it is in transit. Essentially, integrity is provided by generating an XML digital<br />

signature on a part of the SOAP message. If the message data changes, the<br />

signature would no longer be valid.<br />

With WS-Security, it is possible to use XML digital signatures in conjunction with<br />

security tokens to detect any modifications to messages. Data integrity is<br />

provided by generating a signature from the contents of the SOAP message. If<br />

the message data changes, the signature is found to be invalid by the recipient.<br />

The use of XML digital signatures also provides authentication, because a valid<br />

signature implies proof of possession of a private key. A message with a digital<br />

signature contains the digital certificate of the signer, and therefore the signer’s<br />

name and bound public key are validated by a trusted certificate authority. The<br />

trustworthiness of the signature is then a transitive trust process. The trusted<br />

certification authority vouches for the public key value used to verify the<br />

signature.<br />

Chapter 5. Web services security introduction 87


A digital signature is a word attached to the message. This signature establishes<br />

that the message has not been modified and the identity of the signer of the<br />

message. See Figure 5-5.<br />

Figure 5-5 Digital signature creation and validation<br />

A digital signature is created in two steps:<br />

1. The first step distills a part of the SOAP message (for example, the body) into<br />

a large number. This number is the digest code or fingerprint. Several options<br />

are available for generating the digest code, for example, the MD5 message<br />

digest function and the SHA1 secure hash algorithm. Both of these<br />

procedures reduce a message to a number. The crucial aspect of distilling the<br />

document to a number is that if the message changes, even in a trivial way, a<br />

different digest code results. When the recipient gets a message and verifies<br />

the digest code by recomputing it, any changes in the document result in a<br />

mismatch between the stated and the computed digest codes.<br />

88 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


2. In the second step, the digest code is encrypted with the sender's private key.<br />

This two-step process creates the digital signature. The digital signature is<br />

appended to the SOAP message before being sent to the service provider.<br />

When the service provider receives the message, it follows these steps to verify<br />

the signature:<br />

1. It recomputes the digest code for the message.<br />

2. It decrypts the signature by using the sender's public key. This decryption<br />

yields the original digest code for the message.<br />

3. It compares the original and recomputed digest codes. If these codes match,<br />

the message is both intact and authentic. If not, something has changed and<br />

the message is not to be trusted.<br />

The receiver normally obtains the sender’s public key from the sender’s X.509<br />

certificate, which is sent as a security token in the SOAP message.<br />

6.3, “Integrity with XML digital signature” on page 131 describes in detail how to<br />

configure WS-Security integrity with WebSphere Application Server for z/OS.<br />

Confidentiality<br />

Confidentiality is the process in which a SOAP message is protected so that only<br />

authorized recipients can read the SOAP message. Confidentiality is provided by<br />

encrypting the contents of the SOAP message using XML encryption. If the<br />

SOAP message is encrypted, only a service that knows the key for confidentiality<br />

can decrypt and read the message.<br />

The XML encryption standard specifies a process for encrypting data and<br />

representing the result in XML. XML encryption can be used to encrypt any part<br />

of a SOAP message, normally sensitive data such as bank account numbers or<br />

user credentials. The result of encrypting data is an XML encryption element that<br />

contains or references the cipher data.<br />

WS-Security uses a combination of XML Encryption and security tokens to<br />

implement confidentiality for portions of the SOAP message. Unlike transport<br />

security encryption, it is possible at the message level to encrypt local pieces of<br />

the SOAP message. It is not all-or-nothing encryption.<br />

6.4, “Confidentiality with XML encryption” on page 164 describes in detail how to<br />

configure WS-Security confidentiality with WebSphere Application Server for<br />

z/OS.<br />

Chapter 5. Web services security introduction 89


Identity assertion<br />

Identity assertion (ID assertion) is a mechanism that allows the propagation of an<br />

already authenticated identity from one server to another. The receiver can<br />

assume that the identity has been authenticated because he trusts the sender.<br />

This is particularly well suited for end-to-end security solutions.<br />

WS-Security supports the following trust modes with a downstream server:<br />

► Basic authentication: The asserting server authenticates itself, sending a user<br />

name and password in the SOAP header, in addition to the transmitted<br />

asserted identity.<br />

► Digital signature: The asserted identity is transmitted digitally signed by the<br />

asserting server, along with the asserting server x.509 certificate. This<br />

provides both for data integrity of the transmitted asserted identity and for<br />

authentication of the sender.<br />

► Presumed trust: In this case, communication flows inside a secure channel or<br />

uses a secure transport protocol so that the asserting server does not need to<br />

provide authentication data at the SOAP message level. Typically, this can be<br />

achieved using HTTP as the transport protocol with SSL/TLS client (the client<br />

is the asserting server) authentication.<br />

Section 6.5, “Identity assertion” on page 192, describes in detail how to configure<br />

WS-Security identity assertion with WebSphere Application Server for z/OS.<br />

5.5 Web services transport layer security<br />

In this section, the different transport options for Web services are presented<br />

along with the uses of each transport and how security can be applied.<br />

5.5.1 Web services transports introduction<br />

Web services can communicate using different transport mechanisms. The<br />

transport mechanisms build upon or are combinations of other protocols or APIs.<br />

The listed terms are provided to help facilitate describing how Web services<br />

builds upon or utilizes existing protocols and APIs.<br />

► Simple Object Access Protocol (SOAP) is a protocol for exchanging XML<br />

messages over a computer network.<br />

► Hypertext Transfer Protocol (HTTP) is a protocol for transferring hypertext,<br />

files, Web pages, and Web page components over the Internet or computer<br />

network.<br />

90 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


► Secure Sockets Layer (SSL) is a cryptographic protocol to provide secure<br />

communication over the Internet. SSL makes use of symetric or assymetric<br />

key encryption, and can provide client certificate authentication (mutual<br />

authentication).<br />

► Hyptertext Transfer protocol over SSL (HTTPS) is a combination of HTTP<br />

communication over an encrypted SSL connection.<br />

► Java Message Service (JMS) is a set of standard APIs for accessing<br />

enterprise messaging systems using Java programs. JMS supports the<br />

publish/subscribe and point-to-point messaging, and is included in the J2EE<br />

specification.<br />

► Remote Method Invocation over Internet Inter-ORB Protocol (RMI-IIOP) is<br />

the use of Java Remote Method Invocation (RMI) interfaces over the IIOP<br />

(CORBA) protocol. This is used for remote EJB calls, for example.<br />

► Java API for XML based Remote Procedure Call (JAX-RPC) is a<br />

transport-neutral process for performing XML-based remote procedure calls<br />

using SOAP.<br />

SOAP is transport-independent and can be bound to any protocol. SOAP over<br />

HTTP is a commonly used tranport protocol for Web services communication.<br />

WebSphere also supports two other transport mechanisms for Web services<br />

such as SOAP over JMS and RMI-IIOP with multiprotocol JAX-RPC. The<br />

different transport options for Web services communication are summarized with<br />

the pros and cons of each.<br />

SOAP over HTTP<br />

The SOAP over HTTP protocol is one of the most widely used transport protocols<br />

for implementing Web services. HTTP is a request/response protocol between<br />

client and server. HTTP is commonly used between client browsers and Web<br />

servers for transferring files and Web content. The client usually initiates a<br />

request by establishing a TCP/IP connection to a remote host using a<br />

predetermined host name and port number. The host name and port may be<br />

stored in the form of a Universal Resource Identifier (URI). The server listening<br />

on the port waits for the client to send a request message, and responds with an<br />

HTTP response message and status code. The body of the message can<br />

comprise text data, error code, or some other information. A Web service can<br />

send a SOAP message over the HTTP protocol (SOAP over HTTP) for client<br />

server communication leveraging the benefits of HTTP.<br />

There are certain advantages to using SOAP over HTTP for Web services. The<br />

HTTP protocol is widely used in most Internet communication on various<br />

platforms. SOAP over HTTP can be implemented in different programming<br />

languages, allowing Web services to be portable and interoperable across<br />

platforms. In J2EE, support for SOAP over HTTP has been standardized with the<br />

Chapter 5. Web services security introduction 91


Web services for J2EE specification, Version 1.1. Additionally, SOAP can exploit<br />

security capabilities of SSL through SOAP over HTTPS communication.<br />

SOAP over JMS<br />

SOAP over JMS is a vendor-specific transport mechanism that provides an<br />

alternative to SOAP over HTTP. When using SOAP over JMS in WebSphere, the<br />

SOAP message, including the SOAP envelope, is wrapped with a JMS message<br />

and put on a queue. The container receives the JMS message and removes the<br />

SOAP message to be sent to the client.<br />

The benefit of using SOAP over JMS as a transport is that you inherit the quality<br />

of service that is associated with JMS messaging. For example, JMS guarantees<br />

message delivery through persistent messages and acknowledgements, and it<br />

provides transaction support. If a message client or receiver experiences an<br />

outage, the message will remain in the client or receiver queue until both parties<br />

are available to transfer messages again. The message that could not be sent<br />

when the outage occurred can be retrieved from persistent storage and resent<br />

until transmission is successful.<br />

JMS also scales well with large volumes of messages, and supports<br />

asynchronous communication. Depending on your messaging provider, JMS can<br />

service numerous messaging clients concurrently.<br />

There are some drawbacks to using SOAP over JMS. There is no standard on<br />

how to implement SOAP over JMS, and it can pose interoperability issues when<br />

trying to communicate across platforms or programming languages. SOAP over<br />

JMS requires a messaging engine for communication, and additional setup on<br />

both the client and server to make use of the messaging engine. The client may<br />

not have access to a messaging engine or messaging APIs, and the need for a<br />

message engine to be set up may be excessive for simple client SOAP<br />

communication. JMS does not provide an API for controlling the privacy and<br />

integrity of messages, thus leaving the responsibility of this security to the JMS<br />

provider.<br />

RMI-IIOP with multiprotocol JAX-RPC<br />

Remote Method Invocation over Internet Inter-ORB Protocol (RMI-IIOP) can be<br />

used with JAX-RPC to support non-SOAP bindings. Using RMI-IIOP with<br />

JAX-RPC enables WebSphere Java clients to invoke enterprise beans using a<br />

WSDL file and the JAX-RPC programming model instead of using the standard<br />

J2EE programming model. When a WebSphere Java client invokes a Web<br />

services-enabled EJB, RMI-IIOP with multiprotocol JAX-RPC permits the Web<br />

service invocation path to be optimized.<br />

The advantage of using RMI/IIOP with the JAX-RPC protocol instead of a SOAP<br />

with JAX-RPC protocol is that XML processing is not required to send and<br />

92 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


eceive messages. Java serialization and deserialization are used instead. This<br />

can lead to better performance since the EJB Web service is invoked directly<br />

rather than having the overhead of sending a SOAP message over HTTP to a<br />

Web service router that then invokes an EJB. The JAX-RPC client using<br />

RMI/IIOP can also participate in a user transaction, which is not possible with<br />

SOAP over HTTP.<br />

The disadvantage to using RMI/IIOP with JAX-RPC is that the transport<br />

mechanism is vendor specific, and can only be used when invoking Web service<br />

enabled EJBs, not Web service enabled JavaBeans. Furthermore, RMI/IIOP with<br />

JAX-RPC is not standardized, and can cause interoperability problems across<br />

platforms.<br />

Enterprise Service Bus (ESB)<br />

The Enterprise Service Bus is a concept for integrating enterprise applications<br />

and providing connectivity between services. The ESB can rely on the previously<br />

mentioned transports or proprietary transports for interconnecting services.<br />

5.5.2 Point-to-point security<br />

Transport layer security is often considered to be a point-to-point security means<br />

since the communication over the network is secured between two parties.<br />

Hence, a security context only exists between those two parties. Securing the<br />

transport simply creates a secure pipeline between two nodes. Transport<br />

security does not address a full end-to-end security solution in which security<br />

context can be propogated across intermediaries.<br />

5.5.3 The HTTP(S) transport protocol<br />

In this section we provide more details on using HTTP(S) as the transport layer.<br />

The benefits of HTTP(S) as a transport protocol<br />

HTTP(S) is a well-known protocol used for internet communication. There are<br />

several advantages to using Web services SOAP over HTTPS:<br />

► It can be used to provide a very fast and secure transport for Web services.<br />

► It provides authentication through either HTTP basic authentication or a client<br />

X.509 certificate.<br />

► It provides integrity.<br />

► It provides confidentiality.<br />

► It has good support for a broad array of hardware accelerators.<br />

Chapter 5. Web services security introduction 93


► It is mature and similarly implemented by most vendors, and therefore is<br />

subject to few interoperability problems.<br />

► It is firewall friendly. Ports can be opened in the firewall to allow HTTP traffic<br />

through.<br />

We choose to focus on the security aspects of the SOAP over HTTP protocol in<br />

Chapter 8, “Web services transport security” on page 245 based on many of the<br />

points highlighted here.<br />

HTTP(S) transport security<br />

The transport-level security provides client-server authentication, integrity, and<br />

confidentiality. For Web services using HTTP as a transport, authentication can<br />

be performed using either basic authentication or client certificate authentication.<br />

Integrity and confidentiality can be achieved by securing the transport through<br />

the use of SSL.<br />

Authentication<br />

Web services support builds on top of existing J2EE infrastructure. Currently,<br />

there are two forms of authentication available for use with Web services: basic<br />

Authentication (BA) and client certificate authentication.<br />

For Web services transport layer security, basic authentication information (user<br />

ID and password) is provided by the client programmatically or using WebSphere<br />

client bindings, and is passed in the HTTP header of the request that carries the<br />

SOAP message. The application server extracts the basic authentication<br />

information from the header and authenticates the user ID to a user registry. The<br />

application server uses the authentication information to authorize the user to<br />

application components or resources.<br />

Client certificate authentication, or mutual HTTPS authentication, is achieved by<br />

the client authenticating the server, and being authenticated by the server,<br />

through the exchange of X.509 certificates.<br />

Integrity and confidentiality<br />

Integrity ensures that data is not accidentally or maliciously changed or<br />

destroyed during data exchange. Integrity also ensures that the data cannot be<br />

tampered with if intercepted, usually accomplished with digests and digital<br />

signatures. Choosing whether to use confidentiality with integrity or just integrity<br />

alone depends on whether the data needs to be kept confidential.<br />

Applying integrity to transport communication is useful if the sender and receiver<br />

do not care if the data is visible, but want to ensure that the data is accurate.<br />

94 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


For example, a stock company may want to send an up-to-the-minute stock price<br />

to a client so that the client can decide whether to buy, hold, or sell. The stock<br />

company does not care whether others can see the stock price, but the client<br />

would be concerned if the data was not accurate, as it might affect his<br />

purchasing decision.<br />

For this type of scenario, choosing integrity without confidentiality is beneficial<br />

because integrity signing algorithms incur less overhead, and require less<br />

processing since the data being transferred does not need to be encrypted.<br />

Confidentiality ensures that the data sent from the client and received by the<br />

server cannot be viewed. Privacy is maintained by encrypting the data prior to<br />

transmission and decrypting the data on the receiving end.<br />

Continuing with the previous example, confidentiality may be desired after a<br />

client has decided what stock to purchase and needs to send sensitive<br />

information such as his credit card number to the stock company to complete the<br />

sale.<br />

Integrity and confidentiality are provided through the use of SSL over HTTP, also<br />

known as HTTP(S). Web services makes use of a secure transport by sending<br />

SOAP messages over HTTPS utilizing the security features of the transport.<br />

SSL Flow<br />

Figure 5-6 illustrates the message flow for a full SSL handshake. The steps are<br />

listed to explain what occurs in the process. The SSL flow is provided to show<br />

where the certificates are needed for establishing an SSL handshake and<br />

providing client certificate authentication (mutual authentication).<br />

Figure 5-6 SSL handshake flow<br />

Chapter 5. Web services security introduction 95


The steps in bold in Figure 5-6 on page 95 are additional steps specific to client<br />

certificate authentication:<br />

1. The client sends a client hello command to the server, which includes:<br />

– Client version - highest SSL and TLS version supported by the client<br />

– Random structure generated by the client for use in the key generation<br />

process<br />

– A session ID that the client wishes to use for the connection<br />

– Ciphers supported by the client with client's first preference first<br />

– Data compression methods supported by client sorted by client preference<br />

2. The server sends a server hello command to the client, which includes:<br />

– Highest client SSL or TLS version that server supports<br />

– Random structure generated by the server for use in the key generation<br />

process<br />

– A session ID for the SSL session<br />

– A cipher selected by the server from the list of client-supported ciphers<br />

– Data compression method selected by the server from the list of<br />

client-supported compression methods<br />

3. The server sends the server certificate (that is, the X.509 certificate).<br />

4. The server sends a certificate request to authenticate the client. This step<br />

occurs with client certificate authentication only.<br />

5. The server sends the server hello done, indicating that the server is done<br />

sending messages to support the key exchange. The client should verify that<br />

the server provided a valid certificate upon receiving the server hello done.<br />

6. The client sends a client certificate only if the server requested a certificate.<br />

This step occurs with client certificate authentication only.<br />

7. The client key exchange occurs using a premaster secret that was created by<br />

the client and was then encrypted using the server’s public key.<br />

Both the client and the server generate the symmetric encryption keys on<br />

there own using the premaster secret and the random data that is generated<br />

from the server hello and client hello commands.<br />

8. The certificate verify message is sent to provide explicit verification of a client<br />

certificate. This step occurs with client certificate authentication only.<br />

9. The change cipher spec message is sent by the client to notify the server that<br />

subsequent records will be protected under the newly negotiated CipherSpec<br />

and keys.<br />

96 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


10.The client sends the finished command. This command includes a digest of<br />

all the SSL handshake commands that have flowed between the client and<br />

the server up to this point. This command is sent to validate that none of the<br />

commands sent previously, which flow between the client and the server<br />

unencrypted, were altered in flight.<br />

11.The change cipher spec message is sent by the server to notify the client that<br />

subsequent records will be protected under the newly negotiated CipherSpec<br />

and keys.<br />

12.The server sends the finished command, which includes a digest of all the<br />

SSL handshake commands that have flowed between the server and the<br />

client up to this point. This is also used to validate the integrity of the<br />

commands sent previously.<br />

Subsequent requests are done using symetric keys, which are less<br />

computationally intensive.<br />

5.5.4 JMS transport security<br />

The JMS specification does not address privacy or integrity of messages, and<br />

the user must rely on the underlying JMS provider for those functions.<br />

If generic messaging is selected, the vendor documentation needs to be<br />

reviewed for available security facilities. Default messaging in WebSphere uses<br />

TCP/IP for communication. For WebSphere MQ, there are two methods of<br />

communication:<br />

► Direct communication with WebSphere MQ using cross-memory devices if<br />

they are on the same LPAR, the so-called bindings mode<br />

► Using TCP/IP communication<br />

Default messaging and WebSphere MQ using TCP/IP for messaging<br />

communication can be configured to use an SSL-enabled transport chain to<br />

provide integrity and confidentiality. Details for configuring the transport chain for<br />

message security are provided in WebSphere for z/OS V6 Connectivity<br />

Handbook, SG24-7064-02.<br />

Securing the TCP/IP transport that JMS messages flow across may not be<br />

sufficient, and a more desirable JMS application-level of protection may be<br />

needed. An alternate end-to-end security mechanism is available using<br />

WebSphere MQ Extended Security Edition, which secures JMS messages by<br />

signing each message with a private key associated with the sending application,<br />

and encrypting individual messages under unique keys.<br />

Chapter 5. Web services security introduction 97


When invoking a Web service using SOAP over JMS, the SOAP message is<br />

embedded within the JMS message and is secured in the method that the JMS<br />

message is sent.<br />

The following are some SOAP over JMS transport considerations:<br />

► Messaging security is vendor specific and depends on the JMS provider.<br />

► For default messaging and WebSphere MQ, the JMS identity decision is<br />

based on the J2C authentication mechanism.<br />

► JMS provides a highly scalable, reliable message transport for SOAP<br />

messages.<br />

► SOAP over JMS allows for asynchronous communication.<br />

5.5.5 RMI-IIOP security<br />

RMI over IIOP security is provided using the Common Secure Interoperability<br />

Version 2 (CSIv2) authentication protocol. WebSphere supports basic<br />

authentication, identity assertion, client certificate authentication, and tokens<br />

when using CSIv2. In addition, CSIv2 communication can occur over an SSL<br />

transport to provide integrity and confidentiality. More information is provided in<br />

Chapter 9, “Security attribute propagation and CSIv2” on page 293.<br />

5.5.6 Enterprise Service Bus security<br />

The Enterprise Service Bus (ESB) can rely on the previously mentioned<br />

transports or a proprietary transport for interconnecting services. When using<br />

SOAP over HTTP or SOAP over JMS refer to “HTTP(S) transport security” on<br />

page 94 or 5.5.4, “JMS transport security” on page 97, for security<br />

considerations. If the ESB relies on a proprietary transport refer to the ESB<br />

documentation for security facilities.<br />

5.6 Our SecurityInfo Web service application and<br />

environment<br />

The SecurityInfo Application is a sample application used in the subsequent<br />

chapters to demonstrate different message layer and transport layer security<br />

scenarios. Refer to Appendix A, “Additional material” on page 471, for details on<br />

acquiring the sample application from the Web.<br />

98 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


5.6.1 SecurityInfo J2EE architecture in our environment<br />

A Web request is initiated by a client browser to the SecurityCaller index.html<br />

page. The page presents a link to the SecurityCaller ClientServlet that, when<br />

clicked, invokes the local SecurityCallerEJB. The SecurityCallerEJB performs the<br />

JAX-RPC Web service call using SOAP over HTTP to the Web service enabled<br />

SecurityInfoEJB. The Web service enabled SecurityInfoEJB has a Web service<br />

router SecurityInfoRouterWS for receiving a SOAP request and routing the call to<br />

the SecurityInfoEJB. A response is sent back to the client Web page showing<br />

assorted information about the local and remote EJBs.<br />

Figure 5-7 illustrates a typical flow of the SecurityInfo Web service by the<br />

SecurityInfoCaller.<br />

Figure 5-7 Basic flow of SecurityInfo application<br />

Web service provider<br />

The design of the SecurityInfo Web service consists of a stateless session bean<br />

SecurityInfoEJB, with one remote method obtainSecurityInfo, which returns a<br />

string array containing a request ID, date and time, host name, IP address,<br />

principal, operating system name, and operating system version for the EJB.<br />

The SecurityInfo EJB has been Web service enabled through a router module<br />

SecurityInfoRouterWS that is generated by the Rational® Application Developer<br />

tooling. The router module Web application provides a Web service endpoint for<br />

receiving requests over HTTP.<br />

Chapter 5. Web services security introduction 99


Web service requestor<br />

The design of the SecurityCaller application consists of a Web application<br />

SecurityCallerWAR and a stateless session bean SecurityCallerEJB.<br />

The SecurityCallerEJB has two remote methods, obtainSecurityLocalInfo and<br />

obtainSecurityRemoteInfo. The obtainSecurityLocalInfo returns the request ID,<br />

date and time, host name, IP address, principal, operating system name, and<br />

operating system version for the local SecurityCallerEJB. The<br />

obtainSecurityRemoteInfo returns the same information, but does this via a<br />

JAX-RPC Web service call to remote method obtainSecurity from the Web<br />

service enabled SecurityInfoEJB.<br />

The SecurityCallerWAR contains an index.html page and two identical servlets,<br />

ClientServlet and SecuredClientServlet. The ClientServlet is not protected by<br />

any security constraints in the Web deployment descriptor. The<br />

SecuredClientServlet URI is protected by a security constraint for which users<br />

permitted to the role customer are allowed to access through basic<br />

authentication. Both servlets create a unique RequestID (specific to the<br />

application) and call the obtainSecurityLocalInfo and obtainSecurityRemoteInfo<br />

methods for the SecurityCallerEJB. The information is then displayed on a Web<br />

page as two tables.<br />

5.6.2 Our test environment<br />

The setup of the test environment consists of a Windows® and z/OS system<br />

setup at the service levels listed in Table 5-1.<br />

Table 5-1 Test environment for SecurityInfo sample application<br />

Test environment<br />

Web service requestor Web service provider<br />

Windows XP (version 5.1 build 2600<br />

Service Pack 2)<br />

WebSphere base server<br />

6.1.0.2 cf20633.22<br />

J2RE 1.5.0 <strong>IBM</strong> J9 2.3 Windows XP<br />

x86-32 j9vmwi3223-20060504<br />

z/OS 1.8<br />

5.6.3 SecurityInfo Web service implementation<br />

WebSphere 6.1.0.2 base server<br />

J2RE 1.5.0 <strong>IBM</strong> z/OS build<br />

pmz31devifx-20060727a<br />

The SecurityInfoCaller EJB uses a JAX-RPC call implemented with a static stub<br />

to invoke the SecurityInfoEJB Web service. Although dynamic proxy and<br />

dynamic invocation allow for changes to a Web service, such as the location of<br />

100 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


the Web service, the WebSphere bindings are sufficient for overriding the service<br />

endpoint URI in the sample scenarios. The actual call to the Web service is<br />

performed by doing a lookup on the service reference<br />

java:comp/env/service/SecurityInfoService, which is coded in the<br />

SecurityCallerEJB deployment descriptor. The remote Web service method<br />

obtainSecurityInfo is called to obtain the SecurityCallEJB information.<br />

Example 5-1 contains the source for the actual Web service invocation.<br />

Example 5-1 Web service call<br />

javax.naming.InitialContext ic = new javax.naming.InitialContext();<br />

SecurityInfoService myService = (SecurityInfoService)<br />

ic.lookup("java:comp/env/service/SecurityInfoService");<br />

SecurityInfo mySecurityInfo = myService.getSecurityInfo();<br />

securityArray = mySecurityInfo.obtainSecurityInfo(uniqueID);<br />

Less emphasis was placed on the display of the application in the<br />

SecurityCallerWAR, in order to keep the source simple to follow, and to place<br />

more emphasis on the Web service call and security setup. The<br />

SecurityCallerWAR outputs the result information to the Web page directly, and<br />

does not follow an model-view-controller (MVC) practice for this reason.<br />

5.6.4 SecurityInfo deployment<br />

This section describes the steps for deploying the SecurityCaller ear file to<br />

WebSphere on Windows and the SecurityInfo ear file to WebSphere for z/OS.<br />

Additional steps are described after installation.<br />

Deployment of SecurityCaller EAR file on Windows<br />

The SecurityCaller ear file can be deployed in WebSphere on Windows,<br />

choosing the default options presented to the user in the WebSphere admin<br />

console during deployment. A user should click Next to all options presented<br />

during deployment of the ear file. Additional steps need to be taken after<br />

deployment to configure the Web service client bindings.<br />

For the scenario role customer is used for the identity assertion. The purpose of<br />

this role is to secure part of the application so that a user can authenticate. The<br />

user identity can then be propogated with identity assertion.<br />

Chapter 5. Web services security introduction 101


If the external authorization provider is set to default authorization, then the users<br />

permitted to the role should be set to All Authenticated in the application client<br />

bindings. Select Enterprise Applications → SecurityCallerEAR → Security<br />

role to user/group mapping.<br />

Figure 5-8 Mapping users to roles for SecurityCallerEAR<br />

After a successful deployment of the application, the endpoint URL needs to be<br />

overridden in order to specify the correct host name and port for where the<br />

SecurityInfo Web service resides. Select Enterprise Applications →<br />

SecurityCallerEAR → Manage Modules → SecurityCallerEJB.jar → Web<br />

services client bindings → Edit Port Information.<br />

In this example, the Endpoint URL is:<br />

http://wtsc58.itso.ibm.com:19080/SecurityInfoRouterWS/services/Security<br />

Info<br />

Figure 5-9 Overridden endpoint UR<br />

102 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Deployment of SecurityInfo ear file on z/OS<br />

The SecurityInfo ear file can be deployed to WebSphere for z/OS, leaving the<br />

default settings. Additional steps need to be taken after deployment to configure<br />

the client bindings or setup of a role in RACF depending on how your<br />

WebSphere is configured for authorization.<br />

For the scenarios involving message-level authentication, message-level identity<br />

assertion, transport-level basic authentication, and transport-level client<br />

certificate authentication, the role SecureCustomer is used.<br />

If the external authorization provider is set to default authorization, then the users<br />

permitted to the role should be set to All Authenticated in the application client<br />

bindings. Select Enterprise Applications → SecurityInfoEAR → Manage<br />

Modules → SecurityInfoRouterWS.war → Security role to user/group<br />

mapping. See Figure 5-10.<br />

Figure 5-10 Mapping users to roles for SecurityInfoRouterWS<br />

If the external authorization provider is set to System Authorization Facility (SAF)<br />

authorization, then the SecureCustomer role needs to be defined in RACF.<br />

Chapter 5. Web services security introduction 103


Example 5-2 provides the sample commands for defining the SecureCustomer<br />

role in RACF with the ID WINSERV permitted to the role.<br />

Example 5-2 Defining SecureCustomer role<br />

SETROPTS CLASSACT(EJBROLE)<br />

RDEFINE EJBROLE SecureCustomer UACC(NONE)<br />

PERMIT SecureCustomer CLASS(EJBROLE) ID(WINSERV) ACCESS(READ)<br />

SETROPTS RACLIST(EJBROLE) REFRESH<br />

5.6.5 SecurityInfo in action<br />

Once the SecureCaller and SecureInfo Web services are successfully deployed<br />

to WebSphere on Windows and WebSphere on z/OS, the application can be run<br />

by invoking the URL:<br />

http://:/SecurityCallerWAR/index.html<br />

Figure 5-11 SecureInfo Welcome page<br />

Click the ClientServlet link to invoke the Web service call.<br />

104 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


The SecuredClientServlet link is used in 6.5, “Identity assertion” on page 192 so<br />

that the user can authenticate. See Figure 5-12.<br />

Figure 5-12 Successful execution with application security disabled<br />

Chapter 5. Web services security introduction 105


106 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


6<br />

Chapter 6. Web services message layer<br />

security<br />

This chapter provides an in-depth description of Web services message layer<br />

security following the introduction in Chapter 5, “Web services security<br />

introduction” on page 75.<br />

Here we discuss about how to configure Web services message layer security<br />

for different purposes such as authentication, integrity, confidentiality, and<br />

identity assertion.<br />

This chapter focuses on the practical implementation of Web services message<br />

layer security for WebSphere Application Server for z/OS.<br />

The following topics are discussed here:<br />

► “How to configure Web services message layer security” on page 108<br />

► “Authentication with a security token” on page 115<br />

► “Integrity with XML digital signature” on page 131<br />

► “Confidentiality with XML encryption” on page 164<br />

► “Identity assertion” on page 192<br />

© Copyright <strong>IBM</strong> Corp. 2007. All rights reserved. 107


6.1 How to configure Web services message layer<br />

security<br />

This section introduces how to configure Web services message layer security.<br />

We describe some configuration tools and configuration files, and we present<br />

configuration components.<br />

6.1.1 Web services message layer security and WS-Security<br />

Web services message layer security is defined in the WS-Security standard.<br />

Web services Security (WS-Security) is a message-level standard that is based<br />

on securing SOAP messages through XML digital signature, confidentiality<br />

through XML encryption, and credential propagation through security tokens.<br />

The WS-Security specification defines the core facilities for protecting the<br />

integrity and confidentiality of a message and provides mechanisms for<br />

associating security-related claims with the message.<br />

Refer to 5.4, “Web services message layer security with WS-Security” on<br />

page 81 for an introduction to WS-Security.<br />

Using WS-Security, the authentication mechanism, integrity, and confidentiality<br />

can be applied at the message level. In WebSphere Application Server V6.1,<br />

there are many options to apply and combine these security mechanisms.<br />

108 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


After configuring WS-Security, security tags are added to the SOAP message<br />

security header. As illustrated in Figure 6-1, the security header may possess<br />

security tokens, time stamps, signatures, keys, encrypted data, and so on. The<br />

SOAP body might be encrypted. With WS-Security, encryption can be applied to<br />

parts of the SOAP message only.<br />

Figure 6-1 SOAP message security with WS-Security<br />

This chapter shows some sample SOAP messages with various security<br />

techniques applied in the validation sections.<br />

6.1.2 Web services message layer security configuration tools<br />

It is possible to configure Web services security on the application level, server<br />

level, and cell level. When multiple applications use the same binding<br />

information, consider configuring the binding information on the server or cell<br />

level. For example, you might have a global key locator configuration that is used<br />

by multiple applications. Configuration information for the application level<br />

precedes similar configuration information on the server level and the cell level.<br />

In this chapter we show how to configure Web services security at the application<br />

level.<br />

WebSphere Application Server uses for security an extension of the Web<br />

services deployment model for J2EE. The Web services security constraints are<br />

Chapter 6. Web services message layer security 109


defined in <strong>IBM</strong> extension deployment descriptor and the binding file based on the<br />

Web service port. At the application level this means that the Web services<br />

configuration is stored in the two following extension deployment descriptors:<br />

► ibm-webservices-ext.xml<br />

► ibm-webservices-bnd.xml<br />

The format of the deployment descriptor and the binding file is <strong>IBM</strong> proprietary<br />

and is not available. However, WebSphere Application Server provides the<br />

following tools that you can use to edit the deployment descriptor and the binding<br />

file:<br />

► Rational Application Developer (RAD)<br />

Use RAD to develop Web services and configure the deployment descriptor<br />

and the binding file for Web services security. RAD enables you to assemble<br />

both Web and EJB modules.<br />

► Application Server Toolkit v6.1 (AST)<br />

Use AST as an assembly tool designer for WebSphere Application Server<br />

Version 6.0.x and later, to specify the deployment descriptor and the binding<br />

file for Web services security. It is not possible to develop Web services with<br />

the AST.<br />

► WebSphere Application Server Administrative console<br />

It is possible to use the administrative console to configure the Web services<br />

security binding of a deployed application with Web services security<br />

constraints that are defined in the deployment descriptor.<br />

In this chapter we show how to configure Web services security using RAD or<br />

AST, as the panels are the same for the deployment descriptors we configured.<br />

Important: The format of the deployment descriptor and the binding file for<br />

Web services security in WAS Version 6.0.x and later is different from WAS<br />

Versions 5.0.2, 5.1, and 5.1.1. Web services security support in WAS versions<br />

5.0.2, 5.1, and 5.1.1 is based on the Web services security draft 13<br />

specification and the username token draft 2 profile. But this support is<br />

deprecated. However, applications that you configured using the Web service<br />

security Versions 5.0.2, 5.1, and 5.1.1 deployment descriptor and binding file<br />

can work with WebSphere Application Server Version 6 and later.<br />

6.1.3 Web services message layer security configuration files<br />

The WebSphere WS-Security constraints and configuration are defined in the<br />

<strong>IBM</strong> extension of the J2EE Web services deployment descriptor. There are four<br />

110 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


configuration files, which are the application-level deployment descriptor<br />

extensions and bindings for a client and a server. See Figure 6-2.<br />

Figure 6-2 Web services message layer security configuration files<br />

The configuration files are:<br />

► Client deployment descriptor extension file<br />

This includes request generator and response consumer constraints:<br />

ibm-webservicesclient-ext.xmi<br />

► Client binding configuration file<br />

This includes how to apply request generator and response consumer<br />

security measures:<br />

ibm-webservicesclient-bnd.xmi<br />

► Server deployment descriptor extension file<br />

This includes request consumer and response generator constraints:<br />

ibm-webservices-ext.xmi<br />

Chapter 6. Web services message layer security 111


► Server binding configuration file<br />

This includes how to apply request consumer and response generator<br />

security measures:<br />

ibm-webservices-bnd.xmi<br />

The deployment descriptor extension files specify what security constraints are<br />

required, for example, what type of security token and whether to sign the<br />

message. The binding files specify how to apply the required security constraints<br />

defined in the deployment descriptor extension, for example, which security<br />

token is inserted and which keys are used for signing.<br />

These deployment descriptor extension and binding files define the<br />

application-level security constraints, and they belong to each application.<br />

These files are updated using the tooling when configuring the J2EE module<br />

deployment descriptor, as follows:<br />

► On the Web service provider side (server), open the webservices.xml file.<br />

► On the Web service client side, open the deployment descriptor relevant to<br />

the J2EE module you configure:<br />

– For a Web client (servlet, JSP, JavaBean), edit the web.xml file.<br />

– For an EJB client (a session bean accessing a Web service), edit the<br />

ejb-jar.xml file.<br />

– For a J2EE application client, edit the application-client.xml file.<br />

Hence, when configuring WS-Security between two parties, one has to go<br />

through the following four steps:<br />

1. Configure WS-Security for sending the request message (client) in ejb-jar.xml<br />

to open the deployment descriptor editor for the request generator.<br />

2. Configure WS-Security for receiving the request message (server) in<br />

webservices.xml to open the Web services editor for the request consumer.<br />

3. Configure WS-Security for sending the response message (server) in<br />

webservices.xml to open the Web services editor for the request generator.<br />

4. Configure WS-Security for receiving the response message (client) in<br />

ejb-jar.xml to open the deployment descriptor editor for the response<br />

consumer.<br />

112 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


For each of these files, the tooling offers two tabs for WS-Security configuration:<br />

► WS Extension (or Extension) for configuring what security measures to apply<br />

(This tab updates the Web services extension deployment descriptor in the<br />

background.)<br />

► WS Binding (or Binding Configurations) for configuring how to apply the<br />

security measures (This tab updates the Web services bindings deployment<br />

descriptor in the background.)<br />

Figure 6-3 shows the Application Server Toolkit v6.1 display including the<br />

Extension and the Binding Configurations tabs. In this example the<br />

webservices.xml file has been opened for configuration on the server side.<br />

Figure 6-3 Web service message layer security tooling<br />

For authentication purposes, only the request generator and the request<br />

consumer might need some security configuration. But, for integrity and<br />

confidentiality, generally both the request and the response have these<br />

Chapter 6. Web services message layer security 113


equirements. This means that the request generator, the request consumer, the<br />

response generator, and the response consumer might need some security<br />

configuration.<br />

6.1.4 Web services message-layer security configuration<br />

components<br />

In this section we briefly describe some components that need to be configured<br />

for Web services message layer security.<br />

Token generator<br />

The token generator inserts a security token (username or binary) in the SOAP<br />

request. The token generator needs to know the type of token, where to find the<br />

token value, and how to secure the token value in order to generate the token<br />

consequently.<br />

CallbackHandler<br />

The CallbackHandler retrieves security-related information from the security<br />

context. As an example, for a Web service request reaching the Web service<br />

provider, the CallbackHandler may acquire the security token that is inserted in<br />

the Web services security header within the SOAP message. The token<br />

acquisition is a pluggable framework that leverages the JAAS<br />

javax.security.auth.callback.CallbackHandler interface for acquiring the security<br />

token.<br />

Caller part<br />

On the Web service provider side, the caller part specifies the security token,<br />

signed part, or encrypted part used for authentication. This configuration explains<br />

where to find the authentication credentials within the incoming SOAP message.<br />

If a signed or encrypted part is used, the value of the part attribute must be the<br />

name of a defined required integrity or required confidentiality constraint. If a<br />

stand-alone security token is used for authentication, then the URI and local<br />

name attributes must define the type of security token used for authentication.<br />

Key locator<br />

The key locator information for the generator specifies which key locator<br />

implementation is used to locate the key to be used for signature validation or<br />

encryption.<br />

Key information<br />

The key information is used to specify the configuration needed to generate the<br />

key for digital signature and encryption. The signing information and the<br />

114 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


encryption information configurations can share the key information, so they are<br />

both defined at the same level.<br />

Trust anchor<br />

A trust anchor specifies key stores that contain trusted root certificates, which<br />

validate the signer certificate. These key stores are used by the request<br />

generator and the response generator (when acting as a client) to generate the<br />

signer certificate for the digital signature.<br />

Nonce<br />

Nonce is a randomly generated, cryptographic token that is used to prevent<br />

replay attacks. Although nonce can be inserted anywhere in the SOAP message,<br />

it is typically inserted in the UsernameToken element.<br />

Without nonce, when a user name token is passed from one machine to another<br />

machine using a nonsecure transport, such as HTTP, the token might be<br />

intercepted and used in a replay attack. The same password might be reused<br />

when the user name token is transmitted between the client and the server,<br />

which leaves it vulnerable to attack. The user name token can be stolen even if<br />

you use an XML digital signature and XML encryption.<br />

Time stamp<br />

A time stamp can be attached in the target element of the signature and<br />

encryption to put a lifetime on the signed and encrypted element. If the time<br />

stamp is specified when an element is signed, a time stamp is attached to the<br />

target element, and the target element with the time stamp is signed. Because<br />

this is an extension of WebSphere Application Server 6.1, other vendor<br />

implementations might not be able to consume the message generated with the<br />

additional time stamp inserted in the message.<br />

6.2 Authentication with a security token<br />

Authentication is the process of validating the identity claimed by the accessing<br />

entity. Authentication is needed when access discrimination is required on the<br />

basis of requesting identities. Authentication is performed by verifying<br />

authentication information provided with the claimed identity. The authentication<br />

information is generally referred to as credentials. A credential can be the<br />

accessor’s name and password. It can also be a token provided by a trusted<br />

party, such as a Kerberos ticket or an X.509 certificate.<br />

Chapter 6. Web services message layer security 115


This section describes how WS-Security supports authentication, explains our<br />

authentication scenario, gives an overview of how to configure authentication,<br />

and thoroughly describes the steps to configure this scenario.<br />

6.2.1 Authentication support with WS-Security<br />

Web services security provides a general-purpose mechanism to associate<br />

security tokens with messages for single message authentication. A security<br />

token represents a set of claims made by a client that might include a name,<br />

password, identity, key, certificate, group, privilege, and so on.<br />

A specific type of security token is not required by Web services security. Web<br />

services security is designed to be extensible and support multiple security token<br />

formats to accommodate a variety of authentication mechanisms. For example, a<br />

client might provide proof of identity and proof of a particular business<br />

certification. However, the security token usage for Web services security is<br />

defined in separate profiles such as the username token profile, the X.509 token<br />

profile, the Security Assertion Markup Language (SAML) token profile, the<br />

eXtensible rights Markup Language (XrML) token profile, the Kerberos token<br />

profile, and so on.<br />

Username token<br />

A username token is a token mainly for basic authentication, which has a user<br />

name and password. The username token profile 1.0 is published by OASIS, and<br />

WS-Security in WebSphere Application Server 6.1 supports the profile.<br />

In the username token profile, the password digest is specified as a password<br />

type, but the password digest is not supported in WebSphere Application Server<br />

6.1. Only the clear-text password can be inserted in a username token and<br />

should not be transferred over a non-secure network. Basic authentication<br />

should be used over the secure network, such as HTTPS or intranet, or<br />

encryption should be applied to hide the user information.<br />

Basic authentication relies on username tokens. Identity assertion also relies on<br />

username tokens with no password. Identity assertion is described in details in<br />

6.5, “Identity assertion” on page 192.<br />

Binary security token<br />

The two types of binary security tokens that are provided as a default are the<br />

X.509 certificate token and the LTPA token. The LTPA token is a<br />

WebSphere-specific binary token that is authenticated by a WebSphere security<br />

mechanism. The X.509 certificate token is published, and the profile is supported<br />

by the WS-Security implementation in WebSphere Application Server 6.1. The<br />

encoding method is specified in each binary security token.<br />

116 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Custom token<br />

A user can implement a custom token using a pluggable token architecture<br />

provided by WebSphere Application Server 6.1. To implement a custom token,<br />

WebSphere provides interfaces that must be implemented<br />

(TokenGeneratorComponent, CallbackHandler, TokenConsumerComponent,<br />

LoginModule).<br />

XML digital signature<br />

Using XML digital signature is also a way to authenticate. You can assume that a<br />

valid signature is proof of possession. A message with a digital certificate that is<br />

issued by a certificate authority (CA) and a signature in the message that is<br />

validated successfully by a public key in the certificate are proof that the signer<br />

has the corresponding private key. The receiver can authenticate the signer by<br />

checking the trustworthiness of the certificate. XML digital signatures also rely on<br />

binary security tokens and signature tags.<br />

6.2.2 Authentication scenario description<br />

This scenario uses the application and the environment described in 5.6, “Our<br />

SecurityInfo Web service application and environment” on page 98. This<br />

scenario illustrates the usage of a security token to have a Web service client<br />

authenticate to a Web service provider. This security token is a username token<br />

in this example. See Figure 6-4.<br />

Figure 6-4 Web service message security authentication scenario<br />

On the Web service client side, the user does not provide any credentials to the<br />

application. Hence, the principal of the client EJB is unauthenticated. This client<br />

Chapter 6. Web services message layer security 117


EJB makes a Web service call. The Web service request generator includes a<br />

security token in the SOAP message header. This security token contains the<br />

client server user name and password (WINSERV, WINSERV). This is not the<br />

user identity.<br />

On the Web service provider side (WebSphere for z/OS), the Web service<br />

request consumer receives the security token and uses a JAAS login module to<br />

authenticate the user name and password and set the principal. The EJB runs<br />

with a WINSERV principal.<br />

Authentication occurs only when sending the request. Hence, there is no security<br />

mechanism when receiving the response.<br />

6.2.3 Authentication configuration overview<br />

For configuring authentication, the Web service client and provider have to agree<br />

on a security token type. Then configuration has to be executed on both sides.<br />

Web service client side<br />

To insert a security token into a SOAP message, a security token and its token<br />

generator must be specified in the client’s WS-Security configuration:<br />

1. Specify a security token in the request generator configuration. In case of<br />

basic authentication, the security token type should be username. This<br />

security token is sent inside the SOAP header to the server.<br />

2. Specify a token generator for the username token in the request generator<br />

configuration. The role of the token generator is to grab the user name and<br />

password from the configuration file and generate the username token with<br />

the user name and password. The token generator class for the username<br />

token, UsernameTokenGenerator, is provided by the Web services security<br />

run time as a default implementation.<br />

Web service provider side<br />

To receive the security token, you must specify a security token that is required<br />

by the server and a token consumer in the server’s WS-Security configuration, as<br />

follows:<br />

1. Specify a security token that is required by the server. In case of basic<br />

authentication, the required security token type is username (same as in the<br />

client configuration).<br />

2. Specify a token consumer in the request consumer configuration. The token<br />

consumer receives a security token in the request message and validates it.<br />

The token consumer class for the username token,<br />

118 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


UsernameTokenConsumer, is provided by the Web services security run time<br />

as a default implementation.<br />

6.2.4 Configuring the Web service requestor for security token<br />

To configure the Web service requestor for security token:<br />

1. Configure the security token.<br />

Open the SecurityCallerEJB ejb-jar.xml deployment descriptor. Select the WS<br />

Extension tab. In the Port Qualified Name Bindings section, select the<br />

SecurityInfo port. (This is necessary in order to activate the Add button in the<br />

next step.) Expand the Security Request Generator Binding Configuration<br />

section. Expand the Security Token section and click Add.<br />

Figure 6-5 Request generator Security Token Dialog<br />

Configure the Security Token Dialog (Figure 6-5):<br />

a. Enter a name such as BasicAuthToken.<br />

b. Select a token type from the drop-down list. The available choices are:<br />

Username: username token with a user name and password<br />

X509 certificate token: binary security token of X.509 certificate<br />

X509 certificates in a PKIPath: binary security token of an ordered list<br />

of X.509 certificates packaged in a PKIPath<br />

A list of X509 certificates and CRLs in a PKCS#7: binary security token<br />

of a list of X.509 certificates and (optionally) CRLs packaged in a<br />

PKCS#7 wrapper<br />

LTPAToken: binary security token of a Lightweight Third Party<br />

Authentication (LTPA) token<br />

Custom token: Custom-defined token<br />

For basic authentication, select Username as the token type. When you<br />

select a token type, the local name is filled in automatically. For user name<br />

Chapter 6. Web services message layer security 119


and four types of X509 certificates, the URI is not necessary (leave it empty).<br />

If you select a custom token, you have to enter the URI and the local name of<br />

the custom token manually.<br />

Click OK.<br />

2. Configure the token generator.<br />

a. Open the SecurityCallerEJB deployment descriptor. Select the WS<br />

Binding tab. Expand the Security Request Generator Binding<br />

Configuration section.<br />

b. To specify a token generator for a list of X.509 certificates and CRLs in a<br />

PKCS#7, expand Certificate store list and click add (for basic<br />

authentication, you do not specify this).<br />

c. Enter any name. Add a CRL path pointing to the CRL file. These specified<br />

CRLs are packaged in a PKCS#7 wrapper. Click OK, and a collection<br />

certificate store is created.<br />

120 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


d. Expand the Token Generator section and click Add.<br />

Configure the Token Generator dialog () Figure 6-6:<br />

a. Enter Token generator name such as BasicAuthTokenGen.<br />

Figure 6-6 Request generator Token Generator dialog<br />

b. Select a token generator class or input your custom token generator class<br />

name manually. You have to select a corresponding token generator class<br />

Chapter 6. Web services message layer security 121


for the specified security token type. For example, if you select Username<br />

as the token type, you have to select the UsernameTokenGenerator class<br />

as the token generator class.<br />

c. For the security token, expand the drop-down list and select the security<br />

token defined on the WS Extension page (BasicAuthToken).<br />

d. Select Use value type. Select the value type from the drop-down list that<br />

matches your selection. This selection fills the local name and callback<br />

handler. If you specify a token generator for a custom token, select<br />

Custom Token as the value type and enter the URI and local name<br />

manually. In our example, we select Username Token for basic<br />

authentication.<br />

e. Select the callback handler class or input your custom callback handler<br />

class name manually (for a custom token). Some provided callback<br />

handler classes can be selected from the list. The provided default<br />

callback handler classes are as follows:<br />

NonPromptCallbackHandler: Enter the user ID and password<br />

manually.<br />

GUIPromptCallbackHandler: Request the user ID and password by<br />

displaying a GUI prompt dialog box. This is useful for a J2EE<br />

application client.<br />

X590CallbackHandler: Get an X.509 certificate for a key store file.<br />

PkiPathCallbackHandler: Create an X.509 certificate and binary data<br />

without CRL using PKIPath encoding.<br />

PKCS7CallbackHandler: Create an X.509 certificate and binary data<br />

with or without CRL using PKCS#7 encoding.<br />

LTPATokenCallbackHandler: Get user credentials from the LTPA<br />

token.<br />

StdinPromptCallbackHandler: Prompt the user for a user ID and<br />

password on the command line.<br />

We select the NonPromptCallbackHandler for basic authentication. The<br />

user ID and password must be known in the server user registry.<br />

f. If the token generator is the NonPromptCallbackHandler, enter the user ID<br />

and password of the client. We use a user ID and password of WINSERV.<br />

g. If the selected callback handler requires a key store (for example, the<br />

X509CallbackHandler, PkiPathCallbackHandler, and<br />

PKCS7CallbackHandler), select Use key store and specify the key<br />

store-related information. You have to specify the key store storepass<br />

(password to access the key store), key store path, and key store type<br />

from the list.<br />

122 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


If you specified a key store, add the key. You can specify which key is<br />

used. Enter the alias of the key, the key pass (password to get the key<br />

from key store file), and the key name.<br />

h. If you have to specify the properties of the callback handler or token<br />

generator, add a call back handler property or a property.<br />

If you specify a token generator for a list of X.509 certificates and CRLs in<br />

a PKCS#7, select Use certificate path settings and select the<br />

Certificate path reference. If you select Certificate path reference, you<br />

can select the certificate store from the drop down-list. Select one<br />

collection certificate store name from the list, which is packed in PKCS#7.<br />

i. Click OK and a token generator is created.<br />

3. Save the configuration.<br />

6.2.5 Configuring the z/OS Web service provider for security token<br />

To configure the Web service provider for security token:<br />

Attention: Administrative security and application security have to both be<br />

enabled on the Web service provider side for Web service authentication to<br />

operate.<br />

1. Configure the required security token.<br />

Open the SecurityInfoEJB webservices.xml deployment descriptor. Select the<br />

Extensions tab. Expand the Request Consumer Service Configuration<br />

Details section. Select the port component, expand the Required Security<br />

Token, and click Add.<br />

Chapter 6. Web services message layer security 123


Configure the Required Security Token Dialog (Figure 6-7):<br />

a. Enter a name such as BasicAuthToken.<br />

Figure 6-7 Request consumer Required Security Token dialog<br />

b. Select a token type from the drop-down list, matching the client<br />

specification. If a client’s security token is the username token, you should<br />

select Username token as the token type. The URI and local name are<br />

filled in automatically except when using a custom token.<br />

c. Select the usage type from the drop-down list. The available choices are<br />

required or optional. If you select required, a SOAP fault is thrown if a<br />

required security token is not included in a client’s request message. If you<br />

select optional, the process of consuming a request message continues<br />

without throwing a SOAP fault.<br />

Click OK.<br />

124 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


2. Configure the caller part.<br />

Expand Caller Part under Request Consumer Service Configuration Details<br />

and click Add.<br />

Configure the Caller Part Dialog (Figure 6-8):<br />

a. Enter a name for the caller part, such as BasicAuthCallerPart.<br />

Figure 6-8 Request consumer Caller Part dialog<br />

b. If a client’s security token is used for signing or encryption, select the<br />

name of an integrity or confidentiality part from the drop-down list. The<br />

security token that is used for the selected integrity or confidentiality part is<br />

regarded as the client’s security token. In our case, the security token for<br />

basic authentication is not used for signing or encryption.<br />

Chapter 6. Web services message layer security 125


c. If the client’s security token is not used for signing or encryption, select a<br />

token type of the security token. If the security token is username token,<br />

select Username token as the type. If you select custom token as the type,<br />

you have to specify a custom URI and local name of the token.<br />

Click OK and a caller part is created. Save the configuration.<br />

3. Configure the token consumer.<br />

Select the Binding Configurations tab. Expand the Request Consumer<br />

Binding Configuration Details section.<br />

– If you want to specify a token consumer for the four types of X.509<br />

certificate tokens, expand Trust Anchor and click Add (not for basic<br />

authentication):<br />

i. Enter a name for the trust anchor.<br />

ii. Specify the key store information (key store storepass, key store path,<br />

and key store type). If you trust any certificate, you do not have to<br />

specify this.<br />

iii. Click OK and a trust anchor is created.<br />

– If the token consumer is for an X.509 certificate token, and you want to<br />

specify an intermediate trusted certificate store or CRL, add a collection<br />

certificate store under the certificate store list (for basic authentication, you<br />

do not have to specify this):<br />

i. Enter a name for the collection certificate store.<br />

ii. Add the X.509 certificate path for the trusted X.509 certificate file.<br />

iii. Add the CRL path for a CRL file.<br />

iv. Click OK and a collection certificate store is created.<br />

126 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


– Expand Token Consumer and click Add.<br />

Configure the Token Consumer Dialog (Figure 6-9):<br />

i. Enter a token consumer name such as BasicAuthTokenConsumer.<br />

Figure 6-9 Request consumer Token Consumer dialog<br />

Chapter 6. Web services message layer security 127


ii. Select a token consumer class or input your custom token consumer<br />

class name manually. The token consumer class matches the security<br />

token type. For a Username token, select the<br />

UsernameTokenConsumer class.<br />

iii. Expand the drop-down list for the security token and select the token<br />

specified on the extension page (BasicAuthToken).<br />

iv. Select Use value type and select the value type from the list<br />

(Username Token in our case). For a custom token, you have to enter<br />

the URI and local name manually.<br />

v. Select Use jaas.config to validate a security token in a client’s request<br />

message. Specify the name of the JAAS configuration. The default<br />

JAAS configurations are specified in WebSphere Application Server,<br />

and you can add your custom JAAS configuration name to invoke your<br />

custom JAAS login module implementation. The predefined JAAS<br />

configuration names are system.wssecurity.UsernameToken, which<br />

validates a username token with the user name and password;<br />

system.wssecurity.X509BST, which validates an X.509 certificate<br />

token; system.wssecurity.PkiPath, which validates a token of X509<br />

certificates in a PKIPath; system.wssecurity.PKCS7, which validates a<br />

token of a list of X509 certificates and CRLs in a PKCS#7; and<br />

system.wssecurity.IDAssertionUsernameToken, which validates a<br />

username token with the user name only.<br />

However, for an LTPA token, it is not necessary to configure a JAAS<br />

configuration name for the username token.<br />

vi. If you use a self-signed certificate that has no trust anchor and<br />

intermediate certificate, and you cannot trust any certificate, you have<br />

to specify your self-signed certificate information in two jaas.config<br />

properties (com.ibm.wsspi.wssecurity.token.x509.issuerName and<br />

com.ibm.wsspi.wssecurity.token.x509.issuerSerial). You can see your<br />

certificate issuer name and serial number using the keytool.<br />

vii. If you specify a token consumer for identity assertion, you can specify<br />

the trusted ID evaluator. It evaluates the trust of the endpoint identity<br />

sent by identity assertion. Select Use trusted ID evaluator and enter<br />

the trusted ID evaluator class name manually.<br />

viii.If you specify a token consumer for the three types of X.509<br />

certificates, select Use certificate path settings. If you trust any<br />

certificate, select Trust any certificate. If you want to specify a trust<br />

anchor and a trusted certificate store, select Certificate path<br />

reference and select the Trust anchor and Certificate store<br />

references from the drop-down lists. For an X.509 certificate in a<br />

PKIPath and a list of X509 certificates and CRLs in a PKCS#7, only the<br />

trust anchor reference is required.<br />

128 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


ix. Click OK and a token consumer is created.<br />

4. Save the configuration.<br />

6.2.6 Validating authentication with a security token<br />

We validate the authentication scenario using our application described in 5.6,<br />

“Our SecurityInfo Web service application and environment” on page 98.<br />

The application is called with the following URL:<br />

http://windowsbax.pok.ibm.com:9081/SecurityCallerWAR/<br />

The application displays the Principal on Web service client side and also on the<br />

Web service provider side. See Figure 6-10.<br />

Figure 6-10 SecurityInfo application authentication display<br />

The display shows that the user did not authenticate, as the principal on the Web<br />

service client side is unauthenticated.<br />

The display shows that the Web services client sent a username security token<br />

and authenticated, as the principal on the Web service provider side is<br />

WINSERV.<br />

Chapter 6. Web services message layer security 129


The Web service client log confirms that the principal is unauthenticated, as<br />

shown in Example 6-1.<br />

Example 6-1 Web service requestor server log<br />

ITSO SecurityCallerBean - RequestID = ITSO3967<br />

ITSO SecurityCallerBean - Timestamp = Wed Nov 08 11:37:27 EST 2006<br />

ITSO SecurityCallerBean - Hostname = windowsbax<br />

ITSO SecurityCallerBean - ipaddress = 9.56.23.149<br />

ITSO SecurityCallerBean - Principal = UNAUTHENTICATED<br />

ITSO SecurityCallerBean - OSName = Windows XP<br />

ITSO SecurityCallerBean - OS Version = 5.1 build 2600 Service Pack 2<br />

The Web service provider log confirms that the Web service has been called,<br />

run, and that the Principal is WINSERV, as shown in Example 6-2.<br />

Example 6-2 z/OS Web service provider server log<br />

ITSO SecurityInfoBean - RequestID = ITSO3967<br />

ITSO SecurityInfoBean - Timestamp = Wed Nov 08 16:37:30 GMT+00:00 2006<br />

ITSO SecurityInfoBean - Hostname = WTSC58<br />

ITSO SecurityInfoBean - ipaddress = 9.12.4.8<br />

ITSO SecurityInfoBean - Principal = WINSERV<br />

ITSO SecurityInfoBean - OSName = z/OS<br />

ITSO SecurityInfoBean - OS Version = 01.08.00<br />

We use the Ethereal software to see messages flowing between the Web service<br />

client and the provider. The Ethereal output shows that the Web service request<br />

includes the security token with the and <br />

tags. See Example 6-3.<br />

Example 6-3 SOAP/HTTP message from requestor to provider<br />

POST /SecurityInfoRouterWS/services/SecurityInfo HTTP/1.1<br />

Host: wtsc58.itso.ibm.com:49080<br />

Accept: application/soap+xml,multipart/related,text/*<br />

User-Agent: <strong>IBM</strong> WebServices/1.0<br />

Cache-Control: no-cache<br />

Pragma: no-cache<br />

SOAPAction: ""<br />

Connection: Keep-Alive<br />

Content-Type: text/xml; charset=utf-8<br />

Content-Length: 790<br />

Date: Wed, 08 Nov 2006 16:32:09 GMT<br />

130 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


<br />

WINSERVWINSERV<br />

<br />

<br />

<br />

ITSO136<br />

All this validates that authentication of the Web service client occurs at the Web<br />

service provider level using WS-Security.<br />

6.3 Integrity with XML digital signature<br />

Integrity is applied to the application to ensure that no one illegally modifies the<br />

message while it is in transit. Essentially, integrity is provided by generating an<br />

XML digital signature on the contents of the SOAP message. If the message data<br />

changes illegally, the signature would no longer be valid.<br />

A signature is created using the sender private key. Unauthorized sniffers do not<br />

have this key. When the receiver gets the message, it also creates a signature<br />

using the message content. Only if the two signatures match does the receiver<br />

honor the message. If the signatures are different, a SOAP fault is returned to the<br />

sender.<br />

This section describes how WS-Security supports integrity, explains our integrity<br />

scenario, gives an overview of how to configure integrity, and thoroughly<br />

describes the steps to configure this scenario.<br />

6.3.1 Integrity support with WS-Security<br />

With WS-Security, you can use XML digital signatures, in conjunction with<br />

security tokens, to detect any modifications to messages. Data integrity is<br />

Chapter 6. Web services message layer security 131


provided by generating a signature from the contents of the SOAP message. If<br />

the message data changes, the signature is found to be invalid by the recipient.<br />

A digital signature is the application of a combination of one-way and public key<br />

algorithms to a set of data (the data to be signed). The one-way algorithm<br />

produces a hash of the data to be signed. The hash is itself encrypted with the<br />

public key algorithm using the signer’s private secret key. The digital signature,<br />

therefore, establishes the integrity of the signed data and the authentication of<br />

the originator of the same data.<br />

The digital signature mechanism is explained in detail in 5.4.6, “Message<br />

authentication, integrity, confidentiality, ID assertion” on page 86.<br />

The specification for XML Signatures can be found at the following URL:<br />

http://www.w3c.org/Signature<br />

6.3.2 Integrity scenario description<br />

This scenario uses the application and the environment described in 5.6, “Our<br />

SecurityInfo Web service application and environment” on page 98. This<br />

scenario illustrates the usage of the XML digital signature to make sure that<br />

flowing SOAP messages are not altered between the Web service client and the<br />

Web service provider. The body part of the SOAP message is signed in this<br />

example. See Figure 6-11.<br />

Figure 6-11 Web service message security integrity scenario<br />

132 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


On the Web service client side, the user does not provide any credential to the<br />

application. Hence, the principal of the client EJB is unauthenticated. This client<br />

EJB makes a Web service call. The Web service request generator signs the<br />

body part of the SOAP message with the Web service client private key. The<br />

Web service request generator also includes its own public key as a security<br />

token in the SOAP message header.<br />

On the Web service provider side (WebSphere for z/OS), the Web service<br />

request consumer receives the security token and retrieves the client public key.<br />

It uses this client public key to decrypt the signature. It verifies the signature so<br />

that the SOAP message body part has not been changed while flowing. No<br />

identity is being used for authentication. Hence, the EJB runs with an<br />

unauthenticated principal.<br />

For the response, a digital signature is also used to ensure integrity. On the Web<br />

service provider side (WebSphere for z/OS), the response generator side signs<br />

the body part of the SOAP message with the Web service provider private key.<br />

The Web service response generator also includes its own public key as a<br />

security token in the SOAP message header.<br />

On the Web service client side, the Web service response consumer receives<br />

the security token and retrieves the provider public key. It uses this provider<br />

public key to decrypt the signature. It verifies the signature so that the SOAP<br />

message body part has not been changed while flowing.<br />

6.3.3 Integrity configuration overview<br />

For configuring integrity, the Web service client and provider have to agree on a<br />

signature algorithm, on how to find public keys to decrypt the signature, and on<br />

which SOAP message parts to be signed. Then configuration has to be executed<br />

on both sides.<br />

Client side<br />

To specify integrity for a part of a SOAP message, you have to specify the part<br />

that should be signed and the method of signing in the client’s WS-Security<br />

configuration:<br />

► Specify the parts of the message that have to be signed in the request<br />

generator configuration. The message parts can be specified by predefined<br />

keywords or XPath expressions. You can specify multiple parts that require a<br />

signature.<br />

► In the most typical integrity example, a security token is inserted into the<br />

SOAP message, which is used for signature verification by the server. In such<br />

an example, a token generator should be specified in the request generator<br />

configuration. The token generator for an X.509 certificate token,<br />

Chapter 6. Web services message layer security 133


X509TokenGenerator, is provided by the Web services security run time as a<br />

default implementation.<br />

► Specify key-related information, which includes the location of the client’s key,<br />

the type of key, and a password for protecting the key.<br />

► Specify signing information, which defines how to sign the specified part. You<br />

have to specify some options, such as a signature method algorithm and<br />

key-related information.<br />

► If the client expects a response that includes integrity information by the<br />

server, the client also has to be configured to validate the integrity of the<br />

response message in the response consumer configuration.<br />

Server side<br />

To specify integrity for a part of a SOAP message, you have to specify the part<br />

that was signed and the way of verifying the signature in the server’s<br />

WS-Security configuration:<br />

► Specify the parts of the message that require a signature in the request<br />

consumer configuration. The message parts can be specified by predefined<br />

keywords or XPath expressions. You can specify multiple parts that require a<br />

signature.<br />

► In a most typical integrity example, a security token is inserted into the SOAP<br />

message, which will be used for the signature verification by the server. In<br />

such an example, a token consumer should be specified in the request<br />

consumer configuration. This token consumer’s role is to receive the token<br />

and extract the client certificate for signature verification. The token consumer<br />

for an X.509 certificate token, X509TokenConsumer, is provided by the Web<br />

services security run time as a default implementation.<br />

► Specify key-related information, which includes the location of the key to be<br />

used (which is in the token in our example).<br />

► Specify signing information, which defines how the signature should be<br />

verified. You have to specify some options, such as a signature method<br />

algorithm and key-related information.<br />

► If the server sends a response that includes integrity information by the<br />

server, the server also has to be configured to sign the response message in<br />

the response generator configuration.<br />

134 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


6.3.4 Configuring the requestor for request XML digital signature<br />

To configure the Web service requestor for integrity:<br />

1. Configure the Integrity.<br />

Open the SecurityCallerEJB ejb-jar.xml deployment descriptor. Select the WS<br />

Extension tab. In the Port Qualified Name Bindings section, select the<br />

SecurityInfo port. (This is necessary in order to activate the Add button in the<br />

next step.) Expand the Request Generator Configuration section. Expand<br />

the Integrity section and click Add.<br />

Configure the Integrity dialog (Figure 6-12 on page 136):<br />

a. Select the order in which the signature is generated. Multiple integrity<br />

parts can be specified, and you have to specify the order of generating the<br />

signature. In our case, we select 1. The WS-Security runtime of Version<br />

6.1 supports multiple signature and encryption parts in one SOAP<br />

message. For multiple signature and encryption parts, you have to specify<br />

the processing order. For example, if you want to sign and encrypt the<br />

SOAP body, you should specify 1 in the Integrity dialog and 2 in the<br />

Confidentiality dialog.<br />

b. Add and configure the message part. The default created part is for<br />

signing the SOAP body. If you want to sign the SOAP body only, you have<br />

nothing more to do. For another integrity part, you have to specify the<br />

dialect (WebSphere keywords or XPath).<br />

In the parts keyword section, you can select from predefined keywords for<br />

which message parts are signed. The keywords are body (SOAP body<br />

element is signed), time stamp (all time stamp elements are signed),<br />

securitytoken (all security tokens are signed), dsigkey (KeyInfo elements<br />

of the signature are signed), enckey (KeyInfo elements of the encryption<br />

are signed), messageid (MessageID element of WS-Addressing is<br />

signed), to (To element of WS-Addressing is signed), action (action<br />

element of WS-Addressing is signed), relatesto (RelatesTo element of<br />

WS-Addressing is signed), wsaall (all the WS-Addressing elements are<br />

signed), wsafrom (from element of WS-Addressing is signed), wsareplyto<br />

(ReplyTo element of WS-Addressing is signed), wsafaultto (FaultTo<br />

element of WS-Addressing is signed), and wsacontext (WS-Context<br />

header is signed).<br />

In our case we choose to sign the body part only.<br />

Chapter 6. Web services message layer security 135


Figure 6-12 Request generator Integrity dialog<br />

Attention: if you use a security token such as basic authentication, you<br />

should also sign the security token by adding another part with the<br />

keyword securitytoken.<br />

c. If the XPath expression dialect is selected, you should input the XPath<br />

expression to specify the integrity part.<br />

d. Add a nonce or time stamp, or both, if you require WebSphere Application<br />

Server Version 6.1 extensions. For both, you select the dialog and<br />

keyword in the same way as for the message parts. For the time stamp,<br />

you can specify an expiration date.<br />

136 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


e. You can add multiple message parts, a nonce, and a time stamp in one<br />

dialog. All message parts that are specified in one Integrity dialog are<br />

signed by the same signing information, which is defined on the WS<br />

Binding page.<br />

Click OK and an integrity part is created. If you need multiple integrity parts,<br />

you can add them. Save the configuration.<br />

2. Configure the token generator (Figure 6-13 on page 138).<br />

Open the SecurityCallerEJB deployment descriptor. Select the WS Binding<br />

tab. Expand the Security Request Generator Binding Configuration<br />

section. You have to know whether a token reference type and a security<br />

token are inserted. Expand Token Generator and click Add.<br />

Chapter 6. Web services message layer security 137


Figure 6-13 Request generator Token Generator dialog<br />

Note that to specify a token generator used for signing, a security token is not<br />

specified on the WS Extension page.<br />

138 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Configure the Token Generator dialog:<br />

a. Enter a token generator name such as IntegrityX509Token.<br />

b. For the token generator class, select X509TokenGenerator.<br />

c. Do not select a security token.<br />

d. Select Use value type, and then select X509 certificate token.<br />

e. Select X509CallbackHandler.<br />

f. Select Use key store. In our case, we use the WebSphere default pkcs12<br />

keystore. Enter the password keystore (WebAS for the WebSphere<br />

default), the keystore path, and the keystore type.<br />

g. Click Add under Key and enter default as the alias, WebAS as the key<br />

password, and the key name.<br />

h. Click OK and a token generator is created.<br />

Tip: The WebSphere default keystore path can be found with the<br />

administrative console in Security → SSL certificate and key<br />

management → SSL configurations → NodeDefaultSSLSettings →<br />

Key stores and certificates → NodeDefaultKeyStore.<br />

The default personal key description can be found in Security → SSL<br />

certificate and key management → SSL configurations →<br />

NodeDefaultSSLSettings → Key stores and certificates →<br />

NodeDefaultKeyStore → Personal certificates.<br />

Chapter 6. Web services message layer security 139


3. Configure the key locator.<br />

Expand Key Locators and click Add. Specify how to retrieve a key for<br />

signing.<br />

Configure the Key Locator dialog (Figure 6-14):<br />

a. Enter a Key locator name such as IntegrityKeyLocator.<br />

Figure 6-14 Request generator Key locator dialog<br />

b. Select or enter a key locator class name. The class to retrieve a key<br />

implements the com.ibm.wsspi.wssecurity.keyinfo.KeyLocator interface.<br />

Three implementations of KeyLocator are provided in WebSphere<br />

Application Server Version 6.1, and you can implement your own class if<br />

necessary.<br />

The provided implementations are KeyStoreKeyLocator (locates and<br />

obtains the key from the specified key store file), SignerCertKeyLocator<br />

(uses the public key from the certificate of the signer of the request<br />

message), and X509TokenKeyLocator (uses the X.509 security token<br />

from the requester message for signature validation and encryption). The<br />

two last ones are used by the request consumer and the response<br />

consumer. In our case, we select the KeyStoreKeyLocator.<br />

140 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


c. If the selected key locator class requires the key store file, you can specify<br />

the key store and key by selecting Use key store. Enter the same<br />

information as in the previous dialog.<br />

Click OK and a key locator is created.<br />

4. Configure the key information.<br />

Expand Key Information and click Add. Specify which type of security token<br />

reference is used.<br />

Configure the Key Information dialog (Figure 6-15):<br />

a. Enter a name such as IntegrityKeyInfo.<br />

Figure 6-15 Request generator Key Information dialog<br />

b. Select a key information type from these choices:<br />

STRREF - direct reference (our choice)<br />

EMB - embedded reference<br />

KEYID - key identifier reference<br />

KEYNAME - key name reference<br />

X509ISSUER - X.509 issuer name and serial number reference<br />

The key information class name is filled in when a type is selected.<br />

Chapter 6. Web services message layer security 141


c. Select Use key locator and select a key locator from the list. Key locators<br />

that have been defined are listed. Select IntegrityKeyLocator. Also select<br />

one of the predefined keys.<br />

d. If a security token is inserted into the message, and a token generator is<br />

specified already, specify which token generator is used. Select Use<br />

token and select one token generator name from the list. The selected<br />

token generator is invoked to generate the token that is referenced from<br />

this key information. In our case, we select IntegrityX509Token.<br />

e. Click OK and the key information is created.<br />

5. Configure signing information (Figure 6-16).<br />

Expand Signing Information and click Add. You have to specify how to sign.<br />

Figure 6-16 Request generator Signing Information dialog<br />

142 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Configure the Signing Information dialog:<br />

a. Enter a name such as IntegritySigning.<br />

b. Select a canonicalization method algorithm. The supported algorithms are:<br />

http://www.w3.org/2001/10/xml-exc-c14n# (canonical XML algorithm<br />

without comments (our choice))<br />

http://www.w3.org/2001/10/xml-exc-c14n#WithComments (canonical<br />

XML algorithm with comments)<br />

http://www.w3.org/TR/2001/REC-xml-c14n-20010315 (exclusive XML<br />

canonicalization algorithm without comments)<br />

http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments<br />

(exclusive XML canonicalization algorithm with comments)<br />

c. Select a signature method algorithm from the list. The supported<br />

algorithms are:<br />

http://www.w3.org/2000/09/xmldsig#rsa-sha1 (RSA with SHA1 (our<br />

choice))<br />

http://www.w3.org/2000/09/xmldsig#dsig-sha1 (DSA with SHA1)<br />

http://www.w3.org/2000/09/xmldsig#hmac-sha1 (HMAC-SHA1)<br />

d. Enter any key information name such as IntegrityKeyInfo.<br />

e. Select a key information element from the list. Predefined key information<br />

is listed. Select IntegrityKeyInfo.<br />

f. If you specify signature information for integrity on the KeyInfo element of<br />

the signature or encryption, meaning that dsigkey or enckey is specified<br />

as an integrity part, you can specify how to sign the KeyInfo element.<br />

Select Use key information signature and select from the following<br />

choices:<br />

keyinfo specifies the whole KeyInfo element to be signed.<br />

keyinfochildelements specifies the child elements of KeyInfo element<br />

to be signed.<br />

In our case, we do not have to specify this.<br />

Click OK and the signing information is created.<br />

Chapter 6. Web services message layer security 143


6. Configure the part reference (Figure 6-17).<br />

Expand Part References and click Add. This specifies an integrity part that<br />

applies to this signature information.<br />

Figure 6-17 Request generator Part Reference dialog<br />

Configure the Part Reference dialog:<br />

a. Enter a part reference name such as IntegrityPart.<br />

b. Select an integrity part from the list of parts defined on the WS Extensions<br />

page. In our case, we select BodyIntegrity.<br />

c. Select a digest method algorithm from the list. The supported digest<br />

method algorithm is http://www.w3.org/2000/09/xmldsig#sha1.<br />

d. Click OK and a part reference is created. You can specify multiple part<br />

references that apply to the same signature information.<br />

144 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


7. Configure the transforms (Figure 6-18).<br />

After adding part references, adding a transform becomes enabled. Expand<br />

Transforms and click Add and complete the dialog.<br />

Figure 6-18 Request generator Transform dialog<br />

Configure the Transform dialog:<br />

a. Enter a name such as IntegrityTransform.<br />

b. Select a transform algorithm from the list. You can specify multiple<br />

transforms for one part reference. We choose the exclusive<br />

canonicalization algorithm, which is<br />

http://www.w3.org/2001/10/xml-exc-c14n#.<br />

c. Click OK and a transform is created. Save the configuration.<br />

Chapter 6. Web services message layer security 145


6.3.5 Configuring the z/OS provider for request XML digital signature<br />

To configure the Web service provider for integrity:<br />

1. Configure the required integrity (Figure 6-19).<br />

Open the SecurityInfoEJB webservices.xml deployment descriptor. Select the<br />

Extensions tab. Expand the Request Consumer Service Configuration<br />

Details section. Select the port component, expand Required Integrity, and<br />

click Add.<br />

Figure 6-19 Request consumer Required Integrity dialog<br />

Configure the Required Integrity dialog:<br />

a. Enter a name denoting the part, such as IntegrityBody.<br />

146 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


. Select the usage type, required or optional. If the usage type is required, a<br />

request message without integrity throws a SOAP fault. If the usage type<br />

is optional, and a request message does not have the integrity part, the<br />

message is received. We select Required.<br />

c. Click Add under Message Parts to specify an integrity required part. We<br />

select http://..../dialect-was and body to match our client configuration.<br />

d. Nonce and time stamp extensions can be specified in the same way as for<br />

the client.<br />

e. Click OK and a required integrity part is created.<br />

2. Configure the token consumer.<br />

Select the Binding Configurations tab. Expand the Request Consumer<br />

Binding Configuration Details section.<br />

You have to know whether a required token reference type and a security<br />

token are required. These settings should match the client configuration:<br />

a. If you want to specify a token consumer for the three types of X.509<br />

certificate tokens, specify a trust anchor. We do not specify this.<br />

b. If the token consumer for the X.509 certificate token is necessary, and you<br />

want to specify an intermediate trusted certificate store, specify a<br />

collection certificate store under Certificate Store List. We do not specify<br />

this.<br />

c. If the security token is inserted in the request message, add a Token<br />

Consumer (expand Token Consumers and click Add). To specify a token<br />

consumer, refer to “Configuring the z/OS Web service provider for security<br />

token” on page 123. To specify a token consumer for the token used for<br />

signing, a required security token is not specified in the deployment<br />

descriptor.<br />

Configure the Token Consumer dialog (Figure 6-20 on page 148):<br />

a. Enter a name such as IntegrityToken.<br />

b. Select the token consumer class X509TokenConsumer.<br />

c. Do not select a security token.<br />

d. Select Use value type and select X509 certificate token.<br />

e. Select Use jaas.config and enter system.wssecurity.X509BST as the<br />

name.<br />

f. Select Use certificate path settings and select Trust any certificate.<br />

Chapter 6. Web services message layer security 147


Figure 6-20 Request consumer Token Consumer dialog<br />

148 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


3. Configure the key locator (Figure 6-21).<br />

Expand Key Locators and click Add to specify how to retrieve a key for a<br />

signature verification.<br />

Figure 6-21 Request consumer Key Locator dialog<br />

Configure the Key Locator dialog:<br />

a. Enter a name such as IntegrityKeyLocator.<br />

b. Select the X509TokenKeyLocator class.<br />

Chapter 6. Web services message layer security 149


4. Configure the key information (Figure 6-22).<br />

Expand Key Information and click Add to specify which type of security<br />

token reference is required. The type should match the client configuration.<br />

Figure 6-22 Request consumer Key Information dialog<br />

Configure the Key Information dialog:<br />

a. Enter a name such as IntegrityKeyInformation.<br />

b. Select STRREF as the type.<br />

c. Select Use key locator and IntegrityKeyLocator.<br />

d. Select Use token and IntegrityToken<br />

e. On the consumer side, we do not have to specify the key name.<br />

150 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


5. Configure the signing information (Figure 6-23).<br />

Expand Signing Information and click Add to define how to verify a required<br />

integrity part.<br />

Figure 6-23 Request consumer Signing Information dialog<br />

Configure the Signing Information dialog:<br />

a. Enter a name such as IntegritySigningInfo.<br />

b. Select http://www.w3.org/2001/10/xml-exc-c14n# as the<br />

canonicalization method algorithm.<br />

c. Select http://www.w3.org/2000/09/xmldsig#rsa-sha1 as the signature<br />

method algorithm.<br />

Chapter 6. Web services message layer security 151


d. For the signing key information, click Add, enter<br />

IntegrityKeyInformation as the key information name, and select<br />

IntegrityKeyInformation as the key information element.<br />

6. Configure the part reference (Figure 6-24).<br />

Expand Part References and click Add.<br />

Figure 6-24 Request consumer Part Reference dialog<br />

Configure the Part Reference dialog:<br />

a. Enter a name such as IntegrityBody.<br />

b. For the consumer, you should select the name of a required integrity part<br />

from the list instead of a part name. Select IntegrityBody in the list.<br />

c. Select http://www.w3.org/2000/09/xmldsig#sha1 as the algorithm.<br />

152 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


7. Configure the transform (Figure 6-25).<br />

Expand Transforms and click Add.<br />

Figure 6-25 Request consumer Transform dialog<br />

Configure the Transform dialog:<br />

a. Enter a name such as IntegrityTransform.<br />

b. Select http://www.w3.org/2001/10/xml-exc-c14n# as the algorithm.<br />

8. Save the configuration.<br />

Chapter 6. Web services message layer security 153


6.3.6 Configuring the z/OS provider for response XML digital<br />

signature<br />

The configuration for this section is similar to the configuration in 6.3.4,<br />

“Configuring the requestor for request XML digital signature” on page 135. We<br />

only point out differences in this section.<br />

1. Configure the integrity (Figure 6-26).<br />

Open the SecurityInfoEJB webservices.xml deployment descriptor. Select the<br />

Extensions tab. Expand the Response Generator Service Configuration<br />

Details section. Select the port component, expand Integrity, and click Add.<br />

Figure 6-26 Response generator Integrity dialog<br />

The configuration is explained in 6.3.4, “Configuring the requestor for request<br />

XML digital signature” on page 135.<br />

154 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


2. Configure the token generator (Figure 6-27).<br />

Select the Binding Configurations tab. Expand the Response Generator<br />

Binding Configuration Details section. Expand Token Generator and click<br />

Add.<br />

Figure 6-27 Response generator Token Generator dialog<br />

The configuration is explained in 6.3.4, “Configuring the requestor for request<br />

XML digital signature” on page 135.<br />

Chapter 6. Web services message layer security 155


For WebSphere Application Server for z/OS, we choose to use the<br />

WebSphere default pkcs12 keystore. The password is WebAS and we use its<br />

default alias.<br />

Tip: The WebSphere default keystore path can be found with the<br />

administrative console in Security → SSL certificate and key<br />

management → SSL configurations → NodeDefaultSSLSettings →<br />

Key stores and certificates → NodeDefaultKeyStore.<br />

The default personal key description can be found in Security → SSL<br />

certificate and key management → SSL configurations →<br />

NodeDefaultSSLSettings → Key stores and certificates →<br />

NodeDefaultKeyStore → Personal certificates<br />

3. Configure the key locator (Figure 6-28).<br />

Figure 6-28 Response generator Key locator dialog<br />

The configuration is explained in 6.3.4, “Configuring the requestor for request<br />

XML digital signature” on page 135.<br />

156 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


4. Configure the key information (Figure 6-29).<br />

Figure 6-29 Response generator Key Information dialog<br />

The configuration is explained in 6.3.4, “Configuring the requestor for request<br />

XML digital signature” on page 135.<br />

Chapter 6. Web services message layer security 157


5. Configure signing information (Figure 6-30).<br />

Figure 6-30 Response generator Signing Information dialog<br />

The configuration is explained in 6.3.4, “Configuring the requestor for request<br />

XML digital signature” on page 135.<br />

6. Configure the part reference (Figure 6-31).<br />

Figure 6-31 Response generator Part Reference dialog<br />

The configuration is explained in 6.3.4, “Configuring the requestor for request<br />

XML digital signature” on page 135.<br />

158 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


7. Configure the transform (Figure 6-32).<br />

Figure 6-32 Response generator Transform dialog<br />

The configuration is explained in 6.3.4, “Configuring the requestor for request<br />

XML digital signature” on page 135.<br />

6.3.7 Configuring the requestor for response XML digital signature<br />

The configuration for this section is similar to the configuration in 6.3.5,<br />

“Configuring the z/OS provider for request XML digital signature” on page 146.<br />

Open the SecurityCallerEJB ejb-jar.xml deployment descriptor. Select the WS<br />

Extension tab. In the Port Qualified Name Bindings section, select the<br />

SecurityInfo port. (This is necessary in order to activate the Add button in the<br />

next step.) Expand the Response Consumer Configuration section. Expand<br />

the Integrity section, click Add, and configure as described in 6.3.5,<br />

“Configuring the z/OS provider for request XML digital signature” on page 146.<br />

Open the SecurityCallerEJB deployment descriptor. Select the WS Binding tab.<br />

Expand the Security Response Consumer Binding Configuration section.<br />

Configure as described in 6.3.5, “Configuring the z/OS provider for request XML<br />

digital signature” on page 146.<br />

6.3.8 Validating integrity with XML digital signature<br />

We validate the integrity scenario using our application described in 5.6, “Our<br />

SecurityInfo Web service application and environment” on page 98.<br />

The application is called with the following URL:<br />

http://windowsbax.pok.ibm.com:9081/SecurityCallerWAR/<br />

Chapter 6. Web services message layer security 159


The application displays the principal on Web service client side and also on the<br />

Web service provider side.<br />

Figure 6-33 SecurityInfo application display with integrity<br />

The display shows that the user did not authenticate, as the principal on the Web<br />

service client side is unauthenticated.<br />

The display shows that the Web services client does not authenticate to the Web<br />

service provider, as the principal on the Web service provider side is<br />

unauthenticated.<br />

160 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


The Web service client log confirms that the principal is unauthenticated, as<br />

shown in Example 6-4.<br />

Example 6-4 Web service requestor server log<br />

ITSO SecurityCallerBean - RequestID = ITSO3036<br />

ITSO SecurityCallerBean - Timestamp = Fri Nov 10 10:47:57 EST 2006<br />

ITSO SecurityCallerBean - Hostname = windowsbax<br />

ITSO SecurityCallerBean - ipaddress = 9.56.23.149<br />

ITSO SecurityCallerBean - Principal = UNAUTHENTICATED<br />

ITSO SecurityCallerBean - OSName = Windows XP<br />

ITSO SecurityCallerBean - OS Version = 5.1 build 2600 Service Pack 2<br />

The Web service provider log confirms that the Web service has been called,<br />

run, and that the principal is unauthenticated, as shown in Example 6-5.<br />

Example 6-5 z/OS Web service provider server log<br />

ITSO SecurityInfoBean - RequestID = ITSO3036<br />

ITSO SecurityInfoBean - Timestamp = Fri Nov 10 15:48:04 GMT+00:00 2006<br />

ITSO SecurityInfoBean - Hostname = WTSC58<br />

ITSO SecurityInfoBean - ipaddress = 9.12.4.8<br />

ITSO SecurityInfoBean - Principal = UNAUTHENTICATED<br />

ITSO SecurityInfoBean - OSName = z/OS<br />

ITSO SecurityInfoBean - OS Version = 01.08.00<br />

We use the Ethereal software to see messages flowing between the Web service<br />

client and the provider. The Ethereal output shows that the Web service request<br />

includes the security token containing the client public key and also the signature<br />

of the signed SOAP body.<br />

We also see the security token and the digital signature for the response SOAP<br />

message.<br />

The SOAP messages flow in clear, as the purpose of integrity is only to make<br />

sure that the content has not been altered.<br />

Example 6-6 SOAP/HTTP conversation<br />

POST /SecurityInfoRouterWS/services/SecurityInfo HTTP/1.1<br />

Host: wtsc58.itso.ibm.com:49080<br />

...<br />

Date: Fri, 10 Nov 2006 15:47:56 GMT<br />


xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wss<br />

ecurity-secext-1.0.xsd">MIICEDCCAXmgAwIBAgIERU5DqzANBgkqhkiG9w0BAQUFADB<br />

ucG9rLmlibS5jb20wHhcNMDYxMTA1.............8cUUF4aH9TANBgkqhkiG9w0BAQUFA<br />

AOBgQB7c1icR21nrqiYprRncUn23GivfBLyNNZtKIB+1BohOvrmVzJLS4BRd/AdZxTDLb1J<br />

4CESk2KpeuXsFK6D5WC8AFEzAmVEfBGHyvw==vQa<br />

/lbLPXVv0rFc9PS6+8lHiBmY=BmEw84oUOpYzgnh7b2uqDy1JEZQO4qPDNj1J2UYiFcCalDlI+8<br />

5O3E4NnG391TqPoZ/76K/DY2XMxI65dnDeCdYxOluU0pXhSL53+Afri+Y+sJsMQkgVx0Zx4<br />

ALdXEgjE3WjWVTyiZMAYLOfvEAJw3NpO+xDLFLH0ugWvuOnBV4=<br />

<br />

ITSO3036<br />

HTTP/1.1 200 OK<br />

...<br />

Content-Length: 3276<br />

Date: Fri, 10 Nov 2006 15:48:12 GMT<br />

Server: WebSphere Application Server/6.1<br />

162 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


MIICADCCAWmgAwIBAgIERT6FVDANBgkqhkiG9w0BAQUFADA<br />

5MQswCQYDVQQGEwJVUzEMMAoGA1UE..............Hb62hxqB28S29uNKgiMatiySUfG5<br />

8SFsyOTjnQk1UVtud8Y9JLjz7kI1LVTiM1EP6Y++XP+Pq2t8qSNWAN+nVnaE8A4X8EuGRDU<br />

b/DjAjh8LCAWY6CsA37<br />

Up9iFTwgagkadxBg4uk5wprQ=pO+JYmFGdps3yutO6oUbqggknDagy+0pv1cb7C0SRhdw/jD5Vr<br />

Ixe+9Jp/xqZcNrz+yhuE05cCNwk/QznjHxvQ0L8YB4C88A/uG9k7M4Lnv+Dd0RD+MfFaxbP<br />

v3MQETlPBdV69frKEdz+SjJO5jxFhxb4OomHIFKoXQpMXKcVQQ=<br />

<br />

ITSO3<br />

036Fri Nov 10 15:48:04 GMT+00:00<br />

2006WTSC589.12.4.8UN<br />

AUTHENTICATEDz/OS01.08.00


tainSecurityInfoReturn><br />

All this validates that digital signatures are being used to sign SOAP messages<br />

between the Web service client and the Web service provider using<br />

WS-Security.<br />

6.4 Confidentiality with XML encryption<br />

Confidentiality refers to the concept that an unauthorized party cannot obtain the<br />

meaning of the transferred or stored data. Typically, confidentiality is achieved by<br />

encrypting the data using cryptography.<br />

Cryptography is required to thoroughly achieve authentication, data integrity,<br />

confidentiality, and non-repudiation. Three kinds of algorithms are most<br />

commonly used for these purposes.<br />

► Public key, or asymmetric, algorithms (typically the RSA algorithm)<br />

These algorithms use a pair of keys. What has been encrypted with one key<br />

of the pair can only be decrypted with the other key of the pair. One key is<br />

kept secret. This is the private key. The other key is the public key, and, as<br />

the name implies, its value is public knowledge. Public key algorithms can<br />

also be used to achieve authentication.<br />

► Shared secret key, or symmetric algorithms (typically the Data Encryption<br />

Standard (DES) algorithm)<br />

The same single secret key is used both for encryption and decryption.<br />

Shared secret key algorithms are used for data confidentiality.<br />

► One-way algorithm<br />

This algorithm condenses an input string to a short fixed length numeric<br />

value, the hash. Typically, a hash is a 128-bit or 160-bit value. Any change in<br />

the input string induces a change in the hash value. The Secure Hash<br />

Algorithm (SHA-1) is such an algorithm. Its output is used as a fingerprint for<br />

the contents of a message.<br />

This section describes how WS-Security supports confidentiality, explains our<br />

confidentiality scenario, gives an overview of how to configure confidentiality,<br />

and thoroughly describes the steps to configure this scenario.<br />

164 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


6.4.1 Confidentiality support with WS-Security<br />

Confidentiality is the process in which a SOAP message is protected so that only<br />

authorized recipients can read the SOAP message. Confidentiality is provided by<br />

encrypting the contents of the SOAP message using XML encryption. If the<br />

SOAP message is encrypted, only a service that knows the key for confidentiality<br />

can decrypt and read the message.<br />

The XML encryption standard specifies a process for encrypting data and<br />

representing the result in XML. XML encryption can be used to encrypt any part<br />

of a SOAP message, normally sensitive data such as bank account numbers or<br />

user credentials. The result of encrypting data is an XML encryption element that<br />

contains or references the cipher data.<br />

WS-Security uses a combination of XML encryption and security tokens to<br />

implement confidentiality for portions of the SOAP message.<br />

Message confidentiality leverages XML encryption in conjunction with security<br />

tokens to keep portions of a SOAP message confidential. For more information<br />

refer to:<br />

http://www.w3c.org/Encryption<br />

6.4.2 Confidentiality scenario description<br />

This scenario uses the application and the environment described in 5.6, “Our<br />

SecurityInfo Web service application and environment” on page 98.<br />

Chapter 6. Web services message layer security 165


This scenario illustrates the usage of XML encryption to make sure that flowing<br />

SOAP messages are not readable (in clear text) between the Web service client<br />

and the Web service provider. The body part of the SOAP message is encrypted<br />

in this example. See Figure 6-34.<br />

Figure 6-34 Web service message security confidentiality scenario<br />

On the Web service client side, the user does not provide any credential to the<br />

application. Hence, the principal of the client EJB is unauthenticated. This client<br />

EJB makes a Web service call. The Web service request generator encrypts the<br />

body part of the SOAP message with the Web service provider public key. This<br />

Web service provider public key is available as a signer certificate in the client<br />

key store.<br />

On the Web service provider side (WebSphere for z/OS), the Web service<br />

request consumer receives the SOAP message request with the encrypted body<br />

part. It uses its own private key to decrypt the body part. Its own private key is<br />

available as a personal certificate in its key store. No identity is being used for<br />

authentication. Hence, the EJB runs with a unauthenticated principal.<br />

For the response, encryption is also used to ensure confidentiality. On the Web<br />

service provider side (WebSphere for z/OS), the reponse generator side<br />

encrypts the body part of the SOAP message with the Web service client public<br />

key. This Web service client public key is available as a signer certificate in the<br />

provider key store.<br />

166 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


On the Web service client side, the Web service response consumer receives<br />

the SOAP message response with the encrypted body part. It uses its own<br />

private key to decrypt the body part. Its own private key is available as a personal<br />

certificate in its key store.<br />

6.4.3 Confidentiality scenario key prerequisites<br />

As described in the above scenario, the public keys need to be available on the<br />

other party side so that encryption can occur.<br />

Hence, the key stores have the following configuration:<br />

► Web services client (winbax) key store possesses:<br />

– Client public and private keys as a personal certificate<br />

– Provider certificate with only a public key as a signer certificate<br />

► The Web services provider (wtsc58) key store possesses:<br />

– Provider public and private keys as a personal certificate<br />

– Client certificate with only a public key as a signer certificate<br />

In our configuration we use the default key stores that already have the default<br />

personal certificates configured. So we only have to extract the public keys (in<br />

the form of signer certificates) from the personal certificates and transfer them to<br />

the other party key store.<br />

Key configuration for request encryption<br />

In this section we extract a signer certificate from the Web service provider<br />

personal certificate. Then we transfer this certificate and import it as a signer<br />

certificate in the Web service client key store.<br />

We show in this section how to extract the WebSphere z/OS signer certificate<br />

using the administrative console. It is also possible to do it using RACF<br />

commands, as shown in 8.2.2, “Integrity scenario prerequisites” on page 253. A<br />

detailed description about different export options is available in 7.4.4, “Exporting<br />

certificates” on page 220.<br />

Chapter 6. Web services message layer security 167


To do this:<br />

1. Using the Web service provider (WebSphere for z/OS) administrative<br />

console, navigate to the default configured personal certificate in SSL<br />

certificate and key management → Key stores and certificates →<br />

NodeDefaultKeyStore → Personal certificates, select the default<br />

certificate, and click Extract (Figure 6-35).<br />

Figure 6-35 Web service provider personal certificate<br />

It is important to click Extract and not Export. Extract takes the public key<br />

only. Export takes the public key and the private key. But the private key<br />

should stay private and should not be shared with other parties.<br />

2. Enter an HFS path and file name to store the resulting signer certificate.<br />

Select the Binary DER data type and click OK (Figure 6-36).<br />

Figure 6-36 Web service provider certificate extraction<br />

3. FTP this DER file in binary format to the Web service client.<br />

168 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


4. Using the Web service client administrative console, navigate to the Add<br />

signer certificate section of the defaultkey store in SSL certificate and key<br />

management → Key stores and certificates → NodeDefaultKeyStore →<br />

Signer certificates and select the Add signer certificate.<br />

Enter an alias refering to the Web service provider name. Enter the path and<br />

the file name of the DER file you just transfered. Select the Binary DER data<br />

type and click OK (Figure 6-37).<br />

Figure 6-37 Web service signer certificate add<br />

The signer certificate now appears in the list of signer certificates on the Web<br />

service client side.<br />

Key configuration for response encryption<br />

In this section we extract a signer certificate from the Web service client personal<br />

certificate. Then we transfer this certificate and import it as a signer certificate in<br />

the Web service provider key store.<br />

The following steps describe how to do this:<br />

1. Using the Web service client administrative console, navigate to the default<br />

configured personal certificate in SSL certificate and key management →<br />

Key stores and certificates → NodeDefaultKeyStore → Personal<br />

certificates, select the default certificate, and click Extract.<br />

It is important to click Extract and not Export. Extract takes the public key<br />

only. Export takes the public key and the private key. But the private key<br />

should stay private and should not be shared with other parties.<br />

Chapter 6. Web services message layer security 169


2. Enter a path and file name to store the resulting signer certificate. Select the<br />

binary DER data type and click OK.<br />

Figure 6-38 Web service client certificate extraction<br />

3. FTP this DER file in binary format to the Web service provider (WebSphere<br />

for z/OS).<br />

4. Using the Web service provider administrative console, navigate to the Add<br />

signer certificate section of the defaultkey store in SSL certificate and key<br />

management → Key stores and certificates → NodeDefaultKeyStore →<br />

Signer certificates and select the Add signer certificate.<br />

Enter an alias refering to the Web service client name. Enter the path and the<br />

file name of the DER file you just transfered. Select the Binary DER data<br />

type and click OK (Figure 6-39).<br />

Figure 6-39 Web service signer certificate add<br />

170 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


The signer certificate now appears in the list of signer certificates on the Web<br />

service provider side.<br />

6.4.4 Confidentiality configuration overview<br />

For configuring confidentiality, the Web service client and provider have to agree<br />

on an encryption algorithm, on which SOAP message parts are to be encrypted<br />

and have to transfer their public keys as described in the preceding section.<br />

Then configuration has to be executed on both sides.<br />

Client side<br />

To specify confidentiality for a part of a SOAP message, you have to specify the<br />

parts that should be encrypted and the method of encryption in the client’s<br />

WS-Security configuration:<br />

► Specify the parts of the message that have to be encrypted in the request<br />

generator configuration. The message parts can be specified by predefined<br />

keywords or XPath expressions. You can specify multiple parts that require<br />

encryption.<br />

► Specify key-related information, which includes the location of the encryption<br />

key, type of key, and a password for protecting the key.<br />

► Specify encryption information, which defines how to encrypt to the specified<br />

part. You have to specify options, such as an encryption method algorithm<br />

and key-related information. Application Server Toolkit helps you to specify<br />

these options.<br />

► If a client expects a response that includes confidentiality by the server, the<br />

client also has to be configured to decrypt the server’s encryption of the<br />

response message in the response consumer configuration.<br />

Server side<br />

To specify confidentiality required for part of a SOAP message, you have to<br />

specify the encrypted parts and the method of decryption in the server’s<br />

WS-Security configuration:<br />

► Specify the parts of the message that require decryption in the request<br />

consumer configuration. The message parts can be specified by predefined<br />

keywords or XPath expressions. You can specify multiple parts that require<br />

encryption.<br />

► Specify key-related information, which includes the location of the decryption<br />

key, the type of key, and a password for protecting the key.<br />

► Specify encryption information, which defines how to decrypt the specified<br />

part. You have to specify options, such as an encryption method algorithm<br />

and key-related information.<br />

Chapter 6. Web services message layer security 171


► If a server sends a response that includes confidentiality, the server also has<br />

to be configured to encrypt of the response message in the response<br />

generator configuration.<br />

6.4.5 Configuring the requestor for request XML encryption<br />

To configure the Web service requestor for confidentiality:<br />

1. Configure the confidentiality.<br />

Open the SecurityCallerEJB ejb-jar.xml deployment descriptor. Select the WS<br />

Extension tab. In the Port Qualified Name Bindings section, select the<br />

SecurityInfo port. (This is necessary in order to activate the Add button in the<br />

next step.) Expand the Request Generator Configuration section. Expand<br />

the Confidentiality section and click Add.<br />

Configure the Confidentiality dialog (Figure 6-40 on page 173):<br />

a. Enter a name such as ConfidentialityBody.<br />

b. Select the order in which the encryption is generated. Multiple<br />

confidentiality parts can be specified, and you have to specify the order of<br />

generating the encryption. In our case, we select 1.<br />

The WS-Security run time of Version 6.1 supports multiple signature and<br />

encryption parts in one SOAP message. For multiple signature and<br />

encryption parts, you have to specify the processing order. For example, if<br />

you want to sign and encrypt the SOAP body, you should specify 1 in the<br />

Integrity dialog and 2 in the Confidentiality dialog.<br />

c. Click Add for message parts, and one confidentiality part is created. The<br />

created part is an encryption of the SOAP body content. To specify other<br />

confidentiality parts, specify the message parts dialect and message parts<br />

keyword. Refer to the definition of message parts dialect described in<br />

“Configuring the requestor for request XML digital signature” on page 135.<br />

The message parts keywords for specifying a confidentiality part are<br />

different from an integrity part. The keywords for a confidentiality part are:<br />

bodycontent: content of SOAP body element<br />

usernametoken: username token element<br />

digestvalue: digest value element from a signature element<br />

signature: specifies an entire signature<br />

wscontextcontent: encrypts the WS-Context header<br />

We select http://........../dialect-was and bodycontent as the keyword.<br />

172 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Figure 6-40 Request generator Confidentiality dialog<br />

d. Add a nonce or time stamp, or both, if you require them. For both, select<br />

the dialog and keyword in the same way as for the message parts. For the<br />

time stamp, you can specify an expiration date.<br />

e. You can add multiple message parts, a nonce, and time stamp in one<br />

dialog. All message parts that are specified in one Confidentiality dialog<br />

are encrypted by the same encryption information, which is defined on the<br />

WS Binding page.<br />

Click OK, and a confidentiality part is created. Save the configuration.<br />

Chapter 6. Web services message layer security 173


2. Configure the key locator (Figure 6-41).<br />

Open the SecurityCallerEJB deployment descriptor. Select the WS Binding<br />

tab. Expand the Security Request Generator Binding Configuration<br />

section. Expand the Key Locators section and click Add to specify how to<br />

retrieve a key for encryption.<br />

Figure 6-41 Request generator Key Locator dialog<br />

To specify a key locator, refer to 6.3.4, “Configuring the requestor for request<br />

XML digital signature” on page 135.<br />

Configure the Key Locator dialog:<br />

a. Enter a name such as ConfidentialityKeyLocator.<br />

b. Select KeyStoreKeyLocator as the class name. The class to retrieve a<br />

key implements the com.ibm.wsspi.wssecurity.keyinfo.KeyLocator<br />

interface.<br />

c. Select Use key store and specify a client key store. We choose the<br />

WebSphere default key store.<br />

174 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


d. Click Add under Key to define the key. Enter the provider key alias, a key<br />

password, and the provider key name. We choose the wtsc58 alias.<br />

Tip: The WebSphere default key store path can be found with the<br />

administrative console in Security → SSL certificate and key<br />

management → SSL configurations → NodeDefaultSSLSettings →<br />

Key stores and certificates → NodeDefaultKeyStore.<br />

The personal key description can be found in Security → SSL<br />

certificate and key management → SSL configurations →<br />

NodeDefaultSSLSettings → Key stores and certificates →<br />

NodeDefaultKeyStore → Personal certificates.<br />

3. Configure key information (Figure 6-42).<br />

Expand Key Information and click Add to specify which type of key<br />

reference is used.<br />

Figure 6-42 Request generator Key Information dialog<br />

To specify key information, refer to 6.3.4, “Configuring the requestor for<br />

request XML digital signature” on page 135.<br />

Chapter 6. Web services message layer security 175


Configure the Key Information dialog:<br />

a. Enter a name such as ConfidentialityKeyInfo.<br />

b. Select a type (KEYID) from the Key information type list.<br />

c. Select Use key locator, and then select the key locator and the key name<br />

you defined before.<br />

4. Configure encryption information (Figure 6-43).<br />

Expand Encryption Information, click Add, and specify how to encrypt.<br />

Figure 6-43 Request generator Encryption Information<br />

Configure the encryption information:<br />

a. Enter a name such as ConfidentialityEncryptionInfo.<br />

b. Select a data encryption method algorithm from the list. The supported<br />

algorithms are:<br />

http://www.w3.org/2001/04/xmlenc#tripledes-cbc: Triple DES in CBC<br />

(our choice)<br />

http://www.w3.org/2001/04/xmlenc#aes128-cbc: AES 128 in CBC<br />

176 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


http://www.w3.org/2001/04/xmlenc#aes192-cbc: AES 192 in CBC<br />

http://www.w3.org/2001/04/xmlenc#aes256-cbc: AES 256 in CBC<br />

c. Select a Key encryption method algorithm from the list. The supported<br />

algorithms are:<br />

http://www.w3.org/2001/04/xmlenc#rsa-1_5: RSA Version 1.5 (our<br />

choice)<br />

http://www.w3.org/2001/04/xmlenc#kw-tripledes: Triple DES Key Wrap<br />

http://www.w3.org/2001/04/xmlenc#kw-aes128: AES 128 Key Wrap<br />

http://www.w3.org/2001/04/xmlenc#kw-aes192: AES 192 Key Wrap<br />

http://www.w3.org/2001/04/xmlenc#kw-aes256: AES 256 Key Wrap<br />

http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p: RSA-OAEP<br />

If no algorithm is selected, the encryption key is not encrypted.<br />

d. Enter any key information name. This specifies the key information<br />

reference. We specify ConfidentialityKeyInfo.<br />

e. Select a key information element from the list of the key information that<br />

was defined. The selected key information is used for encryption. In our<br />

case, we select ConfidentialityKeyInfo from the list.<br />

f. Select a confidentiality part from the list of confidentiality parts that were<br />

defined in the extensions. In our case, we select ConfidentialityBody from<br />

the list.<br />

g. Click OK and the encryption information is created. Save the<br />

configuration.<br />

Chapter 6. Web services message layer security 177


6.4.6 Configuring the z/OS provider for request XML encryption<br />

Follow the steps to configure the Web service provider for confidentiality:<br />

1. Configure the required confidentiality (Figure 6-44).<br />

Open the SecurityInfoEJB webservices.xml deployment descriptor. Select the<br />

Extensions tab. Expand the Request Consumer Service Configuration<br />

Details section. Select the port component, expand Required<br />

Confidentiality, and click Add.<br />

Figure 6-44 Request consumer Required Confidentiality dialog<br />

Configure the Required Confidentiality dialog:<br />

a. Enter a name such as ConfidentialityBody.<br />

178 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


. Select the usage type, either required or optional. If the usage type is<br />

required, an unencrypted request message throws a SOAP fault. If the<br />

usage type is optional, an unencrypted message is received. Select<br />

Required.<br />

c. Click Add for message parts and select http://.../dialect-was and<br />

bodycontent as the keyword.<br />

d. Nonce and time stamp extensions can be specified as on the generator<br />

side. In our case, we do not specify them.<br />

e. Click OK and a required confidentiality part is created.<br />

2. Configure the trust anchor (Figure 6-45).<br />

Select the Binding Configurations tab. Expand the Request Consumer<br />

Binding Configuration Details section. Expand Trust Anchor and click<br />

Add.<br />

Figure 6-45 Request consumer Trust Anchor dialog<br />

Configure the Trust Anchor dialog:<br />

a. Enter a name such as ConfidentialityTrustAnchor.<br />

b. Enter the trust store password. We choose the WebSphere default<br />

password WebAS.<br />

c. Enter the trust store path. We use the WebSphere default trust store.<br />

d. Select the trust store type. We choose PKCS12.<br />

Chapter 6. Web services message layer security 179


Tip: The WebSphere default trust store path can be found with the<br />

administrative console in Security → SSL certificate and key<br />

management → SSL configurations → NodeDefaultSSLSettings →<br />

Key stores and certificates → NodeDefaultTrustStore.<br />

The default personal key description can be found in Security → SSL<br />

certificate and key management → SSL configurations →<br />

NodeDefaultSSLSettings → Key stores and certificates →<br />

NodeDefaultKeyStore → Personal certificates.<br />

Click OK and a trust anchor is created.<br />

3. Configure the key locator (Figure 6-46).<br />

Expand Key Locators and click Add to specify how to retrieve a key for<br />

decryption.<br />

Figure 6-46 Request consumer Key Locator dialog<br />

To specify a key locator, refer to 6.3.4, “Configuring the requestor for request<br />

XML digital signature” on page 135.<br />

180 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Configure the Key Locator dialog:<br />

a. Enter a name such as ConfidentialityKeyLocator.<br />

b. Select KeyStoreKeyLocator as the class name. The class to retrieve a<br />

key implements the com.ibm.wsspi.wssecurity.keyinfo.KeyLocator<br />

interface.<br />

c. Select Use key store and specify a client key store. We choose the<br />

WebSphere z/OS default key store.<br />

d. Click Add under Key to define the key. Enter the provider key alias, a key<br />

password, and the provider key name. We choose the wtsc58 Alias.<br />

4. Configure key information (Figure 6-47).<br />

Expand Key Information and click Add to specify which type of key<br />

reference is used.<br />

Figure 6-47 Request consumer Key Information dialog<br />

To specify a key information, refer to 6.3.4, “Configuring the requestor for<br />

request XML digital signature” on page 135.<br />

Configure the Key Information dialog:<br />

a. Enter a name such as ConfidentialityKeyInfo.<br />

b. Select a type (KEYID) from the Key information type list.<br />

Chapter 6. Web services message layer security 181


c. Select Use key locator, and then select the key locator and the key name<br />

you defined before.<br />

5. Configure encryption information (Figure 6-48).<br />

Expand Encryption Information, click Add, and specify how to encrypt.<br />

Figure 6-48 Request consumer Encryption Information<br />

To specify encryption information, refer to 6.4.5, “Configuring the requestor for<br />

request XML encryption” on page 172.<br />

Configure the encryption information:<br />

a. Enter a name such as ConfidentialityEncryptionInfo.<br />

b. Select a data encryption method algorithm from the list. If no algorithm is<br />

selected, the encryption key is not encrypted.<br />

c. Enter any key information name. This specifies the key information<br />

reference. We specify ConfidentialityKeyInfo.<br />

182 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


d. Select a key information element from the list of the key information that<br />

was defined. The selected key information is used for encryption. In our<br />

case, we select ConfidentialityKeyInfo from the list.<br />

e. Select a confidentiality part from the list of confidentiality parts that were<br />

defined in the extensions. In our case, we select ConfidentialityBody from<br />

the list.<br />

f. Click OK and the encryption information is created. Save the<br />

configuration.<br />

6.4.7 Configuring the z/OS provider for response XML encryption<br />

The configuration for this section is similar to the configuration in 6.4.5,<br />

“Configuring the requestor for request XML encryption” on page 172. We only<br />

point out differences in this section.<br />

1. Configure the confidentiality.<br />

Open the SecurityInfoEJB webservices.xml deployment descriptor. Select the<br />

Extension tab. In the Port Qualified Name Bindings section, select the<br />

SecurityInfo port. (This is necessary in order to activate the Add button in the<br />

next step.) Expand the Response Generator Configuration section. Expand<br />

the Confidentiality section and click Add.<br />

Refer to 6.4.5, “Configuring the requestor for request XML encryption” on<br />

page 172, for details about this dialog configuration. The configuration of this<br />

dialog is similar.<br />

Chapter 6. Web services message layer security 183


2. Configure the key locator (Figure 6-49).<br />

Open the SecurityInfoEJB webservices.xml deployment descriptor. Select the<br />

Binding Configuration tab. Expand the Response Generator Binding<br />

Configuration Details section. Expand the Key Locators section and click<br />

Add to specify how to retrieve a key for encryption.<br />

Figure 6-49 Response generator Key Locator dialog<br />

Refer to 6.4.5, “Configuring the requestor for request XML encryption” on<br />

page 172 for details about this dialog configuration.<br />

184 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


3. Configure key information (Figure 6-50).<br />

Expand Key Information and click Add to specify which type of key<br />

reference is used.<br />

Figure 6-50 Response generator Key Information dialog<br />

Refer to 6.4.5, “Configuring the requestor for request XML encryption” on<br />

page 172 for details about this dialog configuration.<br />

4. Configure encryption information.<br />

Expand Encryption Information and click Add and specify how to encrypt.<br />

Refer to 6.4.5, “Configuring the requestor for request XML encryption” on<br />

page 172 for details about this dialog configuration. The configuration of this<br />

dialog is similar.<br />

6.4.8 Configuring the z/OS requestor for response XML encryption<br />

The configuration for this section is similar to the configuration in 6.4.6,<br />

“Configuring the z/OS provider for request XML encryption” on page 178. We<br />

only point out differences in this section.<br />

1. Configure the required confidentiality.<br />

Chapter 6. Web services message layer security 185


Open the SecurityCallerEJB ejb-jar.xml deployment descriptor. Select the WS<br />

Extension tab. In the Port Qualified Name Bindings section, select the<br />

SecurityInfo port. (This is necessary in order to activate the Add button in the<br />

next step.) Expand the Response Consumer Configuration section.<br />

Expand the Required Confidentiality section and click Add.<br />

Refer to 6.4.6, “Configuring the z/OS provider for request XML encryption” on<br />

page 178, for details about this dialog configuration. The configuration of this<br />

dialog is similar.<br />

2. Configure the trust anchor (Figure 6-51).<br />

Select the WS Binding tab. Expand the Security Response Consumer<br />

Binding Configuration section. Expand Trust Anchor and click Add.<br />

Figure 6-51 Response consumer Trust Anchor dialog<br />

Refer to 6.4.6, “Configuring the z/OS provider for request XML encryption” on<br />

page 178, for details about this dialog configuration.<br />

186 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


3. Configure the key locator (Figure 6-52).<br />

Expand Key Locators and click Add to specify how to retrieve a key for<br />

decryption.<br />

Figure 6-52 Response consumer Key Locator dialog<br />

Refer to 6.4.6, “Configuring the z/OS provider for request XML encryption” on<br />

page 178 for details about this dialog configuration.<br />

Chapter 6. Web services message layer security 187


4. Configure key information (Figure 6-53).<br />

Expand Key Information and click Add to specify which type of key<br />

reference is used.<br />

Figure 6-53 Response consumer Key Information dialog<br />

Refer to 6.4.6, “Configuring the z/OS provider for request XML encryption” on<br />

page 178, for details about this dialog configuration.<br />

5. Configure encryption information.<br />

Expand Encryption Information and click Add and specify how to encrypt.<br />

Refer to 6.4.6, “Configuring the z/OS provider for request XML encryption” on<br />

page 178, for details about this dialog configuration. The configuration of this<br />

dialog is similar.<br />

6.4.9 Validating confidentiality with XML encryption<br />

We validate the confidentiality scenario using our application described in “5.6,<br />

“Our SecurityInfo Web service application and environment” on page 98.<br />

The application is called with the following URL:<br />

http://windowsbax.pok.ibm.com:9081/SecurityCallerWAR/<br />

188 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


The application displays the principal on Web service client side and also on the<br />

Web service provider side (Figure 6-54).<br />

Figure 6-54 SecurityInfo application confidentiality display<br />

The display shows that the user did not authenticate, as theprincipal on the Web<br />

service client side is unauthenticated.<br />

The display shows that the Web services client does not authenticate to the Web<br />

service provider, as the principal on the Web service provider side is<br />

unauthenticated.<br />

The Web service client log confirms that the principal is unauthenticated, as<br />

shown in Example 6-7.<br />

Example 6-7 Web service requestor server log<br />

ITSO SecurityCallerBean - RequestID = ITSO2069<br />

ITSO SecurityCallerBean - Timestamp = Mon Nov 13 08:55:35 EST 2006<br />

ITSO SecurityCallerBean - Hostname = windowsbax<br />

ITSO SecurityCallerBean - ipaddress = 9.56.23.149<br />

ITSO SecurityCallerBean - Principal = UNAUTHENTICATED<br />

ITSO SecurityCallerBean - OSName = Windows XP<br />

ITSO SecurityCallerBean - OS Version = 5.1 build 2600 Service Pack 2<br />

Chapter 6. Web services message layer security 189


The Web service provider log confirms that the Web service has been called,<br />

run, and that the principal is unauthenticated, as shown in Example 6-8.<br />

Example 6-8 z/OS Web service provider server log<br />

ITSO SecurityInfoBean - RequestID = ITSO2069<br />

ITSO SecurityInfoBean - Timestamp = Mon Nov 13 13:55:47 GMT+00:00 2006<br />

ITSO SecurityInfoBean - Hostname = WTSC58<br />

ITSO SecurityInfoBean - ipaddress = 9.12.4.8<br />

ITSO SecurityInfoBean - Principal = UNAUTHENTICATED<br />

ITSO SecurityInfoBean - OSName = z/OS<br />

ITSO SecurityInfoBean - OS Version = 01.08.00<br />

We use the Ethereal software to see messages flowing between the Web service<br />

client and the provider. The Ethereal output shows that the Web service request<br />

body part is encrypted and not readable. An EncryptedData tag is added to the<br />

SOAP message.<br />

We also see that the body part of the SOAP message for the response is<br />

encrypted.<br />

Example 6-9 SOAP/HTTP conversation<br />

POST /SecurityInfoRouterWS/services/SecurityInfo HTTP/1.1<br />

Host: wtsc58.itso.ibm.com:49080<br />

...<br />

SOAPAction: ""<br />

Connection: Keep-Alive<br />

Content-Type: text/xml; charset=utf-8<br />

Content-Length: 1657<br />

Date: Mon, 13 Nov 2006 13:55:34 GMT<br />

SnrZxQvN4uw=YLx8JzXGihdnEFtk7NMKxrZ/jO5V2dZWOhXiEL0Y/c72Tf3nkoUmRz3r1xTuSW9fcvn<br />

6LKtKzAM0WNFEzIFpeoOVoUtMWoRNLUBLSI3SyUdBIaS6en6536M2CwFRbFCDDzekPQ6ynY<br />

mxpYxrQiIpkRIsbxMIw6O+66lG43y88rU=


List><br />

Ngo63Q72UWG0r/Z3zvyFAVTTlAdTlw4+vtumTqZSgvzbLp8/V5pjE7Pru<br />

X1MxUN+arMjxaC0afV7yP+9nKbNgagf+EB5yFVRCju3PzJXYpg6OBWHwfl/6WWwIpbNLVXN<br />

4ntU5dRSQ5+bC6o6lTQk/PuH3LNAWWlm<br />

<br />

HTTP/1.1 200 OK<br />

...<br />

Date: Mon, 13 Nov 2006 13:55:55 GMT<br />

Server: WebSphere Application Server/6.1<br />

Q/HFFBeGh/U=kB+/NZaPzXVouZYZVa/l991AnRXRMsDkIm/nyJhwWzchOMeE3eaXYHRExjIWCOazJ+G<br />

wZ3tRGLRpkfg9BKJBmQWzKgiGnflgSl+hyqmNnzNb9xzi4Y4zkrvKYuk4Ov6yub7NG94bIS<br />

ndgeSqqBVeMY0KYcAPzx8jo3ES7WghqRk=<br />

M1YgSFnIrz89VFHdPsmVT0PauBHcbxs+qdeLp1/f+BnsDzzz8dCIr1RT5<br />

Sy2fK2nUuW2YRFOjr+0Ryaaw6gWbDDCbG+1FyG3E6YqGvaHng6uM39Hm/Om4wTq8kKYqQaG<br />

HX0lnlieRs04D6iyzk3NfPLXDoxqov4LIuEZaLL5YcxuVmF5+OgPj8mnEe3QN47ENF9Ygjw<br />

mzv2jb21Euz8H0oK5nVBBqMXJH8zakgU2+qOGMsTAUrLd5eCsVqH1jwKmW+VvwXRH65VlZT<br />

o1PV40x5Zn8BpLCA/sfd5GzmtoytAIjxipAVoYw0ebd6IA4msJZ1U/EcLD+rD/bABSSdelF<br />

zHgyw6MZmpWfYgkAC6fw/2p1PrRCCnC12M2xz214TUQgHrljPbtGl73/dz5F77ow8wW+oK9<br />

Chapter 6. Web services message layer security 191


A4rAxe3jWkLuFZwqgPCbRWXYZeCJBB5vp0L1O8O005Q6OUr784vzTlIqj39VtLDaFcJ4wP8<br />

36yoSa8w=<br />

All this validates that XML encryption is used to encrypt SOAP messages<br />

between the Web service client and the Web service provider using<br />

WS-Security.<br />

6.4.10 Confidentiality using hardware cryptography<br />

With WebSphere Application Server for z/OS v6.1, it is not necessary to use<br />

ICSF-managed keys for hardware cryptography. You may use<br />

non-ICSF-managed keys (soft keys) for hardware cryptography. For example,<br />

using the <strong>IBM</strong>JCECCA java cryptographic provider, it is possible to use keys in<br />

JKS keystores (same configuration as the configuration described in the<br />

preceding sections) and benefit from hardware cryptography. If you want such a<br />

configuration, configure confidentiality as described in the preceding sections,<br />

install the unrestricted Java policy jar files, and select the <strong>IBM</strong>JCECCA provider<br />

as the first choice in the java.security file.<br />

For more information see 7.5, “Hardware crypto and Java crypto providers” on<br />

page 222, which describes extensively the different achoices vailable for<br />

exploiting hardware cryptography. Section 7.8.2, “Installing the unrestricted Java<br />

policy jars” on page 236, shows how to install the unrestricted Java policy jar<br />

files.<br />

6.5 Identity assertion<br />

Identity assertion (or ID assertion) is a mechanism that allows the propagation of<br />

an already authenticated identity from one server to another. ID assertion is<br />

different from the other authentication methods in that it is based on a trust<br />

relationship between the sender of the identity and the receiver. The receiver can<br />

assume that the identity has been authenticated, because he trusts the sender.<br />

You can use ID assertion when an intermediary server must invoke a service<br />

from a downstream server on behalf of the client. The intermediary server<br />

establishes a trust relationship with the downstream server (using authentication,<br />

for instance, but not necessarily) and then is recognized as a trusted partner by<br />

the downstream server. The intermediary server can then assert the client<br />

identity to the downstream server.<br />

Identity assertion is particularly well suited for end-to-end security solutions.<br />

192 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


This section describes how WS-Security supports identity assertion, explains our<br />

identity assertion scenario, gives an overview of how to configure identity<br />

assertion, and thoroughly describes the steps to configure this scenario.<br />

6.5.1 Identity assertion support with WS-Security<br />

WS-Security support two formats for sending the caller identity to an endpoint<br />

server:<br />

► Caller’s username token without the caller’s password<br />

► Caller’s X.509 certificate token<br />

WS-Security supports the following trust modes with a downstream server:<br />

► Basic authentication<br />

The asserting server authenticates itself, sending a user name and password<br />

in the SOAP header, in addition to the transmitted asserted identity.<br />

► Digital signature<br />

The asserted identity is transmitted digitally signed by the asserting server,<br />

along with the asserting server x.509 certificate. This provides both for data<br />

integrity of the transmitted asserted identity and for authentication of the<br />

sender.<br />

► Presumed trust<br />

In this case, communication flows inside a secure channel or uses a secure<br />

transport protocol so that the asserting server does not need to provide<br />

authentication data at the SOAP message level. Typically, this can be<br />

achieved using HTTP as the transport protocol with the SSL/TLS client (the<br />

client is the asserting server) authentication.<br />

When you use the BasicAuth and digital signature trust modes, the intermediary<br />

server passes its own authentication information to the downstream server for<br />

authentication. The Web services security implementation for WebSphere<br />

Application Server validates the trust relationship by following this procedure:<br />

1. The downstream server validates the authentication information of the<br />

ntermediary server.<br />

2. The downstream server verifies whether the authenticated intermediary<br />

server is authorized for identity assertion. For example, the intermediary<br />

server must be in the trust list for the downstream server.<br />

3. If the validations described previously succeed, the asserted identity is set as<br />

the identity of the running thread. If any of the validations fail, the request is<br />

rejected with a SOAP fault exception.<br />

Chapter 6. Web services message layer security 193


When asserting an identity, the already authenticated identity must be known in<br />

the downstream server user registry. This implies that identities known to the<br />

intermediary server and identity known to the downstream server must be the<br />

same. This can be ensured sharing the same user registry such as an LDAP user<br />

registry. In a z/OS environment, this can be fulfilled sharing a RACF database<br />

among several LPARs. Or across disparate environments, it might be necessary<br />

to synchronize user registries.<br />

6.5.2 Identity assertion scenario description<br />

This scenario uses the application and the environment described in 5.6, “Our<br />

SecurityInfo Web service application and environment” on page 98. This<br />

scenario illustrates the usage of identity assertion to have a Web service client<br />

assert an identity to a Web service provider. This identity is a user name in this<br />

example. The intermediary server (winbax) uses the embedded file-based user<br />

registry (federated repository). The downstream server (wtsc58) uses RACF<br />

(LocalOS). These two registries are synchronized manually so that an<br />

authenticated user in the intermediary server is also known by the downstream<br />

server. The trust relationship between the intermediary server and the<br />

downstream server is a presumed trust in this example.<br />

Figure 6-55 Web service message security identity assertion scenario<br />

On the Web service client side, the user authenticates to the intermediary server<br />

(winbax) using a user ID (USER1) and a password. These credentials are<br />

validated against the intermediary server user registry. Because credentials are<br />

valid, the login module sets the user ID (USER1) in the Java principal for<br />

194 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


executing the client EJB. This client EJB makes a Web service call. The Web<br />

service request generator includes a security token in the SOAP message<br />

header. This security token is a username token that contains the user username<br />

only (USER1). No password is inserted. The Web service request generator also<br />

performs the actions necessary to establish the trust relationship (basic<br />

authentication token, sign the user name, or nothing). In our example the trust is<br />

presumed, hence no additional action is required.<br />

On the Web service provider side (WebSphere for z/OS), the Web service<br />

request consumer receives the security token and uses a JAAS login module to<br />

accept the asserted user name and set the principal. The EJB runs with a<br />

USER1 principal.<br />

In this example, the user identity USER1 flows from the browser, through the<br />

intermediary server (winbax), to the downstream server (wtsc58).<br />

Identity assertion occurs only when sending the request. Hence, there is no<br />

security mechanism when receiving the response.<br />

6.5.3 Identity assertion configuration overview<br />

For configuring identity assertion, the Web service client and provider have to<br />

agree on a trust relationship and on an assserted identity format. Then<br />

configuration has to be executed on both sides.<br />

Client side<br />

To insert an asserted identity into a SOAP message, a username token and its<br />

token generator must be specified in the client’s WS-Security configuration:<br />

► Specify a security token in the request generator configuration. In case of<br />

identity assertion, the security token type must be username. This security<br />

token is sent inside the SOAP header to the server.<br />

► Specify a token generator for the user name token in the request generator<br />

configuration. The role of the token generator is to retrieve the user name<br />

from the current Java principal and generate the user name token with the<br />

user name only and no password. The token generator class for the user<br />

name token, UsernameTokenGenerator, is provided by the Web services<br />

security run time as a default implementation. Some specific properties need<br />

to be defined so that the callback handler knows where to find the user name.<br />

Chapter 6. Web services message layer security 195


Server side<br />

To receive the asserted identity, you must specify a security token that is<br />

required by the server and a token consumer in the server’s WS-Security<br />

configuration, as follows:<br />

► Specify a security token that is required by the server. In case of identity<br />

assertion, the required security token type is username (same as in the client<br />

configuration).<br />

► Specify a caller part that enforces the trust relationship.<br />

► Specify a token consumer in the request consumer configuration. The token<br />

consumer receives a security token in the request message and validates it.<br />

The token consumer class for the user name token,<br />

UsernameTokenConsumer, is provided by the Web services security run time<br />

as a default implementation. The JAAS login module is specific for identity<br />

assertion, as it only accepts the asserted identity.<br />

6.5.4 Configuring the Web service requestor for identity assertion<br />

To configure the Web service requestor for identity assertion:<br />

1. Configure the security token (Figure 6-56).<br />

Open the SecurityCallerEJB ejb-jar.xml deployment descriptor. Select the WS<br />

Extension tab. In the Port Qualified Name Bindings section, select the<br />

SecurityInfo port. (This is necessary in order to activate the Add button in the<br />

next step.) Expand the Security Request Generator Binding Configuration<br />

section. Expand the Security Token section and click Add.<br />

Figure 6-56 Request generator Security Token dialog<br />

196 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Configure the Security Token dialog:<br />

a. Enter a name such as IDAssertionToken.<br />

b. Select the Username Token type from the drop-down list. When you<br />

select a token type, the local name is filled in automatically. The URI is not<br />

necessary (leave it empty).<br />

Click OK.<br />

Chapter 6. Web services message layer security 197


2. Configure the token generator (Figure 6-57).<br />

Open the SecurityCallerEJB deployment descriptor. Select the WS Binding<br />

tab. Expand the Security Request Generator Binding Configuration<br />

section. Expand the Token Generator section and click Add.<br />

Figure 6-57 Request generator Token Generator dialog<br />

198 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Configure the Token Generator dialog:<br />

a. Enter a token generator name such as IDAssertionTokenGen.<br />

b. Select the UsernameTokenGenerator token generator class.<br />

c. For the security token, expand the drop-down list and select the security<br />

token defined on the WS Extension page (IDAssertionToken).<br />

d. Check the Use value type check box.<br />

e. Select the Username Token value type from the drop-down list. This<br />

selection fills the local name and callback handler.<br />

f. Verify the callback handler class is NonPromptCallbackHandler.<br />

g. Do not specify any user ID and password, as the flowing identity comes<br />

from the principal.<br />

h. Add callback handler properties:<br />

com.ibm.wsspi.wssecurity.token.IDAssertion.isUsed set to true: This<br />

option indicates that the identity of the initial sender is required and<br />

inserted into the Web services security header within the SOAP<br />

message. For example, WebSphere Application Server only sends the<br />

user name of the original caller for a username token generator. For an<br />

X.509 token generator, the application server sends the original signer<br />

certification only.<br />

com.ibm.wsspi.wssecurity.token.IDAssertion.useRunAsIdentity set to<br />

true: This option indicates that the RunAs identity will be used instead<br />

of the initial caller identity for identity assertion for a downstream call.<br />

i. Click OK and the identity assertion token generator is created.<br />

3. Save the configuration.<br />

6.5.5 Configuring the z/OS Web service provider for identity<br />

assertion<br />

To configure the Web service provider for identity assertion:<br />

Attention: Administrative security and application security have to be both<br />

enabled on the Web service provider side for Web service identity assertion to<br />

operate.<br />

Chapter 6. Web services message layer security 199


1. Configure the required security token (Figure 6-58).<br />

Open the SecurityInfoEJB webservices.xml deployment descriptor. Select the<br />

Extensions tab. Expand the Request Consumer Service Configuration<br />

Details section. Select the Port Component Binding, expand the Required<br />

Security Token, and click Add.<br />

Figure 6-58 Request consumer Required Security Token dialog<br />

Configure the Required Security Token dialog:<br />

a. Enter a name such as IDAssertionToken.<br />

b. Select the Username token type from the drop-down list, matching the<br />

client specification. The local name is filled in automatically.<br />

c. Select the usage type from the drop-down list. The available choices are<br />

required or optional. If you select required, a SOAP fault is thrown if a<br />

required security token is not included in a client’s request message. If you<br />

select optional, the process of consuming a request message continues<br />

without throwing a SOAP fault. We choose Required.<br />

Click OK.<br />

200 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


2. Configure the caller part (Figure 6-59).<br />

Expand Caller Part under Request Consumer Service Configuration<br />

Details and click Add.<br />

Figure 6-59 Request consumer Caller Part dialog<br />

Configure the Caller Part dialog:<br />

a. Enter a name of for the caller part such IDAssertionCallerPart.<br />

b. Select Username Token as the token type. This automatically fills the<br />

local name.<br />

c. Check Use IDAssertion and choose the message layer level trust method<br />

name. We choose None. If Signature is selected for the trust method,<br />

specify the required integrity part that specifies the signature of the trusted<br />

intermediary certificate.<br />

Chapter 6. Web services message layer security 201


Click OK and a caller part is created. Save the configuration.<br />

3. Configure the token consumer (Figure 6-60).<br />

Select the Binding Configurations tab. Expand the Request Consumer<br />

Binding Configuration Details section. Expand Token Consumer and click<br />

Add.<br />

Figure 6-60 Request consumer Token Consumer dialog<br />

202 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Configure the Token Consumer dialog:<br />

a. Enter a token consumer name such as IDAssertionTokenConsumer.<br />

b. Select the IDAssertionUsernameTokenConsumer token consumer<br />

class. This class processes the username token for identity assertion,<br />

which does not have a password element. This interface invokes the<br />

system.wssecurity.IDAssertionUsernameToken JAAS login configuration<br />

with the<br />

com.ibm.wsspi.wssecurity.auth.module.IDAssertionUsernameLoginModul<br />

e login module to validate the IDAssertion user name token. An object of<br />

the com.ibm.wsspi.wssecurity.auth.token.UsernameToken class is created<br />

for the validated username token and stored in the JAAS subject.<br />

c. Expand the drop-down list for security token and select the token specified<br />

on the extension page (IDAssertionToken).<br />

d. Select Use value type and select the Username Token value type from<br />

the list. This fills the local name automatically.<br />

e. Select Use jaas.config to validate the security token in the client’s<br />

request message. Specify the name of the JAAS configuration:<br />

system.wssecurity.IDAssertionUsernameToken. This enables the<br />

application to use identity assertion to map a user name to an application<br />

server credential principal.<br />

f. Click OK and the token consumer is created.<br />

4. Save the configuration.<br />

6.5.6 Configuring the trust relationship for identity assertion<br />

Identity assertion relies on the trust relationship between an intermediary server<br />

and a downstream server. Because of this, the downstream server trusts the<br />

intermediary server and accepts the asserted identity.<br />

This section discusses different ways to create the trust relationship between the<br />

intermediary server and the downstream server.<br />

Trust enforced with Web service message security<br />

As described in 6.5.1, “Identity assertion support with WS-Security” on page 193,<br />

the trust relationship can be created at the Web service message layer level<br />

using one of the following methods:<br />

► Basic authentication<br />

The asserting server authenticates itself, sending a user name and password<br />

in the SOAP header, in addition to the transmitted asserted identity.<br />

Chapter 6. Web services message layer security 203


► Digital signature<br />

The asserted identity is transmitted digitally signed by the asserting server,<br />

along with the asserting server x.509 certificate. This provides both for data<br />

integrity of the transmitted asserted identity and for authentication of the<br />

sender.<br />

Consider that basic authentication is not very secured by itself, as the user name<br />

and password flow in clear in the SOAP message. If you choose basic<br />

authentication, you should also consider some other security mechanisms such<br />

as SSL at the transport layer level.<br />

Presumed trust and Web service transport security<br />

If the trust relationship is not created at the Web service message layer level,<br />

then it is only presumed at the message layer level and it can be enforced at the<br />

Web service transport layer level.<br />

In this case, communication flows inside a secure channel or uses a secure<br />

transport protocol so that the asserting server does not need to provide<br />

authentication data at the SOAP message level.<br />

Depending on the transport security capabilities, different mechanisms may be<br />

used. If HTTP is being used as the transport, see Chapter 8, “Web services<br />

transport security” on page 245, which describes in detail the different<br />

possibilities. With HTTP you may use, for instance, HTTP basic authentication,<br />

confidentiality with SSL, or confidentiality with client certificate authentication.<br />

Presumed trust<br />

If the trust relationship is not created at the Web service message layer level,<br />

then it is only presumed at the message layer level, and it can be enforced<br />

outside of the Web service flow itself.<br />

Trust can be enforced at the network level, for instance. For example, network<br />

appliances such as firewalls can be used to create a secured zone in which<br />

servers trust each others. Another example at the network level could be using<br />

different networks for incoming communication to the intermediary server and for<br />

outgoing communication to the downstream server.<br />

6.5.7 Validating identity assertion<br />

We validate the identity assertion scenario using our application described in 5.6,<br />

“Our SecurityInfo Web service application and environment” on page 98.<br />

204 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


The application is called with the following URL:<br />

http://windowsbax.pok.ibm.com:9081/SecurityCallerWAR/<br />

For this scenario we use the secured servlet so that the user has to authenticate<br />

and provide credentials. We provide the username and password known to the<br />

Web service client (windowsbax) user registry. This username is valence in our<br />

example. See Figure 6-61.<br />

Figure 6-61 SecurityInfo application secured servlet display<br />

The servlet runs, calls the client EJB, makes the Web service call, and displays<br />

the results.<br />

Chapter 6. Web services message layer security 205


The application displays the principal on Web service client side and also on the<br />

Web service provider side (Figure 6-62).<br />

Figure 6-62 SecurityInfo application identity assertion display<br />

The display shows that the user did authenticate, as the principal on the Web<br />

service client side is valence.<br />

The display shows that the Web services client sent a username security token<br />

with the asserted identity, as the principal on the Web service provider side is<br />

valence.<br />

The Web service client log confirms that the principal is valence, as shown in<br />

Example 6-10, “Web service requestor server log” on page 206.<br />

Example 6-10 Web service requestor server log<br />

ITSO SecurityCallerBean - RequestID = ITSO1235<br />

ITSO SecurityCallerBean - Timestamp = Mon Nov 13 10:19:11 EST 2006<br />

ITSO SecurityCallerBean - Hostname = windowsbax<br />

ITSO SecurityCallerBean - ipaddress = 9.56.23.149<br />

ITSO SecurityCallerBean - Principal = valence<br />

ITSO SecurityCallerBean - OSName = Windows XP<br />

ITSO SecurityCallerBean - OS Version = 5.1 build 2600 Service Pack 2<br />

206 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


The Web service provider log confirms that the Web service has been called,<br />

run, and that the principal is valence, as shown in Example 6-11.<br />

Example 6-11 z/OS Web service provider server log<br />

ITSO SecurityInfoBean - RequestID = ITSO1235<br />

ITSO SecurityInfoBean - Timestamp = Mon Nov 13 15:19:21 GMT+00:00 2006<br />

ITSO SecurityInfoBean - Hostname = WTSC58<br />

ITSO SecurityInfoBean - ipaddress = 9.12.4.8<br />

ITSO SecurityInfoBean - Principal = valence<br />

ITSO SecurityInfoBean - OSName = z/OS<br />

ITSO SecurityInfoBean - OS Version = 01.08.00<br />

We use the Ethereal software to see messages flowing between the Web service<br />

client and the provider. The Ethereal output shows that the Web service request<br />

includes the username security token with the tag only. There<br />

is no password being transfered. This is indeed an asserted identity. See<br />

Example 6-12.<br />

Example 6-12 SOAP/HTTP message from requestor to provider<br />

POST /SecurityInfoRouterWS/services/SecurityInfo HTTP/1.1<br />

Host: wtsc58.itso.ibm.com:49080<br />

...<br />

SOAPAction: ""<br />

Connection: Keep-Alive<br />

Content-Type: text/xml; charset=utf-8<br />

Content-Length: 650<br />

Date: Mon, 13 Nov 2006 15:19:11 GMT<br />

<<br />

wsse:Security soapenv:mustUnderstand="1"<br />

xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wss<br />

ecurity-secext-1.0.xsd">valenceITSO1235<br />

HTTP/1.1 200 OK<br />

Content-Type: text/xml; charset=utf-8<br />

Chapter 6. Web services message layer security 207


Content-Language: en-US<br />

Content-Length: 642<br />

Date: Mon, 13 Nov 2006 15:19:23 GMT<br />

Server: WebSphere Application Server/6.1<br />

ITSO1<br />

235Mon Nov 13 15:19:21 GMT+00:00<br />

2006WTSC589.12.4.8va<br />

lencez/OS01.08.00<br />

All this validates that identity assertion occurs between the Web service client<br />

and the Web service provider using WS-Security.<br />

208 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Chapter 7. Secure Sockets Layer (SSL)<br />

This chapter provides an overview of SSL changes in WebSphere V6.1 for z/OS<br />

and how these changes are applied.<br />

The following topics are discussed here:<br />

► “Centrally managed SSL” on page 210<br />

► “WebSphere V6.1 for z/OS SSSL to JSSE changes” on page 213<br />

► “SSL RACF certificate management” on page 214<br />

► “Hardware crypto and Java crypto providers” on page 222<br />

► “<strong>IBM</strong>JCECCA and <strong>IBM</strong>JCE characteristics” on page 227<br />

► “SSL and JCERACFKS keystore” on page 229<br />

► “Hardware crypto using a JCECCARACFKS keystore” on page 233<br />

► “SSL troubleshooting and traces” on page 239<br />

7<br />

© Copyright <strong>IBM</strong> Corp. 2007. All rights reserved. 209


7.1 Introduction<br />

This section introduces new SSL features, changes, and provides z/OS-specific<br />

considerations when using SSL.<br />

7.2 Centrally managed SSL<br />

In previous versions of WebSphere, every endpoint using SSL required a<br />

repertoire alias to be configured. Consequently, changing the SSL repertoire<br />

alias for an endpoint was cumbersome since the user had to know what path to<br />

take in the admin console to get to a desired endpoint, and getting to the<br />

endpoint configuration usually involved traversing several screens.<br />

WebSphere V6.1 provides a new approach to organizing SSL configurations by<br />

centralizing all SSL configurations on one panel. Additionally, SSL configurations<br />

can be scoped at the cell (network deployment only), node, server, and endpoint<br />

level so that an alias is not required for every endpoint. The panel is broken into<br />

two hierarchies, one tree for inbound endpoints, and one tree for outbound<br />

endpoints.<br />

210 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


A new WebSphere base installation will have only one SSL configuration defined<br />

at the node level, as illustrated in Figure 7-1. Select SSL certificate and key<br />

management → Manage endpoint security configurations.<br />

Figure 7-1 Centrally managed SSL configuration<br />

In Figure 7-1, the server and endpoints under the inbound topology inherit their<br />

SSL configuration NodeDefaultSSLSettings from the node-level SSL<br />

configuration. Additional SSL configurations can be defined at a lower scope<br />

overriding the node-level configuration by simply clicking the server or endpoint<br />

and choosing a new SSL configuration.<br />

SSL aliases are still supported in WebSphere V6.1, but using centrally managed<br />

SSL configuration is recommended for ease of management. Application servers<br />

that are migrated from earlier releases of WebSphere to WebSphere V6.1 still<br />

use SSL aliases, and the endpoints need to be manually configured to take<br />

advantage of the centrally managed SSL support.<br />

Following any of the paths for the endpoints in Table 7-2 on page 214, the<br />

transport chain can be changed from using an SSL configuration alias specific to<br />

an endpoint to using the centrally configured SSL configuration.<br />

Chapter 7. Secure Sockets Layer (SSL) 211


Figure 7-2 shows an example of how the admin console’s SSL inbound channel<br />

was changed from using an SSL configuration alias to being centrally managed.<br />

Figure 7-2 Centrally managed SSL endpoint<br />

212 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


7.3 WebSphere V6.1 for z/OS SSSL to JSSE changes<br />

There have been improvements to the way SSL is configured and managed in<br />

the admin console in WebSphere V6.1. In previous versions of WebSphere an<br />

SSL repertoire could be defined as one of two types, either as Java Secure<br />

Socket Extension (JSSE) or System SSL (SSSL). JSSE and SSL differed in the<br />

following ways:<br />

► JSSE<br />

– Used Java APIs for SSL<br />

– Defined with path to an HFS Java keystore file<br />

– Defined with a path to a safkeyring URI<br />

► SSL (system SSL)<br />

– Used z/OS set of C/C++ APIs for SSL<br />

– Defined with z/OS SAF keyring name only<br />

Certain endpoints were designed to only work with SSSL or JSSE, and each<br />

endpoint needed to be configured with a repertoire alias. It was important to<br />

know the location in the admin console for updating the alias of a transport.<br />

Table 7-1 shows the WebSphere V6.0 SSL type and admin console location for<br />

specifying a repertoire alias.<br />

Table 7-1 WebSphere V6.0 endpoint details<br />

WebSphere V6.0 for z/OS base server<br />

Endpoint Type Administration console location<br />

HTTPS SSSL Application servers → server name →<br />

Web container → HTTP transport →<br />

Choose SSL transport<br />

RMI-IIOP CSIV2 SSSL Global security →<br />

Authentication Protocol →<br />

CSIv2 inbound/outbound transport<br />

Daemon SSL SSSL Application servers → server name →<br />

z/OS location service daemon<br />

JMX Soap<br />

Connector<br />

JSSE Application servers → server name →<br />

Administration Services → JMX connectors →<br />

SOAPConnector → Custom Properties → sslConfig<br />

In WebSphere V6.1, all endpoints with the exception of the daemon use JSSE as<br />

the SSL type. The daemon is a lightweight address space that uses system SSL<br />

because the address space does not run with a JVM. All other endpoints are<br />

used in a WebSphere control regions that run with a JVM.<br />

Chapter 7. Secure Sockets Layer (SSL) 213


Table 7-2 shows the WebSphere V6.1 equivalent location for specifying an SSL<br />

configuration for various endpoints, and the endpoints that were converted to<br />

JSSE.<br />

Table 7-2 WebSphere V6.1 endpoint details<br />

WebSphere V6.1 for z/OS base server<br />

Endpoint Type Central/alias Administration console location<br />

HTTPS JSSE Centrally<br />

configured<br />

(preferred)<br />

RMI-IIOP<br />

CSIV2<br />

Daemon<br />

SSL<br />

JMX Soap<br />

Connectors<br />

7.4 SSL RACF certificate management<br />

SSL certificate and key management →<br />

Manage endpoint security<br />

configurations<br />

Alias Application servers → server name →<br />

Web container →<br />

z/OS additional settings →<br />

Web container transport chains →<br />

Choose SSL enabled transport<br />

SSL inbound channel (SSL_2)<br />

JSSE Centrally<br />

configured<br />

(preferred)<br />

SSL certificate and key management →<br />

Manage endpoint security<br />

configurations<br />

Alias Secure administration,<br />

applications, and infrastructure →<br />

RMI/IIOP security →<br />

CSIv2 inbound/outbound transport<br />

SSSL Not Centrally<br />

configured<br />

See Alias<br />

Alias Application servers → server name →<br />

z/OS location service daemon<br />

JSSE Centrally<br />

configured<br />

(preferred)<br />

SSL certificate and key management →<br />

Manage endpoint security<br />

configurations<br />

Alias Application servers → server name →<br />

Administration Services →<br />

JMX connectors → SOAPConnector →<br />

Custom Properties > sslConfig<br />

The WebSphere V6.1 for z/OS admin console has a new facility for managing<br />

certificates similar to the ikeyman utility provided with the WebSphere distributed<br />

214 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


platforms. For certificates stored in the HFS keystore and trustore files, full<br />

management of the certificates can be done from the admin console.<br />

For certificates stored in RACF, the keystores are read only, meaning that<br />

certificates cannot be added, deleted, received, or imported. These operations<br />

need to be performed by the RACF administrator. However, it is possible to view<br />

the certificates and monitor their expirations in the administrative console.<br />

This section shows how to perform certain administrative tasks with safkeyrings<br />

and are supplemented with sample RACF commands. The tasks include<br />

viewing, importing, exporting, and deleting certificates. For more details about<br />

the RACF commands, see Security Server RACF Command Language<br />

Reference, SA22-7687, which provides a complete list of RACF security<br />

commands and options.<br />

7.4.1 Viewing certificates<br />

The WebSphere administrative console has the facility for viewing the signer<br />

certificate and personal certificate for a keystore configured with a safkeyring<br />

URI that uses a keystore type of JCERACFKS.<br />

Chapter 7. Secure Sockets Layer (SSL) 215


The following path can be used to locate the signer certificates and personal<br />

certificates in the WebSphere admin console: SSL certificate and key<br />

management → Key stores and certificates → NodeDefaultKeyStore<br />

(Figure 7-3).<br />

Figure 7-3 Viewing signer certificate and personal certificate in the admin console<br />

216 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Important certificate information such as issuer, issued by, and validity period<br />

can be obtained for a signer certificate or personal certificate. The certificate<br />

information obtained from the administrative console can be useful for<br />

diagnosing problems related to SSL and for confirming that the application server<br />

is able to access the certificates for a particular keyring. See Figure 7-4.<br />

Figure 7-4 Example of signer certificates details<br />

When adding or deleting a signer certificate or personal certificate to or from a<br />

keyring in RACF, the application server or deployment manager may need to be<br />

recycled in order to view the certificate in the administration console.<br />

Chapter 7. Secure Sockets Layer (SSL) 217


The following RACF commands are provided to show how to obtain<br />

corresponding certificate information that is displayed in the admin console.<br />

► View a list of certificates on a keyring for a user ID:<br />

RACDCERT LISTRING(ring-name) ID(userid)<br />

► View certificate authority information:<br />

RACDCERT CERTAUTH LIST(LABEL('certificate_authority_label'))<br />

► View personal certificate information for a user ID:<br />

RACDCERT LIST (label('personal_certificate_label')) ID(userid)<br />

7.4.2 Monitoring certificate expiration<br />

WebSphere V6.1 provides a certificate expiration monitoring task that cycles<br />

through all the keystores in the security.xml file to check for expired certificates.<br />

The cycle can be specified by the day of the week, or by a certain number of<br />

days, and a notification can be provided as a message in the message log, or as<br />

an e-mail. For e-mail notification, a Simple Mail Transfer Protocol (SMTP) server<br />

address needs to be specified with a recipient’s e-mail address. The WebSphere<br />

Application Server issues an expiration warning before expiration based on the<br />

number of days specified in the Expiration notification threshold field.<br />

The admin console path to manage certificate expiration is SSL certificate and<br />

key management → Key stores and certificates → Manage certificate<br />

expiration.<br />

218 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Figure 7-5 illustrates the options for managing certificate expiration.<br />

Figure 7-5 Certificate management expiration panel<br />

The options for “Automatically replace expiring self-signed certificates” and<br />

“Delete expiring certificates and signers after replacement” are not applicable to<br />

certificates stored in RACF. More information is provided in the Information<br />

Center at:<br />

http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/<br />

com.ibm.websphere.zseries.doc/info/zseries/ae/csec_sslcertmonitoring.<br />

html<br />

Chapter 7. Secure Sockets Layer (SSL) 219


7.4.3 Importing certificates<br />

The import operation in the admin console is applicable to file-based keystore<br />

types. SAF-based keystore types are read only, and the following commands are<br />

provided to show how to import a certificate from an HFS file into a keyring:<br />

► Copy the certificate to a data set from an HFS file:<br />

OGET '/tmp/certificate.cer' DSN.NAME binary convert(no)<br />

► Add the certificate from the data set to RACF with a label:<br />

RACDCERT ADD(DSN.NAME) withlabel('certificate_label')<br />

7.4.4 Exporting certificates<br />

RACF commands can be used to export a certificate from a keyring to a data set,<br />

and then the data set can be placed into the HFS as a file to be used on other<br />

systems.<br />

The following RACF commands and steps are provided to show an example of<br />

how to export a signer certificate or personal certificate into an HFS file to be<br />

transferred to another system:<br />

► Exporting a signer certificate to an HFS file:<br />

RACDCERT ID(userid) CERTAUTH<br />

EXPORT(LABEL('certificate_authority_label')) DSN(CA.DSN.NAME)<br />

FORMAT(CERTDER)<br />

Once the certificate is exported to a data set in DER format, the data set can<br />

be moved to an HFS file with the following command:<br />

OPUT CA.DSN.NAME '/tmp/ca.crt' binary convert(no)<br />

► Exporting a personal certificate to an HFS file:<br />

RACDCERT ID(userid) EXPORT(LABEL('personal_certificate_label'))<br />

DSN(PS.DSN.NAME) FORMAT(PKCS12DER) PASSWORD('XXXX')<br />

Once the certificate is exported to a data set in PKCS12 format, the data set<br />

can be moved to an HFS file with the following command:<br />

OPUT PS.DSN.NAME '/tmp/personal.p12' binary convert(no)<br />

Important: While the CERTDER and CERTB64 keywords indicate to export<br />

only a certificate, the PKCS12DER and PKCS12B64 keywords export the<br />

certificate and the private key (which must exist and not be an ICSF key).<br />

Care should be taken when specifying the format to not mistakenly export a<br />

private key with the PKCS12 format when the intent is to export the signer<br />

certificate only.<br />

220 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Table 7-3 shows the available formats that the WebSphere administration<br />

console can import from a file.<br />

Table 7-3 Export formats for certificates<br />

Format Description<br />

CERTB64 Specifies X.509 certificate and public key that has been encoded<br />

using Base64. This format can be transferred in ASCII.<br />

CERTDER Specifies encoded X.509 certificate and public key encoded in<br />

binary DER format. This format should be transferred in binary.<br />

PKCS12B64 Specifies a PKCS #12 package that has been encoded using<br />

Base64. This format may not be compatible with non-<strong>IBM</strong><br />

applications, and should be transferred in ASCII.<br />

PKCS12DER Specifies a PKCS #12 package encoded using binary DER<br />

format. This format should be transferred in binary.<br />

The signer certificate or personal certificate can then be transferred from an HFS<br />

file to a client in binary using FTP.<br />

8.2, “Integrity with SSL” on page 252 shows one example of using the RACF<br />

commands to export a certificate to an HFS file, and 6.4, “Confidentiality with<br />

XML encryption” on page 164 shows how to export a certificate from the<br />

administration console to an HFS file.<br />

7.4.5 Deleting certificates<br />

The delete operation in the admin console is applicable to file-based keystore<br />

types. SAF-based keystore types are read only, and the following RACF<br />

commands are provided for removing a certificate from a keyring, removing a<br />

keyring, and deleting certificates for a user ID:<br />

► Remove a CA signer certificate from a keyring:<br />

RACDCERT REMOVE(CERTAUTH LABEL('certificate_authority_label')<br />

RING(ring-name)) ID(userid))<br />

► Remove a personal certificate from a keyring:<br />

RACDCERT REMOVE(LABEL('personal_certificate_label') RING(ring-name))<br />

ID(userid)<br />

► Delete the keyring:<br />

RACDCERT DELRING(ring-name) ID(userid)<br />

Chapter 7. Secure Sockets Layer (SSL) 221


► Delete a CA signer certificate:<br />

RACDCERT CERTAUTH DELETE(LABEL('certificate_authority_label'))<br />

► Delete a personal certificate:<br />

RACDCERT DELETE(LABEL('personal_certificate_label')) ID(userid)<br />

7.4.6 Deleting keystores and truststores<br />

Keystores and truststores can be deleted if no SSL configurations are<br />

referencing them. This applies to keystores with paths to HFS files or safkeyring<br />

URIs. The following example error message (Figure 7-6) appears when<br />

attempting to delete a keystore or truststore that is still being used by an SSL<br />

configuration.<br />

Figure 7-6 Error received when deleting a keystore defined in an SSL configuration<br />

To resolve this issue, delete the SSL configuration that has this keystore<br />

specified first before deleting the keystore.<br />

7.5 Hardware crypto and Java crypto providers<br />

The Java Cryptography Extension (JCE) is a set of Java packages that provides<br />

a framework and implementations for encryption, key generation, key<br />

agreement, and Message Authentication Code (MAC) algorithms. Support for<br />

encryption includes symmetric, asymmetric, block, and stream ciphers. JCE is a<br />

pluggable framework that allows other providers (security packages) signed by a<br />

trusted entity to be plugged into the JCE framework, allowing new algorithms to<br />

be added seamlessly.<br />

Vendors such as SUN and <strong>IBM</strong> provide their implementations of JCE. The <strong>IBM</strong><br />

version of the Java Cryptography Extension (<strong>IBM</strong>JCE) is an implementation of<br />

the JCE cryptographic service provider compatible in z/OS environments. The<br />

<strong>IBM</strong>JCE is similar to SunJCE with a few differences. <strong>IBM</strong>JCE has a different<br />

package naming convention, it offers more algorithms, and it supports<br />

z/OS-specific keystores.<br />

The <strong>IBM</strong>JCECCA is an extension to <strong>IBM</strong>JCE in that it adds the capability to use<br />

hardware cryptography through <strong>IBM</strong> Common Cryptographic Architecture (CCA)<br />

222 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


interfaces. <strong>IBM</strong>JCECCA provides secure, high-speed cryptographic services on<br />

various platforms through hardware cryptographic devices.<br />

The <strong>IBM</strong>JCECCA provider is new in Java 1.5, which ships as part of WebSphere<br />

V6.1. Previous WebSphere configurations running with Java 1.4.2 may have<br />

been accessing keys stored in hardware using the <strong>IBM</strong>JCE4758 provider. The<br />

<strong>IBM</strong>JCECCA provider extends and replaces the <strong>IBM</strong>JCE4758 provider from<br />

earlier releases. At this time, the <strong>IBM</strong>JCECCA provider and the <strong>IBM</strong>JCE4758<br />

provider are functionally equivalent.<br />

To use <strong>IBM</strong>JCECCA, the following are required:<br />

► A system at the z/OS V1R6 level or later with one of the following:<br />

– On a z800 or z900 processor, a CCF and a PCICC card<br />

– On a z890 or z990 processor, a CPACF and a PCIXCC card<br />

– On a z890 or z990 processor, a CPACF and a CEX2C card<br />

– On a z9-109 processor, a CPACF and a CEX2C or CEX2A card<br />

► ICSF must be running.<br />

There are a variety of other security providers that can be used with the JCE<br />

architecture. The focus of this section is on the <strong>IBM</strong>JCE and <strong>IBM</strong>JCECCA<br />

providers in a WebSphere 6.1 z/OS environment.<br />

7.5.1 Choosing a JCE provider<br />

A JCE provider is a Java package or set of Java packages that supply a<br />

concrete implementation of a subset of cryptography aspects of the Java security<br />

API. The provider is typically packaged in a jar file, and placed on the classpath<br />

to be used by the Java Virtual Machine (JVM) during startup. The providers that<br />

the JVM use are listed in a java.security file located in the HFS, and are<br />

instantiated when the JVM starts. Beginning with WebSphere V6.0 for z/OS, the<br />

JVM is now shipped as part of WebSphere. For WebSphere V6.1 for z/OS the<br />

provider jars and java.security file can be found in:<br />

► /java/lib/security (location of java.security file)<br />

► /java/lib (location of provider jars)<br />

Where is the location of the WebSphere configuration HFS.<br />

Chapter 7. Secure Sockets Layer (SSL) 223


Example 7-1 shows a list of providers in the java.security file. <strong>IBM</strong>JCECCA and<br />

<strong>IBM</strong>JCEFIPS are commented out in this sample. The providers are listed in order<br />

by preference, and the first provider <strong>IBM</strong>JCE is used as the default provider.<br />

Example 7-1 Providers listed by preference<br />

# List of providers and their preference orders (see above):<br />

#<br />

#security.provider.1=com.ibm.crypto.hdwrCCA.provider.<strong>IBM</strong>JCECCA<br />

#security.provider.1=com.ibm.crypto.fips.provider.<strong>IBM</strong>JCEFIPS<br />

security.provider.1=com.ibm.crypto.provider.<strong>IBM</strong>JCE<br />

security.provider.2=com.ibm.jsse.<strong>IBM</strong>JSSEProvider<br />

security.provider.3=com.ibm.jsse2.<strong>IBM</strong>JSSEProvider2<br />

security.provider.4=com.ibm.security.jgss.<strong>IBM</strong>JGSSProvider<br />

security.provider.5=com.ibm.security.cert.<strong>IBM</strong>CertPath<br />

security.provider.6=com.ibm.security.sasl.<strong>IBM</strong>SASL<br />

security.provider.7=com.ibm.security.cmskeystore.CMSProvider<br />

security.provider.8=com.ibm.security.jgss.mech.spnego.<strong>IBM</strong>SPNEGO<br />

A new default provider can be chosen by setting the provider name as the first in<br />

the list and saving the file. WebSphere needs to be restarted to pick up any<br />

changes made to the java.security file.<br />

7.5.2 Admin console keystore types<br />

In previous versions of WebSphere, the keystore types available were only those<br />

programmed into the admin console. In WebSphere V6.1, the admin console<br />

dynamically builds its list of available keystore types based on the providers<br />

listed in the java.security file. The java.security file is read during server startup,<br />

and any changes to the java.security file require the application server to be<br />

restarted.<br />

In Example 7-2 the java.security file was modified to have only the <strong>IBM</strong>JCE<br />

provider.<br />

Example 7-2 Modified file<br />

# List of providers and their preference orders (see above):<br />

#<br />

security.provider.1=com.ibm.crypto.hdwrCCA.provider.<strong>IBM</strong>JCE<br />

224 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Figure 7-7 illustrates only the keystore types available for the <strong>IBM</strong>JCE provider.<br />

The keystore types are listed as:<br />

► PKCS12<br />

► JCERACFKS<br />

► JCEKS<br />

► JKS<br />

► PKCS11<br />

Figure 7-7 Keystore types from the <strong>IBM</strong>JCE provider<br />

In Example 7-3, the java.security provider was modified to include an additional<br />

hardware cryptography provider <strong>IBM</strong>JCECCA.<br />

Example 7-3 java.security file<br />

# List of providers and their preference orders (see above):<br />

#<br />

security.provider.1=com.ibm.crypto.hdwrCCA.provider.<strong>IBM</strong>JCECCA<br />

security.provider.2=com.ibm.crypto.provider.<strong>IBM</strong>JCE<br />

Chapter 7. Secure Sockets Layer (SSL) 225


Upon restarting the application server and attempting to create a new keystore,<br />

the admin console presents additional keystore types JCECCARACFKS and<br />

JCECCAKS as a result of adding the <strong>IBM</strong>JCECCA provider to the front of the list.<br />

Figure 7-8 shows the additions to the keystore list. Select SSL certificate and<br />

key management → Key stores and certificates → New.<br />

Figure 7-8 Keystore types from the <strong>IBM</strong>JCECCA and <strong>IBM</strong>CE providers<br />

When using the <strong>IBM</strong>JCECCA hardware cryptography provider, the unrestricted<br />

jar files need to be installed on the WebSphere system, and the ICSF address<br />

space must be up and running prior to starting WebSphere.<br />

7.5.3 Keystores and truststores<br />

The keystore is a database that can contain public and private keys. In<br />

WebSphere the public keys are stored as signer certificates, while private keys<br />

are stored in personal certificates. The keys are used for a variety of purposes,<br />

including authentication and data integrity.<br />

226 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


A truststore is a type of keystore whose database contains one or more<br />

certificates that are trusted belonging to another party. In WebSphere a trusted<br />

certificate and public key are stored as a signer certificate. The certificates are<br />

considered trusted because the truststore owner trusts that the public key in the<br />

certificate belongs to the identity identified by the subject of the certificate. The<br />

public key certificate can be used to confirm that a person is really who she<br />

claims to be, and that data really came from that person. In general terms,<br />

truststores and keystores are often referred to as keystores.<br />

7.6 <strong>IBM</strong>JCECCA and <strong>IBM</strong>JCE characteristics<br />

Table 7-4 JCE Characteristics<br />

Provider<br />

name<br />

<strong>IBM</strong>JCECCA<br />

<strong>IBM</strong>JCE<br />

In WebSphere, on distributed systems, the certificates in a keystore are usually<br />

stored in a file. In WebSphere V6.1 for z/OS, the certificates in a keystore can be<br />

stored in a file, or in the SAF database. The actual public/private keys for the<br />

corresponding certificates can be stored in a file, in a SAF database, or in<br />

hardware, depending on the provider and keystore being used. The <strong>IBM</strong>JCE and<br />

<strong>IBM</strong>JCECCA provider support various keystore types that can be selected<br />

depending on the use of the location of certificates and keys.<br />

Table 7-4 describes the characteristics between the <strong>IBM</strong>JCE and <strong>IBM</strong>JCECCA<br />

providers based on the keystore types.<br />

Keystore<br />

type<br />

JKS<br />

JCEKS<br />

PKCS12<br />

<strong>IBM</strong>JCE JKS<br />

JCEKS<br />

PKCS12<br />

Certificate<br />

location<br />

Key<br />

location<br />

File File<br />

system<br />

Use<br />

HW<br />

WebSphere<br />

path<br />

Tooling<br />

Yes path/file WAS<br />

ikeyman<br />

keytool<br />

JCECCARACFKS RACF Hardware Yes safkeyring:///<br />

safkeyringhw:///<br />

RACF<br />

JCECCAKS File Hardware Yes path/file hwkeytool<br />

File File<br />

system<br />

No path/file WAS<br />

ikeyman<br />

keytool<br />

JCERACFKS RACF RACF No safkeyring:/// RACF<br />

The Use HW column indicates that hardware is used for SSL acceleration.<br />

Chapter 7. Secure Sockets Layer (SSL) 227


Note: To use hardware cryptography, both the <strong>IBM</strong>JCECCA and <strong>IBM</strong>JCE<br />

providers need to be listed in the java.security file with the <strong>IBM</strong>JCECCA listed<br />

first. 7.8.3, “Update the java.security file with the <strong>IBM</strong>JCECCA provider” on<br />

page 236, provides an example on how to do this.<br />

Note: RACF is used in explaining the acronyms in “Keystore descriptions” on<br />

page 228. The security product RACF in Table 7-4 can be replaced with other<br />

security products accessible with SAF interfaces (that is, Top Secret and<br />

ACF2).<br />

Keystore descriptions<br />

A description of each of the keystore types from Table 7-4 on page 227 is<br />

provided:<br />

► JKS (Java KeyStore file)<br />

This is a traditional file-based keystore format available with the standard<br />

JDK. Files based on this format are usually stored with a .jks extension.<br />

Use this option if the keystore file is stored in JKS format.<br />

► JCEKS (Java Cryptography Extension Keystore)<br />

This is a file-based keystore implementation of the Java Cryptography<br />

Extensions provider. Files based on this format are usually stored with a<br />

*.jceks extension.<br />

Use this option if the keystore file is stored in JCEKS format.<br />

► PKCS12KS (Public Key Cryptography Standards version 12 Keystore)<br />

This is a file format commonly used to store private keys with accompanying<br />

public key certificates protected with a password-based symmetric key. Files<br />

based on this format are usually stored with a .p12 extension.<br />

Use this option if your keystore uses the PKCS#12 file format.<br />

► JCERACFKS (JCE RACF Keystore)<br />

This is the keystore used in which certificates are stored in a SAF keyring and<br />

the keys stored in RACF.<br />

► JCECCARACFKS (JCE Common Crytpographic Architecture RACF<br />

Keystore)<br />

This is the keystore used for certificates that are stored in a SAF keyring, and<br />

the keys can be stored in RACF, or stored in hardware, and are ICSF<br />

managed.<br />

228 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


► JCECCAKS (JCE Common Crytpographic Architecture Keystore)<br />

A file-based keystore where certificates are stored in a file, but the keys are in<br />

hardware managed with hwkeytool utility.<br />

► PKCS11KS (Public Key Cryptography Standards version 11 Keystore)<br />

This option is not currently supported on WebSphere V6.1 for z/OS.<br />

To better understand how to use certificates that are stored in RACF, see 7.7,<br />

“SSL and JCERACFKS keystore” on page 229 and 7.8, “Hardware crypto using<br />

a JCECCARACFKS keystore” on page 233, which provide two examples that<br />

step through setting up and accessing certificates in RACF with a safkeyring<br />

URI.<br />

7.7 SSL and JCERACFKS keystore<br />

This example demonstrates creating a signer certificate and a personal<br />

certificate, attaching them to a keyring, and configuring the admin console to use<br />

that keyring. This example assumes that the provider is set to the default<br />

<strong>IBM</strong>JCE and that the keys are managed in software.<br />

7.7.1 Keyring and certificate setup<br />

This example creates a new signer certificate and personal certificate, and<br />

connects these certificates to a keyring using the RACF commands provided.<br />

1. Generate a signer certificate labeled TESTCA:<br />

RACDCERT CERTAUTH GENCERT SUBJECTSDN(CN('TEST CertAuth') OU('<strong>IBM</strong>'))<br />

WITHLABEL('TESTCA')<br />

2. Create a personal certificate signed by TESTCA:<br />

RACDCERT ID (ASCR1) GENCERT SUBJECTSDN(CN('wtsc58.itso.ibm.com')<br />

O('<strong>IBM</strong>')) WITHLABEL('TESTPersonal') SIGNWITH(CERTAUTH<br />

LABEL('TESTCA')) TRUST<br />

3. Create a ring called WASKeyring.TEST for the control region’s user ID:<br />

RACDCERT ADDRING(WASKeyring.TEST) ID(ASCR1)<br />

4. Connect the TESTCA to the ring WASKeyring.TEST:<br />

RACDCERT ID(ASCR1) CONNECT (RING(WASKeyring.TEST) LABEL('TESTCA')<br />

CERTAUTH)<br />

Chapter 7. Secure Sockets Layer (SSL) 229


5. Connect the personal certificate to WASKeyring.TEST:<br />

RACDCERT ID(ASCR1) CONNECT (LABEL('TESTPersonal')<br />

RING(WASKeyring.TEST) DEFAULT)<br />

7.7.2 WebSphere admin console setup<br />

In the WebSphere for z/OS administration, create a new key store by selecting<br />

SSL certificate and key management → Key stores and certificates → New.<br />

► Name: JCERACFKS KeyStore<br />

► Path: safkeyring:///WASKeyring.TEST<br />

► Password: password<br />

► Confirm password: password<br />

► Type: JCERACFKS<br />

► Check the Read Only check box.<br />

Then click Apply and then save the changes.<br />

The admin console’s panel is set up to accommodate file-based and SAF-based<br />

keystore types. File-based keystores are normally protected with a password<br />

when the keystore database is first created, and the admin console needs to<br />

have this password specified to access a file-based keystore. For certificates<br />

stored in RACF, the certificates are protected by the access granted to the user<br />

by the RACF administrator. JSSE still requires that a password to be specified as<br />

password to access a SAF keystore, although the certificates are protected by<br />

the user ID’s access privileges in the RACF database. The certificates in RACF<br />

will not be accessible unless the password is specified as password.<br />

The Read Only check box is checked since SAF keystores are read only.<br />

230 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Figure 7-9 shows the options chosen in the admin console when setting up the<br />

keystore.<br />

Figure 7-9 Creating a JSSE configuration using a safkeyring URI<br />

Important: The admin console stores the exact string that you type for the<br />

safkeyring URI in the security.xml file in the HFS. Be sure not to add any<br />

trailing spaces when specifying the safkeyring URI, otherwise you will not be<br />

able to view or access your certificates in RACF. The port configured with this<br />

SSL configuration will not work correctly.<br />

For safkeyring URIs, the admin console only confirms that the Change<br />

password entry and the Confirm password entry match. It does not verify that<br />

the password should be password, which is the valid password that can be<br />

used to access certificates using a safkeyring URI.<br />

If the keyring is set up correctly in RACF, the signer certificate or personal<br />

certificate connected to the user ID for the control region address space can be<br />

viewed by clicking either signer certificates or personal certificates for that<br />

keystore.<br />

Chapter 7. Secure Sockets Layer (SSL) 231


Figure 7-10 shows the output of the signer certificate for WASKeyring.TEST<br />

created for this example.<br />

Figure 7-10 Signer certificate information from admin console<br />

232 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Figure 7-11 shows the output of the personal certificate for WASKeyring.TEST<br />

created for this example.<br />

Figure 7-11 Personal certificate information from admin console<br />

7.8 Hardware crypto using a JCECCARACFKS keystore<br />

This example demonstrates creating a signer certificate and personal certificate<br />

with the keys in hardware, and the setup needed in the admin console to use<br />

these certificates. This example assumes that the default provider is set to<br />

<strong>IBM</strong>JCECCA, and that ICSF is currently running.<br />

The steps for this exercise can be summarized as:<br />

1. Create the certificates in RACF with keys in hardware.<br />

2. Install unrestricted policy jars in WebSphere.<br />

3. Update the java.policy file with the <strong>IBM</strong>JCECCA provider.<br />

4. Create a keystore in the administration console.<br />

Chapter 7. Secure Sockets Layer (SSL) 233


7.8.1 Keyring and certificate setup with keys in hardware<br />

To set this up:<br />

1. Create a new signer certificate called HDCA with its key in hardware:<br />

RACDCERT CERTAUTH GENCERT SUBJECTSDN(CN('HDwtsc58.itso.ibm.com')<br />

OU('<strong>IBM</strong>')) WITHLABEL('HDCA') TRUST ICSF<br />

2. Create a new keyring called WASKeyring.HD for the control user ID ASCR1<br />

and servant user ID ASSR1:<br />

RACDCERT ADDRING(WASKeyring.HD) ID(ASCR1)<br />

RACDCERT ADDRING(WASKeyring.HD) ID(ASSR1)<br />

3. Connect the signer certificate HDCA to WASKeyring.HD for ASCR1 and<br />

ASSR1:<br />

RACDCERT ID(ASCR1) CONNECT (RING(WASKeyring.HD) LABEL('HDCA')<br />

CERTAUTH)<br />

RACDCERT ID(ASSR1) CONNECT (RING(WASKeyring.HD) LABEL('HDCA')<br />

CERTAUTH)<br />

4. Create a new personal certificate HDPersonal signed by HDCA with its key in<br />

hardware:<br />

RACDCERT ID (ASCR1) GENCERT SUBJECTSDN(CN('HDPersonal') O('<strong>IBM</strong>'))<br />

WITHLABEL('HDPersonal') SIGNWITH(CERTAUTH LABEL('HDCA')) TRUST ICSF<br />

5. Connect the new personal certificate to the control region’s keyring:<br />

RACDCERT ID(ASCR1) CONNECT (LABEL('HDPersonal') RING(WASKeyring.HD)<br />

DEFAULT)<br />

The commands in step 3 connect the HDCA signer certificate to both the control<br />

and servant region keyrings. It may not be necessary to connect the signer<br />

certificate to the servant region keyring depending on the endpoint for SSL<br />

communication, but it is done in this step so that the signer certificate can be<br />

viewed in the administration console.<br />

The creation of the certificates is appended with the ICSF keyword, which<br />

indicates that RACF should attempt to store the private key associated with this<br />

certificate in the ICSF PKDS.<br />

234 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Example 7-4 shows a display of the signer certificate information:<br />

RACDCERT CERTAUTH LIST(LABEL('HDCA'))<br />

Example 7-4 Signer certificate HDCA information<br />

Digital certificate information for CERTAUTH:<br />

Label: HDCA<br />

Certificate ID: 2QiJmZmDhZmjgcjEw8FA<br />

Status: TRUST<br />

Start Date: 2006/12/04 00:00:00<br />

End Date: 2007/12/04 23:59:59<br />

Serial Number:<br />

>00<<br />

Issuer's Name:<br />

>CN=HDwtsc58.itso.ibm.com.OU=<strong>IBM</strong><<br />

Subject's Name:<br />

>CN=HDwtsc58.itso.ibm.com.OU=<strong>IBM</strong><<br />

Key Usage: CERTSIGN<br />

Private Key Type: ICSF<br />

Private Key Size: 1024<br />

PKDS Label: IRR.DIGTCERT.CERTIFAUTH.SC58.BFCDC999793165CE<br />

Ring Associations:<br />

Ring Owner: ASCR1<br />

Ring:<br />

>WASKeyring.HD<<br />

Ring Owner: ASSR1<br />

Ring:<br />

>WASKeyring.HD<<br />

Example 7-5 shows a display of the personal certificate information:<br />

RACDCERT LIST (label('HDPersonal')) ID(ASCR1)<br />

Example 7-5 HDPersonal certificate information<br />

Digital certificate information for user ASCR1:<br />

Label: HDPersonal<br />

Certificate ID: 2QXB4sPZ8cjE14WZopaVgZNA<br />

Status: TRUST<br />

Start Date: 2006/12/04 00:00:00<br />

End Date: 2007/12/04 23:59:59<br />

Serial Number:<br />

>01<<br />

Issuer's Name:<br />

Chapter 7. Secure Sockets Layer (SSL) 235


CN=HDwtsc58.itso.ibm.com.OU=<strong>IBM</strong><<br />

Subject's Name:<br />

>CN=HDPersonal.O=<strong>IBM</strong><<br />

Private Key Type: ICSF<br />

Private Key Size: 1024<br />

PKDS Label: IRR.DIGTCERT.ASCR1.SC58.BFCDCD6AB6371A8E<br />

Ring Associations:<br />

Ring Owner: ASCR1<br />

Ring:<br />

>WASKeyring.HD<<br />

7.8.2 Installing the unrestricted Java policy jars<br />

The WebSphere JVM ships with policy jars that provide only limited function<br />

cryptography. Certain countries have restrictions on the import, re-export,<br />

possession, and use of encryption software. To use the <strong>IBM</strong>JCECCA provider<br />

with hardware, the unrestricted policy jars that provide full function cryptography<br />

need to be downloaded and installed in WebSphere.<br />

To obtain the Java unrestricted policy jars and place them on the WebSphere<br />

z/OS system:<br />

1. Obtain the unrestricted policy jars from:<br />

http://www.ibm.com/developerworks/java/jdk/security/index.html<br />

2. Make a backup of the original restricted local_policy.jar and<br />

US_export_policy.jar.<br />

3. <strong>Download</strong> the unrestricted local_policy.jar and US_export_policy.jar to your<br />

WebSphere z/OS system in /AppServer/java/lib/security.<br />

4. After copying the local_policy.jar and US_export_policy.jar, change the<br />

permissions so that the control and servant region address spaces can<br />

access the jar files:<br />

– chmod 644 local_policy.jar<br />

– chmod 644 US_export_policy.jar<br />

7.8.3 Update the java.security file with the <strong>IBM</strong>JCECCA provider<br />

The java.security file located in the WebSphere HFS needs to be updated with<br />

the <strong>IBM</strong>JCECCA provider as the first provider in the list of providers. The<br />

java.security file is in ASCII, so it may be necessary to convert the file to EBCDIC<br />

first before making changes.<br />

236 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Example 7-6 illustrates the addition made to the java.security file.<br />

Example 7-6 Updating the java.security file for <strong>IBM</strong>JCECCA<br />

# List of providers and their preference orders (see above):<br />

security.provider.1=com.ibm.crypto.hdwrCCA.provider.<strong>IBM</strong>JCECCA<br />

security.provider.2=com.ibm.crypto.provider.<strong>IBM</strong>JCE<br />

security.provider.3=com.ibm.jsse.<strong>IBM</strong>JSSEProvider2<br />

security.provider.4=com.ibm.jsse2.<strong>IBM</strong>JSSEProvider<br />

security.provider.5=com.ibm.security.jgss.<strong>IBM</strong>JGSSProvider<br />

security.provider.6=com.ibm.security.cert.<strong>IBM</strong>CertPath<br />

security.provider.7=com.ibm.security.sasl.<strong>IBM</strong>SASL<br />

security.provider.8=com.ibm.security.cmskeystore.CMSProvider<br />

security.provider.9=com.ibm.security.jgss.mech.spnego.<strong>IBM</strong>SPNEGO<br />

7.8.4 Admin console setup<br />

In the WebSphere for z/OS admin console, create a new key store by selecting<br />

SSL certificate and key management → Key stores and certificates → New.<br />

► Name: JCECCARACFKS KeyStore<br />

► Path: safkeyringhw:///WASKeyring.HD<br />

► Password: password<br />

► Confirm password: password<br />

► Type: JCECCARACFKS<br />

► Check the Read Only check box.<br />

Then click Apply and then save the changes.<br />

The safkeyring URI needs to be specified as safkeyringhw to indicate that the<br />

keys for the certificates in the keyring are stored in hardware. Avoid trailing<br />

spaces after the safkeyringhw URI. The password for accessing certificates in<br />

RACF is password.<br />

When setting up the certificates, the HDCA certificate was connected to both the<br />

control region and servant region user ID so that the certificate information can<br />

be viewed in the admin console.<br />

Chapter 7. Secure Sockets Layer (SSL) 237


Figure 7-12 shows the options chosen in the administrative console when setting<br />

up the keystore.<br />

Figure 7-12 Creating a JSSE configuration using a safkeyring URI<br />

238 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Figure 7-13 shows the signer certificate information for keyring WASKeyring.HD.<br />

Figure 7-13 Signer certificate HDCA information<br />

7.9 SSL troubleshooting and traces<br />

SSL handshake errors are one of the most common problems that can surface<br />

when attempting to set up secure communications in WebSphere. This section<br />

provides diagnostic steps that can be performed to identify an incorrect SSL<br />

setup, and the types of traces to gather to diagnose them, and common<br />

problems.<br />

Chapter 7. Secure Sockets Layer (SSL) 239


7.9.1 Diagnostic steps<br />

When attempting to diagnose SSL handshake issues the following steps can be<br />

taken to identify what is causing the problem:<br />

1. Identify the endpoints for the SSL communication. It is important to determine<br />

who is the SSL client (client initiating the SSL handshake) and who is the SSL<br />

server (the receiving party in the SSL handshake attempt). This is sometimes<br />

not that obvious, as the SSL client can be a distributed J2EE client or thin<br />

client, a Web browser, a WebSphere distributed process, or a z/OS<br />

Deployment Manager or Application server control or servant region address<br />

space. The SSL server is usually a WebSphere on distributed process or<br />

WebSphere on z/OS control region.<br />

2. Determine the SSL configuration for the SSL client and SSL server. SSL<br />

handshake issues occur between two endpoints, and the SSL handshake<br />

error usually surfaces in the job output or error log of the client.<br />

If the SSL client or server is on z/OS, obtain the user ID of the address space<br />

or process. A keyring that contains the certificates is associated with the user<br />

ID. Knowledge of the certificates attached to those keyrings can be used to<br />

identify where the setup may be incorrect.<br />

If the SSL client or server is on distributed, it is necessary to obtain the SSL<br />

configuration (keystore, truststore, and certificates).<br />

A list of example scenarios is provided to demonstrate where to obtain the<br />

SSL configuration for client and server:<br />

– SSL handshake issue that occurs during synchronization between the<br />

deployment manager and node agent:<br />

Deployment manager control region user ID<br />

Node agent control region user ID<br />

– SSL handshake issue attempting to connect to the admin console:<br />

SSL configuration of off-platform Web browser<br />

Deployment manager control region user ID (network deployment) or<br />

application server control region user ID (base configuration)<br />

– SSL handshake issues when attempting to connect to a Web application:<br />

SSL configuration of off-platform Web browser<br />

Application server control region user ID<br />

240 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


7.9.2 SSL traces<br />

– SSL handshake issues when using HFS clients (that is, wsadmin.sh,<br />

syncNode.sh, launchClient.sh, and so on)<br />

User ID executing the client on z/OS<br />

User ID of admin console it is running in (either the user ID of the<br />

deployment manager control region (network deployment) or the user<br />

ID of the application control region user ID (base))<br />

3. For a z/OS client or server, display the certificates on the keyring associated<br />

with the user ID and provide the certificate details for the signer certificate and<br />

personal certificate (if there is one). The SSL commands to display the<br />

certificate information are provided in “Viewing certificates” on page 215<br />

For the distributed client or server, display the certificate information for the<br />

signer certificate and personal certificate (if there is one) using the admin<br />

console SSL management, or ikeyman utility.<br />

4. From the displayed information check the validity period for the signer<br />

certificate on the SSL client side and SSL server side. Verify that the current<br />

date falls within the start date and end date for the certificates. The<br />

certificate’s start date should precede the current date and not be expired.<br />

5. From the displayed information, confirm that the SSL client’s truststore<br />

contains the signer certificate of the server. Verify that the issuer’s<br />

distinguished name and subject distinguished name for the server’s signer<br />

certificate on the SSL client side matches that the server personal certificate<br />

on the SSL server side.<br />

When SSL errors surface, and analyzing the certificates, keyrings, and<br />

WebSphere setup does not provide enough information to diagnose the problem,<br />

SSL traces can be enabled in either the WebSphere admin console or in the<br />

JVM.<br />

WebSphere SSL trace<br />

When diagnosing WebSphere SSL problems, SSL traces can be enabled in<br />

WebSphere and in the JVM.<br />

Follow the path in the admin console in WebSphere: Logging and Tracing ><br />

servername → Change Log Detail Levels. Click the Configuration tab and<br />

add the WebSphere trace specification:<br />

SSL=all<br />

Chapter 7. Secure Sockets Layer (SSL) 241


7.9.3 Common errors<br />

The WebSphere trace can also be turned on dynamically from the MVS console<br />

using command:<br />

F control_region,TRACEJAVA=’SSL=all’<br />

Reset the trace to the original trace specification at startup with:<br />

F control_region,TRACEINIT<br />

Java JSSE trace<br />

To enable diagnostic trace for determining the cause of SSL handshake errors<br />

follow the path in the admin console to Application servers → server_name →<br />

Process Definition → Control/Servant → Java Virtual Machine.<br />

In the Generic JVM Arguments field add:<br />

-Djavax.net.debug=true -Djava.security.auth.debug=all<br />

The Java trace setting cannot be enabled dynamically and requires the<br />

application server to be restarted to pick up the change.<br />

The following section includes some common errors that can occur when<br />

attempting SSL handshake communication. The examples provide the cause of<br />

the problem that resulted in the error message.<br />

► Example error when signer certificate is missing from a client’s truststore in<br />

order to create attempt an SSL handshake. This type of error surfaces on the<br />

client initiating the SSL handshake:<br />

CWPKI0022E: SSL HANDSHAKE FAILURE: A signer with SubjectDN<br />

"CN=wtsc58.itso.ibm.com, OU=SC58, O=<strong>IBM</strong>" was sent from target<br />

host:port "*:9044". The signer may need to be added to local trust<br />

store<br />

"C:/Program1/<strong>IBM</strong>/WebSphere/AppServer/profiles/AppSrv01/config/cells/<br />

Node02Cell/nodes/Node02/trust.p12" located in SSL configuration<br />

alias "NodeDefaultSSLSettings" loaded from SSL configuration file<br />

"security.xml". The extended error message from the SSL handshake<br />

exception is: "No trusted certificate found".<br />

► The error text shows a problem that can occur using the <strong>IBM</strong>JCECCA<br />

provider with safkeyring URI. The ICSF address space has become<br />

unavailable while a user is attempting to access the admin console or<br />

application.<br />

Message: BBOO0220E: SSLC0008E: Unable to initialize SSL connection.<br />

Unauthorized access was denied or security settings have expired.<br />

242 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Exception is javax.net.ssl.SSLHandshakeException: Client requested<br />

protocol Unknown 0.2 not enabled or not supported.<br />

com.ibm.ws.ssl.channel.impl.SSLHandshakeErrorTracker<br />

► The error text shows a problem while starting WebSphere using the<br />

<strong>IBM</strong>JCECCA provider, but with the ICSF address space not running:<br />

java.lang.RuntimeException: Hardware error from call CSNBOWH<br />

returnCode 12 reasonCode 0<br />

com.ibm.crypto.hdwrCCA.provider.SHA.a(Unknown Source)<br />

com.ibm.crypto.hdwrCCA.provider.SHA.engineDigest(Unknown Source)<br />

java.security.MessageDigest$Delegate.engineDigest(MessageDigest.java<br />

:554)<br />

java.security.MessageDigest.digest(MessageDigest.java:332)<br />

com.ibm.ws.management.repository.DocumentDigestImpl.calc(DocumentDig<br />

estImpljava:128)<br />

com.ibm.ws.management.repository.FileDocument.calcDigest(FileDocumen<br />

t.java:212)<br />

Chapter 7. Secure Sockets Layer (SSL) 243


244 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Chapter 8. Web services transport<br />

security<br />

Web services security can be addressed at both the transport level and the<br />

message level. In this chapter we focus on the transport level security features<br />

for Web services.<br />

The following examples are provided here:<br />

► “Authentication with HTTP” on page 246<br />

► “Integrity with SSL” on page 252<br />

► “Confidentiality with SSL” on page 268<br />

► “Confidentiality with SSL using hardware crypto” on page 272<br />

► “Confidentiality and basic authentication” on page 282<br />

► “Confidentiality and client certificate authentication” on page 282<br />

8<br />

© Copyright <strong>IBM</strong> Corp. 2007. All rights reserved. 245


8.1 Authentication with HTTP<br />

Basic authentication can be enabled for a Web service in the application server<br />

at the transport level by specifying BASIC in the Web deployment descriptor.<br />

When basic authentication is enabled, the client needs to specify a user name<br />

and password that will be passed in the header when calling the Web services<br />

protected URL. The user name and password are sent over the network<br />

unencrypted using the HTTP protocol. The user name and password are also<br />

sent with each subsequent request. Since HTTP communication is not<br />

encrypted, the user name and password are visible and can be intercepted. To<br />

protect the user name and password from being sent over the network, basic<br />

authentication is usually performed over an encrypted transport through the use<br />

of Secure Sockets Layer (SSL).<br />

8.1.1 HTTP basic authentication scenario description<br />

On the client side, a user invokes a servlet from a static Web page running in the<br />

WebSphere distributed system. The servlet invokes a Web service enabled EJB<br />

that has its Web service client descriptor configured with a user name and<br />

password. The user name and password flow in the HTTP header to the Web<br />

service provider. The Web service provider extracts the user ID and password to<br />

authenticate the Web service requestor.<br />

Figure 8-1 illustrates the HTTP basic authentication scenario.<br />

Figure 8-1 Web service transport security HTTP basic authentication scenario<br />

In this scenario, we demonstrate how the client SecureCaller EJB can provide a<br />

user name and password to authenticate to the SecureInfo EJB that is Web<br />

246 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


service enabled. An authentication method of BASIC is specified in the<br />

SecurityInfoRouterWS deployment descriptor. The user name and password are<br />

specified in a Web service client binding, as opposed to specifying them<br />

programmatically in the code. The transport does not have SSL enabled.<br />

8.1.2 Configuring the z/OS Web service provider with authentication<br />

The process for configuring transport-level basic authentication for a Web<br />

service is similar to configuring transport-level basic authentication for a Web<br />

application. The Web service endpoint resides in a WAR file, and can be<br />

configured using the Web deployment descriptor editor.<br />

1. In the J2EE perspective, traverse the tree under Dynamic Web Projects, and<br />

open the deployment descriptor for the SecurityInfoRouterWS.<br />

2. Select the Security tab. Under Security Roles, add a role named<br />

SecureCustomer.<br />

3. Under Security Constraints, add a security constraint named<br />

SecureConstraint.<br />

– Set Resource Name to Secure Web Resource.<br />

– Select the check box for “GET, and POST” HTTP Methods.<br />

– Add the pattern /*.<br />

4. Under Authorized Roles, add SecureCustomer.<br />

5. Select the Pages tab. Under Authentication Method, select BASIC and<br />

provide the realm name SecurityInfo Realm.<br />

In Example 8-1, the XML code shows how the security-constraint,<br />

login-config, and security role were setup in the web.xml.<br />

Example 8-1 Security setup in web.xml<br />

<br />

SecureConstraint<br />

<br />

Secure Web Resource<br />

/*<br />

GET<br />

POST<br />

<br />

<br />

<br />

<br />

SecureCustomer<br />

<br />

<br />

Chapter 8. Web services transport security 247


NONE<br />

<br />

<br />

<br />

BASIC<br />

SecurityInfo Realm<br />

<br />

<br />

<br />

<br />

SecureCustomer<br />

<br />

6. In the J2EE perspective, traverse the tree under Enterprise Applications, and<br />

open the deployment descriptor for the SecurityInfoEAR.<br />

7. Select the Security tab. Click the Gather button, and check the box for All<br />

authenticated users under WebSphere bindings.<br />

Testing basic authentication for the Web service provider<br />

Deploy the SecurityInfo ear file in the admin console, accepting the default<br />

settings presented during deployment.<br />

The Web service client example uses a POST method to invoke the Web<br />

service. Since the GET method was included in the security constraint, the URI<br />

for the service endpoint can be invoked from a Web browser to verify that a<br />

challenged response is sent to the Web browser. This can be useful for verifying<br />

that basic authentication has been set up correctly for the Web service provider<br />

before proceeding to set up the Web service requestor.<br />

In this example, the following URL was invoked:<br />

http://wtsc58.itso.ibm.com:19080/SecurityInfoRouterWS/services/Security<br />

Info<br />

A Basic Authentication window should appear in the Web browser.<br />

Upon entering a valid user ID and password for an ID permitted to the role<br />

SecureCustomer, the following output appears on the Web browser:<br />

{http://itso.ibm.com}SecurityInfo<br />

Hi there, this is a Web service!<br />

248 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


8.1.3 Configuring the Web service requestor to authenticate<br />

WebSphere bindings facilitate where to specify the user name and password for<br />

a Web services client so that the application does not have to do this<br />

programmatically. In this section we demonstrate how to set the user ID and<br />

password in the Rational Application Developer tool and in the WebSphere<br />

distributed admin console.<br />

Start Rational Application Developer:<br />

1. In the J2EE perspective, traverse the tree under EJB Projects and open the<br />

deployment descriptor for SecurityCallerEJB.<br />

2. Select the WS Binding tab and under Port Qualified Name Binding Details<br />

set the HTTP basic authentication user ID and password, as shown in<br />

Example 8-2 on page 251.<br />

Figure 8-2 Web service client user ID and password<br />

Chapter 8. Web services transport security 249


To configure the user ID and password in the admin console for the<br />

SecurityCallerEJB, follow the path Enterprise Applications →<br />

SecurityCallerEAR → Manage Modules → SecurityCallerEJB.jar → Web<br />

services client bindings → Web services: Client security bindings → HTTP<br />

basic authentication. See Figure 8-3.<br />

Figure 8-3 Admin console basic authentication user ID and password<br />

Follow the steps in 5.6.4, “SecurityInfo deployment” on page 101, for overriding<br />

the client endpoint URL of the client if it has not already been done. This step is<br />

necessary so that the client knows the host name and port for the Web service<br />

provider.<br />

8.1.4 Validating transport security using HTTP basic authentication<br />

To validate that transport security is working correctly with HTTP basic<br />

authentication, execute the client application. A successful output to the Web<br />

page of the application should show the user principal of the user ID specified on<br />

the Web services client security binding in the Web table under Remote<br />

SecurityInfoBean Information.<br />

250 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


In Figure 8-4, principal WINSERV can be seen.<br />

Figure 8-4 SecurityInfo output<br />

Using the TCP/IP monitor to view the header information, you can verify that the<br />

authorization field is set to BASIC. The SOAP message in the HTTP request is<br />

unchanged.<br />

Example 8-2 shows example output of the header information and authorization<br />

field. The SOAP message follows the HTTP header information.<br />

Example 8-2 Header information with authorization BASIC<br />

POST /SecurityInfoRouterWS/services/SecurityInfo HTTP/1.1<br />

Host: wtsc58.itso.ibm.com:19080<br />

Accept: application/soap+xml,multipart/related,text/*<br />

User-Agent: <strong>IBM</strong> WebServices/1.0<br />

Cache-Control: no-cache<br />

Pragma: no-cache<br />

SOAPAction: ""<br />

Authorization: Basic V0lOU0VSVjpXSU5TRVJW<br />

Connection: Keep-Alive<br />

Chapter 8. Web services transport security 251


Content-Type: text/xml; charset=utf-8<br />

Content-Length: 402<br />

Date: Wed, 08 Nov 2006 16:33:48 GMT<br />

<br />

ITSO5285<br />

8.2 Integrity with SSL<br />

Integrity and confidentiality are provided through the use of HTTP over the SSL<br />

protocol, also known as HTTPS. Once SSL had been configured in WebSphere,<br />

the level of the cipher suite group being used by the SSL configuration<br />

determines whether WebSphere supports integrity or confidentiality algorithms<br />

(or both). Additionally, the application can enforce that the communication is<br />

performed with integrity and confidentiality in the Web application’s deployment<br />

descriptor using security constraints.<br />

8.2.1 Integrity with SSL scenario description<br />

On the client side, the user invokes a servlet from a static Web page running in<br />

the WebSphere distributed system. The WebSphere distributed run time initiates<br />

an SSL handshake with the WebSphere for z/OS run time. A weak cipher signing<br />

algorithm is negotiated between WebSphere on distributed and WebSphere on<br />

z/OS. Finally, an SSL connection with no encryption (only integrity validation) is<br />

established between the client and server endpoints. Once the transport is<br />

secure, the SOAP message flows from client to server.<br />

252 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Figure 8-5 illustrates the Integrity with SSL scenario.<br />

Figure 8-5 Web service transport security integrity scenario<br />

In this section, we demonstrate how to set up SSL at the transport layer between<br />

WebSphere distributed and WebSphere z/OS. We extract the signer certificate<br />

from the WebSphere z/OS server and import it into the WebSphere distributed<br />

server using the new admin console SSL support. A new SSL-enabled inbound<br />

transport chain is created on WebSphere z/OS in order to isolate inbound Web<br />

service SSL calls. A new SSL configuration is defined for both the Web service<br />

client and the Web service port so that the quality of protection can be modified<br />

for those SSL configurations. Lastly, we demonstrate using Web service client<br />

bindings to configure the Web service client to use the SSL configuration, and to<br />

override the host and port of the service endpoint URL.<br />

8.2.2 Integrity scenario prerequisites<br />

To establish trust, the server signer certificate needs to be extracted from the<br />

WebSphere for z/OS certificate authority and imported into the WebSphere<br />

distributed truststore. During the SSL handshake, the WebSphere for z/OS<br />

server sends its signer certificate to be validated. In this section, the RACF<br />

commands are provided to export the signer certificate from the WebSphereCA<br />

into a binary HFS file. The certificate is transferred using FTP to WebSphere<br />

distributed to be imported into the truststore using the admin console.<br />

Chapter 8. Web services transport security 253


Extracting the server signer certificate from z/OS<br />

Add the WebSphere z/OS signer certificate to the WebSphere client truststore on<br />

Windows. In this example, we use the default WebSphere Certificate Authority<br />

WebSphereCA that was created during the installation customization jobs.<br />

1. Use the following sample RACF command to export the signer certificate:<br />

RACDCERT CERTAUTH EXPORT(LABEL('WebSphereCA')) DSN(CERTAUTH.DER)<br />

FORMAT(CERTDER) PASSWORD('XXXXX')<br />

2. From TSO, copy the certificate from a data set to a binary file:<br />

OPUT CERTAUTH.DER '/tmp/certauth.der' binary convert(no)<br />

3. FTP the certificate in binary to the client.<br />

Importing the server signer certificate in the client<br />

In the admin console of the distributed WebSphere Application Server, to add the<br />

certificate, select SSL certificate and key management → SSL<br />

configurations → NodeDefaultSSLSettings → Key stores and<br />

certificates → NodeDefaultTrustStore → Signer certificates.<br />

Specify the absolute path to where the certificate was downloaded in binary and<br />

provide a new alias name for the certificate. The data type indicates whether the<br />

certificate was downloaded as Binary Der Data or base64. The certificate was<br />

exported with a format option CERTDER, and must be imported using the same<br />

binary der format.<br />

254 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


In this example:<br />

► Alias: webspherezos_ca<br />

► File name: C:\TEMP\certauth.der<br />

► Data type: Binary DER data<br />

Figure 8-6 Importing the signer certificate<br />

8.2.3 Configuring the z/OS Web service provider SSL configuration<br />

In this section, the admin console steps are provided in order to isolate the<br />

security setup from the default node level SSL configuration:<br />

1. Create a new SSL configuration.<br />

An SSL configuration contains the attributes that you need to control the<br />

behavior of client and server SSL endpoints. You create SSL configurations<br />

with unique names within specific management scopes on the inbound and<br />

outbound tree in the configuration topology.<br />

2. Create new SSL inbound channel.<br />

An SSL inbound channel is used to associate an SSL configuration with a<br />

transport chain. This channel is only available when SSL support is enabled<br />

for the transport chain.<br />

A transport chain consists of one or more types of channels, each of which<br />

supports a different type of I/O protocol, such as TCP, DCS, or HTTP.<br />

Chapter 8. Web services transport security 255


Network ports can be shared among all of the channels within a chain. The<br />

channel framework function automatically distributes a request arriving on<br />

that port to the correct I/O protocol channel for processing.<br />

3. Create a new SSL port for use with the SSL inbound channel.<br />

The new SSL port is where the Web service provider receives incoming<br />

SOAP requests.<br />

The goal of this step is to create a new SSL configuration that does not affect the<br />

existing default node-level SSL settings. Creating a new SSL configuration, SSL<br />

inbound channel, and SSL port provides this isolation.<br />

Creating a new SSL configuration on WebSphere for z/OS<br />

In the admin console of the WebSphere Application for z/OS server, follow the<br />

path to configure a new SSL Configuration: Security → Secure Administration,<br />

applications, and infrastructure → SSL Configurations.<br />

Click New JSSE Configuration:<br />

► Name: WebServiceSSLConfig<br />

► Trust store name: NodeDefaultTrustStore<br />

► Keystore name: NodeDefaultKeyStore<br />

256 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Click Get certificate Aliases and then click OK.<br />

Figure 8-7 WebServiceSSLConfig SSL config<br />

Creating an SSL inbound channel and SSL port<br />

A new SSL inbound channel is created to isolate the SSL configuration for this<br />

endpoint so that it can be changed without affecting any other endpoints.<br />

In the admin console of the WebSphere Application Server for z/OS, follow the<br />

path to create a new transport chain: Severs → Application Servers →<br />

servername → Web Container Settings → Web Container Transport<br />

Chains.<br />

► Transport chain name: SecureWebServiceInbound<br />

► Transport chain template: WebContainer-Secure<br />

Chapter 8. Web services transport security 257


Be sure to select the WebContainer-Secure transport chain template to ensure<br />

that an SSL-enabled transport chain is created (Figure 8-8).<br />

Figure 8-8 Transport chain selection<br />

Select a port for the Web service to accept inbound SSL calls to. In this example:<br />

► Port name: SecureWebServicePort<br />

► Host: *<br />

► Port: 19445<br />

Click Finish to confirm the new transport chain creation.<br />

258 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


At this point, a new transport chain is created, however, the transport chain<br />

defaults to the default SSL configuration, in our case NodeDefaultSSLSetttings.<br />

The SSL configuration for the inbound transport chain needs to be changed to<br />

the new SSL configuration WebServiceSSLConfig that was created in the<br />

previous steps.<br />

1. Select the SecureWebServiceInbound transport chain.<br />

2. Click SSL inbound channel (SSL_4).<br />

3. Check the radio button Centrally Managed (Figure 8-9).<br />

Figure 8-9 Centrally managed SSL configuration for transport chain<br />

Follow the path in the admin console to: SSL certificate and key<br />

management → Manage endpoint security configurations →<br />

SecureWebServicePort.<br />

Chapter 8. Web services transport security 259


It is necessary to expand the tree in the local topoly view to find the<br />

SecureWebServicePort:<br />

► Override inherited values: checked<br />

► SSL configuration: WebServiceSSLConfig<br />

► Certificate alias in key store: defaultwascert.sc58<br />

Figure 8-10 Choosing the WebServiceSSLConfig for SecureWebServicePort<br />

In this step, the newly created port SecureWebServicePort needs to be added to<br />

the virtual host. Select Environment → Virtual Hosts → default_host.<br />

Under Additional Properties select Host Aliases → New:<br />

► Hostname: *<br />

► Port: 19445<br />

The user may be wondering whether it was necessary to create a new transport<br />

chain and SSL configuration instead of using the centrally managed SSL<br />

configuration that is defined at the node level from the WebSphere installation.<br />

The forthcoming steps involve changing the ciphers for an SSL configuration.<br />

Changing the ciphers for the node-level SSL configuration can result in problems<br />

accessing the admin console in a base server configuration since it also uses<br />

260 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


SSL and the admin console requires confidentiality. By creating a new SSL<br />

configuration and transport chain, the SSL changes are isolated to the Web<br />

service only.<br />

8.2.4 Configuring the Web service requestor SSL configuration<br />

In this section, a new SSL configuration is created for the client so that the quality<br />

of protection setting, specifically the ciphers, can be modified without affecting<br />

the admin console or any applications using SSL. The Web service requestor’s<br />

client binding is modified to use the new SSL configuration, and the Web service<br />

requestor’s endpoint URL is modified to connect to the Web service provider’s<br />

SSL port.<br />

Creating a new Web service requestor SSL configuration<br />

In the admin console of the distributed WebSphere Application Server, follow the<br />

path to create a new SSL configuration: Security → Secure Administration,<br />

applications, and infrastructure → SSL Configurations.<br />

Click New JSSE Configuration:<br />

► Name: WebServiceConfig<br />

► Trust store name: NodeDefaultTrustStore<br />

► Keystore name: NodeDefaultKeyStore<br />

Chapter 8. Web services transport security 261


Click Get certificate Aliases and then OK.<br />

Figure 8-11 WebServiceConfig SSL configuration<br />

Configuring the Web service requestor to use SSL<br />

configuration<br />

In the admin console of the distributed WebSphere Application Server, follow the<br />

path to the ServiceCallerEJB’s HTTP SSL binding in order to select the new SSL<br />

configuration WebServiceConfig.<br />

In this example, the Web service requestor uses an SSL configuration that is<br />

specific to this Web service port rather than a centrally manage SSL<br />

configuration. The reason for choosing the SSL configuration that is specific to<br />

the this Web service port is that the client binding only affects this Web service’s<br />

outbound SSL call. Choosing a centrally managed SSL configuration would<br />

require setting up an SSL configuration for an outbound port, which could affect<br />

262 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


all applications using that port. Select Enterprise Applications →<br />

SecurityCallerEAR → Manage Modules → SecurityCallerEJB.jar → Web<br />

services deployment descriptor Extension → Web services client<br />

bindings → Web services: Client security bindings → HTTP SSL<br />

configuration. See Figure 8-12.<br />

Figure 8-12 Selecting the SSL configuration for Web service client binding<br />

Follow the path in the admin console to override the endpoint URL to reflect the<br />

host name and port of the WebSphere z/OS system. The port should be the<br />

same port you defined for the SSL inbound transport chain<br />

SecureWebServicePort. Select Enterprise Applications →<br />

SecurityCallerEAR → Manage Modules → SecurityCallerEJB.jar → Web<br />

services deployment descriptor Extension → Web services client<br />

bindings → SecurityInfoService:SecurityCallerEJB.<br />

Chapter 8. Web services transport security 263


Configuring the Web service requestor endpoint URL<br />

In this example, the endpoint URL was changed to:<br />

https://wtsc58.itso.ibm.com:19445/SecurityInfoRouterWS/services/Security<br />

Info<br />

Figure 8-13 Changing the endpoint URL in Web service client binding<br />

8.2.5 Configuring the z/OS Web service provider for integrity<br />

In the admin console for WebSphere for z/OS, follow the path to set the cipher<br />

suite group. Select Security → Secure Administration, applications, and<br />

infrastructure → SSL Configurations.<br />

1. Choose the WebServiceSSLConfig for the Web service on z/OS.<br />

2. Under Additional Properties, select quality of protection (Qop) settings.<br />

3. Change the cipher suite groups to Weak.<br />

Figure 8-14 on page 265 illustrates the quality of protection panel for both<br />

platforms.<br />

8.2.6 Configuring the Web service requestor for integrity<br />

In both, the distributed WebSphere admin console follow the path to set the<br />

cipher suite group. Select Security → Secure Administration, applications,<br />

and infrastructure → SSL Confirugrations.<br />

1. Choose the WebServiceConfig for the Web service client.<br />

2. Under Additional Properties, select quality of protection (Qop) settings.<br />

3. Change the cipher suite groups to Weak.<br />

264 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Figure 8-14 illustrates the quality of protection panel for both platforms.<br />

Figure 8-14 Quality of protection with weak cipher for Integrity<br />

Restart both application servers to pick up the changes.<br />

8.2.7 Validating integrity with SSL<br />

Execute the SecurityInfo application. The output should look similar to when you<br />

ran the SecurityInfo application with no security.<br />

Chapter 8. Web services transport security 265


Looking at the output in the TCP/IP monitor, the output is still visible, as the data<br />

is not encrypted. However, you will notice SSL information preceding the header<br />

and soap message.<br />

Example 8-3 TCP/IP output<br />

.....0G1.0...U....WebSphere for zOS1)0'..U... WAS CertAuth for Security<br />

Domain0..<br />

040604040000Z.<br />

110101035959Z0G1.0...U....WebSphere for zOS1)0'..U... WAS CertAuth for<br />

Security Domain0..0<br />

..*.H..<br />

.........0.......D.3]j.F....A...N<br />

....b.ec|.Te...t.*."f......U.b.>..38..i.F.)T.X......<br />

(.&3..R}{?.|*...u...TQ.&.....o.yVv3..N..!..+....;vcXV...'........0..0?.<br />

.`.H...B.<br />

.2.0Generated by the Security Server for z/OS<br />

(RACF)0...U...........0...U.......0....0...U......q..GP...}2..5.../...0<br />

..*.H..<br />

.........<br />

......E.h!........o.ov......\.k......POST<br />

/SecurityInfoRouterWS/services/SecurityInfo HTTP/1.1<br />

Host: wtsc58.itso.ibm.com:19445<br />

Accept: application/soap+xml,multipart/related,text/*<br />

User-Agent: <strong>IBM</strong> WebServices/1.0<br />

Cache-Control: no-cache<br />

Pragma: no-cache<br />

SOAPAction: ""<br />

Connection: Keep-Alive<br />

Content-Type: text/xml; charset=utf-8<br />

Content-Length: 402<br />

Date: Fri, 10 Nov 2006 15:25:10 GMT<br />

<br />

ITSO1916(....[xU.n..........QHTTP/1.<br />

1 200 OK<br />

Content-Type: text/xml; charset=utf-8<br />

Content-Language: en-US<br />

266 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Content-Length: 650<br />

Date: Fri, 10 Nov 2006 15:25:13 GMT<br />

Server: WebSphere Application Server/6.1<br />

<br />

ITSO1<br />

916Fri Nov 10 15:25:13 GMT+00:00<br />

2006WTSC589.12.4.8UN<br />

AUTHENTICATEDz/OS01.08.00...K.....g.\..o<br />

Note: With the cipher suite group set to weak, you may not be able to access<br />

the service endpoint URI from your Web browser directly to see the following<br />

message since the browser does not support this cipher suite group:<br />

{http://itso.ibm.com}SecurityInfo<br />

Hi there, this is a Web service!<br />

Enforcing integrity with the Web service descriptor<br />

At this point your Web service can still be invoked from the default non-SSL port<br />

defined for your system, as well as the new transport chain configured with a<br />

weak cipher suite group for integrity. In order to enforce that integrity be<br />

mandatory for any calls to this Web service, the Security Constraint can be<br />

updated in the Web deployment descriptor for SecurityInfoRouterWS.<br />

1. In the J2EE perspective, traverse the tree under Dynamic Web Projects, and<br />

open the deployment descriptor for the SecurityInfoRouterWS.<br />

2. Select the Security tab, and then select your security constraint<br />

SecureConstraint.<br />

3. Under User Data Constraint, change the type to INTEGRAL.<br />

Example 8-4 shows the xml that will be added to the web.xml.<br />

Example 8-4 Integrity requirement for Web service<br />

<br />

INTEGRAL<br />

<br />

Chapter 8. Web services transport security 267


Re-deploy the application to WAS for z/OS to pick up the change.<br />

8.3 Confidentiality with SSL<br />

Confidentiality involves encrypting the data flowing across the HTTP transport<br />

such that the data cannot be viewed. WebSphere accomplishes this encryption<br />

using a set of ciphers.<br />

8.3.1 Confidentiality with SSL scenario description<br />

The user client invokes a servlet from a static Web page running in the<br />

WebSphere distributed system. The WebSphere distributed run time initiates an<br />

SSL handshake with the WebSphere for z/OS run time. During the handshake<br />

the WebSphere for z/OS certificate is sent to the WebSphere application server<br />

on Windows. WebSphere on distributed validates this certificate against its<br />

truststore. A strong cipher algorithm is negotiated between WebSphere on<br />

distributed and WebSphere on z/OS. Finally, an SSL connection with encryption<br />

is established between the client and server endpoints. Once the transport is<br />

secure, the SOAP message flows from client to server.<br />

Figure 8-15 Web services transport security confidentiality scenario<br />

Using the previous setup from 8.2, “Integrity with SSL” on page 252,<br />

confidentiality can be provided by switching the cipher suite group from weak to<br />

medium or strong. Selecting a medium cipher suite group, WebSphere uses<br />

40-bit encryption algorithms for providing confidentiality, and with a strong cipher<br />

suite group, WebSphere uses 128-bit encryption algorithms. Both the medium<br />

and strong cipher suite groups maintain data integrity as well as provide<br />

268 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


confidentiality. The stronger the encryption algorithm the more secure the<br />

connection. However, more processing is needed to encrypt and decrypt the<br />

information.<br />

8.3.2 Configuring the z/OS Web service provider SSL configuration<br />

If it has not already been done, create a new z/OS Web service provider SSL<br />

configuration, a new SSL inbound channel, and a new SSL port to provide<br />

isolation from other SSL configurations. The steps for this process are described<br />

in 8.2.3, “Configuring the z/OS Web service provider SSL configuration” on<br />

page 255.<br />

8.3.3 Configuring the Web service requestor SSL configuration<br />

If it has not already been done, create a new Web service requestor SSL<br />

configuration, and configure it to use the SSL configuration. In addition, update<br />

the Web service requestor’s endpoint URL to point to the host and port of the<br />

Web service provider. The steps for this process are described in 8.2.4,<br />

“Configuring the Web service requestor SSL configuration” on page 261.<br />

8.3.4 Configuring the z/OS Web service provider for confidentiality<br />

In this example, the cipher suite group was changed to strong in the WebSphere<br />

for z/OS admin console. Select Security → Secure Administration,<br />

applications, and infrastructure → SSL Confirugrations.<br />

1. Choose the WebServiceSSLConfig.<br />

2. Under Additional Properties, select quality of protection (Qop) settings.<br />

3. Change the cipher suite groups to Strong.<br />

Figure 8-16 on page 270 illustrates changing the cipher suite in the admin<br />

console for both platforms.<br />

8.3.5 Configuring the Web service requestor for confidentiality<br />

In this example, the cipher suite group was changed in the distributed<br />

WebSphere admin console. Select Security → Secure Administration,<br />

applications, and infrastructure → SSL Confirugrations.<br />

1. Choose WebServiceConfig.<br />

2. Under Additional Properties, select quality of protection (Qop) settings.<br />

3. Change the cipher suite groups to Strong.<br />

Chapter 8. Web services transport security 269


Figure 8-16 illustrates changing the cipher suite in the admin console for both<br />

platforms.<br />

Figure 8-16 Quality of protection with strong cipher for confidentiality<br />

Restart both servers to pick up the change.<br />

Note: If there is a change to the cipher suite groups, the WebSphere<br />

Application Server needs to be restarted to pick up the change.<br />

270 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


8.3.6 Validating confidentiality with SSL<br />

Execute the SecurityInfo application. The output should look like the same as<br />

when you ran the SecurityInfo application with no security.<br />

Looking at the output in the TCP/IP Monitor, the HTTP header and SOAP<br />

message are no longer visible, as the data is now encrypted.<br />

Note: You can also invoke the Web service from a browser using the Web<br />

service endpoint URL, as the browser supports the cipher suite group:<br />

https://wtsc58.itso.ibm.com:19445/SecurityInfoRouterWS/services/<br />

SecurityInfo<br />

The browser output shows:<br />

{http://itso.ibm.com}SecurityInfo<br />

Hi there, this is a Web service!<br />

Enforcing confidentiality with the Web service descriptor<br />

At this point your Web service can still be invoked from the default non-SSL port<br />

defined for your system, as well as the new transport chain configured with a<br />

strong cipher suite group for confidentiality. In order to enforce that confidentiality<br />

be mandatory for any calls to this Web service, the security constraint can be<br />

updated in the Web deployment descriptor for SecurityInfoRouterWS.<br />

1. In the J2EE perspective, traverse the tree under Dynamic Web Projects, and<br />

open the deployment descriptor for the SecurityInfoRouterWS.<br />

2. Select the Security tab, and then select your security constraint<br />

SecureConstraint.<br />

3. Under User Data Constraint change the type to CONFIDENTIAL.<br />

Example 8-5 shows the xml that will be added to the web.xml.<br />

Example 8-5 Confidentiality requirement for Web service<br />

<br />

CONFIDENTIAL<br />

<br />

The application must be redeployed after making the change to the deployment<br />

descriptor.<br />

Chapter 8. Web services transport security 271


8.4 Confidentiality with SSL using hardware crypto<br />

The SecurityInfo Web service can take advantage of hardware cryptographic<br />

support to help accelerate SSL communication. This section assumes that ICSF<br />

is active and initialized. The WebSphere steps are provided to show one way to<br />

set up WebSphere for accessing keys in hardware. Further information about<br />

enabling hardware can be found in z/OS Cryptographic Services Integrated<br />

Cryptographic Service Facility Administrator’s Guide, SA22-7521. This manual<br />

has references to other publications and sources of information as well.<br />

8.4.1 Confidentiality with SSL using hardware crypto prerequisites<br />

In this section a new certificate authority, personal certificate, and keyring are<br />

created and connected to the control and servant region user IDs. The reason for<br />

doing this is to separate the certificate and keyring setup from the default keyring<br />

that comes from running the customization jobs to set up WebSphere on z/OS.<br />

The certificate authority and personal certificate setup are created with the ICSF<br />

keyword appended to the commands to specify that RACF should store the<br />

private key associated with the certificate in ICSF. The signer certificate is<br />

exported on WebSphere V6.1 for z/OS and imported into WebSphere distributed<br />

to be used by the Web service requestor during an SSL handshake.<br />

Creating keyring and certificates<br />

Create a new certificate authority called HDCA with its keys stored in ICSF, as<br />

follows:<br />

RACDCERT CERTAUTH GENCERT SUBJECTSDN(CN('HDwtsc58.itso.ibm.com')<br />

OU('<strong>IBM</strong>')) WITHLABEL('HDCA') TRUST NOTAFTER(DATE(2010/12/20)) ICSF<br />

Create a new keyring called WASKeyring.HD for the control user ID ASCR1 and<br />

servant user ID ASSR1:<br />

RACDCERT ADDRING(WASKeyring.HD) ID(ASCR1)<br />

RACDCERT ADDRING(WASKeyring.HD) ID(ASSR1)<br />

Connect the certificate authority HDCA to WASKeyring.HD for ASCR1 and<br />

ASSR1:<br />

RACDCERT ID(ASCR1) CONNECT (RING(WASKeyring.HD) LABEL('HDCA') CERTAUTH)<br />

RACDCERT ID(ASSR1) CONNECT (RING(WASKeyring.HD) LABEL('HDCA') CERTAUTH)<br />

272 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Create a new personal certificate HDPersonal signed by HDCA with its key in<br />

ICSF:<br />

RACDCERT ID (ASCR1) GENCERT SUBJECTSDN(CN('HDPersonal') O('<strong>IBM</strong>'))<br />

WITHLABEL('HDPersonal') SIGNWITH(CERTAUTH LABEL('HDCA')) TRUST<br />

NOTAFTER(DATE(2010/12/20)) ICSF<br />

Connect the new personal certificate to the control region’s keyring:<br />

RACDCERT ID(ASCR1) CONNECT (LABEL('HDPersonal') RING(WASKeyring.HD)<br />

DEFAULT)<br />

As an additional verification step, display the contents of the certificate authority<br />

HDCA, and personal certificate HDPersonal. Notice that the private key type<br />

indicates ICSF to indicate that the keys are ICSF managed and that there is a<br />

new PKDS label.<br />

Issue the following commands to view the certificate authority information:<br />

RACDCERT CERTAUTH LIST(LABEL('HDCA'))<br />

Example 8-6 Signer certificate HDCA information<br />

Digital certificate information for CERTAUTH:<br />

Label: HDCA<br />

Certificate ID: 2QiJmZmDhZmjgcjEw8FA<br />

Status: TRUST<br />

Start Date: 2006/11/21 00:00:00<br />

End Date: 2010/12/20 23:59:59<br />

Serial Number:<br />

>00<<br />

Issuer's Name:<br />

>CN=HDwtsc58.itso.ibm.com.OU=<strong>IBM</strong><<br />

Subject's Name:<br />

>CN=HDwtsc58.itso.ibm.com.OU=<strong>IBM</strong><<br />

Key Usage: CERTSIGN<br />

Private Key Type: ICSF<br />

Private Key Size: 1024<br />

PKDS Label: IRR.DIGTCERT.CERTIFAUTH.SC58.BFBDE7690EF01249<br />

Ring Associations:<br />

Ring Owner: ASCR1<br />

Ring:<br />

>WASKeyring.HD<<br />

Ring Owner: ASSR1<br />

Ring:<br />

>WASKeyring.HD<<br />

Chapter 8. Web services transport security 273


The private key type should be ICSF and a PKDS label should exist for the<br />

personal certificate as well.<br />

Issue the following command to view the personal certificate information:<br />

RACDCERT LIST (label('HDPersonal')) ID(ASCR1)<br />

Example 8-7 HDPersonal certificate information<br />

Digital certificate information for user ASCR1:<br />

Label: HDPersonal<br />

Certificate ID: 2QXB4sPZ8cjE14WZopaVgZNA<br />

Status: TRUST<br />

Start Date: 2006/11/21 00:00:00<br />

End Date: 2010/12/20 23:59:59<br />

Serial Number:<br />

>02<<br />

Issuer's Name:<br />

>CN=HDwtsc58.itso.ibm.com.OU=<strong>IBM</strong><<br />

Subject's Name:<br />

>CN=HDPersonal.O=<strong>IBM</strong><<br />

Private Key Type: ICSF<br />

Private Key Size: 1024<br />

PKDS Label: IRR.DIGTCERT.ASCR1.SC58.BFBDE9BD1F5C88CC<br />

Ring Associations:<br />

Ring Owner: ASCR1<br />

Ring:<br />

>WASKeyring.HD<<br />

Extracting the signer certificate from z/OS<br />

Export the HDCA signer certificate (with public key) to an HFS file:<br />

1. Use the following sample RACF command to export the signer certificate:<br />

RACDCERT CERTAUTH EXPORT(LABEL('HDCA')) DSN(CERTAUTH.DER)<br />

FORMAT(CERTDER) PASSWORD('XXXXX')<br />

2. From TSO, copy the certificate from a data set to a binary file:<br />

OPUT CERTAUTH.DER '/tmp/certauth.der' binary convert(no)<br />

3. FTP the certificate in binary to the client.<br />

Importing the signer certificate into WebSphere distributed<br />

In the admin console of the distributed WebSphere application server, follow the<br />

path to add a signer certificate. Select SSL certificate and key management →<br />

274 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


SSL configurations → NodeDefaultSSLSettings → Key stores and<br />

certificates → NodeDefaultTrustStore → Signer certificates.<br />

Specify the absolute path to where the certificate was downloaded in binary and<br />

provide a new alias name for the certificate. The data type indicates whether the<br />

certificate was downloaded as binary data or base64. In this example:<br />

► Alias: HDCA<br />

► File name: C:\TEMP\certauth.der<br />

► Data type: Binary DER Data<br />

Once imported, follow the admin console path SSL certificate and key<br />

management → SSL configurations → WebServiceSSLConfig.<br />

Click Get certificate aliases and then Save.<br />

8.4.2 Installing the unrestricted Java policy jars<br />

These unrestricted jars must be installed to access the keys in hardware using a<br />

strong encryption. To obtain the Java unrestricted policy jars and place them on<br />

the WebSphere z/OS system:<br />

1. Obtain the unrestricted policy jars from:<br />

http://www.ibm.com/developerworks/java/jdk/security/index.html<br />

2. Make a backup of the original restricted local_policy.jar and<br />

US_export_policy.jar.<br />

3. <strong>Download</strong> the unrestricted local_policy.jar and US_export_policy.jar to your<br />

WebSphere z/OS system in:<br />

/AppServer/java/lib/security<br />

4. After copying the local_policy.jar and US_export_policy.jar, change the<br />

permissions so that the control and servant region address spaces can<br />

access the jar files, as follows:<br />

chmod 644 local_policy.jar<br />

chmod 644 US_export_policy.jar<br />

8.4.3 Updating the JVM to use the <strong>IBM</strong>JCECCA provider<br />

The java.security file located in the WebSphere HFS needs to be updated with<br />

the <strong>IBM</strong>JCECCA provider as the first provider in the list of providers. The<br />

java.security file is in an ASCII, so it may be necessary to convert the file to<br />

EBCDIC before making changes.<br />

Chapter 8. Web services transport security 275


Example 8-8 illustrates the addition made to the java.security file.<br />

Example 8-8 Updating the java.security file for <strong>IBM</strong>JCECCA<br />

# List of providers and their preference orders (see above):<br />

security.provider.1=com.ibm.crypto.hdwrCCA.provider.<strong>IBM</strong>JCECCA<br />

security.provider.2=com.ibm.crypto.provider.<strong>IBM</strong>JCE<br />

security.provider.3=com.ibm.jsse.<strong>IBM</strong>JSSEProvider2<br />

security.provider.4=com.ibm.jsse2.<strong>IBM</strong>JSSEProvider<br />

security.provider.5=com.ibm.security.jgss.<strong>IBM</strong>JGSSProvider<br />

security.provider.6=com.ibm.security.cert.<strong>IBM</strong>CertPath<br />

security.provider.7=com.ibm.security.sasl.<strong>IBM</strong>SASL<br />

security.provider.8=com.ibm.security.cmskeystore.CMSProvider<br />

security.provider.9=com.ibm.security.jgss.mech.spnego.<strong>IBM</strong>SPNEGO<br />

The admin console in WebSphere V6.1 obtains the list of providers dynamically<br />

from this file. Restart the application server to pick up the changes.<br />

8.4.4 Configuring the z/OS Web service provider SSL configuration<br />

To configure the z/OS Web service provider to use the certificates with keys<br />

managed by ICSF, a new SSL configuration, JCECCRACFKS keystore, and SSL<br />

inbound channel and port are created to isolate the configuration.<br />

Creating a new JCECCARACFKS keystore<br />

In the WAS admin console, follow the path SSL certificate and key<br />

management → Key stores and certificates → New.<br />

If the java.security file was updated with the <strong>IBM</strong>JCECCA provider, the admin<br />

console shows two new types, JCECCARACFKS and JCECCAKS, in the<br />

drop-down menu, as shown in Figure 8-17.<br />

Figure 8-17 Certificate store types<br />

276 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Figure 8-18 HDCertStore<br />

Create the new certificate store with the values below and click Apply.<br />

► Name: HDCertStore<br />

► Path: safkeyringhw:///WASKeyring.HD<br />

► Change password: password<br />

► Confirm password: password<br />

► Type: JCECCARACFKS<br />

Notice that the safkeyring URI has been changed to safkeyringhw:/// to indicate<br />

that the keys are stored in hardware. See Figure 8-18.<br />

Since the HDCA was added to the keyring for both control and servant region<br />

user IDs, the signer certificate HDCA is viewable from the admin console.<br />

Chapter 8. Web services transport security 277


Verify that you can see the HDCA signer certificate by following the admin<br />

console path: SSL certificate and key management → SSL configurations →<br />

New → Key stores and certificates → HDCertStore → Signer certificates →<br />

hdca. See Figure 8-19.<br />

Figure 8-19 HDCA signer certificate information in admin console<br />

The personal certificate will not be viewable since it was only added to the<br />

keyring for the control region user ID.<br />

Creating a new SSL configuration<br />

Create a new SSL configuration to be used by the Web service port<br />

SecureWebServicePort. Follow the path in the admin console: SSL certificate<br />

and key management → SSL configurations → New.<br />

► Name: HDWebServiceSSLConfig<br />

► Trust store name: HDCertStore<br />

► Keystore Name: HDCertStore<br />

► Default server certificate alias: none<br />

► Default client certificate alias: none<br />

278 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Click the Get Certificate aliases button, and then click Apply (Figure 8-20).<br />

Figure 8-20 SSL configuration HDWebServiceSSLConfig<br />

Create a new SSL inbound channel and SSL port<br />

If it has not already been done, create a new SSL inbound channel and SSL port,<br />

as described in “Creating an SSL inbound channel and SSL port” on page 257,<br />

to isolate SSL changes for the Web service provider.<br />

Update SecureWebServicePort to use the new SSL configuration, using the<br />

following path in the admin console: SSL certificate and key management →<br />

Manage endpoint security configurations → SecureWebServicePort.<br />

Chapter 8. Web services transport security 279


Under Specific SSL configuration for this endpoint, click the check box to<br />

Override inherited values, and choose HDWebServiceSSLConfig in the<br />

drop-down for SSL configuration (Figure 8-21).<br />

Figure 8-21 Specific SSL configuration for SecureWebServicePort<br />

8.4.5 Configuring the Web service requestor SSL configuration<br />

If it has not already been done, create a new Web service requestor SSL<br />

configuration, and configure it to use the SSL configuration. In addition, update<br />

the Web service requestor’s endpoint URL to point to the host and port of the<br />

Web service provider. The steps for this process are described in 8.2.4,<br />

“Configuring the Web service requestor SSL configuration” on page 261.<br />

280 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


8.4.6 Configuring the z/OS Web service provider for confidentiality<br />

In this example, the cipher suite group was changed to strong in the WebSphere<br />

for z/OS admin console. Select Security → Secure Administration,<br />

applications, and infrastructure → SSL Confirugrations.<br />

1. Choose the WebServiceSSLConfig.<br />

2. Under Additional Properties, select quality of protection (Qop) settings.<br />

3. Change the cipher suite groups to strong.<br />

8.4.7 Configuring the Web service requestor for confidentiality<br />

In this example, the cipher suite group was changed in the distributed<br />

WebSphere admin console. Select Security → Secure Administration,<br />

applications, and infrastructure → SSL Confirugrations.<br />

1. Choose the WebServiceConfig.<br />

2. Under Additional Properties, select quality of protection (Qop) settings.<br />

3. Change the cipher suite groups to strong.<br />

8.4.8 Validating confidentiality with SSL using hardware crypto<br />

Execute the SecurityInfo application. The output should be similar to when you<br />

ran the SecurityInfo application with no security.<br />

If you are on a test system, stopping the ICSF address space and executing the<br />

SecurityInfo application results in an SSLException:<br />

javax.net.ssl.SSLException: Received close_notify during handshake<br />

The application executes successfully after restarting the ICSF address space.<br />

In a non-test environment, an RMF report can be viewed to see the ICSF<br />

address space’s CPU activity.<br />

Chapter 8. Web services transport security 281


Note: It is also possible to invoke the Web service provider’s URL from a Web<br />

browser:<br />

https://wtsc58.itso.ibm.com:19445/SecurityInfoRouterWS/services/<br />

SecurityInfo<br />

Depending on your browser settings, you may be prompted with a security<br />

alert. If so, click View Certificate to see who the certificate was issued by and<br />

issued to. The certificate should match what you have defined for the<br />

WebSphere control region user ID’s keyring. The output on the Web page<br />

should show:<br />

{http://itso.ibm.com}SecurityInfo<br />

Hi there, this is a Web service!<br />

8.5 Confidentiality and basic authentication<br />

Configuring basic authentication over SSL is accomplished by combining the<br />

steps in 8.1, “Authentication with HTTP” on page 246 and 8.3, “Confidentiality<br />

with SSL” on page 268. The steps have been outlined in order below:<br />

1. “Configuring the z/OS Web service provider with authentication” on page 247<br />

2. “Configuring the Web service requestor to authenticate” on page 249<br />

3. “Configuring the z/OS Web service provider SSL configuration” on page 255<br />

4. “Configuring the Web service requestor SSL configuration” on page 261<br />

5. “Configuring the z/OS Web service provider for confidentiality” on page 269<br />

6. “Configuring the Web service requestor for confidentiality” on page 269<br />

8.6 Confidentiality and client certificate authentication<br />

Client certificate authentication occurs during an SSL handshake when the<br />

server sends a certificate request after sending its own certificate. The client<br />

provides its certificate with a public key to the server. During the certificate verify<br />

step, the client sends a certificate verify message in which it encrypts a known<br />

piece of plain text using its private key. The server uses the client certificate to<br />

decrypt the message, therefore confirming that the client has the private<br />

key.“SSL Flow” on page 95 illustrates where the steps for client certificate<br />

authentication occur during an SSL handshake.<br />

282 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


8.6.1 Confidentiality and client certificate scenario description<br />

The user client invokes a servlet from a static Web page running in the<br />

WebSphere distributed system. The WebSphere distributed run time initiates an<br />

SSL handshake with the WebSphere for z/OS run time. During the handshake,<br />

the WebSphere for z/OS certificate is sent to the WebSphere Application Server<br />

on Windows. WebSphere on distributed validates this certificate against its<br />

truststore. Additionally, a client certificate and encrypted message is sent from<br />

WebSphere on Windows to WebSphere for z/OS to authenticate the client. A<br />

strong cipher algorithm is negotiated between WebSphere on distributed and<br />

WebSphere on z/OS. Finally, an SSL connection is established between the<br />

client and server endpoints. Once the transport is secure, the SOAP message<br />

flows from client to server.<br />

Figure 8-22 Client certificate authentication scenario<br />

8.6.2 Confidentiality and client certificate prerequisites<br />

During the SSL handshake the client authenticates to the server by sending an<br />

encrypted message that can only be decrypted by the server’s public key. The<br />

client must possess the personal certificate and private key for doing this<br />

encryption. In this section, a personal certificate is created and signed by the<br />

WebSphereCA, and then transferred to the WebSphere distributed system to be<br />

used by the Web service requestor for client certificate authentication.<br />

Chapter 8. Web services transport security 283


Creating certificate authority and personal certificate in RACF<br />

To create this:<br />

RACDCERT ADDRING(WASKeyring.CL6581) ID(WINSERV)<br />

RACDCERT ID(WINSERV) GENCERT SUBJECTSDN(CN('WINSERV') O('<strong>IBM</strong>')<br />

OU('ITSO')) WITHLABEL('WINSERVCERT') SIGNWITH(CERTAUTH<br />

LABEL('WebSphereCA')) NOTAFTER(DATE(2010/12/29))<br />

RACDCERT ID(WINSERV) CONNECT (LABEL('WINSERVCERT')<br />

RING(WASKeyring.CL6581) DEFAULT)<br />

RACDCERT ID(WINSERV) EXPORT(LABEL('WINSERVCERT')) DSN(WINSERV.P12BIN)<br />

FORMAT(PKCS12DER) PASSWORD('XXXX')<br />

OPUT WINSERV.P12BIN '/tmp/winserv.p12' binary convert(no)<br />

FTP the user certificate in binary to the client.<br />

Import personal certificate into client keystore<br />

In the admin console of the distributed WebSphere application server, follow the<br />

path to import the certificate from a key file. Select SSL certificate and key<br />

management → SSL configurations → WebServiceConfig → Key stores<br />

and certificates → NodeDefaultKeyStore → Personal certificates.<br />

► Key file name: C:\TEMP\winserv.p12<br />

► Type: PKCS12<br />

► Key file password: Specify the password that you exported the certificate<br />

with.<br />

► Imported certificate alias: winserv<br />

284 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Click the Get key file aliases button. The certificate alias to import should fill in<br />

with winservcert (Figure 8-23).<br />

Figure 8-23 Importing the certificate from a key file<br />

Chapter 8. Web services transport security 285


Important: WebSphere for z/OS uses a high level of encryption. <strong>Download</strong><br />

the unrestricted local_policy.jar and US_export_policy.jar to your WebSphere<br />

distributed system in the path:<br />

\AppServer\java\jre\lib\security<br />

Otherwise, you will not be able to import the personal certificate exported from<br />

WebSphere for z/OS.<br />

Refer to:<br />

http://www.ibm.com/developerworks/java/jdk/security/index.html<br />

Comparing the personal certificate on z/OS and Windows<br />

At this point you may want to confirm that the certificate that you exported from<br />

RACF matches the certificate imported in Windows. The following RACF<br />

command lists information about your certificate, such as serial number, issuer,<br />

subject, and expiration, that can be used to compare with the certificate imported<br />

into WebSphere distributed:<br />

RACDCERT LIST (label('WINSERVCERT')) ID(WINSERV)<br />

Example 8-9 Listing certificate information<br />

Digital certificate information for user WINSERV:<br />

Label: WINSERVCERT<br />

Certificate ID: 2QfmydXixdnl5snV4sXZ5cPF2eNA<br />

Status: TRUST<br />

Start Date: 2006/11/21 00:00:00<br />

End Date: 2010/12/29 23:59:59<br />

Serial Number:<br />

>24<<br />

Issuer's Name:<br />

>CN=WAS CertAuth for Security Domain.OU=WebSphere for zOS<<br />

Subject's Name:<br />

>CN=WINSERV.OU=ITSO.O=<strong>IBM</strong><<br />

Private Key Type: Non-ICSF<br />

Private Key Size: 1024<br />

Ring Associations:<br />

Ring Owner: WINSERV<br />

Ring:<br />

>WASKeyring.CL6581<<br />

286 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


In the Windows admin console follow the path to SSL certificate and key<br />

management → Key stores and certificates → NodeDefaultKeyStore →<br />

Personal certificates → winserv. See Figure 8-24.<br />

Figure 8-24 Personal certificate display on Windows<br />

8.6.3 Configuring the z/OS Web service provider SSL configuration<br />

If it has not already been done, create a new z/OS Web service provider SSL<br />

configuration, a new SSL inbound channel, and a new SSL port to provide<br />

isolation from other SSL configurations. The steps for this process are described<br />

in 8.2.3, “Configuring the z/OS Web service provider SSL configuration” on<br />

page 255.<br />

Chapter 8. Web services transport security 287


8.6.4 Configuring the Web service requestor SSL configuration<br />

If it has not already been done, create a new Web service requestor SSL<br />

configuration, and configure it to use the SSL configuration. In addition, update<br />

the Web service requestor’s endpoint URL to point to the host and port of the<br />

Web service provider. The steps for this process are described in 8.2.4,<br />

“Configuring the Web service requestor SSL configuration” on page 261.<br />

1. Change the SSL configuration WebServiceConfig to now point to the winserv<br />

certificate, as follows: SSL certificate and key management → SSL<br />

configurations → WebServiceConfig.<br />

2. Click the Get certificate aliases button.<br />

3. Under Default client certificate alias select winserv. See Figure 8-25.<br />

Figure 8-25 Setting default client certificate alias<br />

288 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


8.6.5 Configuring z/OS Web service provider for authentication<br />

The process for configuring transport-level client certificate authentication for a<br />

Web service is similar to that described in 8.1.1, “HTTP basic authentication<br />

scenario description” on page 246. The Web service endpoint resides in a WAR<br />

file and can be configured using the Web deployment descriptor editor.<br />

1. In the J2EE perspective, traverse the tree under Dynamic Web Projects and<br />

open the deployment descriptor for the SecurityInfoRouterWS.<br />

2. Select the Security tab. Under the Security Roles, add a role named<br />

SecureCustomer.<br />

3. Under Security Constraints, add a security constraint named<br />

SecureConstraint.<br />

– Set Resource Name to Secure Web Resource.<br />

– Select the check box for “GET, and POST” HTTP Methods.<br />

– Add the pattern /*.<br />

4. Under Authorized Roles, add SecureCustomer.<br />

5. Select the Pages tab. Under Authentication Method, select CLIENT_CERT.<br />

Example 8-10 Client certificate authentication setup in web.xml<br />

<br />

<br />

Security Constraint<br />

<br />

Security Resource<br />

/*<br />

GET<br />

PUT<br />

POST<br />

<br />

<br />

<br />

<br />

SecureCustomer<br />

<br />

<br />

<br />

CLIENT-CERT<br />

<br />

<br />

SecureCustomer<br />

<br />

Chapter 8. Web services transport security 289


Deploy the SecurityInfo ear file in the admin console, accepting the default<br />

settings presented during deployment.<br />

Enable client certificate authentication for SSL config<br />

Follow the path Security → Secure Administration, applications, and<br />

infrastructure → SSL Confirugrations.<br />

1. Choose WebServiceSSLConfig.<br />

2. Under Additional Properties, select quality of protection (Qop) settings.<br />

3. Change the client authentication to Required.<br />

Figure 8-26 Setting client authentication for SSL configuration<br />

290 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


8.6.6 Validating client certificate authentication<br />

Successful output from the application should show the user principal of the user<br />

ID associated with the personal certificate in the Web page table Remote<br />

SecurityInfoBean Information. In this scenario WINSERV is seen as the user<br />

principal. See Figure 8-27.<br />

Figure 8-27 Client certificate authentication validation<br />

Attention: For the client certificate scenario to work successfully, the fix for<br />

PK31729 needed to be applied, which corrected a problem with authorization<br />

errors when creating native credentials.<br />

Chapter 8. Web services transport security 291


292 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Chapter 9. Security attribute<br />

propagation and CSIv2<br />

9<br />

As J2EE applications are deployed in many different application servers across<br />

the enterprise, there is a need to not only have single sign-on, but also to<br />

propagate additional security context information. This way static or dynamic<br />

security attributes flow among application servers following user requests.<br />

In this chapter we describe security attribute propagation and CSIv2 identity<br />

assertion. The following topics are discussed:<br />

► “Introduction, logins, and tokens” on page 294<br />

► “Horizontal attribute propagation” on page 298<br />

► “CSIv2 standard identity assertion” on page 305<br />

► “Vertical attribute propagation with CSIv2” on page 328<br />

© Copyright <strong>IBM</strong> Corp. 2007. All rights reserved. 293


9.1 Introduction, logins, and tokens<br />

This section presents what security attribute propagation is and introduces<br />

technical concepts pertaining to attribute propagation.<br />

9.1.1 Security attribute propagation<br />

To better understand security attribute propagation, we first introduce identity<br />

propagation.<br />

Identity propagation refers to the basic level capability of passing the user<br />

identity from one server to another server. In the context of WebSphere<br />

Application Server for z/OS, a user initially authenticates to one server. This<br />

WebSphere server creates a JAAS subject that contains a principal that<br />

possesses the user identity. If there is any following request to another<br />

WebSphere server, the user identity is propagated to this other server so that<br />

single sign-on occurs and so that the other server’s principal gets populated with<br />

the user identity.<br />

Attribute propagation refers to the more advanced capability of passing the<br />

complete user security context from one server to another server. The complete<br />

user security context includes the user identity, tokens, and any attribute<br />

collected or created by the login module. These attributes may be groups,<br />

location, department name, IP address, and so on. In the context of WebSphere<br />

Application Server for z/OS, an user initially authenticates to one server. This<br />

WebSphere server creates a JAAS subject that contains a principal and<br />

credentials. The principal possesses the user identity. Credentials possess<br />

tokens and attributes. If there is any following request to another WebSphere<br />

server, the complete user security context is propagated to this other server so<br />

that single sign-on occurs and so that the other server’s subject gets populated<br />

with the user identity, eventually with tokens, and all other attributes.<br />

Security attribute propagation enables propagation of security attributes (user<br />

identity, authenticated subject content, and security context information) between<br />

application servers. Alternatively, servers would have to query the user registry<br />

or use a custom login module to get the attributes. This can be expensive from a<br />

performance view point and may increase the complexity of the solution.<br />

294 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


There are two different security attribute propagation styles:<br />

► Horizontal propagation<br />

Propagation occurs across front-end servers for Web application HTTP<br />

requests. Propagation relies on DynaCache and JMX.<br />

► Vertical propagation<br />

Propagation occurs between a front-end server and a back-end server for<br />

EJB application RMI-IIOP requests. Propagation relies on RMI-IIOP and<br />

CSIv2. This vertical attribute propagation style is also called downstream<br />

propagation.<br />

WebSphere Application Server for z/OS may obtain security attributes from<br />

either an enterprise user registry, which queries static attributes, or a custom<br />

login module, which can query static or dynamic attributes. WebSphere<br />

propagates only the objects within the subject that it can serialize. This means<br />

that it propagates custom objects on a best-effort basis.<br />

The propagation of security attributes in WebSphere Application Server for z/OS<br />

has significant benefits. Some benefits of using security attribute propagation<br />

are:<br />

► Performing registry lookups at each hop along an invocation is eliminated.<br />

► In your environment, you may use a Reverse Proxy Security Server (RPSS)<br />

such as WebSEAL to perform user authentication and gather group<br />

information and other security attributes. Prior to Version 6.0.x, the<br />

WebSphere Application Server for z/OS could only use the identity of the user<br />

and disregarded all the other security attributes. Since then, information that<br />

is obtained from the RPSS can be used by WAS and propagated downstream<br />

to other server resources without additional calls to the user registry.<br />

► Another significant benefit of the security attribute propagation is that the user<br />

switches that occur because of J2EE run-as configurations do not cause the<br />

WebSphere Application Server to loose the original caller information. This<br />

information is stored in the propagation token that is located on the running<br />

thread.<br />

9.1.2 Initial login versus propagation login<br />

When a request is being authenticated, a determination is made by the login<br />

modules as to whether this request is an initial login or a propagation login.<br />

An initial login is the process of WebSphere Application Server for z/OS<br />

authenticating the user information. Typically, the user proves his identity<br />

through a credential, which may be a user ID and password or a certificate, and<br />

Chapter 9. Security attribute propagation and CSIv2 295


WebSphere Application Server for z/OS then validates the user against the user<br />

registry and looks up secure attributes that represent the user access rights.<br />

A propagation login is the process of validating the user information, typically a<br />

Lightweight Third Party Authentication (LTPA) token, and then deserializing a<br />

set of tokens that constitute both custom objects and token objects known to the<br />

WebSphere Application Server. See Figure 9-1.<br />

Figure 9-1 Horizontal and vertical propagation - initial and propagation login<br />

When an user connects to a Web infrastructure for the first time, he typically<br />

does an initial login with WebSphere Application Server for z/OS. His credentials<br />

are validated against the user registry and the JAAS subject is created by the<br />

login module. This request might make a remote EJB call, and vertical security<br />

attribute propagation would happen. A following user request can reach the<br />

same server or a different server. Because the user already provided his<br />

296 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


credentials, a propagation login happens. If the request reaches a server<br />

different from the original server, then horizontal security attribute propagation<br />

happens.<br />

9.1.3 Token framework<br />

Security attribute propagation provides propagation services using Java<br />

serialization for any objects that are contained in the JAAS subject. However,<br />

Java code must be able to serialize and deserialize these objects. The Java<br />

programming model specifies the rules for how Java code can serialize an<br />

object. Because problems can occur when dealing with different platforms and<br />

versions of software, WebSphere Application Server for z/OS offers a token<br />

framework that enables custom serialization functionality. The token framework<br />

has other benefits that include the ability to identify the uniqueness of the token.<br />

This uniqueness determines how the JAAS subject gets cached and the purpose<br />

of the token. The token framework defines four marker token interfaces that<br />

enable the WebSphere Application Server for z/OS run time to determine how to<br />

propagate the token.<br />

The WebSphere token framework consists of the following tokens:<br />

► Subject-based tokens<br />

– Authentication token (old LtpaToken)<br />

This token contains the identity of the user only. It is converted to a cookie<br />

and sent to the browser. It is the same as the old LtpaToken for backwards<br />

compatibility with previous WebSphere versions.<br />

– Single sign-on (SSO) token (new LtpaToken2)<br />

This token is converted to a cookie and sent to the browser. It represents<br />

the unique authentication. It contains stronger encryption than the<br />

LtpaToken and enables you to add multiple attributes to the token. It<br />

contains the authentication identity and attributes that are used for<br />

contacting the original login server and the unique cache key for looking<br />

up the JAAS subject.<br />

– Authorization token<br />

This token contains most of the authorization-related security attributes<br />

that are propagated. It is used by WebSphere to make J2EE authorization<br />

decisions.<br />

► Thread-based token<br />

– Propagation token<br />

This token is not user specific and thus not part of the JAAS subject. It<br />

represents the thread context. It is used to implement chaining support.<br />

Chapter 9. Security attribute propagation and CSIv2 297


This allows servers in the invocation hop to add information that can be<br />

retrieved downstream. This token is not associated with the subject, since<br />

the subject may change. Instead, it is stored with the thread. The default<br />

propagation token monitors and logs all user switches and host switches.<br />

Each of the WebSphere Application Server tokens discussed above can be<br />

customized by implementing the appropriate interface. This customization may<br />

be done in two ways. You can add custom attributes to the default token or you<br />

can create your own implementation of the token by extending the specific token<br />

interface. The token framework serves as a way to notify WebSphere that you<br />

want these custom tokens propagated in a particular way.<br />

For example, service providers can use custom authorization token<br />

implementations to isolate their data in a different token, perform custom<br />

serialization and de-serialization, and make custom authorization decisions using<br />

the information in their token at the appropriate time.<br />

Custom tokens added by other servers and front end are not used by<br />

WebSphere for authorization or authentication. Any custom tokens that are used<br />

in this framework are not used by WebSphere Application Server for<br />

authorization or authentication. WebSphere Application Server handles the<br />

propagation details, but does not handle serialization or deserialization of custom<br />

tokens. Serialization and deserialization of these custom tokens are carried out<br />

by the implementation and handled by a custom login module.<br />

For front-end custom login modules, the WEB_INBOUND login configuration is<br />

modified. For upstream to downstream custom login modules, the<br />

RMI_OUTBOUND and RMI_INBOUND login configuration are modified.<br />

For more information about how to develop a custom token, refer to <strong>IBM</strong><br />

WebSphere Application Server V6.1 Security Handbook, SG24-6316.<br />

9.2 Horizontal attribute propagation<br />

This section presents horizontal attribute propagation. It describes the concept,<br />

how it works, the implementation, and highlights some cross-cell considerations.<br />

9.2.1 Horizontal attribute propagation description<br />

In horizontal propagation, security attributes are propagated among front-end<br />

servers. The serialized security attributes, which are the JAAS subject contents<br />

and the propagation tokens, can contain both static and dynamic attributes. The<br />

single sign-on (SSO) token stores additional system-specific information that is<br />

needed for horizontal propagation. The information contained in the SSO token<br />

298 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


tells the receiving server where the originating server is located and how to<br />

communicate with that server. Additionally, the SSO token also contains the key<br />

to look up the serialized attributes.<br />

The benefit of using horizontal attribute propagation is that you do not need to<br />

perform any remote user registry calls during a propagation login because the<br />

application server can regenerate the JAAS subject from the serialized<br />

information. Without this ability, the application server might make five to six<br />

separate remote calls. It is also very useful if you need to gather dynamic<br />

security attributes set at the original login server that cannot be regenerated at<br />

the other front-end server.<br />

The serialized information of the security attributes is automatically propagated<br />

to all the servers within the same Data Replication Service (DRS).<br />

For making horizontal attribute propagation a reality, WebSphere Application<br />

Server for z/OS relies on two mechanisms:<br />

► DynaCache<br />

WebSphere creates a private security cache in DynaCache. All JAAS<br />

subjects are placed in this cache and replicated in the replication domain<br />

(such as the application server cluster). During a propagation login,<br />

WebSphere retrieves the unique cache key from the single sign-on token.<br />

WebSphere is then able to retrieve the JAAS subject from the replicated<br />

security cache. The security cache lifetime is the same as the single sign-on<br />

token lifetime.<br />

► JMX<br />

During a propagation login, if WebSphere cannot find the JAAS subject in the<br />

security cache, it uses JMX to query the server where the initial login<br />

happened and that created the original JAAS subject. JMX is the fallback<br />

solution. WebSphere finds the original server address in the single sign-on<br />

token.<br />

If JMX fails, WebSphere falls back to an initial login in order to recreate the JAAS<br />

subject. In this case security attribute propagation does not occur, but identity<br />

propagation (or single sign-on) still occurs because the user identity is stored in<br />

the single sign-on token. The login modules are called to recreate the JAAS<br />

subject but the user does not have to re-authenticate.<br />

There are some performance implications of enabling horizontal propagation.<br />

Enabling Web inbound propagation eliminates some user registry calls.<br />

However, the deserialization and the decryption of tokens are intensive tasks<br />

and may impact performance. We recommended that you run performance tests<br />

in your environment with a typical number of users with the propagation enabled<br />

Chapter 9. Security attribute propagation and CSIv2 299


and with propagation disabled to determine the performance implications and the<br />

best solution to implement.<br />

9.2.2 Horizontal attribute propagation in action<br />

In this section we describe how horizontal attribute propagation works with an<br />

example. See Figure 9-2.<br />

Figure 9-2 Horizontal security attribute propagation in action<br />

In this example, server 1 and server 2 are part of the same data replication<br />

service. Server 3 and server 4 are part of the same data replication service.<br />

The example scenario goes through the following steps:<br />

1. An user accesses a Web application in server 1. He first authenticates with<br />

server 1. This is an initial login. The user provides his credentials.<br />

2. Server 1 creates a JAAS subject with the login module.<br />

3. Server 1 converts this JAAS subject in serialized tokens and places it in<br />

DynaCache and in the security cache.<br />

4. The JAAS subject is replicated via data replication service (DRS), if this is<br />

configured (within a WebSphere cluster for example).<br />

300 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


5. Server 1 creates the single sign-on token that represents this subject. It<br />

contains the user uniqueid and time stamp, optional custom key information,<br />

and the application server’s JMX administrative endpoint.<br />

6. Server 1 sends this single sign-on token to the user’s browser in the form of a<br />

cookie (LtpaToken2).<br />

7. The user then accesses another Web application in server 3. This is a<br />

propagation login. The browser sends the single sign-on token along with the<br />

request.<br />

8. Server 3 retrieves the user identity, and retrieves the uniqueid and the original<br />

server JMX endpoint from the single sign-on token.<br />

9. Server 3 tries to find the security context information in the local security<br />

cache. Because the user did not use this server 3 before, it cannot find it.<br />

10.Server 3 tries to find the security context information in the DynaCache.<br />

Because DRS is not configured between server 1 and server 3, it cannot find<br />

it.<br />

11.Server 3 then makes a JMX call to the original server to retrieve the serialized<br />

JAAS subject.<br />

12.Server 3 creates the subject containing all the security context information<br />

found in the original server 1.<br />

9.2.3 Horizontal attribute propagation implementation<br />

To enable horizontal propagation, you must configure the single sign-on token<br />

and the Web inbound security attribute propagation features. You can configure<br />

both of these features using the admin console.<br />

Complete the following steps to configure WebSphere Application Server for<br />

z/OS for horizontal propagation. This configuration has to be done on every<br />

WebSphere server participating in the horizontal attribute propagation.<br />

1. Launch the administrative console and log in.<br />

2. Navigate to Security → Secure administration, applications, and<br />

infrastructure → Web security → Single Sign-On (SSO).<br />

3. If not already checked, check the Enabled check box so that single sign-on<br />

occurs using an LTPA token.<br />

4. Earlier versions of WebSphere Application Server did not support security<br />

attribute propagation. They used an old LTPA token for single sign-on<br />

purposes. If you need to interoperate with such servers, select the<br />

Interoperability Mode option. WebSphere Application Servers that do not<br />

support security attribute propagation receive the LTPA token and the<br />

propagation token, but ignore the security attribute information that they do<br />

Chapter 9. Security attribute propagation and CSIv2 301


not understand. The interoperability mode option generates the<br />

authentication token (old LtpaToken) containing the user identity only.<br />

5. Check the option for Web inbound security attribute propagation. This<br />

option enables horizontal propagation. This option generates the single<br />

sign-on token (new LtpaToken2) containing the user identity, the uniqueid,<br />

and the original server JMX address.<br />

6. Click Apply and save the configuration in the master repository.<br />

Figure 9-3 Horizontal attribute propagation configuration<br />

With the Web inbound security attribute propagation enabled, the security<br />

attributes of the originating server where the initial login occurred will get<br />

propagated to the receiving server. These security attributes include any custom<br />

attributes or tokens that are set in the custom login modules in the login server.<br />

9.2.4 Cross-cell considerations<br />

Single sign-on and security attribute propagation rely on the usage of LTPA<br />

tokens. These tokens are encrypted using LTPA keys. By default these keys are<br />

automatically generated and shared among all application servers in the same<br />

cell. This is the reason why all application servers in one cell are able to generate<br />

and encrypt or decrypt and read any LTPA token generated by another. Single<br />

sign-on and security attribute propagation happens sharing one set of LTPA keys<br />

302 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


in the cell. In a deployment manager configuration, the LTPA keys generated at<br />

the deployment manager level are automatically replicated to all servers’<br />

members of the same cell.<br />

In a multiple-cell environment, LTPA keys and security configurations are likely<br />

to be different by default and need some adjustment to be able to communicate.<br />

Cross-cell identity propagation or single sign-on<br />

As described before, identity propagation or single sign-on relies on the single<br />

sign-on token (new LtpaToken2) or on the authentication token (old LtpaToken)<br />

for backwards compatibility. The user identity is stored encrypted in this token.<br />

For cross-cell single sign-on to happen, all servers must be able to decrypt the<br />

single sign-on token (new LtpaToken2). Hence, they must all share the same<br />

LTPA key. If LTPA keys are generated separately in every cell, then all LTPA<br />

keys are different, and servers from one cell are not able to decrypt single<br />

sign-on tokens coming from other cells. See Figure 9-4.<br />

Figure 9-4 Cross-cell identity propagation or single sign-on and LTPA tokens<br />

To share the same LTPA key, it is necessary to generate the LTPA key once in<br />

one cell, to export this LTPA key, and to import this LTPA key in any other cell<br />

that you want to single sign-on with. Then all servers share the same LTPA, and<br />

they are all able to decrypt the LTPA token coming from another.<br />

This applies to identity propagation among front-end servers (horizontal with<br />

HTTP and cookies) and for identity propagation to back-end servers (vertical or<br />

downstream with RMI-IIOP or Web services and tokens).<br />

Chapter 9. Security attribute propagation and CSIv2 303


In order to have all cells share the same LTPA keys, follow these steps:<br />

1. Generate the LTPA keys in one initial cell. From the deployment manager<br />

administrative console, navigate to Secure administration, applications,<br />

and infrastructure → Authentication mechanisms and expiration and<br />

click Generate. Save the changes to the master configuration.<br />

2. Export the LTPA keys from this initial cell. From the deployment manager<br />

administrative console, navigate to Secure administration, applications,<br />

and infrastructure → Authentication mechanisms and expiration. Under<br />

Cross-cell single sign-on, specify a password for the key file. Enter a key file<br />

name and path in an HFS. Click Export.<br />

Figure 9-5 Cross-cell single sign-on key transfer<br />

3. Transfer the key file in binary format to the deployment manager of the target<br />

cell.<br />

4. Import the LTPA keys to this target cell. From the deployment manager<br />

administrative console, navigate to Secure administration, applications,<br />

and infrastructure → Authentication mechanisms and expiration. Under<br />

Cross-cell single sign-on, specify the same password for the key file. Enter<br />

the transferred key file name and path in an HFS. Click Import. Save the<br />

changes to the master configuration.<br />

5. Repeat the last two steps with any other cell that you want to single sign-on<br />

with.<br />

Attention: If you choose to use automatically generated keys in Secure<br />

administration, applications, and infrastructure → Authentication mechanisms<br />

and expiration → Key set groups → NodeLTPAKeySetGroup, then every time<br />

a new set of keys is generated, you have to redo this process.<br />

304 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Cross-cell horizontal attribute propagation<br />

For cross-cell attribute propagation to happen, identity propagation or single<br />

sign-on is a prerequisite. Hence, the process described in the preceding section<br />

has to be executed.<br />

Horizontal attribute propagation implies the usage of JMX calls. If you are using<br />

JMX across cells then a great deal of trust is implied between the cells. In<br />

addition to the requirement for shared LTPA encryption keys, the cell level server<br />

identities end up with substantial authority across the cell boundaries. This is<br />

because, as with any administrative call, the JMX call requires authentication<br />

and authorization.<br />

For the remote JMX administration call across the cell to succeed, the two cells<br />

must share a common security infrastructure, registries, SSL Keys, and so on.<br />

Also, the cell’s security server ID must have administrative access to the remote<br />

cell. All cells must completely trust each other. Each has administrative authority<br />

over the other. The same behavior holds with propagation within a cell, but in that<br />

case there is no issue because servers within a cell already trust each other and<br />

share a common administrative identity.<br />

9.3 CSIv2 standard identity assertion<br />

9.3.1 CSIv2<br />

Note: This does not apply when vertical or downstream attribute propagation<br />

occurs using IIOP. In that case the upstream server simply sends the<br />

complete serialized subject to the downstream server. No JMX callbacks are<br />

required.<br />

This section presents CSIv2 standard identity assertion. It describes CSIv2,<br />

CSIv2 identity assertion, how identity assertion works, and the implementation.<br />

This section also presents the scenario we implemented in our environment.<br />

Common Secure Interoperability version 2 (CSIv2) is a standard security<br />

protocol for RMI-IIOP communication. CSIv2 defines the Security Attribute<br />

Service (SAS) that enables interoperable authentication, delegation, and<br />

privileges. CSIv2 supports SSL and interoperability across J2EE vendors. CSIv2<br />

is the authentication protocol of choice for the EJB container.<br />

Chapter 9. Security attribute propagation and CSIv2 305


The following Common Secure Interoperability Version 2 features are available<br />

in WebSphere Application Server for z/OS:<br />

► Transport layer authentication<br />

This authenticates credential information and sends that information at the<br />

transport layer across the network so that a receiving server can interpret it.<br />

► Message layer authentication<br />

This authenticates credential information and sends that information at the<br />

message layer across the network so that a receiving server can interpret it.<br />

► Identity assertion<br />

This supports a downstream server in accepting the client identity that is<br />

established on an upstream server, without having to authenticate again. The<br />

downstream server trusts the upstream server. We describe this feature in<br />

9.3.2, “CSIv2 standard identity assertion description” on page 307.<br />

► Security attribute propagation<br />

This supports the use of tokens to propagate serialized subject contents.<br />

Propagating security attributes prevents downstream logins from having to<br />

make user registry calls to look up these attributes. Propagating security<br />

attributes is also useful when the security attributes contain information that is<br />

only available at the time of authentication. This information cannot be<br />

located using the user registry on downstream servers. We describe this<br />

feature in 9.4, “Vertical attribute propagation with CSIv2” on page 328.<br />

The standard CSIv2 protocol defines three layers: the transport layer, the<br />

message layer, and the attribute layer, as shown in Figure 9-6.<br />

Figure 9-6 CSIv2 layers and authentication possibilities<br />

306 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


CSIv2 offers multiple authentication mechanisms depending on the layer being<br />

used:<br />

► At the transport layer level, SSL client certificate authentication (mutual<br />

authentication) can be used. This authentication occurs during the connection<br />

handshake using SSL certificates. The advantage of using a certificate is<br />

increased authentication performance. The disadvantage is the complexity of<br />

configuring each client with the proper keystore.<br />

► At the message layer level, basic authentication or mechanism-specific<br />

format tokens such as the LTPA token can be used.<br />

► At the attribute layer level, an identity token when doing identity assertion can<br />

be used.<br />

Authentication mechanisms from different layers can be used simultaneously.<br />

When several mechanisms are being used simultaneously, the target JAAS<br />

subject contains the identity provided at the attribute layer if any, or at the<br />

message layer if any, or at the transport layer of any. For example, when doing<br />

identity assertion, basic authentication can be used at the message layer level to<br />

create the trust relationship, and the user identity would flow at the attribute<br />

layer. Hence, the JAAS subject contains the identity provided at the attribute<br />

layer.<br />

CSIv2 authentication can be used by a J2EE thick client on an user workstation<br />

to authenticate to an EJB container. Or it can be used between J2EE servers to<br />

authenticate to an EJB container.<br />

9.3.2 CSIv2 standard identity assertion description<br />

Identity assertion (or ID assertion) is a mechanism that allows the propagation of<br />

an already authenticated identity from one server to another. ID assertion is<br />

different from the other authentication methods in that it is based on a trust<br />

relationship between the sender of the identity and the receiver. The receiver can<br />

assume that the identity has been authenticated, because he trusts the sender.<br />

You can use ID assertion when an intermediary server must invoke a service<br />

from a downstream server on behalf of the client. The intermediary server<br />

establishes a trust relationship with the downstream server (using authentication,<br />

for instance, but not necessarily) and then is recognized as a trusted partner by<br />

the downstream server. The intermediary server can then assert the client<br />

identity to the downstream server.<br />

Identity assertion is particularly well suited for end-to-end security solutions.<br />

CSIv2 identity assertion is standard. This means that it can be used across J2EE<br />

vendor application servers.<br />

Chapter 9. Security attribute propagation and CSIv2 307


CSIv2 allows a client identity to be asserted to a downstream server. This is<br />

beneficial when propagating user identities from one server to a downstream<br />

server using RMI-IIOP. This can also be beneficial when there is no common<br />

authentication token that can be sent at the message layer for interoperability.<br />

With identity assertion, the authenticated user in one server is validated by the<br />

downstream server. Hence, users’ identities must be known by both servers.<br />

Asserted identity<br />

The asserted identity flows in the attribute layer. WebSphere Application Server<br />

for z/OS supports the following identity formats:<br />

► SAF identity<br />

This is a raw user identity. It is typically used with the local operating system<br />

user registry.<br />

► Distinguished name<br />

This is typically used when LDAP is the user registry.<br />

► Certificate<br />

This is typically used when client certificate authentication is configured in the<br />

front-end server.<br />

Trust relationship<br />

Identity assertion relies on the trust relationship between an intermediary server<br />

and a downstream server. Because of this, the downstream server trusts the<br />

intermediary server and accepts the asserted identity.<br />

With CSIv2 standard identity assertion, the trust relationship can be established<br />

in different ways:<br />

► At the message layer level using basic authentication or a LTPA token.<br />

► At the transport layer level using client certificate authentication (mutual<br />

authentication).<br />

► Outside of the CSIv2 protocol, assuming that the trust is enforced outside of<br />

the CSIv2 flow itself. Trust can be enforced at the network level, for instance.<br />

For example, network appliances such as firewalls can be used to create a<br />

secured zone in which servers trust each others.<br />

308 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


9.3.3 CSIv2 standard identity assertion in action<br />

During a CSIv2 identity assertion between an upstream server (outbound server)<br />

and a downstream server (inbound server), the following happens:<br />

► The outbound server authenticates to the inbound server to establish trust<br />

with one of the following mechanisms:<br />

– Client certificate authentication<br />

The outbound server’s client certificate must be verifiable by the inbound<br />

server. The client certificate authority must be connected to the inbound<br />

server’s keyring. The outbound server’s certificate must be mapped to an<br />

identity in the inbound server registry.<br />

– Basic authentication<br />

The outbound server identity and password must be in the inbound<br />

server’s registry.<br />

► The outbound server provides the attribute layer asserted identity only with no<br />

password. This identity can be a RACF ID, an LDAP DN, a certificate, and so<br />

on.<br />

► The inbound server receives the outbound server identity and the asserted<br />

identity.<br />

► The inbound server checks whether the outbound server (from the outbound<br />

server identity) is in its list of trusted servers. If so, it authenticates the<br />

upstream server. You can use the System Authorization Facility (SAF) CBIND<br />

class to indicate that a process is trusted to assert identities to WebSphere<br />

Application Server for z/OS.<br />

► The inbound server accepts the asserted identity and creates credentials by<br />

querying the registry. No validation is performed on the asserted identity (no<br />

password, token, and so on).<br />

For CSIv2 stateful connections, this checking is done only once. All subsequent<br />

requests are made through a session ID.<br />

Chapter 9. Security attribute propagation and CSIv2 309


9.3.4 CSIv2 standard identity assertion implementation<br />

The CSIv2 protocol requires that the two discussing parties have coherent CSIv2<br />

configurations. Each communication endpoint needs to be configured for CSIv2.<br />

For example, a J2EE thick client CSIv2 outbound configuration must match the<br />

server CSIv2 inbound configuration. And a J2EE server CSIv2 outbound<br />

configuration must match the receiving server CSIv2 inbound configuration. See<br />

Figure 9-7.<br />

Figure 9-7 CSIv2 configuration endpoints<br />

For a J2EE thick client, the CSIv2 outbound configuration is done in a<br />

sas.client.props file. Because identity assertion occurs between two servers, we<br />

focus in this section on how to configure server outbound and inbound endpoints.<br />

CSIv2 outbound transport<br />

On the CSIv2 upstream server side, using the administrative console, click<br />

Security → Secure administration, applications, and infrastructure. Under<br />

Authentication, click RMI/IIOP security → CSIv2 outbound transport.<br />

310 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Consider the following options:<br />

► TCP/IP<br />

If you select this option, the server opens TCP/IP connections with<br />

downstream servers only.<br />

► SSL required<br />

If you select this option, the server opens SSL connections with downstream<br />

servers.<br />

► SSL supported<br />

If you select this option, the server opens SSL connections with any<br />

downstream server that supports them and opens TCP/IP connections with<br />

any downstream servers that do not support SSL.<br />

Chapter 9. Security attribute propagation and CSIv2 311


For identity assertion, depending on the trust relationship mechanism you want<br />

to use, you have to choose the transport accordingly. For example, if you want to<br />

create a trust relationship with SSL client certificate authentication, then you<br />

need to choose SSL required. If you want to create a trust relationship with basic<br />

authentication, you may simply use TCP/IP as a transport, although you may<br />

choose to use SSL for encrypting the communication flow so that identities and<br />

passwords do not flow in clear. See Figure 9-8.<br />

Figure 9-8 CSIv2 outbound transport<br />

If you choose SSL required or supported, you can configure the SSL settings you<br />

wish to use.<br />

CSIv2 outbound authentication<br />

On the CSIv2 upstream server side, using the administrative console, click<br />

Security → Secure administration, applications, and infrastructure. Under<br />

Authentication, click RMI/IIOP security → CSIv2 outbound transport.<br />

312 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Consider how to create the trust relationship for identity assertion:<br />

► Basic authentication<br />

If you select Required for this option, then message-layer authentication<br />

occurs. This can be basic authentication user ID and password or it can be an<br />

LTPA token being sent.<br />

► Client certificate authentication<br />

If you select Required for this option, then transport-layer SSL client<br />

certificate authentication occurs. Typically, client certificate authentication has<br />

a higher performance than message-layer authentication, but requires some<br />

additional setup. These additional steps include verifying that this server has<br />

a personal certificate and that the downstream server has the signer<br />

certificate of this server.<br />

Chapter 9. Security attribute propagation and CSIv2 313


Figure 9-9 CSIv2 outbound authentication<br />

For identity assertion to occur, select the Identity assertion check box. The<br />

identity asserted is the client identity. If there are multiple identity types to assert,<br />

the identity is asserted in the following order: client certificate, distinguished<br />

name (DN), System Authorization Facility (SAF) user ID.<br />

Once you check the Identity assertion check box, choose between “Use server<br />

trusted identity” and “Specify an alternative trusted identity.”<br />

314 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


“Use server trusted identity” specifies the server identity that the application<br />

server uses to establish trust with the target server. The server identity can be<br />

sent using a server ID and password when the server password is specified in<br />

the registry configuration, or using a server ID in an LTPA token when the<br />

internal server ID is used.<br />

For interoperability with application servers other than WebSphere, configure the<br />

server ID and password in the registry, then select the Specify an alternative<br />

trusted identity option and specify the trusted identity and password so that an<br />

interoperable Generic Security Services Username Password (GSSUP) token is<br />

sent instead of an LTPA token.<br />

“Specify an alternative trusted identity” specifies an alternative user as the<br />

trusted identity that is sent to the target server instead of sending the server<br />

identity. This option is recommended for identity assertion. The identity is<br />

automatically trusted when it is sent within the same cell and does not need to be<br />

in the trusted identities list within the same cell. However, this identity must be in<br />

the registry of the target server in an external cell, and the user ID must be on the<br />

trusted identities list or the identity is rejected during trust evaluation.<br />

On z/OS systems, the stateful sessions option is ignored. The sending server<br />

prefers stateful sessions and uses them if the receiving server supports them.<br />

“Login configuration” specifies the type of system login configuration that is used<br />

for outbound authentication. You can add custom login modules before or after<br />

this login module. “Custom outbound mapping” enables the use of custom RMI<br />

outbound login modules. The custom login module maps or performs other<br />

functions before the predefined RMI outbound call.<br />

“Security attribute propagation” enables the application server to propagate the<br />

subject and the security context to other application servers. We describe this<br />

feature in detail in 9.4, “Vertical attribute propagation with CSIv2” on page 328.<br />

CSIv2 inbound transport<br />

On the CSIv2 downstream server side, using the administrative console, click<br />

Security → Secure administration, applications, and infrastructure. Under<br />

Authentication, click RMI/IIOP security → CSIv2 inbound transport.<br />

Chapter 9. Security attribute propagation and CSIv2 315


Consider the following options:<br />

► TCP/IP<br />

If you select this option, the server opens a TCP/IP listener port only and all<br />

inbound requests do not have SSL protection.<br />

► SSL required<br />

If you select this option, the server opens an SSL listener port only and all<br />

inbound requests are received using SSL. You might want to take advantage<br />

of the CBIND class in RACF so that the certificate-mapped user identity must<br />

be allowed to this facility class.<br />

► SSL supported<br />

If you select this option, the server opens both a TCP/IP and an SSL listener<br />

port.<br />

This configuration has to match the CSIv2 client server configuration.<br />

316 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


For identity assertion, depending on the trust relationship mechanism you want<br />

to use, you have to choose the transport accordingly. For example, if you want to<br />

create a trust relationship with SSL client certificate authentication, then you<br />

need to choose SSL required. If you want to create a trust relationship with basic<br />

authentication, you may simply use TCP/IP as a transport, although you may<br />

choose to use SSL for encrypting the communication flow so that identities and<br />

passwords do not flow in clear.<br />

Figure 9-10 CSIv2 inbound transport<br />

If you choose SSL required or supported, you can configure the SSL settings you<br />

wish to use.<br />

CSIv2 inbound authentication<br />

On the CSIv2 downstream server side, using the administrative console, click<br />

Security → Secure administration, applications, and infrastructure. Under<br />

Authentication, click RMI/IIOP security → CSIv2 inbound transport.<br />

Chapter 9. Security attribute propagation and CSIv2 317


Consider how to create the trust relationship for identity assertion:<br />

► Basic authentication<br />

If you select Required for this option, then message-layer authentication<br />

occurs. This can be a basic authentication user ID and password or it can be<br />

an LTPA token being sent.<br />

► Client certificate authentication<br />

If you select Required for this option, then transport layer SSL client certificate<br />

authentication occurs. Typically, client certificate authentication has higher<br />

performance than message layer authentication, but requires some additional<br />

setup. These additional steps include verifying that this server has a personal<br />

certificate and that the downstream server has the signer certificate of this<br />

server. When the certificate is authenticated to a local OS user registry, the<br />

certificate is mapped to the user ID in the registry.<br />

318 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


This configuration has to match the CSIv2 client server configuration. See<br />

Figure 9-11.<br />

Figure 9-11 CSIv2 inbound authentication<br />

For identity assertion to occur, select the Identity assertion check box. The<br />

identity asserted is the client identity.<br />

In Trusted identities, specify a semicolon-separated (;) or comma-separated (,)<br />

list of trusted server IDs, which are trusted to perform identity assertion to this<br />

server.<br />

On z/OS systems, the stateful sessions option is ignored. The sending server<br />

prefers stateful sessions and uses them if the receiving server supports them.<br />

Chapter 9. Security attribute propagation and CSIv2 319


Login configuration specifies the type of system login configuration to use for<br />

inbound authentication. You can add custom login modules.<br />

“Security attribute propagation” enables the application server to propagate the<br />

subject and the security context to other application servers. We describe this<br />

feature in detail in 9.4, “Vertical attribute propagation with CSIv2” on page 328.<br />

On the CSIv2 downstream server side, using the administrative console, click<br />

Security → Secure administration, applications, and infrastructure. Under<br />

Authentication, click RMI/IIOP security → CSIv2 inbound transport → z/OS<br />

Additional Settings.<br />

Choose the type of client identities allowed to be asserted from the upstream<br />

server:<br />

► System Authorization Facility (SAF) user names<br />

► Distinguished names (LDAP user identities, for example)<br />

► X.509 certificates<br />

This configuration has to match the CSIv2 client server configuration. See<br />

Figure 9-12.<br />

Figure 9-12 CSIv2 inbound authentication z/OS additional settings<br />

320 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


9.3.5 Our CSIv2 identity assertion scenario<br />

We present in this section our CSIv2 identity assertion scenario in our<br />

environment.<br />

Our scenario environment<br />

This section uses an application that helps demonstrate secured RMI-IIOP calls.<br />

The application is called ejbMagic. See Figure 9-13.<br />

Figure 9-13 Our environment and the ejbMagic application<br />

We have two WebSphere Application Servers installed on two different LPARs.<br />

The ejbMagic application is deployed to the two WebSphere servers. Both<br />

WebSphere servers use the local operating system user registry (RACF). In this<br />

scenario, WebSphere Application Server v6.0 is used. Note that some<br />

configuration panels differ from WebSphere Application Server v6.1.<br />

The ejbMagic application does some local EJB calls and some remote EJB calls.<br />

It can be deployed into multiple WebSphere cells, and then used to call itself to<br />

help verify inter-WebSphere cell communication. The SnoopMagicEjb EJB<br />

consists of a method called snoopInfo. This is the method that gathers the<br />

information such as Java principal, and so on, and calls the remote EJB. In<br />

addition, four other EJB methods allow the testing of different RunAs settings<br />

(siNoRunAs, siRunAsServer, siRunAsCaller, siRunAsRoleWorker).<br />

Our CSIv2 setup for identity assertion<br />

The sending server needs to be configured to allow identity assertion, and the<br />

receiving server needs to be configured to allow it to receive an asserted identity.<br />

In this configuration, the trust relationship is presumed and is not configured at<br />

the CSIv2 message layer or transport layer. So, default values are used at the<br />

Chapter 9. Security attribute propagation and CSIv2 321


transport and at the message-layer level. Basic authentication and client<br />

certificate authentication are supported. But because they are not configured in<br />

this scenario, they are not used.<br />

On the upstream server, we check the Identity Assertion check box. Because<br />

we use the local operating system user registry (RACF), a SAF identity is<br />

asserted in the CSIv2 attribute layer. See Figure 9-14.<br />

Figure 9-14 Scenario CSIv2 outbound authentication<br />

For more information about how to configure this panel, refer to 9.3.4, “CSIv2<br />

standard identity assertion implementation” on page 310.<br />

322 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


On the downstream server, we check the Identity Assertion check box to<br />

enable identity assertion. See Figure 9-15.<br />

Figure 9-15 Scenario CSIv2 inbound authentication<br />

For more information about how to configure this panel, refer to 9.3.4, “CSIv2<br />

standard identity assertion implementation” on page 310.<br />

Chapter 9. Security attribute propagation and CSIv2 323


In the z/OS additional settings for the downstream server, we choose SAF<br />

identity assertion so that WebSphere Application Server for z/OS can validate<br />

the incoming identity against the SAF user registry (RACF). See Figure 9-16.<br />

Figure 9-16 Scenario CSIv2 inbound additional settings<br />

324 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Our EJBMagic scenario in action<br />

In our scenario, a servlet calls a local EJB and then this local EJB calls a remote<br />

EJB, as shown in Figure 9-17.<br />

Figure 9-17 Scenario EJBMagic in action<br />

The servlet is secured and requires authentication. The user authenticating is<br />

daubman. Hence, the JAAS principal of the running servlet is daubman. The<br />

servlet calls the local EJB with a runAs role of worker. This worker role is<br />

associated with the TIWARI identity. This is done within RACF using the<br />

APPLDATA field of the EJBROLE profile. Hence, the JAAS principal of the<br />

running local EJB is TIWARI. The local EJB calls the remote EJB with runAs set<br />

to caller. This remote EJB call relies on CSIv2 identity assertion to propagate the<br />

identity in the attribute layer. Hence, the TIWARI SAF identity flows with the<br />

CSIv2 secured RMI-IIOP call. There is no password flowing. On the downstream<br />

server side, the asserted identity is validated against the user registry (RACF).<br />

Because this identity is asserted, WebSphere sets the JAAS principal of the<br />

running remote EJB to TIWARI.<br />

We now show the EJBMagic displays that confirm this scenario.<br />

Chapter 9. Security attribute propagation and CSIv2 325


After authenticating, the EJBMagic choice menu appears. Figure 9-18 shows the<br />

choice menu.<br />

Figure 9-18 EJBMagic display<br />

With our scenario, the local EJB is called by the servlet with the runAs role of<br />

worker and the remote EJB is called by the local EJB with runAs caller.<br />

The JNDI value we use for the remote EJB call is the following:<br />

corbaname::9.12.4.34:22809/NameServiceServerRoot#cell/nodes/nd6622/serv<br />

ers/ws6622/ejb/itso/em/ejb/SnoopMagicEjbHome<br />

This value tells the ejbMagic application running in the ws6611 server to pass<br />

this lookup value to WebSphere to locate the remote EJB in the ws6622 server.<br />

The 22809 port is the Boostrap port of the ws6622 server. More information<br />

about how to find the initial context is available in the InfoCenter:<br />

http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/<br />

com.ibm.websphere.zseries.doc/info/zseries/ae/rnam_example_prop1.html<br />

326 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


We then click the Let’s do some magic button.<br />

Figure 9-19 shows that the servlet JAAS principal is daubman. This is the user<br />

who authenticates to the upstream server.<br />

Figure 9-19 EJBMagic servlet information<br />

Figure 9-20 shows that the local EJB JAAS principal is TIWARI. It also shows<br />

that the caller (the servlet) identity was daubman. TIWARI is the runAs role<br />

worker identity set in the APPLDATA field of the EJBROLE RACF profile.<br />

Figure 9-20 EJBMagic local EJB information<br />

Chapter 9. Security attribute propagation and CSIv2 327


Figure 9-21 shows that the remote EJB JAAS principal is TIWARI. It also shows<br />

that the caller (the local EJB) identity was TIWARI.<br />

Figure 9-21 EJBMagic remote EJB information<br />

CSIv2 identity assertion flowed the runAs identity from the upstream server to the<br />

downstream server.<br />

9.4 Vertical attribute propagation with CSIv2<br />

This section presents vertical attribute propagation. It describes the concept, how<br />

it works, the implementation, and highlights some cross-cell considerations. It<br />

also shows the differences between CSIv2 identity assertion and vertical<br />

attribute propagation.<br />

9.4.1 Vertical attribute propagation with CSIv2 description<br />

In vertical propagation (also called downstream propagation) security attributes<br />

are propagated from an upstream server to a downstream server. The serialized<br />

security attributes, which are the JAAS Subject contents, can contain both static<br />

and dynamic attributes. Vertical attribute propagation relies on the Remote<br />

Method Invocation (RMI) over the Internet Inter-ORB Protocol (RMI over IIOP).<br />

Vertical attribute propagation can then be used when accessing Enterprise Java<br />

Beans (EJBs) running on a back-end, that is, a downstream server. The security<br />

328 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


attributes are passed to the EJB running on the downstream server by using the<br />

CSIv2 protocol that is established between the WebSphere Application Servers.<br />

Basically, vertical attribute propagation enables an upstream server to propagate<br />

the complete security context, including the client identity and other security<br />

information and tokens to a downstream server.<br />

If no attribute propagation is used, servers have to query the user registry or a<br />

custom login module to get the attributes, and this can be expensive from a<br />

performance view point.<br />

Attribute propagation has the benefit of enabling third-party providers to plug in<br />

custom tokens. It provides the ability to have multiple tokens of the same type<br />

within a JAAS subject created by different providers.<br />

CSIv2 is the authentication mechanism used for EJBs, and hence the vertical<br />

security propagation is enabled in the CSIv2 inbound and outbound panels in the<br />

administrative console.<br />

9.4.2 Vertical attribute propagation versus CSIv2 identity assertion<br />

CSIv2 identity assertion propagates the J2EE identity only (JAAS subject<br />

principal).<br />

CSIv2 identity assertion is standard. This means it can be used across J2EE<br />

vendors’ application servers.<br />

Vertical attribute propagation propagates the full security context (complete<br />

JAAS subject including the principal and credentials).<br />

Vertical attribute propagation is WebSphere specific. It relies on a WebSphere<br />

token framework. Interoperability across J2EE application servers of different<br />

vendors cannot be guaranteed. Nevertheless, WebSphere provides some login<br />

configuration (RMI_INBOUND and RMI_OUTBOUND) that can be customized to<br />

facilitate interoperability.<br />

Chapter 9. Security attribute propagation and CSIv2 329


9.4.3 Vertical attribute propagation with CSIv2 in action<br />

In this section, we describe how vertical attribute propagation works with an<br />

example. See Figure 9-22.<br />

Figure 9-22 Vertical security attribute propagation in action<br />

In this example there is no data replication service configured between server 1<br />

and server 5. The example scenario goes through the following steps:<br />

1. A user accesses a Web application in server 1. He first authenticates with<br />

server 1. This is an initial login. The user provides his credentials.<br />

2. Server 1 creates a JAAS subject with the login module.<br />

3. Server 1 creates the single sign-on token that represents this subject.<br />

330 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


4. The user request accesses a remote EJB located on server 5 with CSIv2.<br />

Server 1 serializes the complete JAAS subject content with all attributes and<br />

tokens within the RMI-IIOP request.<br />

5. Server 5 receives the request and, because tokens are found, executes a<br />

propagation login. If no token was found it would execute an initial login<br />

asking for credentials. The propagation login deserializes the complete JAAS<br />

subject content with all attributes and tokens.<br />

6. Server 5 creates the subject containing all the security context information<br />

similar to the security context in the original server 1. This hydrated subject is<br />

associated with the CSIv2 session for the following requests.<br />

9.4.4 Vertical attribute propagation with CSIv2 implementation<br />

To enable vertical propagation, you must configure CSIv2 and security attribute<br />

propagation. You can configure both of these features using the administrative<br />

console. Actually, vertical security attribute propagation is configured within the<br />

CSIv2 configuration.<br />

Refer to 9.3.4, “CSIv2 standard identity assertion implementation” on page 310<br />

for a description of the CSIv2 configuration. The CSIv2 identity assertion feature<br />

does not need to be enabled for vertical security attribute propagation. You can<br />

uncheck the Identity assertion check box.<br />

On the upstream server side:<br />

1. Launch the administrative console and log in.<br />

2. Navigate to Security → Secure administration, applications, and<br />

infrastructure. Under Authentication, click RMI/IIOP security → CSIv2<br />

outbound authentication.<br />

Chapter 9. Security attribute propagation and CSIv2 331


3. Check the option for Security attribute propagation (Figure 9-23). This<br />

option enables vertical or downstream propagation. It serializes the full<br />

security context within the RMI-IIOP call.<br />

4. Click Apply and save the configuration in the master repository.<br />

Figure 9-23 Upstream server vertical attribute propagation configuration<br />

On the downstream server side:<br />

1. Launch the administrative console and log in.<br />

2. Navigate to Security → Secure administration, applications, and<br />

infrastructure. Under Authentication, click RMI/IIOP security → CSIv2<br />

inbound authentication.<br />

332 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


3. Check the option for Security attribute propagation (Figure 9-24). This<br />

option enables vertical or downstream propagation. It deserializes the full<br />

security context within the RMI-IIOP call.<br />

4. Click Apply and save the configuration in the master repository.<br />

Figure 9-24 Downstream server vertical attribute propagation configuration<br />

With the security attribute propagation enabled, the security attributes of the<br />

originating server where the initial login occurred get propagated to the<br />

downstream server. These security attributes include any custom attributes or<br />

tokens that are set in the custom login modules in the login server.<br />

Chapter 9. Security attribute propagation and CSIv2 333


9.4.5 Cross-cell considerations<br />

Security attribute propagation relies on the usage of LTPA tokens. These tokens<br />

are encrypted using LTPA keys. By default, these keys are automatically<br />

generated and shared among all application servers in the same cell. This is the<br />

reason why all application servers in one cell are able to generate and encrypt or<br />

decrypt and read any LTPA token generated by another. Security attribute<br />

propagation happens sharing one set of LTPA keys in the cell. In a deployment<br />

manager configuration, the LTPA keys generated at the deployment manager<br />

level are automatically replicated to all servers’ members of the same cell.<br />

In a multiple cells environment, LTPA keys and security configurations are likely<br />

to be different by default and need some adjustment to be able to communicate.<br />

Refer to “Cross-cell identity propagation or single sign-on” on page 303 for how<br />

to configure LTPA keys across cells.<br />

“Cross-cell horizontal attribute propagation” on page 305 does not apply to<br />

vertical security attribute propagation because no JMX call is involved in vertical<br />

attribute propagation.<br />

334 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Chapter 10. User registries<br />

User registries or repositories are essential to security architectures. They<br />

contain critical users and groups information. WebSphere Application Server for<br />

z/OS v6.1 provides some flexible features to access different types of registries.<br />

The new federated repositories functionality extends even more its capabilities.<br />

This chapter describes the following topics:<br />

► “Introduction to user registries” on page 336<br />

► “Our scenario and our environment” on page 339<br />

► “Standalone LDAP registry” on page 340<br />

► “Federated repositories” on page 363<br />

► “z/OS local operating system registry” on page 382<br />

10<br />

© Copyright <strong>IBM</strong> Corp. 2007. All rights reserved. 335


10.1 Introduction to user registries<br />

In WebSphere Application Server for z/OS, a user registry or repository<br />

authenticates a user and retrieves information about users and groups to<br />

perform security-related functions, including authentication and authorization.<br />

The information about users and groups resides within a registry or repository.<br />

WebSphere Application Server for z/OS v6.1 provides implementations that<br />

support multiple types of registries and repositories:<br />

► Local operating system<br />

► Standalone LDAP registry<br />

► Standalone custom registry<br />

► Federated repositories<br />

With WebSphere Application Server for z/OS, a user registry or repository is<br />

used for:<br />

► Authenticating a user using basic authentication, identity assertion, client<br />

certificates, tokens<br />

► Retrieving information about users and groups to perform security-related<br />

administrative functions, such as mapping users and groups to security roles<br />

Although the WebSphere Application Server supports different types of user<br />

registries, only one user registry can be active. This active registry is shared by<br />

all of the product server processes within a cell.<br />

Local operating system registry<br />

WebSphere Application Server for z/OS uses the System Authorization Facility<br />

(SAF) interfaces. SAF interfaces are defined by z/OS to enable applications to<br />

use system authorization services or registries to control access to resources<br />

such as data sets and z/OS commands. SAF allows security authorization<br />

requests to be processed directly through the Resource Access Control Facility<br />

(RACF) or a third-party z/OS security provider.<br />

Unlike the distributed platforms, the local operating system registry on the z/OS<br />

platform can be used in a multiserver z/OS environment, since the security<br />

database can be easily shared across the sysplex. In such a configuration,<br />

multiple WebSphere z/OSs on different LPARs share the same security<br />

database.<br />

The local operating system registry on z/OS is compatible with z/OS Enterprise<br />

Information Systems such as CICS, IMS, and DB2. This is major benefit when<br />

flowing the original identity from WebSphere Application Server for z/OS to<br />

back-end EIS.<br />

336 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


When should you use a local operating system registry?<br />

► When the authenticated users are present in the local security subsystem<br />

(intranet)<br />

► When the best performance available is mandatory<br />

► When comprehensive end-to-end security is needed (user ID existing in the<br />

Web server, Web container, EJB container, and back-end system)<br />

► When good auditing support is needed<br />

► When the users and application security need to be managed by the RACF<br />

security administrators<br />

► When OS thread security or thread identity support are needed<br />

Standalone LDAP registry<br />

Lightweight Directory Access Protocol (LDAP) is widely used in a distributed<br />

environment where multiple servers need access to a central user registry. This<br />

is an option on z/OS as well.<br />

This functionality allows a more versatile WebSphere environment, making room<br />

for cross-platform integration by allowing the use of existing user registries and<br />

authorization tables with the security functions in WebSphere Application Server.<br />

LDAP servers act as a repository for user and group information. WebSphere<br />

Application Server for z/OS binds to the LDAP server to retrieve this user and<br />

group information. This support is provided by using different user and group<br />

filters. These filters are highly configurable to be able to access all sorts of LDAP<br />

servers.<br />

LDAP servers are incompatible with z/OS Enterprise Information Systems such<br />

as CICS, IMS, and DB2. Hence, some more complex steps are required to<br />

access these systems with the user identity.<br />

When should you use a LDAP registry?<br />

► When a single sign-on solution with a distributed system is needed<br />

► When a registry on other platforms should be used<br />

► When a cross-platform authentication mechanism is mandatory<br />

► When only one user identity must be maintained across multiple<br />

environments<br />

► When RACF identities have to be used on distributed platforms through a<br />

central z/OS LDAP SDBM back end.<br />

► When RACF passwords need to be checked on distributed platforms through<br />

a central z/OS LDAP TDBM back end with native authentication<br />

Chapter 10. User registries 337


Standalone custom registry<br />

A standalone custom registry is a customer-implemented registry that<br />

implements the UserRegistry Java interface, as provided by the product. A<br />

custom-implemented registry can support virtually any type of account<br />

repositories from relational databases to flat files and so on. The custom user<br />

registry provides flexibility in adapting product security to various environments<br />

where some form of a registry or repository other than federated repositories, a<br />

standalone Lightweight Directory Access Protocol (LDAP) registry, or a local<br />

operating system registry already exists in the operational environment.<br />

It allows you to plug in any kind of registry whose support is not implemented by<br />

WebSphere Application Server security.<br />

A custom registry is written as a Java program that implements a WebSphere<br />

Application Server for z/OS supplied com.ibm.websphere.security.UserRegistry<br />

interface. The implementation should not be dependent on WebSphere<br />

Application Server resources (for example, datasources).<br />

Federated repositories<br />

This registry type is new with WebSphere Application Server for z/OS v6.1.<br />

Federated repositories enable us to use simultaneously multiple repositories with<br />

WebSphere Application Server for z/OS. These repositories, which can be<br />

file-based repositories, LDAP repositories, or a sub-tree of an LDAP repository,<br />

are defined combined under a single realm. All of the user repositories that are<br />

configured under the federated repository functionality are transparent to<br />

WebSphere Application Server for z/OS.<br />

The federated repositories functionality in WebSphere Application Server for<br />

z/OS supports the logical joining of entries across multiple user repositories<br />

when the application server searches and retrieves entries from the repositories.<br />

For example, when an application calls for a sorted list of people whose age is<br />

greater than twenty, WebSphere Application Server for z/OS searches all of the<br />

repositories in the federated repositories configuration. The results are combined<br />

and sorted before the application server returns the result to the application.<br />

Unlike the local operating system, standalone LDAP registry, or custom registry<br />

options, federated repositories provide user and group management with read<br />

and write capabilities. If you do not configure the federated repositories<br />

functionality or do not enable federated repositories as the active repository, you<br />

cannot use the user management capabilities that are associated with federated<br />

repositories.<br />

More information about federated repositories is provided in 10.4.1, “What<br />

federated repositories are” on page 363.<br />

338 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


10.2 Our scenario and our environment<br />

This chapter focuses on showing how to configure WebSphere Application<br />

Server for z/OS with different registry types. For this purpose we define a LDAP<br />

tree whose goal is to be accessed by WebSphere Application Server for z/OS in<br />

different manners, illustrating typical WebSphere configurations. This LDAP tree<br />

is shown in Figure 10-1.<br />

Figure 10-1 Our scenario LDAP tree and supporting LDAP servers<br />

Chapter 10. User registries 339


This LDAP tree common root organization is o=itso. This LDAP tree possess<br />

three organization units, which are ou=itsoitds, ou=itsotdbm, and ou=itsoracf, as<br />

follows:<br />

► The itsoitds organization unit is supported by a <strong>IBM</strong> Tivoli Directory Server v6<br />

(ITDS). DB2 v8.2 is used as a back end. This server runs on a Windows<br />

server. The suffix of this subtree is ou=itsoitds,o=itso.<br />

► The itsotdbm organization unit is supported by a z/OS LDAP TDBM server.<br />

DB2 z/OS v8 is used as a back end. This server runs on z/OS v1r8. The suffix<br />

of this subtree is ou=itsotdbm,o=itso. This server has one user configured for<br />

native authentication, which means that his password is checked against the<br />

RACF database.<br />

► The itsoracf organization unit is supported by a z/OS LDAP SDBM server.<br />

The RACF database is used as a back end. This server runs on z/OS v1r8.<br />

The suffix of this subtree is ou=itsoracf,o=itso.<br />

These organization units possess one or two users.<br />

In this chapter we describe how to configure WebSphere Application Server for<br />

z/OS v6.1 to use some parts of this LDAP tree as a user registry. More<br />

specifically we explain how to configure:<br />

► A standalone LDAP registry with WebSphere and z/OS LDAP SDBM back<br />

end (RACF).<br />

► A standalone LDAP registry with WebSphere and z/OS LDAP TDBM back<br />

end (DB2).<br />

► A standalone LDAP registry with WebSphere and z/OS LDAP TDBM native<br />

authentication.<br />

► A federated repositories including Federated z/OS LDAP with TDBM back<br />

end (DB2) and Federated <strong>IBM</strong> Tivoli Directory Server.<br />

10.3 Standalone LDAP registry<br />

The Standalone LDAP registry feature in WebSphere Application Server for z/OS<br />

v6.1 is similar to the LDAP registry feature existing in v5 and v6.0.<br />

In this section we show how to configure the WebSphere Standalone LDAP<br />

registry with z/OS LDAP SDBM, with z/OS LDAP TDBM with Native<br />

Authentication or not, and with ITDS.<br />

340 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


10.3.1 WebSphere and z/OS LDAP SDBM back end (RACF)<br />

z/OS LDAP can handle many different types of back ends. One of them is SDBM,<br />

and it uses the RACF database as a data repository.<br />

With a SDBM back end, RACF user profiles, group profiles, and user to groups<br />

connections appear as LDAP entries with distinguished name to LDAP clients. All<br />

binds are authenticated with a RACF distinguished name and a RACF password.<br />

z/OS LDAP SDBM supports add, modify, delete, and search operations. The<br />

access controls for user and group profiles are the RACF privileges of the<br />

authenticated user.<br />

z/OS LDAP SDBM configuration<br />

The z/OS LDAP installation is described in Distributed Security and High<br />

Availability with Tivoli Access Manager and WebSphere Application Server for<br />

z/OS, SG24-6760. In this section we focus on the configuration part.<br />

1. For configuring z/OS LDAP with an SDBM back end, find the LDAP<br />

configuration that should be in the SLAPDCNF member of the LDAP<br />

customization data set. In our environment, the z/OS LDAP configuration file<br />

is WTSC58.LDAP1.CNTL(SLAPDCNF). In this LDAP configuration file,<br />

uncomment or set up the following parameters:<br />

database sdbm GLDBSDBM<br />

suffix "ou=itsoracf,o=itso"<br />

where the suffix is the top of the LDAP tree you want for your organization.<br />

We choose ou=itsoracf,o=itso in our environment. The suffix does not<br />

necessarily need to have an organization unit (ou=). It may contain an<br />

organization only (o=).<br />

Example 10-1 shows an extract of our z/OS LDAP configuration for using a<br />

SDBM back end.<br />

Example 10-1 z/OS LDAP configuration with a SDBM back end<br />

listen ldap://:3389<br />

maxConnections 60<br />

adminDN "cn=LDAP Administrator"<br />

adminPW "secret"<br />

# SDBM-specific CONFIGURATION SETTINGS<br />

database sdbm GLDBSDBM<br />

suffix "ou=itsoracf,o=itso"<br />

Chapter 10. User registries 341


2. Restart the z/OS LDAP server from SDSF, for instance. If your LDAP server is<br />

configured properly with a SDBM back end, there should be a message<br />

similar to Example 10-2 in the LDAP log at startup.<br />

Example 10-2 z/OS LDAP log with a SDBM back end<br />

Backend type: sdbm, Backend ID: SDBM BACKEND<br />

SDBM BACKEND manages the following suffixes:<br />

Backend suffix: OU=ITSORACF,O=ITSO<br />

End of suffixes managed by SDBM BACKEND.<br />

Capability: LDAP_Backend_ID Value: SDBM BACKEND<br />

Capability: LDAP_Backend_BldDateTime Value:<br />

2006-04-18-15.18.14.000000<br />

Capability: LDAP_Backend_APARLevel Value: OA15948<br />

Capability: LDAP_Backend_Release Value: R 6.0<br />

Capability: LDAP_Backend_Version Value: V 1.0<br />

Capability: LDAP_Backend_Dialect Value: DIALECT 1.0<br />

Capability: LDAP_Backend_BerDecoding Value: STRING<br />

Capability: LDAP_Backend_ExtGroupSearch Value: YES<br />

Capability: LDAP_Backend_krbIdentityMap Value: YES<br />

Capability: supportedControl Value: 2.16.840.1.113730.3.4.2<br />

Capability: supportedControl Value: 1.3.18.0.2.10.2<br />

End of capability listing for Backend type: sdbm, Backend ID: SDBM<br />

BACKEND.<br />

Backend capability listing ended.<br />

Configuration file successfully read.<br />

3. We now validate that the SDBM is functional by accessing it from an LDAP<br />

client.<br />

The native LDAP commands are cumbersome to run from UNIX System<br />

Services. A simpler way to access LDAP is to use an independently<br />

developed LDAP browser client, which you can download from:<br />

http://www-unix.mcs.anl.gov/~gawor/ldap/<br />

Configure the LDAP client connection such as the following:<br />

Host : wtsc58.itso.ibm.com<br />

Port : 3389<br />

Base DN : ou=itsoracf,o=itso<br />

User DN : racfid=valence,profiletype=user,ou=itsoracf,o=itso<br />

User password : xxxxxxx<br />

The SDBM schema requires the RACF user distinguished name to follow this<br />

template:<br />

racfid=,profiletype=user,<br />

342 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


The RACF user ID being used (valence in our example) must have the proper<br />

access to list users and groups from the RACF database. It should be a<br />

RACF user ID with the AUDITOR attribute, a valid OMVS segment (specific<br />

or implied by a defaulted segment), and it does not need a TSO segment.<br />

See Figure 10-2.<br />

Figure 10-2 LDAP client connection configuration for SDBM back end<br />

Using this configuration, we access the RACF content displayed as an LDAP<br />

tree. All the RACF user IDs and groups can be accessed. See Figure 10-3.<br />

Figure 10-3 LDAP client showing z/OS LDAP SDBM back-end (RACF) content<br />

Chapter 10. User registries 343


WebSphere z/OS configuration for z/OS LDAP SDBM<br />

WebSphere Application Server for z/OS supports accessing z/OS LDAP with a<br />

SDBM back end (RACF) when configured as a Standalone LDAP registry. In this<br />

section we explain how to configure WebSphere in order to access z/OS LDAP<br />

SDBM.<br />

1. Within the administrative console, click Security → Secure administration,<br />

applications and infrastructure. Under User account repository, select<br />

Standalone LDAP registry and then click Set as current. The Standalone<br />

LDAP registry then appears in the Current realm definition field (Figure 10-4).<br />

Figure 10-4 WebSphere user account repository<br />

Verify that administrative security is enabled and also that application security<br />

is enabled if necessary. Click Apply on this page to keep these settings.<br />

2. Click Configure and set up the general properties for the z/OS LDAP server:<br />

– Primary administrative user name: This ID is the security server ID, which<br />

is only used for WebSphere Application Server administrative security and<br />

is not associated with the system process that runs the server. We use<br />

racfid=valence,profiletype=user,ou=itsoracf,o=itso in our environment.<br />

This primary user name will be used to log on to the administrative<br />

console, for example.<br />

– Server user identity: Select Automatically generated server identity in a<br />

WebSphere 6.1 only environment.<br />

– Type of LDAP server: Select Custom.<br />

– Host and port: Enter the full DNS host name and TCP port to access z/OS<br />

LDAP. We use wtsc58.itso.ibm.com and 3389 in our environment.<br />

– Base distinguished name (DN): The base DN indicates the starting point<br />

for searches in this LDAP directory server. It is the suffix ou=itsoracf,o=itso<br />

in our environment.<br />

– Bind distinguished name (DN) and password: The bind DN is required if<br />

anonymous binds are not possible on the LDAP server to obtain user and<br />

group information. We use<br />

racfid=mogos,profiletype=user,ou=itsoracf,o=itso in our environment. This<br />

344 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


is a technical user identity to connect to LDAP. This identity is allowed to<br />

list RACF users and groups.<br />

– Make sure that Ignore case for authorization is selected. RACF user<br />

names and group names are not case-sensitive.<br />

Then click Apply.<br />

Figure 10-5 WebSphere configuration for z/OS LDAP SDBM<br />

Chapter 10. User registries 345


3. In the same window, under Additional Properties, click Advanced<br />

Lightweight Directory Access Protocol (LDAP) user registry setting and<br />

configure the properties:<br />

– Change user filter and group filter to racfid=%v.<br />

– Change user ID map and group ID map to *:racfid.<br />

– Change group member ID map to<br />

racfconnectgroupname:racfgroupuserids.<br />

Click OK.<br />

Figure 10-6 WebSphere advanced configuration for z/OS LDAP SDBM<br />

4. Save the changes in the master repository and restart WebSphere<br />

Application Server for z/OS.<br />

WebSphere and z/OS LDAP SDBM back-end validation<br />

After restarting WebSphere Application Server for z/OS, log in to the<br />

administration console with the primary administrative user name defined earlier.<br />

It is possible to use the full distinguished name<br />

(racfid=valence,profiletype=USER,ou=itsoracf,o=itso in our example) or the user<br />

name only (valence). The user name only is a RACF identity.<br />

346 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


It is also possible to validate the user registry being used with the snoop servlet,<br />

which is bundled in WebSphere for z/OS. With application security enabled, the<br />

snoop servlet requires basic authentication. Call the snoop with a URL such as<br />

the following:<br />

http://wtsc58.itso.ibm.com:49080/snoop/<br />

Authenticate providing a z/OS LDAP SDBM user name and password (RACF<br />

user name and password) (Figure 10-7). The snoop servlet then appears and<br />

shows the authenticatedprincipal.<br />

Figure 10-7 Snoop servlet authentication with a RACF user ID<br />

Once authenticated, the snoop servlet displays lots of information and more<br />

specifically the authenticated user (valence in our example). See Figure 10-8.<br />

Figure 10-8 Snoop servlet showing authenticated RACF user ID<br />

Chapter 10. User registries 347


WebSphere, LDAP SDBM, and SAF authorization<br />

When LDAP is the configured user registry it is common to bind users and<br />

groups to J2EE roles at application deploy time. Bindings to administrative and<br />

naming roles are usually done through the admin console. These bindings are<br />

referred to as WebSphere bindings. In the case of LDAP SDBM, all users and<br />

groups need to be existing RACF identities.<br />

z/OS has a strong tradition in security and security administration. RACF<br />

administrators might not agree with the fact that a deployer (or even the<br />

development team, if users and groups are already mapped to J2EE roles in the<br />

applications’ descriptors) has the authority to decide which RACF group or user<br />

ID can be authorized to which J2EE role. The mapping of users and groups to<br />

roles at deploytime, or searching for users and groups in the RACF database, is<br />

done under credentials of the bind distinguished name (BDN), which the user ID<br />

must have the AUDITOR attribute for. Therefore audit trails only lead to that BDN<br />

identity, not the identity of the deployer.<br />

This section describes how to set up SAF authorization as an alternative to<br />

WebSphere bindings in combination with LDAP SDBM as the configured user<br />

registry.<br />

Note: SAF authorization combined with LDAP SDBM UR has been<br />

successfully tested on WebSphere for z/OS v6.0.2. Configuration steps are<br />

described for v6.0.2, but are similar to v6.1. Differences between the two<br />

versions are highlighted.<br />

Only a few steps are required to configure SAF authorization:<br />

1. Configure WebSphere to use SAF authorization:<br />

– v6.0: Go to Security → Global Security. Under User registries choose<br />

LDAP → custom properties. Set the value of<br />

com.ibm.security.SAF.authorization to true.<br />

– v6.1: Go to Security → Secure administration, applications, and<br />

infrastructure → External authorization providers. Select the System<br />

Authorization Facility (SAF) authorization radio button.<br />

A key component in configuring SAF authorization in combination with LDAP<br />

SDBM authentication is a mapping module. The function of such a module is<br />

to map the LDAP distinguished name to a SAF identity. There is no need to<br />

write such a JAAS module yourself. The SampleSAFMappingModule is<br />

provided in the WebSphere run time (v6.0: in wssec.jar, v6.1: in<br />

com.ibm.ws.runtime_6.1.0.jar) and functions perfectly in combination with<br />

LDAP SDBM provided credentials. In an LDAP SDBM constructed DN, the<br />

348 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


SAF ID is already part of the DN. LTPA is assumed to be the authentication<br />

mechanism. SWAM has been deprecated as of v6.1.<br />

2. Add SampleSAFMappingModule to JAAS login. This configuration is identical<br />

in V6.0 and V6.1. Only the admin console path is different.<br />

– v6.0: Go to Security → Global Security.<br />

– v6.1: Go to Security → Secure administration, applications, and<br />

infrastructure. Under Authentication expand JAAS Configuration on<br />

v6.0 and Java Authentication and Authorization Service on v6.1.<br />

Click System Logins.<br />

3. Modify DEFAULT, RMI_INBOUND, and WEB_INBOUND. Modification is<br />

identical for all three system login configurations. Make sure that you alter all<br />

three of them. Click the Alias name, click JAAS login modules, click New.<br />

For the module class name enter<br />

com.ibm.websphere.security.SampleSAFMappingModule and check the Use<br />

login module proxy check box. Verify that the authentication strategy is set<br />

to REQUIRED. Click OK. The SampleSAFMappingModule needs to be<br />

searched just before the MapPlatformSubject module. The ltpaLoginModule<br />

is at search order one. The MapPlatformSubject should occupy the last<br />

position. Since a newly added login module is always placed at the last<br />

position, we need to change the login module search order. Click Set Order.<br />

Select the just added<br />

com.ibm.websphere.security.SampleSAFMappingModule and click the<br />

Move up button, then click OK. See Figure 10-9.<br />

Figure 10-9 Change login module load order (WAS v6.0.2 illustration)<br />

4. Verify that SampleSAFMappingModule is loaded just before<br />

MapPlatformSubject by looking at the module order number. In this case<br />

Chapter 10. User registries 349


SampleSAFMappingModule is in search order 3, as shown in Figure 10-10.<br />

You can also click the Module order column to have the login modules<br />

displayed in ascending search order.<br />

Figure 10-10 JAAS login modules on a system login alias (WAS v6.0.2 illustration)<br />

5. Make sure that the EJBROLE class is active and RACLISTed. Optionally,<br />

configure the grouping class GEJBROLE. Define all administrative and<br />

naming roles as explained in 13.1.3, “Administrative security with SAF<br />

authorization” on page 450, and 13.3.2, “Mapping users or groups to<br />

CosNaming roles” on page 468, and permit the appropriate user IDs and<br />

groups to the profiles. If you already have applications deployed, examine the<br />

J2EE roles and define them as well in the EJBROLE class, with the<br />

appropriate access list. Both administrative and application security must be<br />

enabled. Remove all WebSphere bindings from the configuration. If you are<br />

migrating from WebSphere bindings to SAF authorization (SAF bindings), we<br />

recommend that you define all EJBROLE class profiles and permits in<br />

advance.<br />

Now bring down the cell or base server and restart. One difference between<br />

WebSphere and SAF bindings to be aware off is the possibility that more than<br />

one application could specify the same J2EE role name. In the case of SAF<br />

bindings, authorization checks to the roles in those applications would result in a<br />

SAF call to one and the same profile in the EJBROLE class, and therefore would<br />

grant access to all applications with identical role names. In the case of<br />

WebSphere bindings the mapping is at application level. We always recommend<br />

having development discuss role naming with RACF security administrators.<br />

10.3.2 WebSphere and z/OS LDAP TDBM back end (DB2)<br />

z/OS LDAP can handle many different types of back ends. One of them is TDBM,<br />

and it uses DB2 z/OS as a data repository.<br />

350 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


z/OS LDAP TDBM configuration<br />

The z/OS LDAP installation is described in Distributed Security and High<br />

Availability with Tivoli Access Manager and WebSphere Application Server for<br />

z/OS, SG24-6760. In this section we focus on the configuration part.<br />

1. For configuring z/OS LDAP with an TDBM back end, find the LDAP<br />

configuration that should be in the SLAPDCNF member of the LDAP<br />

customization data set. In our environment, the z/OS LDAP configuration file<br />

is WTSC58.LDAP1.CNTL(SLAPDCNF). In this LDAP configuration file,<br />

uncomment or set up the following parameters:<br />

database tdbm GLDBTDBM<br />

suffix "ou=itsotdbm,o=itso"<br />

servername DB2B<br />

dbuserid GLDSRV<br />

databasename GLDDB<br />

dsnaoini WTSC58.LDAP1.CNTL(DSNAOINI)<br />

attroverflowsize 255<br />

where the suffix is the top of the LDAP tree that you want for your<br />

organization. We choose ou=itsotdbm,o=itso in our environment. the suffix<br />

does not necessarily need to have an organization unit (ou=). It may contain<br />

an organization only (o=). The DB2 back-end configuration refers to the DB2<br />

setup made at z/OS LDAP installation time.<br />

Example 10-3 shows an extract of our z/OS LDAP configuration for using a<br />

TDBM back end.<br />

Example 10-3 z/OS LDAP configuration with a TDBM back end<br />

listen ldap://:3389<br />

maxConnections 60<br />

adminDN "cn=LDAP Administrator"<br />

adminPW "secret"<br />

# TDBM-specific CONFIGURATION SETTINGS<br />

database tdbm GLDBTDBM<br />

suffix "ou=itsotdbm,o=itso"<br />

servername DB2B<br />

dbuserid GLDSRV<br />

databasename GLDDB<br />

dsnaoini WTSC58.LDAP1.CNTL(DSNAOINI)<br />

attroverflowsize 255<br />

Chapter 10. User registries 351


2. Restart the z/OS LDAP server from SDSF, for instance. If your LDAP server is<br />

configured properly with a TDBM back end, there should be a message<br />

similar to Example 10-4 in the LDAP log at startup.<br />

Example 10-4 z/OS LDAP log with a TDBM back end<br />

Backend type: tdbm, Backend ID: TDBM BACKEND<br />

TDBM BACKEND manages the following suffixes:<br />

Backend suffix: OU=ITSOTDBM,O=ITSO<br />

End of suffixes managed by TDBM BACKEND.<br />

Capability: LDAP_Backend_ID Value: TDBM BACKEND<br />

Capability: LDAP_Backend_BldDateTime Value:<br />

2006-07-25-22.56.16.000000<br />

Capability: LDAP_Backend_APARLevel Value: OA17138<br />

Capability: LDAP_Backend_Release Value: R 6.0<br />

Capability: LDAP_Backend_Version Value: V 1.0<br />

Capability: LDAP_Backend_Dialect Value: DIALECT 1.0<br />

Capability: LDAP_Backend_BerDecoding Value: BINARY<br />

Capability: LDAP_Backend_ExtGroupSearch Value: YES<br />

Capability: LDAP_Backend_krbIdentityMap Value: YES<br />

Capability: supportedControl Value: 2.16.840.1.113730.3.4.2<br />

Capability: supportedControl Value: 1.3.18.0.2.10.2<br />

...<br />

Capability: LDAP_Backend_SupportedCapabilities Value:<br />

1.3.18.0.2.32.3<br />

Capability: LDAP_Backend_SupportedCapabilities Value:<br />

1.3.18.0.2.32.31<br />

...<br />

Capability: LDAP_Backend_EnabledCapabilities Value: 1.3.18.0.2.32.31<br />

End of capability listing for Backend type: tdbm, Backend ID: TDBM<br />

BACKEND.<br />

3. Copy the following files to the LDAP working directory /etc/ldap:<br />

– /usr/lpp/ldap/etc/schema.user.ldif<br />

– /usr/lpp/ldap/etc/schema.<strong>IBM</strong>.ldif<br />

4. Edit these files and change the line cn=schema, to reflect the TDBM<br />

suffix that is defined in the z/OS LDAP configuration file. For example:<br />

dn: cn=schema,ou=itsotdbm,o=itso<br />

Attention: There are no spaces between the comma (,) and o=. Those<br />

schema files contain the objects and attributes used to organize data<br />

following <strong>IBM</strong> schema and for the SAF native authentication object class.<br />

352 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


5. From Unix System Services, use the ldapmodify command to load the<br />

schema files into z/OS LDAP:<br />

ldapmodify -h wtsc58 -p 3389 -D "cn=LDAP Administrator" -w secret -f<br />

/etc/ldap/schema.user.ldif<br />

ldapmodify -h wtsc58 -p 3389 -D "cn=LDAP Administrator" -w secret -f<br />

/etc/ldap/schema.<strong>IBM</strong>.ldif<br />

Load schema.user.ldif followed by schema.<strong>IBM</strong>.ldif. The options here are:<br />

– -h host name: defines the host name where LDAP is running<br />

– -p portnumber: defines the port on which LDAP is listening<br />

– -D adminDN: defines the administrator distinguished name (DN)<br />

– -w password: administrator password<br />

6. We now add entries to the z/OS LDAP with a TDBM back end because it is<br />

empty. We add a suffix entry and a person entry. For this purpose create a<br />

new schema.suffix.ldif that contains the following:<br />

dn: ou=itsotdbm,o=itso<br />

objectclass: organizationalUnit<br />

objectclass:top<br />

ou: itsotdbm<br />

dn: cn=UserTdbm,ou=itsotdbm,o=itso<br />

objectClass: inetOrgPerson<br />

objectClass: ePerson<br />

objectClass: organizationalPerson<br />

objectClass: person<br />

objectClass: top<br />

cn: UserTdbm<br />

uid: UserTdbm<br />

sn: 2006<br />

description: Test user for TDBM<br />

Customize the above entries to match your suffix and the user name you want<br />

for a first user.<br />

Use a command similar to the following to add the entries to the LDAP tree:<br />

ldapadd -h wtsc58 -p 3389 -D "cn=LDAP Administrator" -w secret -f<br />

schema.suffix.ldif<br />

7. We set up a password for the above new user creating a file called<br />

user.password.ldif, which contains the following:<br />

dn: cn=UserTdbm,ou=itsotdbm,o=itso<br />

changetype:modify<br />

replace:userpassword<br />

userpassword: usertdbm<br />

Chapter 10. User registries 353


Use a command similar to the following to modify the user entry in the LDAP<br />

tree:<br />

ldapmodify -h wtsc58 -p 3389 -D "cn=LDAP Administrator" -w secret -f<br />

user.password.ldif<br />

8. We now validate that the TDBM is functional by accessing it from an LDAP<br />

client.<br />

The native LDAP commands are cumbersome to run from UNIX System<br />

Services. A simpler way to access LDAP is to use an independently<br />

developed LDAP browser client, which you can download from:<br />

http://www-unix.mcs.anl.gov/~gawor/ldap/<br />

Configure the LDAP client connection such as the following:<br />

– Host: wtsc58.itso.ibm.com<br />

– Port: 3389<br />

– Base DN: ou=itsotdbm,o=itso<br />

– User DN: cn=LDAP Administrator<br />

– User password: secret<br />

Figure 10-11 LDAP client connection configuration for TDBM back end<br />

354 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Using this configuration we access the z/OS LDAP TDBM content. We can<br />

see the suffix entry and the UserTdbm entry. See Figure 10-12.<br />

Figure 10-12 LDAP client showing z/OS LDAP TDBM back-end content<br />

WebSphere z/OS configuration for z/OS LDAP TDBM<br />

WebSphere Application Server for z/OS supports accessing z/OS LDAP with a<br />

TDBM back end (DB2) when configured as a Standalone LDAP registry. In this<br />

section we explain how to configure WebSphere in order to access z/OS LDAP<br />

TDBM.<br />

1. Within the administrative console, click Security → Secure administration,<br />

applications and infrastructure. Under User account repository, select<br />

Standalone LDAP registry and then click Set as current. The Standalone<br />

LDAP registry then appears in the Current realm definition field<br />

(Figure 10-13).<br />

Figure 10-13 WebSphere user account repository<br />

Verify that administrative security is enabled and also the application security<br />

is enabled if necessary. Click Apply on this page to keep these settings.<br />

2. Click Configure and set up the general properties for the z/OS LDAP server:<br />

– Primary administrative user name: This ID is the security server ID, which<br />

is only used for WebSphere Application Server security and is not<br />

associated with the system process that runs the server. We use<br />

Chapter 10. User registries 355


cn=UserTdbm,ou=itsotdbm,o=itso in our environment. This primary user<br />

name will be used to log on to the administration console, for example.<br />

– Server user identity: Select Automatically generated server identity in a<br />

WebSphere 6.1 only environment.<br />

– Type of LDAP server: Select <strong>IBM</strong> Tivoli Directory Server. This choice set<br />

up the default filters for retrieving users and groups in the Advanced<br />

Lightweight Directory Access Protocol (LDAP) user registry settings.<br />

– Host and port: Enter the full DNS host name and TCP port to access z/OS<br />

LDAP. We use wtsc58.itso.ibm.com and 3389 in our environment.<br />

– Base distinguished name (DN): The base DN indicates the starting point<br />

for searches in this LDAP directory server. It is ou=itsotdbm,o=itso in our<br />

environment.<br />

– Bind distinguished name (DN) and password: The bind DN is required if<br />

anonymous binds are not possible on the LDAP server to obtain user and<br />

group information. We use cn=LDAP Administrator in our environment.<br />

356 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Then click Apply.<br />

Figure 10-14 WebSphere configuration for z/OS LDAP TDBM<br />

3. Save changes in the master repository and restart WebSphere Application<br />

Server for z/OS.<br />

Chapter 10. User registries 357


WebSphere and z/OS LDAP TDBM back-end validation<br />

After restarting WebSphere Application Server for z/OS, log in to the<br />

administration console with the primary administrative user name defined earlier.<br />

It is possible to use the full distinguished name<br />

(cn=UserTdbm,ou=itsotdbm,o=itso) or the user name only (usertdbm). Using our<br />

ldif file, the password is usertdbm also.<br />

Also, it is possible to validate the user registry being used with the snoop servlet,<br />

which is bundled in WebSphere for z/OS. With the application security enabled,<br />

the snoop servlet requires basic authentication. Call the snoop servlet with a<br />

URL such as the following:<br />

http://wtsc58.itso.ibm.com:49080/snoop/<br />

358 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Authenticate providing the user name and password defined earlier. The snoop<br />

servlet then appears and shows the authenticated principal. Once authenticated,<br />

the snoop servlet displays lots of information and more specifically the<br />

authenticated user (usertdbm in our example). See Figure 10-15.<br />

Figure 10-15 Snoop servlet showing authenticated z/OS LDAP TDBM user ID<br />

10.3.3 WebSphere and z/OS LDAP TDBM native authentication<br />

LDAP has the ability to authenticate to RACF through TDBM by supplying a<br />

RACF password on a simple bind to a TDBM back end. Authorization information<br />

is still gathered by the LDAP server based on the distinguished name that<br />

performed the bind operation. The LDAP entry that contains the bind DN should<br />

contain either the ibm-nativeId attribute or uid attribute to specify the ID that is<br />

associated with this entry. Note that the SDBM back end does not have to be<br />

configured. The ID and password are passed to RACF, and the verification of the<br />

password is performed by RACF. Another feature of native authentication is the<br />

ability to change your RACF password by issuing an LDAP modify command.<br />

Chapter 10. User registries 359


Why should you enable native authentication?<br />

► You have the need for a central user registry with RACF identities (single<br />

sign-on).<br />

► You want the ability to reuse RACF user IDs and passwords using an LDAP<br />

interface.<br />

► You are looking to front-end WebSphere Application Server for z/OS with a<br />

security product like Tivoli Access Manager.<br />

z/OS LDAP TDBM native authentication configuration<br />

First configure LDAP z/OS with a TDBM back end, as described in 10.3.2,<br />

“WebSphere and z/OS LDAP TDBM back end (DB2)” on page 350.<br />

Additional modification is needed in the LDAP configuration file. Specify the<br />

native authentication options in this configuration file in the TDBM section. To do<br />

this, uncomment the following directives:<br />

► useNativeAuth: This line defines which attribute uses native authentication.<br />

We use the selected value, which means that only the ibm-nativeId attribute is<br />

subject to native authentication.<br />

► nativeUpdateAllowed: This defines whether LDAP can modify attributes such<br />

as the password for the native authentication system. We choose on.<br />

► nativeAuthSubtree: This defines in which subtree in the LDAP tree native<br />

authentication occurs.<br />

Example 10-5 shows an extract of our z/OS LDAP configuration for using<br />

native authentication with a TDBM back end.<br />

Example 10-5 z/OS LDAP configuration for native authentication<br />

listen ldap://:3389<br />

maxConnections 60<br />

adminDN "cn=LDAP Administrator"<br />

adminPW "secret"<br />

# TDBM-specific CONFIGURATION SETTINGS<br />

database tdbm GLDBTDBM<br />

suffix "ou=itsotdbm,o=itso"<br />

servername DB2B<br />

dbuserid GLDSRV<br />

databasename GLDDB<br />

dsnaoini WTSC58.LDAP1.CNTL(DSNAOINI)<br />

attroverflowsize 255<br />

useNativeAuth selected<br />

nativeUpdateAllowed on<br />

360 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Restart the LDAP server to activate these configuration modifications. You<br />

should now see the following message in the LDAP JOBLOG:<br />

The useNativeAuth configuration option SELECTED has been enabled.<br />

When using the TDBM back end for native authentication, users need to have<br />

the ibm-nativeAuthentication objectclass and ibm-nativeId attribute. If you have<br />

existing users in your LDAP TDBM back end, you need to modify their definition<br />

to include the ibm-nativeAuthentication objectclass and ibm-nativeId attribute.<br />

For our configuration we create a new user with such an attribute and objectclass<br />

using a file called newuser.ldif, which contains the following:<br />

dn: cn=valence,ou=itsotdbm,o=itso<br />

objectClass: inetOrgPerson<br />

objectClass: ePerson<br />

objectClass: organizationalPerson<br />

objectClass: person<br />

objectClass: top<br />

cn: valence<br />

uid: valence<br />

sn: 2006<br />

description: Test user for TDBM Native<br />

ibm-nativeId: VALENCE<br />

objectclass: ibm-nativeAuthentication<br />

Use a command similar to the following to add the entries to the LDAP tree:<br />

ldapadd -h wtsc58 -p 3389 -D "cn=LDAP Administrator" -w secret -f<br />

newuser.ldif<br />

This ldif entry does not have any password. The password will be verified against<br />

the VALENCE entry in the RACF database.<br />

The ibm-nativeId attribute specifies the user ID to which the entry binds to in the<br />

RACF database. In this example, the valence LDAP entry binds to the user<br />

VALENCE in the RACF database.<br />

Chapter 10. User registries 361


Using the z/OS LDAP TDBM connection configuration for the LDAP client, we<br />

access the z/OS LDAP TDBM content. We can see the new user entry with the<br />

proper objectcall and attribute (Figure 10-16).<br />

Figure 10-16 LDAP client showing z/OS LDAP TDBM native authentication entry<br />

WebSphere z/OS configuration for LDAP native authentication<br />

From a WebSphere Application Server for z/OS perspective, using native<br />

authentication with z/OS LDAP is transparent.<br />

Consequently, the configuration is the same as with no native authentication.<br />

Refer to 10.3.2, “WebSphere and z/OS LDAP TDBM back end (DB2)” on<br />

page 350 for configuring WebSphere.<br />

WebSphere z/OS and LDAP native authentication validation<br />

We validate the user registry used with the snoop servlet, which is bundled in<br />

WebSphere for z/OS. With application security enabled, the snoop servlet<br />

requires basic authentication. Call the snoop servlet with a URL such as the<br />

following:<br />

http://wtsc58.itso.ibm.com:49080/snoop/<br />

362 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Authenticate providing the user name and password defined earlier with the<br />

native authentication attribute and objectclass. The distinguished name<br />

(cn=valence,ou=itsotdbm,o=itso) or the common name only (valence) can be<br />

used. The RACF password corresponding to the ibm-nativeId attribute has to be<br />

provided. If the common name and the ibm-nativeId match, credentials provided<br />

are RACF credentials. The snoop servlet then appears and shows the<br />

authenticated principal. See Figure 10-17.<br />

Figure 10-17 Snoop servlet showing authenticated z/OS LDAP TDBM native<br />

authentication user ID<br />

10.4 Federated repositories<br />

Federated repositories is a new feature provided with WebSphere Application<br />

Server for z/OS v6.1. Federated repositories allows, for example, you to access<br />

simultaneously intranet users and Internet users stored in different registries. In<br />

this section, we describe what federated repositories are and we show how to<br />

configure federated repositories with our scenario.<br />

10.4.1 What federated repositories are<br />

Inclusion of federated repositories in this WebSphere release provides a single<br />

model for managing organizational entities. You can configure a realm that<br />

consists of identities in the file-based repository that is built into the system, in<br />

one or more external repositories, or in both the built-in, file-based repository and<br />

in one or more external repositories.<br />

Chapter 10. User registries 363


Currently, most WebSphere applications have their own models and<br />

components for managing organizational entities, and they provide different<br />

levels of security. Most applications are dependent on specific types and brands<br />

of repositories, assume a specific schema for the data in those repositories, and<br />

are not able to use repositories with existing data. Federated repositories helps<br />

these applications by providing them with a common model, secure access to<br />

various brands and types of repositories, and the ability to use repositories with<br />

existing data. The single model includes a set of organizational entity types and<br />

their properties, a repository-independent application programming interface<br />

(API), and a service provider programming interface (SPI) for plugging in<br />

repositories. XPath is chosen as the search language in the API and SPI.<br />

Federated repository configuration uses multiple repositories simultaneously and<br />

recognizes the entries in the different repositories as entries representing distinct<br />

entities. By configuring an entry mapping repository, a federated repository<br />

configuration can use both LDAP and the database at the same time. The<br />

federated repository configuration hierarchy and constraints for identifiers<br />

provide the aggregated namespace for both of those repositories and prevent<br />

identifiers from colliding.<br />

A federated repository configuration provides a property extension repository,<br />

which is a database regardless of the type of main profile repositories for a<br />

property-level join configuration. When an application uses the federated<br />

repository configuration to retrieve an entry for a person, the federated repository<br />

configuration transparently joins the properties of the person that is retrieved<br />

from either the LDAP or the customer’s database with the properties of the<br />

person that is retrieved from the property extension repository into a single<br />

logical person entry.<br />

When you configure a property extension repository, you can supply a valid data<br />

source, a direct connection configuration, or both. WebSphere first tries to<br />

connect by way of the data source. If the data source is not available, then the<br />

system uses the direct access configuration.<br />

364 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Figure 10-18 presents the WebSphere federated repositories architecture<br />

overview. The federated repository feature is also called Virtual Member<br />

Manager (VMM).<br />

Figure 10-18 Federated repositories or Virtual Member Manager architecture overview<br />

Federated repositories supports multiple user repositories in the cell’s security<br />

realm:<br />

► Built-in file-based repository<br />

► Multiple federated LDAP servers<br />

► Database that can be federated by CLI<br />

The federation creates a single namespace for identities. Database<br />

repositories are supported using the command line only.<br />

Chapter 10. User registries 365


Also, federated repositories provides some user and group management<br />

features. This is possible because federated repository is accessed with read<br />

and write permissions. This user and group management is available through the<br />

administrative console, through command-line utilities, or using public APIs.<br />

Table 10-1 Federated repositories versus other user registry options<br />

Supported registries File-based<br />

LDAP<br />

DB (via wsadmin)<br />

Simultaneous<br />

multi-registry support<br />

Registry read/write<br />

support<br />

When you use the federated repositories functionality, all of the configured<br />

repositories, which you specify as part of the federated repository configuration,<br />

become active. It is required that the user ID, and the distinguished name (DN)<br />

for an LDAP repository, be unique in multiple user repositories that are<br />

configured under the same federated repository configuration.<br />

10.4.2 Our federated repositories scenario<br />

Federated repositories Other user registry<br />

options<br />

Yes No<br />

Read/write Read only<br />

Our federated repositories scenario relies on the LDAP tree and on the<br />

environment that we described in 10.2, “Our scenario and our environment” on<br />

page 339.<br />

366 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS<br />

Local operating system<br />

Standalone LDAP<br />

Standalone custom


In this section we focus on configuring WebSphere Application for z/OS for a<br />

federated repository composed of z/OS LDAP TDBM and <strong>IBM</strong> Tivoli Directory<br />

Server. See Figure 10-19.<br />

Figure 10-19 Our federated repositories scenario<br />

The itsoitds organization unit is supported by ITDS. The itsotdbm organization<br />

unit is supported by z/OS LDAP TDBM. In this scenario we federate those two<br />

subtrees in order to make them available to WebSphere as one LDAP tree<br />

whose root organization is itso.<br />

This federation is transparent to WebSphere Application Server for z/OS. Users<br />

and groups can be accessed in both subtrees simultaneously.<br />

In the following section we start to federate z/OS LDAP TDBM. Then we validate<br />

that it works also with native authentication, and finally we federate ITDS. At the<br />

Chapter 10. User registries 367


end of this federation configuration, all three users defined in our scenario can<br />

access the WebSphere application simultaneously.<br />

10.4.3 Federated z/OS LDAP with TDBM back end (DB2)<br />

In this section we describe how to federate a z/OS LDAP with a TDBM back end.<br />

Note: WebSphere Application Server for z/OS v6.1 does not currently support<br />

federated repositories with a z/OS LDAP SDBM back end. For accessing a<br />

z/OS LDAP SDBM back end, WebSphere can use a Standalone LDAP<br />

registry configuration.<br />

z/OS LDAP TDBM configuration<br />

Configure z/OS LDAP with a TDBM back end, as described in 10.3.2,<br />

“WebSphere and z/OS LDAP TDBM back end (DB2)” on page 350.<br />

WebSphere z/OS configuration for LDAP TDBM<br />

WebSphere Application Server for z/OS supports accessing z/OS LDAP with a<br />

TDBM back end (DB2) when configured as a federated repository LDAP registry.<br />

In this section we explain how to configure WebSphere in order to access z/OS<br />

LDAP TDBM.<br />

1. Within the administrative console, click Security → Secure administration,<br />

applications and infrastructure. Under User account repository, select<br />

Federated repositories and then click Configure. Under the Related Items<br />

section, select Manage repositories. The default InternalFileRepository<br />

should appear in the list. Click Add to define a new repository.<br />

Configure the new repository with the parameters for the z/OS LDAP TDBM<br />

back end:<br />

– Repositoty identifier: name of the repository in the WebSphere<br />

configuration. We choose itsotdbm in our configuration.<br />

– As a directory type, select z/OS Integrated Security Services LDAP<br />

Server.<br />

– Enter the primary host name and port for the z/OS LDAP server. These<br />

are wtsc58.itso.ibm.com and 3389 in our environment.<br />

– It is possible to specify failover servers for high availability purposes.<br />

– Specify the bind distinguished name and password. This should be an<br />

LDAP user ID that is allowed to scan and update the LDAP tree. We<br />

choose the administrator identity for our LDAP server in our environment,<br />

which is cn=LDAP Administrator.<br />

368 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


– For a TDBM back end with the schema loaded, leave uid in the Login<br />

properties field.<br />

– It is possible to configure SSL for securing the connection to the LDAP<br />

server. We do not implement this feature in our environment.<br />

Then click Apply and save to the master configuration. WebSphere validates<br />

that it can access the LDAP server.<br />

Figure 10-20 WebSphere configuration for z/OS LDAP TDBM as a federated repository<br />

2. Within the Administrative Console, click Security → Secure administration,<br />

applications and infrastructure. Under User account repository, select<br />

Federated repositories and then click Configure. Under Repositories in the<br />

Realm, click Add Base entry to Realm.<br />

a. Select your new repository name. This is itsotdbm in our example.<br />

b. Specify the distinguished name of a base entry that uniquely identifies this<br />

set of entries in the realm. If multiple repositories are included in the realm,<br />

Chapter 10. User registries 369


it is necessary to define a different distinguished name that uniquely<br />

identifies this set of entries within the realm. We choose<br />

ou=itsotdbm,o=itso in our configuration.<br />

c. Specify the distinguished name of the base entry within the repository.<br />

The entry and its descendents are mapped to the subtree that is identified<br />

by the unique base name entry field. If this field is left blank, then the<br />

subtree defaults to the root of the LDAP repository. We set up<br />

ou=itsotdbm,o=itso for our configuration.<br />

Then click OK and save to the master configuration.<br />

Figure 10-21 WebSphere repository reference for z/OS LDAP TDBM<br />

3. Within the administrative console, click Security → Secure administration,<br />

applications and infrastructure. Under User account repository, select<br />

Federated repositories and then click Configure.<br />

a. Enter a realm name of your choice. We choose itso in our example.<br />

b. Specify the name of the user who will have WebSphere administrative<br />

privileges. This distinguished name has to be an existing identity in the<br />

z/OS LDAP TDBM repository. We choose<br />

cn=UserTdbm,ou=itsotdbm,o=itso in our environment.<br />

c. Select an automatically generated server identity.<br />

370 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


d. Remove the existing file-based InternalFileRepository by selecting it and<br />

clicking Remove.<br />

Then click Apply and save to the master configuration. WebSphere validates<br />

that it can find the administrative user identity.<br />

Figure 10-22 WebSphere federated repositories base entries<br />

4. Within the administrative console, click Security → Secure administration,<br />

applications and infrastructure.<br />

a. Under User account repository, select Federated repositories and then<br />

click Set as current.<br />

b. Select Administrative security and unselect Java2 security if not<br />

necessary.<br />

Chapter 10. User registries 371


c. Then click Apply and save to the master configuration (Figure 10-23).<br />

Figure 10-23 WebSphere federated repositories main security panel<br />

5. Restart WebSphere Application Server for z/OS.<br />

Federated z/OS LDAP TDBM validation<br />

After restarting WebSphere Application Server for z/OS, log in to the<br />

administration console with the primary administrative user name defined earlier.<br />

It is possible to use the full distinguished name<br />

(cn=UserTdbm,ou=itsotdbm,o=itso) or the user name only (usertdbm). Using our<br />

ldif file, the password is usertdbm also.<br />

372 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Also, it is possible to validate the user registry being used with the snoop servlet,<br />

which is bundled in WebSphere for z/OS. With the application security enabled,<br />

the snoop servlet requires basic authentication. Call the snoop servlet with a<br />

URL such as the following:<br />

http://wtsc58.itso.ibm.com:49080/snoop/<br />

Authenticate providing the user name and password defined earlier. The snoop<br />

servlet then appears and shows the authenticated principal (Figure 10-24).<br />

Figure 10-24 Snoop servlet showing authenticated z/OS LDAP TDBM user ID<br />

10.4.4 Federated z/OS LDAP TDBM native authentication<br />

In this section we describe how to federate a z/OS LDAP TDBM with native<br />

authentication.<br />

Why you may choose to enable native authentication is explained in 10.3.3,<br />

“WebSphere and z/OS LDAP TDBM native authentication” on page 359.<br />

z/OS LDAP TDBM configuration<br />

Configure z/OS LDAP with a TDBM back end, as described in 10.3.3,<br />

“WebSphere and z/OS LDAP TDBM native authentication” on page 359.<br />

Chapter 10. User registries 373


WebSphere z/OS configuration for LDAP TDBM<br />

Native authentication does not imply configuration changes at the WebSphere<br />

level. Hence, configure WebSphere z/OS for a z/OS LDAP TDBM back end, as<br />

described in 10.4.3, “Federated z/OS LDAP with TDBM back end (DB2)” on<br />

page 368.<br />

You can now access your secured applications with user IDs and password in<br />

RACF. For example, in our environment, the valence user can access the snoop<br />

servlet providing his RACF password. See Figure 10-25.<br />

Figure 10-25 Snoop servlet showing authenticated z/OS LDAP TDBM native<br />

authorization user ID<br />

In order to access the administrative console, users need to be added to the list<br />

of administrative roles.<br />

374 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


For example, access the administrative console with the existing administrative<br />

user ID (usertdbm in our example), then add any new user (valence in our<br />

example) with an administrative role. See Figure 10-26.<br />

Figure 10-26 WebSphere administrative user roles<br />

10.4.5 Federated <strong>IBM</strong> Tivoli Directory Server<br />

In this section we describe how to federate a <strong>IBM</strong> Tivoli Directory Server.<br />

<strong>IBM</strong> Tivoli Directory Server (ITDS) configuration<br />

How to install <strong>IBM</strong> Tivoli Directory Server is described in the InfoCenter:<br />

http://publib.boulder.ibm.com/infocenter/tivihelp/v2r1/index.jsp?topic=<br />

/com.ibm.<strong>IBM</strong>DS.doc/install04.htm<br />

In this section we focus on configuring it.<br />

On the Windows platform, ITDS can be configured using the idsxcfg utility. This<br />

utility is available using the following command:<br />

C:\Program Files\<strong>IBM</strong>\LDAP\V6.0\sbin\idsxcfg.cmd<br />

We configure ITDS to handle the following suffix:<br />

o=itsoitds,o=itso<br />

Chapter 10. User registries 375


The LDAP administrator is cn=LDAP Administrator and the password is secret.<br />

Figure 10-27 <strong>IBM</strong> Tivoli Directory Server idsxcfg current configuration display<br />

We now add entries to ITDS because it is empty. We add a suffix entry and a<br />

person entry. For this purpose create a new schema.suffix.ldif that contains the<br />

following:<br />

dn: ou=itsoitds,o=itso<br />

ou: itsoitds<br />

objectclass: organizationalUnit<br />

objectclass: top<br />

dn: cn=UserItds, ou=itsoitds,o=itso<br />

uid: UserItds<br />

description: Test user for ITDS<br />

objectclass: inetOrgPerson<br />

objectclass: ePerson<br />

objectclass: organizationalPerson<br />

objectclass: person<br />

objectclass: top<br />

sn: 2007<br />

cn: UserItds<br />

376 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Customize the above entries to match your suffix and the user name you want for<br />

a first user.<br />

Use a command similar to the following to add the entries to the LDAP tree:<br />

C:\Program Files\<strong>IBM</strong>\LDAP\V6.0\bin>ldapadd -D "cn=LDAP Administrator"<br />

-w secret -i schema.suffix.ldif<br />

We set up a password for the above new user, creating a file called<br />

user.password.ldif, which contains the following:<br />

dn: cn=UserItds,ou=itsoitds,o=itso<br />

changetype:modify<br />

replace:userpassword<br />

userpassword: useritds<br />

Use a command similar to the following to modify the user entry in the LDAP tree:<br />

C:\Program Files\<strong>IBM</strong>\LDAP\V6.0\bin>ldapmodify -D "cn=LDAP<br />

Administrator" -w secret -i user.password.ldif<br />

We now validate that ITDS is functional by accessing it from a LDAP client.<br />

Configure the LDAP client connection such as the following (Figure 10-28):<br />

Host : itds.itso.ibm.com<br />

Port : 389<br />

Base DN : ou=itsoitds,o=itso<br />

User DN : cn=LDAP Administrator<br />

User password : secret<br />

Figure 10-28 LDAP client connection configuration for ITDS<br />

Chapter 10. User registries 377


Using this configuration we access ITDS content. We can see the suffix entry<br />

and the UserItds entry (Figure 10-29).<br />

Figure 10-29 LDAP client showing ITDS content<br />

WebSphere z/OS configuration for ITDS<br />

WebSphere Application Server for z/OS supports accessing <strong>IBM</strong> Tivoli Directory<br />

Server (ITDS) when configured as a federated repository LDAP registry. In this<br />

section we explain how to configure WebSphere in order to access ITDS.<br />

1. Within the administrative console, click Security → Secure administration,<br />

applications and infrastructure. Under User account repository, select<br />

Federated repositories and then click Configure. Under the Related Items<br />

section, select Manage repositories. The default InternalFileRepository<br />

should appear in the list. Click Add to define a new repository.<br />

Configure the new repository with the parameters for ITDS.<br />

a. Repositoty identifier: name of the repository in the WebSphere<br />

configuration. We choose itsoitds in our configuration.<br />

b. As a directory type, select <strong>IBM</strong> Tivoli Directory Server Version 6.<br />

c. Enter the primary host name and port for the z/OS LDAP server. These<br />

are itds.itso.ibm.com and 389 in our environment.<br />

d. It is possible to specify failover servers for high availability purposes.<br />

e. Specify the bind distinguised name and password. This should be an<br />

LDAP user ID that is allowed to scan and update the LDAP tree. We<br />

choose the administrator identity for our LDAP server in our environment,<br />

which is cn=LDAP Administrator.<br />

f. Leave uid in the Login properties field.<br />

378 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


g. It is possible to configure SSL for securing the connection to the LDAP<br />

server. We do not implement this feature in our environment.<br />

Then click Apply and save to the master configuration. WebSphere validates<br />

that it can access the LDAP server.<br />

Figure 10-30 WebSphere configuration for ITDS as a federated repository<br />

2. Within the administrative console, click Security → Secure administration,<br />

applications and infrastructure. Under User account repository, select<br />

Federated repositories and then click Configure. Under Repositories in the<br />

Realm, click Add Base entry to Realm.<br />

a. Select your new repository name. This is itsoitds in our example.<br />

b. Specify the distinguished name of a base entry that uniquely identifies this<br />

set of entries in the realm. If multiple repositories are included in the realm,<br />

it is necessary to define a different distinguished name that uniquely<br />

identifies this set of entries within the realm. We choose ou=itsoitds,o=itso<br />

in our configuration.<br />

Chapter 10. User registries 379


c. Specify the distinguished name of the base entry within the repository.<br />

The entry and its descendents are mapped to the subtree that is identified<br />

by the unique base name entry field. If this field is left blank, then the<br />

subtree defaults to the root of the LDAP repository. We set up<br />

ou=itsoitds,o=itso for our configuration.<br />

Then click OK and save to the master configuration (Figure 10-31).<br />

Figure 10-31 WebSphere repository reference for ITDS<br />

3. Within the administrative console, click Security → Secure administration,<br />

applications and infrastructure. Under User account repository, select<br />

Federated repositories and then click Configure.<br />

380 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


In our configuration we federate z/OS LDAP with ITDS. Because we already<br />

configured this panel for z/OS LDAP, we do not need to do any further<br />

configuration. This means that the primary administrative user name stays a<br />

user name from our first registry (cn=UserTdbm,ou=itsotdbm,o=itso). The<br />

realm name is the one for all federated registries. See Figure 10-32.<br />

Figure 10-32 WebSphere federated repositories base entries<br />

4. Within the administrative console, click Security → Secure administration,<br />

applications and infrastructure.<br />

If this has not been done before, under User account repository, select<br />

Federated repositories and then click Set as current. Select<br />

Administrative security, and unselect Java2 security if not necessary. Then<br />

click Apply and save to the master configuration.<br />

5. Restart WebSphere Application Server for z/OS.<br />

Federated ITDS validation<br />

To log into the administrative console, use the primary administrative user name<br />

defined earlier. It is possible to use the full distinguished name<br />

Chapter 10. User registries 381


(cn=UserTdbm,ou=itsotdbm,o=itso) or the user name only (usertdbm). Using our<br />

ldif file, the password is usertdbm also.<br />

It is possible to validate the federated user registry with the snoop servlet, which<br />

is bundled in WebSphere for z/OS. With the application security enabled, the<br />

snoop servlet requires basic authentication. Call the snoop servlet with a URL<br />

such as the following:<br />

http://wtsc58.itso.ibm.com:49080/snoop/<br />

Authenticate providing the user name and password defined ealier for the last<br />

federated repository (UserItds in our example). The snoop servlet then appears<br />

and shows the authenticated principal. See Figure 10-33.<br />

Figure 10-33 Snoop servlet showing authenticated ITDS user ID<br />

Because user registries are now federated, the user from z/OS LDAP TDBM<br />

(UserTdbm) can also be used with the same configuration at the same time.<br />

All this validates the federated repositories set up with a z/OS LDAP TDBM and<br />

<strong>IBM</strong> Tivoli Directory Server. Native authentication can also be used.<br />

10.5 z/OS local operating system registry<br />

When using the local operating system registry with WebSphere Application<br />

Server for z/OS, the z/OS security product is accessed for user and group<br />

information.<br />

382 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


In this section we describe specific z/OS options available when using the local<br />

operating system registry.<br />

10.5.1 System Authorization Facility (SAF) authorization<br />

When using the local operating system user registry on z/OS, it is possible to<br />

choose SAF authorization. Choosing SAF authorization is not mandatory.<br />

Use SAF authorization to have EJBROLE security enforced by the z/OS security<br />

product, such as RACF. In that case, SAF EJBROLE profiles are used for<br />

user-to-role authorization for both J2EE applications and the role-based<br />

authorization requests (naming and administration) that are associated with<br />

application server run time. WebSphere Application Server for z/OS uses the<br />

authorization policy that is stored in the z/OS security product for authorization.<br />

This option is available when your environment contains z/OS nodes only. It is<br />

available using the Administrative Console in Secure administration, applications,<br />

and infrastructure → External authorization providers, as shown in Figure 10-34.<br />

Figure 10-34 System Authorization Facility authorization<br />

Chapter 10. User registries 383


Defining EJBROLES belongs to the application deployment process. If the user<br />

ID has at least READ access to the defined EJBROLE profile that corresponds to<br />

the J2EE role defined by the application, the user ID is considered to be in role.<br />

(Do not be confused by the name EJBROLE. It is used for J2EE roles in both<br />

enterprise beans and Web applications.)<br />

Here is an example of how to define a EJBROLE in RACF and how to authorize<br />

a user ID:<br />

RDEFINE EJBROLE PRODCELL.bankTeller UACC(NONE)<br />

PERMIT PRODCELL.bankTeller CLASS(EJBROLE) ID(JOHN) ACCESS(READ)<br />

SETROPTS RACLIST(EJBROLE) REFRESH<br />

In this example, the domain name is PRODCELL. The role name is bankTeller.<br />

The authorized user ID is JOHN.<br />

If a Lightweight Access Directory Protocol (LDAP) registry or custom registry is<br />

configured and SAF authorization is specified, a mapping to a z/OS principal is<br />

required at each login for any protected methods to run. If the authentication<br />

mechanism is Lightweight Third Party Authentication, we recommend that you<br />

update all of the following configuration entries to include a mapping to a valid<br />

z/OS principal (such as WEB_INBOUND, RMI_INBOUND, and DEFAULT).<br />

Table 10-2 Authorization providers characteristics<br />

Authorization providers Characteristics<br />

Default authorization<br />

(WebSphere bindings)<br />

System Authorization<br />

Facility authorization<br />

► Access to servlets or EJB methods is based upon the role (job title,<br />

function, and so on) of the user or caller.<br />

► Roles are associated with servlets or EJBs at assembly time.<br />

► Roles are stored in the application's .ear file: application.xml.<br />

► Which users and groups have which roles is also stored in the<br />

application's .ear file: ibm-application-bnd.xmi.<br />

► Roles are managed by the application developer and the application<br />

deployer.<br />

► RACF only provides user and group information.<br />

► Access to servlets or EJB methods is based upon the role (job title,<br />

function, and so on) of the user or caller.<br />

► Roles are associated with servlets or EJBs at assembly time.<br />

► Roles are represented in the application's .ear file: application.xml.<br />

► Which users and groups have which roles is determined in RACF by<br />

profiles in the EJBROLE class.<br />

► If a user is in the access list of an EJBROLE profile, he has that role.<br />

► If a group is in the access list of an EJBROLE profile, users in that<br />

group have that role.<br />

► Roles are managed through RACF.<br />

384 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Authorization providers Characteristics<br />

External authorization<br />

using a JACC provider<br />

► Access to servlets or EJB methods is based upon the role (job title,<br />

function, and so on) of the user or caller.<br />

► Roles are associated with servlets or EJBs at assembly time.<br />

► Roles are represented in the application's .ear file: application.xml.<br />

► Which users and groups have which roles is determined in the JACC<br />

provider.<br />

► Roles are managed through the JACC provider.<br />

SAF delegation<br />

System Authorization Facility delegation minimizes the need to store user IDs<br />

and passwords in many locations in the configuration. SAF delegation is used in<br />

conjunction with the RunAs feature.<br />

WebSphere Application Server for z/OS supports the function of delegation.<br />

Delegation allows a user identity to be represented as a J2EE role. For example,<br />

you can establish an application to be run with a RunAs role of RoleA. RoleA can<br />

then be mapped as UserA. WebSphere then establishes the principal as UserA,<br />

and RoleA is defined in the deployment descriptor. With such a configuration,<br />

SAF delegation uses the specified J2EE role, RoleA, to determine the user<br />

identity and then set the Java principal with the user ID, UserA. UserA is<br />

specified in the SAF EJBROLE profile's APPLDATA value of the RDEFINE RACF<br />

command. The RDEFINE command in this example would be as follows:<br />

RDEFINE EJBROLE rolea UACC(NONE) APPLDATA(usera)<br />

SAF delegation requires that the SAF authorization be enabled. The SAF security<br />

administrator would be responsible for the assignment of users to the role.<br />

This option is available using the administrative console in Secure<br />

administration, applications, and infrastructure → External authorization<br />

providers → SAF authorization options.<br />

SAF profile mapper<br />

WebSphere Application Server for z/OS supports the use of a custom SAF EJB<br />

role mapper. The custom SAF EJB role mapper allows an installation to map<br />

J2EE role names to SAF EJBRole profile names. Without the SAF EJB role<br />

mapper, you must deploy an application by using a role in the deployment<br />

descriptor of a component that is identical to the name of an EJBROLE class<br />

profile. The security administrator defines EJBROLE profiles and provides the<br />

permission to these profiles to SAF users or groups.<br />

Using SAF EJBROLE class profiles can conflict with the standard J2EE role<br />

naming conventions. J2EE role names are Unicode strings of any length. RACF<br />

Chapter 10. User registries 385


class profiles are restricted to 240 characters in length and cannot be defined if<br />

these profiles contain any white spaces or extended code page characters. If a<br />

J2EE role name for an installation conflicts with these RACF restrictions, an<br />

installation can use the SAF EJB role mapper exit to map the desired J2EE role<br />

name to an acceptable class profile name.<br />

The custom SAF role mapper is a Java-based exit to replace the EJBROLE class<br />

profile construction algorithm. The custom SAF role mapper is called to generate<br />

a profile for authorization and delegation requests. The role mapper passes the<br />

name of the application, and the name of the role then passes back the<br />

appropriate class profile name. Information about the server name, cell name,<br />

and the z/OS security domain name prefix is provided to the implementation<br />

during initialization.<br />

This option is available using the administrative console in Secure<br />

administration, applications, and infrastructure → External authorization<br />

providers → SAF authorization options.<br />

10.5.2 OS thread security support<br />

OS thread security refers to the WebSphere on z/OS’s unique ability to<br />

synchronize the OS thread identity with the J2EE identity. In other words, it<br />

allows the switching of the security context of the servant region’s Task Control<br />

Block (TCB level ACEE) to the current JAAS principal (J2EE identity).<br />

This feature can be used in the middle of a J2EE application with Synch-to-OS<br />

Thread to access z/OS system-level ressources, or it can be used in a connector<br />

with Connection Manager RunAs Identity to access some Enterpsie Information<br />

Systems (EIS) such as DB2 or IMS JDBC.<br />

Synch to OS Thread<br />

Sync-to-OS Thread (or z/OS thread identity synchronization) applies when the<br />

application requires access to system resources (for example, HFS files, TCP/IP<br />

sockets, and so on). The application requests this function and the container<br />

changes the OS thread identity to the J2EE identity.<br />

This option indicates whether an operating system thread identity is enabled for<br />

synchronization with the J2EE identity that is used in the application server run<br />

time if an application is coded to request this function.<br />

Synchronizing the operating system identity to the J2EE identity causes the<br />

operating system identity to synchronize with the authenticated caller, or<br />

delegated RunAs identity in a servlet or Enterprise JavaBeans (EJB). This<br />

synchronization or association means that the caller or security role identity,<br />

386 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


ather than the server region identity, is used for z/OS system service requests<br />

such as access to files.<br />

For the SyncToOS function to be active, the following conditions must all be true:<br />

► An application includes within its deployment descriptor an env-entry of<br />

com.ibm.websphere.security.SyncToOSThread set to true.<br />

► z/OS thread identity synchronization is enabled in the administrative console.<br />

► The configured user registry is the local operating system.<br />

► The BBO.SYNC facility class is defined in RACF, and the control region user<br />

ID has control or read access to it. Use the optional SURROGAT facility class<br />

for finer-grained access controls.<br />

When these conditions are true, the OS thread identity is set to the authenticated<br />

caller identity of a Web or EJB request. The OS thread is modified each time the<br />

J2EE identity is modified. The J2EE identity can be modified either by a RunAs<br />

specification on the deployment descriptor or a programmatic WSSubject.doAs()<br />

request. See Figure 10-35.<br />

Figure 10-35 Administrative Console Synch to OS Thread option<br />

This “Enable application server and z/OS thread identity synchronization” option<br />

is available using the administrative console in Secure administration,<br />

applications, and infrastructure → z/OS security options.<br />

Chapter 10. User registries 387


Connection manager RunAs identity<br />

Connection manager RunAs identity applies to connections to back-end<br />

Enterprise Information Systems such as DB2 and IMS JDBC. It allows the<br />

changing of the OS thread identity to the J2EE identity at the connector level.<br />

Thread security support for DB2 and IMS JDBC is enabled when:<br />

► Connection manager RunAs thread identity is enabled.<br />

► A local connection is used between the application server and the EIS.<br />

► Res-auth=Container is specified for the resource reference defined in the<br />

deployment descriptor.<br />

► The connection factory does not specify a JAAS authentication alias.<br />

► The configured user registry is the local operating system.<br />

► The BBO.SYNC facility class is defined in RACF and the control region user<br />

ID has control or read access to it. Use the optional SURROGAT facility class<br />

for finer-grained access controls.<br />

With such a configuration, the connection manager synchronizes the OS thread<br />

identity with the J2EE identity before obtaining the EIS connection. See<br />

Figure 10-36.<br />

Figure 10-36 Administrative console connection manager RunAs identity option<br />

This “Enable the conection manager RunAs thread identity” option is available<br />

using the administrative console in Secure administration, applications, and<br />

infrastructure → z/OS security options.<br />

388 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


10.5.3 Thread identity support<br />

Thread identity support is the ability to pass the identity of the Java principal<br />

within the subject (J2EE identity) through a JCA connector or a JDBC ressource<br />

adapter to an Enterprise Information System. Depending on the connector being<br />

used, thread identity support may or may not require you to configure connection<br />

manager RunAs identity. Some connectors can accomplish thread identity<br />

support without synchronizing the J2EE identity with the OS thread identity.<br />

Some connectors accomplish thread identity support by synchronizing the J2EE<br />

identity with the OS thread identity.<br />

WebSphere Application Server for z/OS allows you to assign an identity as an<br />

owner of a connection when you first obtain the connection. This thread identity<br />

function only applies to J2EE Connector Architecture (JCA) resource adapters<br />

and Relational Resource Adapter (RRA) wrappered Java Database Connectivity<br />

(JDBC) providers that support the use of thread identity for connection<br />

ownership.<br />

Thread identity support is enabled when:<br />

► A local connection is used between the application server and the EIS (CICS,<br />

IMS, DB2, and so on).<br />

► Res-auth=Container is specified for the resource reference defined in the<br />

deployment descriptor.<br />

► The connection factory does not specify a JAAS Authentication Alias.<br />

► You are using an SAF-based user registry.<br />

Table 10-3 lists the JCA resource adapter and JDBC provider processes that<br />

support thread identity and thread security. It also provides the level of thread<br />

identity support.<br />

Table 10-3 Connectors thread identity and OS thread security support<br />

Connectors Thread<br />

identity<br />

support<br />

OS thread<br />

security<br />

support<br />

IMS Connector - local ConnectionFactory configuration Allowed Not supported<br />

IMS Connector - remote ConnectionFactory configuration Not allowed Not supported<br />

CTG CICSECIConnector - local ConnectionFactory configuration Allowed Not supported<br />

CTG CICSECIConnector - remote ConnectionFactory configuration Not allowed Not supported<br />

IMS JDBC Connector - local ConnectionFactory configuration (By<br />

default, IMS JDBC only supports this type of configuration.)<br />

Required Supported<br />

Chapter 10. User registries 389


Connectors Thread<br />

identity<br />

support<br />

RRA DB2 for z/OS local JDBC provider - data sources configured to<br />

the local DB2<br />

The level of thread identity support can be:<br />

► Allowed, which indicates that thread identity for connection ownership is<br />

allowed for this configuration.<br />

► Not allowed, which indicates that thread identity for connection ownership is<br />

not allowed for this configuration.<br />

► Required, which indicates that thread identity for connection ownership is<br />

required.<br />

390 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS<br />

Allowed Supported<br />

RRA DB2 Universal JDBC Driver Provider using Type 2 connectivity Allowed Supported<br />

RRA DB2 Universal JDBC Driver Provider using Type 4 connectivity Not allowed Not supported<br />

WebSphere MQ JMS Provider: Connection Factory (TransportType =<br />

BINDINGS)<br />

WebSphere MQ JMS Provider - Connection Factory (TransportType<br />

= CLIENT)<br />

WebSphere JMS Provider (such as Integral JMS Provider):<br />

Connection Factory<br />

OS thread<br />

security<br />

support<br />

Allowed Supported<br />

Not allowed Not supported<br />

Not allowed Not supported


Chapter 11. SPNEGO and Windows<br />

single sign-on<br />

11<br />

A new feature provided in WebSphere Application Server for z/OS v6.1 is the<br />

ability to single sign-on to WebSphere applications from a Microsoft Windows<br />

desktop using Simple and Protected GSS-API Negotiation Mechanism<br />

(SPNEGO). This single sign-on is transparent for the user.<br />

In this chapter we introduce several technologies relating to SPNEGO, we<br />

describe some solution designs, and we explain how to implement a single<br />

sign-on solution between a Microsoft Windows domain and WebSphere<br />

Application Server for z/OS.<br />

This chapter discusses the following topics:<br />

► “Introducing the SPNEGO TAI” on page 392<br />

► “Designing single sign-on with Microsoft Windows domain” on page 397<br />

► “Implementing single sign-on using SPNEGO TAI” on page 400<br />

► “Validating single sign-on using the SPNEGO TAI” on page 424<br />

© Copyright <strong>IBM</strong> Corp. 2007. All rights reserved. 391


11.1 Introducing the SPNEGO TAI<br />

Single sign-on (SSO) throughout an enterprise is the ultimate goal of many<br />

security organizations today. One aspect of single sign-on is user desktop<br />

authentication. It is desirable for users to authenticate to their desktops and then<br />

have implicit authenticated access from those desktops to other enterprise<br />

resources, such as Web applications. This chapter describes a solution that is<br />

available today to solve that matter when using Microsoft Windows Active<br />

Directory® (AD) domains, Windows client desktops, and WebSphere Application<br />

Server for z/OS v6.1.<br />

In this section we introduce several technologies involved in the SPNEGO TAI<br />

single sign-on solution. We present Kerberos, the Trust Association Interceptor,<br />

SPNEGO, and finally the SPNEGO TAI.<br />

11.1.1 An introduction to Kerberos<br />

Utilizing Kerberos tokens has become more and more common, especially since<br />

Microsoft started supporting Kerberos Version 5 as the default network<br />

authentication protocol in their Windows 2000 operating system.<br />

Kerberos realm and principal<br />

A Kerberos realm is often referred to as an administrative domain. A realm<br />

consists of members, which can be users, servers, services, or network<br />

resources that are registered within a KDC’s database. Each of these members<br />

has a unique identifier that is called a principal. The Kerberos realm is made up<br />

of the KDC and all of its principals.<br />

The principal is a unique identifier that the KDC can assign tickets to. There are<br />

three parts in a principal name:<br />

primaryname/instancename@REALM<br />

► The primary name: It can be either the user’s name, the word host, or the<br />

name of the service. An example of a principal in the ITSO.<strong>IBM</strong>.COM realm<br />

could be fdevalence@ITSO.<strong>IBM</strong>.COM.<br />

► The instance name: This is optional. It is used to further define the primary<br />

name, for example, fdevalence/admin@ITSO.<strong>IBM</strong>.COM. Note that the<br />

principals fdevalence and fdevalence/admin are two completely separate<br />

principals with different passwords and possibly a different set of authorities.<br />

The instance component is also used when specifying a host or a service<br />

principal. In this case, it can be the fully qualified domain name of the host<br />

such as telnet/wtsc58.itso.ibm.com@ITSO.<strong>IBM</strong>.COM.<br />

392 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


► The realm name: The realm portion of the principal’s name is the name of the<br />

Kerberos realm, which is usually the domain name in uppercase.<br />

Key Distribution Center (KDC)<br />

Three different functions are performed in the Key Distribution Center. There is<br />

an authentication server (AS), a ticket granting server (TGS), and the KDC<br />

database that holds shared secret information about each principal in the<br />

Kerberos realm. Since these functions are incorporated into the KDC, and are<br />

also linked by the services provided to the principals, they usually reside on the<br />

same machine.<br />

The two primary functions of the KDC are to grant ticket granting tickets and to<br />

grant service tickets.<br />

Kerberos ticket<br />

The word ticket is used to describe how authentication data is transmitted in the<br />

Kerberos environment. Tickets are essentially an encrypted data structure that<br />

uses shared keys issued by the KDC to communicate in a secure fashion. The<br />

purpose of the ticket depends on where it has been created.<br />

When a principal requests an initial authentication, the authentication server<br />

gives him a ticket granting ticket (TGT). This ticket is used to request tickets for<br />

other services in the network.<br />

When the principal wants to use a service in the network, it sends a request<br />

including his TGT to the ticket granting server. The TGS responds by issuing and<br />

sending a service ticket (ST).<br />

When the principal uses a service in the network, it sends a request including his<br />

ST to the server hosting the service. The server accepts the ST and executes the<br />

service.<br />

Each ticket can also contain options that give you more control over the use of<br />

the tickets.<br />

Kerberos authentication protocol<br />

The Kerberos system consists of three components: a client, a server, and a<br />

trusted third party, which is the Key Distribution Center. KDC interacts with both<br />

a client and a server to accept the client’s request, authenticate its identity, and<br />

issue tickets to it.<br />

Chapter 11. SPNEGO and Windows single sign-on 393


Although the Kerberos protocol consists of several sub protocols, three<br />

exchanges are the most interesting, as shown in Figure 11-1.<br />

Figure 11-1 Kerberos authentication protocol overview<br />

The Kerberos protocol executes the following steps:<br />

► Steps 1 and 2: The first exchange takes place between a client and the<br />

authentication server, in which a client asks the AS that knows the secret<br />

keys of all clients in the realm to authenticate itself and gives it a ticket called<br />

ticket-granting ticket. The TGT is used to get a secret shared with an<br />

application server the client wants to access.<br />

► Steps 3 and 4: Upon receiving the TGT, the client sends a request, which<br />

contains the TGT, for a service ticket to the ticket-granting server, and waits<br />

for a service ticket (ST) to be returned.<br />

► Steps 5 and 6: Having the service ticket available, the client is allowed to<br />

communicate with the server that is providing a service he wants to use. The<br />

application server can verify the service ticket without the need to contact the<br />

KDC.<br />

Kerberos and Microsoft Windows<br />

Kerberos is implemented in Microsoft Windows Server® 2000 and later. The<br />

implementation of Kerboros on a Windows server is composed of two elements,<br />

394 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


which are the Kerberos service and Active Directory (AD). AD is Microsoft’s<br />

implementation of the LDAP protocol.<br />

When a user logs onto the Windows domain, the information entered by the user<br />

is captured by the logon program and is transmitted to the computer’s local<br />

security authority (LSA). The LSA is a Windows component that authenticates<br />

users to the local system. This LSA then communicates with the network’s KDC<br />

in order to receive ticket granting tickets and service tickets so that this user can<br />

access kerberized services on the Windows domain.<br />

Kerberos on Windows server platforms use the Active Directory for all<br />

information about principals on the Kerberos network. The encryption key used<br />

in communicating with principals is stored in the Active Directory database in the<br />

user’s profile.<br />

Active Directory not only plays the role of an LDAP server on a Windows server,<br />

it is also used as the KDC database. This can be a great benefit to an<br />

organization in terms of one central store, but can be equally devastating in the<br />

event of system failure.<br />

11.1.2 An introduction to trust association interceptor (TAI)<br />

The trust association feature is a point in the WebSphere HTTP authentication<br />

process where an organization can insert its own code to achieve whatever<br />

authentication outcome it desires.<br />

The trust association interceptor relies on a trust relationship with a front-end<br />

party. Once this trust is established, the TAI retrieves the identity from the<br />

incoming request and returns it as a principal to WebSphere.<br />

Trust association applies for Web requests where some other servers, like<br />

Reverse Proxy Security Servers (RPSS), authenticate the request and forward<br />

the request to the application server. The WebSphere Application Server TAI<br />

only validates the trust relationship with the RPSS and retrieves the identity from<br />

the incoming request and returns it as a principal.<br />

Some examples of Reverse Proxy Security Servers are <strong>IBM</strong> Tivoli Access<br />

Manager WebSeal or <strong>IBM</strong> Datapower, and so on.<br />

It can be coded so that only some requests are validated by the TAI. That is, the<br />

TAI can decide that it will not perform a trust association operation on a request,<br />

in which case the authentication process returns to WebSphere for processing.<br />

You can develop your own TAI, but WebSphere Application Server for z/OS v6.1<br />

comes with four trust association interceptors. These can be found with the<br />

Chapter 11. SPNEGO and Windows single sign-on 395


Administrative Console in Secure administration, applications, and<br />

infrastructure → Trust association → Interceptors:<br />

► com.ibm.ws.security.spnego.TrustAssociationInterceptorImpl<br />

► com.ibm.ws.security.web.WebSealTrustAssociationInterceptor<br />

► com.ibm.ws.security.web.TAMTrustAssociationInterceptorPlus<br />

► com.ibm.ws.sip.security.digest.DigestTAI<br />

The TAMTrustAssociationInterceptorPlus TAI was introduced in WebSphere<br />

Application Server V5.1. It is a new TAI Interface that has significantly enhanced<br />

features. This new interface introduced new performance benefits that allowed<br />

the TAI module to return credential information to the application server. This<br />

means that no additional user registry searches are required by the login<br />

modules, thus reducing authentication overhead. This can be combined with<br />

WebSphere Application Server’s downstream security attribute propagation<br />

services to allow security context propagation.<br />

The spnego.TrustAssociationInterceptorImpl TAI is the centerpiece of the single<br />

sign-on solution we describe in this chapter. We present the SPNEGO TAI in<br />

11.1.4, “The WebSphere SPNEGO TAI” on page 396.<br />

11.1.3 An introduction to SPNEGO<br />

SPNEGO is a standard specification defined in The Simple and Protected<br />

GSS-API Negotiation Mechanism (IETF RFC 2478).<br />

Microsoft Windows, when configured to use an Active Directory domain, is based<br />

upon a security infrastructure that is at its core Kerberos. Kerberos has<br />

supported distributed authentication for a long time. Microsoft has extended a<br />

protocol known as Simple and Protected GSS-API Negotiation Mechanism<br />

(SPNEGO) for sharing Windows credentials with Web servers. This protocol<br />

defines a way via negotiation for the client workstation to send authentication<br />

data to the Web server. If the Web server understands the SPNEGO tokens, this<br />

can then be used to implement secure single sign-on. Thus, the user’s identity is<br />

transferred in a secure manner to the Web server.<br />

SPNEGO is a protocol defined for exchanging credentials from a client to a<br />

server. Microsoft has extended this protocol and used it as its authentication<br />

mechanism for HTTP usage. The Kerberos service ticket is wrapped in a<br />

SPNEGO token.<br />

11.1.4 The WebSphere SPNEGO TAI<br />

The goal of the SPNEGO TAI is to leverage the Kerberos distributed<br />

authentication through the SPNEGO protocol.<br />

396 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


SPNEGO supports both Active Directory credentials (based on Kerberos) and<br />

the older style (and less secure) NTLM credentials. The WebSphere SPNEGO<br />

TAI supports only the Active Directory credentials.<br />

The WebSphere SPNEGO TAI handles the SPNEGO handshake requests,<br />

retrieves the identity from the SPNEGO token, and transfers this identity to<br />

WebSphere run time as a principal.<br />

Essentially, when WebSphere Application Server (WAS) receives an inbound<br />

request that requires authentication, the TAI is invoked. If the requests meets<br />

certain customizable filter criteria, the TAI responds with a SPNEGO challenge to<br />

the Web browser. If a proper SPNEGO token is returned, the TAI uses the WAS<br />

and JDK built-in JGSS services and the SPNEGO provider to parse the token<br />

and determine the user’s identity. This information is then provided to the WAS<br />

run time. WAS uses this information to create an LTPA cookie, which is sent to<br />

the browser. The user is now authenticated. Future requests within the same<br />

SSO domain do not invoke the TAI since the LTPA cookie now represents the<br />

user’s authentication.<br />

The SPNEGO TAI can work with Web services clients for HTTP transport-level<br />

security with SPNEGO tokens. The SPNEGO TAI is for Web client authentication<br />

and is not relevant for EJB clients.<br />

11.2 Designing single sign-on with Microsoft Windows<br />

domain<br />

In this section we present two solutions for single sign-on between a Microsoft<br />

Windows Active Directory domain and WebSphere Application Server for z/OS.<br />

11.2.1 Single sign-on with Microsoft Windows KDC only<br />

The benefits of having WebSphere Application Server for z/OS use the SPNEGO<br />

TAI single sign-on solution include:<br />

► The cost of administering a large number of IDs and passwords is reduced.<br />

► A secure and mutually authenticated transmission of security credentials from<br />

the Web browser or .NET clients is established.<br />

► Interoperability with Web services and .NET applications that use SPNEGO<br />

authentication at the transport level is achieved.<br />

Previously, this could only be achieved through third-party software such as<br />

Tivoli Access Manager. This can now be achieved by having a SPNEGO<br />

protocol enabled client such as a .NET application or SPNEGO enabled<br />

Chapter 11. SPNEGO and Windows single sign-on 397


owsers such as Microsoft Internet Explorer 5.5 and later or Mozilla Firefox 1.0.<br />

These clients establish trust and pass credentials to WebSphere Application<br />

Server for z/OS using Kerberos tickets wrapped in SPNEGO tokens issued from<br />

a Microsoft Windows 2000 or 2003 Active Directory domain controller.<br />

In a simple solution, there is one Microsoft Windows Active Directory domain with<br />

one Kerberos KDC. The WebSphere Application Server for z/OS service is<br />

defined as kerberized in the Windows Kerberos KDC and the corresponding<br />

principal keytab file is transferred to the WebSphere for z/OS configuration.<br />

The Windows client workstation authenticates to the Windows domain and<br />

interacts with the Windows Kerberos KDC. When this Windows client workstation<br />

accesses the z/OS Web application, it uses a Kerberos service ticket wrapped in<br />

a SPNEGO token to single sign-on with WebSphere Application Server for z/OS.<br />

See Figure 11-2.<br />

Figure 11-2 Single sign-on with Microsoft Windows KDC only<br />

398 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


When designing such a solution, the WebSphere Application Server for z/OS<br />

repository need to be considered. For single sign-on to occur, users identities<br />

need to be known to both Active Directory and the WebSphere registry.<br />

It is easy to use the Windows domain’s Active Directory registry as either a<br />

standalone LDAP or federated into the federated repositories. This way all users<br />

are known the same in the Windows environment and in WebSphere.<br />

You may choose to use RACF as a local operating system registry for<br />

WebSphere. This is the configuration we choose for our scenario. In that case, it<br />

is necessary to synchronize the Windows identities with the RACF identities. We<br />

do this manually in our scenario.<br />

If you decide to use another registry then, depending on your environment, you<br />

may need to do some name mapping for users presented. Also, a process must<br />

be implemented to make sure that there is user mapping between registries. This<br />

mapping may be one-to-one or many-to-one, depending upon the environments<br />

architecture.<br />

We describe the detailed step-by-step implementation of this solution in this<br />

chapter.<br />

11.2.2 Single sign-on with z/OS KDC and Microsoft Windows KDC<br />

The Kerberos protocol is designed to operate across organizational boundaries.<br />

Each organization wanting to run a Kerberos server can establish its own realm.<br />

The name of the realm in which a client is registered is part of the client's name<br />

and can be used by the application server to decide whether to honor a request.<br />

By establishing cross-realm keys, the administrators of two realms can allow a<br />

client authenticated in one realm to use its credentials in the other realm. The<br />

exchange of cross-realm keys registers the ticket-granting service of each realm<br />

as a principal in the other realm. A client is then able to obtain a ticket-granting<br />

ticket for the remote realm's ticket-granting service from its local ticket-granting<br />

service. Tickets issued to a service in the remote realm indicate that the client<br />

was authenticated from another realm.<br />

You may already have a z/OS KDC in your organization. You may want to take<br />

advantage of the strong z/OS KDC capabilities such as sysplex awareness. You<br />

may choose z/OS as your trusted security vault. In these cases, it is possible to<br />

have WebSphere Application Server for z/OS defined as a kerberized service in<br />

the z/OS KDC Kerberos realm (zOSKerbRealm).<br />

The Microsoft Windows Active Directory KDC still has its own Windows Kerberos<br />

realm (WinKerbRealm). The user client workstation authenticates to this<br />

Kerberos realm.<br />

Chapter 11. SPNEGO and Windows single sign-on 399


With such a configuration, a cross-realm trust is created between the<br />

zOSKerbRealm and the WinKerbRealm by establishing cross-realm keys.<br />

Consequently, the user client workstation can access the z/OS Web application<br />

using a Kerberos service ticket wrapped in a SPNEGO token to single sign-on<br />

with WebSphere Application Server for z/OS. See Figure 11-3.<br />

Figure 11-3 Single sign-on with z/OS KDC and Microsoft Windows KDC<br />

The detailed step-by-step implementation of this solution is described in an<br />

article on developerWorks:<br />

http://www.ibm.com/developerworks/websphere/techjournal/0707_rogers/070<br />

7_rogers.html<br />

11.3 Implementing single sign-on using SPNEGO TAI<br />

From a technical perspective, the overall goal of this section is to enable the<br />

WebSphere Application Server for z/OS SPNEGO TAI to trust requests and<br />

400 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


validate user credentials that come from SPNEGO-enabled clients that are part<br />

of a Microsoft Windows Active Directory domain.<br />

In this section we first describe our environment and our scenario, then we<br />

explain in detail how to configure the three main components of this solution,<br />

which are WebSphere Application Server for z/OS, Windows Active Directory<br />

KDC, and the user workstation browser, and finally we provide hints about how<br />

to troubleshoot this solution.<br />

11.3.1 Our environment and our scenario<br />

The solution we implement in our environment is based on the solution design<br />

described in 11.2.1, “Single sign-on with Microsoft Windows KDC only” on<br />

page 397. The three main components for this single sign-on solution are:<br />

► The Web application server: WebSphere Application Server for z/OS v6.1.0.2<br />

Build Number: cf20633.22. It runs on z/OS v1r8.<br />

► The Kerberos KDC: Microsoft Windows Server 2003 SP1 with Active<br />

Directory KDC. The Windows 2003 Support Tools are installed.<br />

► The user workstation: Microsoft Windows XP Professional 2002 SP2. The<br />

Windows Server 2003 Resource Kit Tools are installed. It runs Microsoft<br />

Internet Explorer v6.0.29000 and Mozilla Firefox v1.0.7.<br />

The user logs onto the Microsoft Windows Active Directory domain with an<br />

identity known in Active Directory (USER1). He then accesses a Web application<br />

using his browser, and his identity is propagated to WebSphere Application<br />

Server for z/OS. This identity is mapped to a known RACF identity (USER1).<br />

Single sign-on occurs between the Windows domain and the WebSphere<br />

application server.<br />

Chapter 11. SPNEGO and Windows single sign-on 401


Figure 11-4 shows the detailed steps of this scenario.<br />

Figure 11-4 SPNEGO TAI and Windows single sign-on scenario<br />

At the very beginning the user logs onto the Windows domain from the<br />

workstation. After the user enters a user name and password, Winlogon sends<br />

the information to the workstation local security authority, which passes the<br />

request to the Kerberos authentication package. The client sends an initial<br />

authentication request (AS_REQ), which includes the user’s credentials and an<br />

encrypted time stamp to the KDC. This is a request for authentication and a ticket<br />

granting ticket. The first domain controller in the domain generates the<br />

krbtgt/domain_name ticket. The KDC uses the secret key to decrypt the time<br />

stamp and issues a TGT to the client. The AS_REP is encrypted with the user’s<br />

key and returned to the user. The ticket is encrypted with the KDC’s key and<br />

enclosed in the AS_REP.<br />

402 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


When the user accesses the Web application, the scenario executes the<br />

following steps for single sign-on:<br />

1. The user requests a secured Web resource using a browser. This sends a<br />

HTTP get request to WebSphere Application Server for z/OS.<br />

2. WebSphere Application Server for z/OS and SPNEGO TAI answer to the<br />

client browser with an HTTP challenge header 401 containing the<br />

Authenticate: Negotiate status.<br />

3. The client browser recognizes the negotiate header because it has been<br />

configured to support integrated Windows authentication. The client parses<br />

the requested URL for the host name. The client uses the host name as an<br />

attribute to request a valid Kerberos Service Ticket from the Kerberos ticket<br />

granting service in Active Directory KDC (TGS_REQ). The TGS then issues a<br />

service ticket (TGS_REP) to the client.<br />

4. The client puts this Kerberos service ticket in an SPNEGO token. The service<br />

ticket proves both the user’s identity and permissions to the service, and the<br />

service’s identity to the user. The client responds to the WebSphere<br />

Application Server for z/OS Authenticate: Negotiate challenge with the<br />

SPNEGO token in the request HTTP header.<br />

5. WebSphere Application Server for z/OS and SPNEGO TAI see the HTTP<br />

header with the SPNEGO token. It extracts the Kerberos service ticket and<br />

gets the identity (principal) of the user.<br />

6. The SPNEGO TAI maps the identity to a valid RACF identity and validates<br />

this identity against RACF. This identity is set in the principal of the JAAS<br />

subject. Once the identification process is executed, WebSphere executes<br />

the related Java code (servlets, JSPs, EJBs, and so on) and checks<br />

authorizations.<br />

7. If all access is granted, WebSphere Application Server for z/OS sends back<br />

the response with an HTTP 200. WebSphere also includes in the response a<br />

LTPA token (in the form of a cookie).<br />

For all subsequent requests, the LTPA token is used to access resources<br />

securely. Hence, the SPNEGO protocol is executed once for the first request.<br />

The key point to notice here is that the user is not prompted to authenticate to<br />

WebSphere Application Server for z/OS in this scenario. The solution flows the<br />

user’s existing Active Directory credentials to the WebSphere server. The user's<br />

access is via his Windows credentials. This is single sign-on between Windows<br />

and WebSphere Application Server for z/OS using the SPNEGO.<br />

Chapter 11. SPNEGO and Windows single sign-on 403


11.3.2 Configuring the Microsoft Windows server<br />

In this section, we describe how to configure the Microsoft Windows Active<br />

Directory and its Kerberos KDC.<br />

Before configuring<br />

A working domain controller and at least one client computer in that domain are<br />

required for this solution, as trying to use SPNEGO from the domain controller<br />

does not work.<br />

We recommend making sure that you have the following before configuring:<br />

► A functioning Microsoft Windows 2000/2003 Active Directory Domain<br />

including:<br />

– Domain controller<br />

– Client workstation<br />

– Users that can log into the client workstation<br />

► A functioning WebSphere Application Server for z/OS with application<br />

security enabled.<br />

► The users from the Active Directory should be able to successfully access<br />

WebSphere Application Server’s protected resources using a native<br />

authentication mechanism such as basic authentication (BA) or forms<br />

authentication.<br />

► Windows 200x Support Tools must be installed on the Microsoft Windows<br />

Server. These include the setspn, the ktpass, and the adsiedit tools. These<br />

support tools are available on the Windows Server installation CD or from the<br />

Microsoft Web site:<br />

http://www.microsoft.com/downloads/details.aspx?familyid=6EC50B78-8B<br />

E1-4E81-B3BE-4E7AC4F0912D<br />

► The SPNEGO TAI configuration requirements must be satisfied. These are<br />

described in the InfoCenter at:<br />

http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic<br />

=/com.ibm.websphere.zseries.doc/info/zseries/ae/rsec_SPNEGO_tai_reqs.<br />

html<br />

We also recommend installing the Windows Server 2003 Resource Kit Tools,<br />

which provide the kerbtray.exe utility to see Kerberos tickets. This package can<br />

be installed on the user workstation:<br />

http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-<br />

4ae7-96ee-b18c4790cffd<br />

404 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Creating the WebSphere service principal name<br />

Create a user account for WebSphere Application Server for z/OS in the<br />

Microsoft Active Directory. This account is mapped to the Kerberos service<br />

principal name (SPN). This identifies the WebSphere Application Server for z/OS<br />

installation as a kerberized service.<br />

In order to create this SPN for WebSphere, follow these steps:<br />

1. Log on as an administrator to the Windows 2003 Server machine that serves<br />

as the domain controller.<br />

2. Invoke the Active Directory users and computers snap-in by typing the<br />

following command in the Start/Run menu:<br />

dsa.msc /server=localhost<br />

Figure 11-5 Windows Run display<br />

Chapter 11. SPNEGO and Windows single sign-on 405


3. Create a user account for WebSphere Application Server for z/OS. We create<br />

a wtsc58a user account.<br />

Figure 11-6 Windows New Object - User display<br />

406 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


The new user account then appears in the list of Windows users and<br />

computers (Figure 11-7).<br />

Figure 11-7 Windows Active Directory Users and Computers display<br />

Chapter 11. SPNEGO and Windows single sign-on 407


4. Right-click this new user account and select Properties. Go to the Account<br />

tab and scroll down the account options. Check the Use DES encryption<br />

types for this account check box. Then click OK to validate. We choose to<br />

use DES encryption for compatibility reasons. See Figure 11-8.<br />

Figure 11-8 Windows user properties Account tab<br />

408 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


5. Invoke the Active Directory service interface snap-in by typing the following<br />

command in the Start/Run menu:<br />

adsiedit.msc<br />

Note: In order to use the Active Directory service interface snap-in<br />

(adsiedit.msc), the Windows Server Support Tools have to be installed, as<br />

described in the tip at the beginning of this section.<br />

Figure 11-9 Windows Active Directory Service Interface display<br />

Verify that the new user (wtsc58 in our case) has been created and check its<br />

distinguished name (CN=wtsc58a,CN=Users,DC=kkdc,DC=test,DC=com in<br />

our example).<br />

6. Map the user account to the Kerberos service principal name. This user<br />

account represents the WebSphere Application Server as being a kerberized<br />

service with the Kerberos key distribution center.<br />

Use the following setspn command for this task:<br />

setspn -a HTTP/ <br />

We run the following command for our environment:<br />

setspn -a HTTP/wtsc58a.kkdc.test.com wtsc58a<br />

Chapter 11. SPNEGO and Windows single sign-on 409


List SPNs defined for the user account with the following command:<br />

setspn -l wtsc58a<br />

Example 11-1 setspn command output<br />

C:\>setspn -a HTTP/wtsc58a.kkdc.test.com wtsc58a<br />

Registering ServicePrincipalNames for<br />

CN=wtsc58a,CN=Users,DC=kkdc,DC=test,DC=com<br />

HTTP/wtsc58a.kkdc.test.com<br />

Updated object<br />

C:\>setspn -l wtsc58a<br />

Registered ServicePrincipalNames for<br />

CN=wtsc58a,CN=Users,DC=kkdc,DC=test,DC=com:<br />

HTTP/wtsc58a.kkdc.test.com<br />

Tip: More information about the setspn tool can be found here:<br />

http://technet2.microsoft.com/WindowsServer/en/library/318642de-15a3<br />

-4478-beb0-8022696def511033.mspx?mfr=true<br />

Creating the Kerberos keytab file<br />

Use the ktpass tool to set up the Kerberos keytab file (krb5.keytab) for the<br />

previously created service principal name.<br />

Ktpass allows you to configure a non Windows Server 2003 Kerberos service<br />

(like WebSphere applications on a z/OS platform) as a security principal in the<br />

Windows Server 2003 Active Directory. This tool generates a keytab file<br />

containing the shared key of the service. This keytab file is then transferred over<br />

to the WebSphere server so that the SPNEGO TAI can use it.<br />

Use the following ktpass command for this task:<br />

ktpass -princ HTTP/@ -out<br />

-pass password -mapUser -crypto<br />

DES-CBC-MD5 -mapOp set<br />

The most common options are (use the -help switch to get a full list of switches):<br />

► princ principal_name specifies the principal name. The Windows Domain can<br />

be found on the Active Directory service interface snap-in displayed before. It<br />

has to be all upper-case.<br />

► out filename specifies the keytab to produce.<br />

► pass password specifies the password to use.<br />

► mapuser username maps princ to the user.<br />

410 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


► crypto specifies the type of cryptographic system to use. With the wtsc58a<br />

Windows account we set up, DES-CBC-MD5 has to be selected.<br />

Tip: More information about the keytab files and the ktpass command can be<br />

found here:<br />

http://technet2.microsoft.com/WindowsServer/en/library/5090598d-a735<br />

-4c73-9e37-1a95a4651fa51033.mspx?mfr=true<br />

We run the following command for our environment:<br />

ktpass -princ HTTP/wtsc58a.kkdc.test.com@KKDC.TEST.COM -out<br />

c:\wtsc58a.keytab -pass password -mapUser wtsc58a -crypto DES-CBC-MD5<br />

-mapOp set -ptype KRB5_NT_PRINCIPAL<br />

The realm name has to be written in uppercase letters for the ktpass command.<br />

We choose the DES-CBC-MD5 encryption algorithm for compatibility reasons.<br />

Restriction: Microsoft Windows Active Directory supports two different<br />

Kerberos encryption types: RC4-HMAC and DES-CBC-MD5. <strong>IBM</strong> Java<br />

Generic Security Service (JGSS) library (and SPNEGO library) support both<br />

of these encryption types. RC4-HMAC encryption is only supported with a<br />

Windows 2003 Server key distribution center. RC4-HMAC encryption is not<br />

supported when using a Windows 2000 Server as a Kerberos KDC.<br />

There might be a warning regarding the account type and the ptype, but that can<br />

safely be ignored.<br />

Example 11-2 ktpass command output<br />

C:\>ktpass -princ HTTP/wtsc58a.kkdc.test.com@KKDC.TEST.COM -out<br />

c:\wtsc58a.keytab -pass password -mapUser wtsc58a -crypto DES-CBC-MD5<br />

-mapOp set -ptype KRB5_NT_PRINCIPAL<br />

Targeting domain controller: sec05.kkdc.test.com<br />

Using legacy password setting method<br />

Successfully mapped HTTP/wtsc58a.kkdc.test.com to wtsc58a.<br />

Key created.<br />

Output keytab to c:\wtsc58a.keytab:<br />

Keytab version: 0x502<br />

keysize 67 HTTP/wtsc58a.kkdc.test.com@KKDC.TEST.COM ptype 1<br />

(KRB5_NT_PRINCIPAL)<br />

vno 8 etype 0x3 (DES-CBC-MD5) keylength 8 (0x13bfe54345ea08d3)<br />

Chapter 11. SPNEGO and Windows single sign-on 411


11.3.3 Configuring WebSphere Application Server for z/OS<br />

The WebSphere Application Server for z/OS SPNEGO TAI configuration requires<br />

some Kerberos configuration within z/OS Unix System Services, then some TAI<br />

configuration within WebSphere, and finally some JVM configuration within<br />

WebSphere.<br />

Configuring the Kerberos configuration file<br />

The Kerberos configuration properties must be updated to the relevant values for<br />

the Kerberos key distribution center (KDC) and its port, the location of the actual<br />

Kerberos keytab file that has been copied from the Windows 2003 server, as well<br />

as the Kerberos realm name that is the related Microsoft domain controller.<br />

WebSphere Application Server for z/OS has a wsadmin utility to generate the<br />

Kerberos configuration file.<br />

1. Transfer in binary format the previously generated keytab file from the<br />

Windows server to the z/OS partition in UNIX System Services. We put the<br />

keytab file in the existing z/OS Kerberos directory in /etc/skrb. A Kerberos<br />

keytab configuration file contains a list of keys that are analogous to user<br />

passwords. It is important for hosts to protect their Kerberos keytab files.<br />

2. If Kerberos is not already used by another component in z/OS, rename the<br />

existing Kerberos configuration with a command such as the following in<br />

UNIX System Services:<br />

mv krb5.conf krb5.conf.backup20061115<br />

3. The SPNEGO TAI expects the configuration file to be in the /etc/krb5<br />

directory. Create a symbolic link from /etc/krb5 to the /etc/skrb directory with<br />

the following command:<br />

ln -s /etc/skrb /etc/krb5<br />

You can specify another location by using the JVM system property<br />

java.security.krb5.conf.<br />

412 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


4. The following steps use the wsadmin utility to create a Kerberos configuration<br />

file. An administrator user is needed to be able to connect to WebSphere with<br />

the wsadmin utility. Make sure that the user is declared as an administrator in<br />

the administrative console administrative user roles list. In our environment<br />

we use the wsadmin user for wsadmin scripting. See Figure 11-10.<br />

Figure 11-10 Administrative User Roles display<br />

5. Create a createKrbConfigFile.jacl file in the /tmp directory, for instance. Enter<br />

the following command in the file (all on one line) and customize it to your<br />

environment:<br />

$AdminTask createKrbConfigFile {-krbPath /etc/skrb/krb5.conf -realm<br />

KKDC.TEST.COM -kdcHost sec05.kkdc.test.com -dns kkdc.test.com<br />

-keytabPath /etc/skrb/wtsc58a.keytab -encryption des-cbc-md5}<br />

We choose des-cbc-md5 for encryption, as Windows tickets come encrypted<br />

with this algorithm.<br />

6. Use wsadmin to run the above jacl script with a command such as the<br />

following:<br />

wsadmin.sh -user wsadmin -password wsadmin1 -f<br />

/tmp/createKrbConfigFile.jacl<br />

The output of this command in shown in Example 11-3.<br />

Example 11-3 wsadmin command execution output<br />

VALENCE:/WebSphereBS4/V6R1/AppServer/bin $ wsadmin.sh -user wsadmin<br />

-password wsadmin1 -f /tmp/createKrbConfigFile.jacl<br />

WASX7209I: Connected to process "ws6584" on node nd6584 using SOAP<br />

connector; The type of process is: UnManagedProcess<br />

7. Make sure that WebSphere users (controller region and servant region) have<br />

sufficient read access to the /etc/krb5/krb5.conf file.<br />

Chapter 11. SPNEGO and Windows single sign-on 413


The /etc/skrb/krb5.conf is now created, and its content is shown in Example 11-4.<br />

Example 11-4 krb5.conf file content<br />

[libdefaults]<br />

default_realm = KKDC.TEST.COM<br />

default_keytab_name = FILE:/etc/skrb/wtsc58a.keytab<br />

default_tkt_enctypes = des-cbc-md5<br />

default_tgs_enctypes = des-cbc-md5<br />

kdc_default_options = 0x54800000<br />

# forwardable = true<br />

# proxiable = true<br />

# noaddresses = true<br />

[realms]<br />

KKDC.TEST.COM = {<br />

kdc = sec05.kkdc.test.com:88<br />

default_domain = kkdc.test.com<br />

}<br />

[domain_realm]<br />

.kkdc.test.com = KKDC.TEST.COM<br />

Configuring the SPNEGO TAI in WebSphere<br />

This section configures the SPNEGO TAI in WebSphere Application Server.<br />

Make sure that all the preceding steps in the previous section have been<br />

executed.<br />

1. Log on to the WebSphere Application Server administrative console.<br />

2. Make sure that administrative security and application security are enabled in<br />

your WebSphere Application Server for z/OS configuration.<br />

414 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


3. Click Security → Secure administration, applications, and infrastructure.<br />

Expand Web security. Under the General Properties heading, select the<br />

check box to Enable trust association and click Apply. See Figure 11-11.<br />

Figure 11-11 Enable Trust Association window<br />

4. Click Interceptors and then click the SPNEGO TAI in the list of interceptors,<br />

com.ibm.ws.security.spnego.TrustAssociationInterceptorImpl, then click<br />

Custom properties, then click Add to set up properties as follows:<br />

– com.ibm.ws.security.spnego.SPN.hostName: This attribute is<br />

required. It specifies the full DNS host name in the SPN used by the<br />

SPNEGO TAI to establish a Kerberos secured context. It is the host name<br />

used with the ktpass command.<br />

– com.ibm.ws.security.spnego.SPN.filter: This attribute is optional. It<br />

specifies the conditions that are matched against the HTTP request<br />

headers to determine whether the HTTP request is selected for SPNEGO<br />

authentication. In a WebSphere Standalone server configuration, we<br />

strongly recommend using this option so that the SPNEGO TAI does<br />

operate when accessing the administrative console.<br />

Chapter 11. SPNEGO and Windows single sign-on 415


Tip: The complete list of available custom properties for the SPNEGO TAI<br />

is available in the InfoCenter at the following URL:<br />

http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?<br />

topic=/com.ibm.websphere.zseries.doc/info/zseries/ae/rsec_SPNEGO_<br />

tai_attribs.html<br />

In our environment we add the following properties with the following values:<br />

com.ibm.ws.security.spnego.SPN1.hostName : wtsc58a.kkdc.test.com<br />

com.ibm.ws.security.spnego.SPN1.filter : request-url%=snoop<br />

In our example, we use the WebSphere embedded snoop servlet to verify our<br />

configuration setup.<br />

Figure 11-12 SPNEGO TAI custom properties display<br />

5. After you finish defining your custom properties, click Save to store the<br />

updated SPNEGO TAI configuration.<br />

Configuring the JVM for the SPNEGO TAI<br />

The following steps configure the JVM for use with the SPNEGO TAI.<br />

1. Log on to the WebSphere Application Server administrative console.<br />

2. For the Control region, navigate to Servers → Application servers →<br />

server_name → Java and Process management → Process Definition →<br />

416 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Control → Java Virtual Machine and locate the Generic JVM arguments<br />

text box. Add the following option in this text box:<br />

-Dcom.ibm.ws.security.spnego.isEnabled=true<br />

3. For the Servant region, navigate to Servers → Application servers →<br />

server_name → Java and Process management → Process Definition →<br />

Servant → Java Virtual Machine and locate the Generic JVM arguments<br />

text box. Add the following option in this text box:<br />

-Dcom.ibm.ws.security.spnego.isEnabled=true<br />

Tip: To enable the JGSS and KRB5 traces, add the following to the<br />

Generic JVM arguments text box:<br />

-Dcom.ibm.security.jgss.debug=all<br />

-Dcom.ibm.security.krb5.Krb5Debug=all<br />

Figure 11-13 Java Virtual Machine properties display<br />

Chapter 11. SPNEGO and Windows single sign-on 417


Verifying security in WebSphere<br />

The following steps may have already been done in your environment:<br />

1. Log on to the WebSphere Application Server administrative console.<br />

2. Verify that you have Lightweight Third-Party Authentication (LTPA) as the<br />

authentication mechanism. You can verify that you use LTPA in Security →<br />

Secure administration, applications, and infrastructure →<br />

Authentication mechanisms and expiration. LTPA is now the default<br />

authentication mechanism. The “Use SWAM-no authenticated<br />

communication between servers” check box should not be checked. The<br />

Enabled check box should be checked under Security → Secure<br />

administration, applications, and infrastructure → single sign-on (SSO).<br />

3. Verify that you have administrative and application security on under<br />

Security → Secure administration.<br />

4. In our configuration, we use the local operating system user registry<br />

(LocalOS), which is RACF. It is also possible to use Active Directory as a<br />

LDAP user registry.<br />

5. Make sure that the user identities used within the Active Directory domain are<br />

also known by the user registry used by WebSphere. This is mandatory for<br />

single sign-on to happen.<br />

6. Restart WebSphere Application Server for z/OS.<br />

At server startup, the servant region log should appear the SPNEGO TAI<br />

initialization and parameters. Example 11-5 shows our servant region log.<br />

Example 11-5 SPNEGO TAI servant region log<br />

BossLog: { 0021} 2006/11/16 04:03:02.713 01 SYSTEM=SC58 SERVER=WS6584<br />

./bborjtr.cpp+953 ... CWSPN0006I: SPNEGO Trust Association Interceptor<br />

initialialization is complete. Configuration follows:<br />

TAI configuration (JVM) properties:<br />

com.ibm.ws.security.spnego.isEnabled=true<br />

Server configuration:<br />

Kerberos ServicePrincipalName=HTTP/wtsc58a.kkdc.test.com@KKDC.TEST.COM<br />

com.ibm.ws.security.spnego.SPN.filter=request-url%=snoop<br />

com.ibm.ws.security.spnego.SPN.filterClass=com.ibm.ws.security.spnego.H<br />

TTPHeaderFilter@641c641c<br />

com.ibm.ws.security.spnego.SPN.NTLMTokenReceivedPage=null<br />

com.ibm.ws.security.spnego.SPN.spnegoNotSupportedPage=null<br />

418 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


11.3.4 Configuring the Web browser<br />

In this section, we describe how to configure the Web browser on the user<br />

workstation. We show how to configure Microsoft Internet Explorer and Mozilla<br />

Firefox.<br />

Configuring Microsoft Internet Explorer<br />

Complete the following steps to ensure that Internet Explorer is enabled to<br />

perform SPNEGO authentication:<br />

1. Using the user workstation, log onto the Active Directory domain.<br />

2. Launch Microsoft Internet Explorer.<br />

3. Within Internet Explorer, click Tools → Internet Options and select the<br />

Security tab. Select the Local intranet icon and click Sites. In the Local<br />

intranet window, ensure that the check box to include all local (intranet) not<br />

listed in other zones is selected, then click Advanced.<br />

Chapter 11. SPNEGO and Windows single sign-on 419


4. In the Local intranet window, fill in the Add this Web site to the zone field with<br />

the Web address of the host name so that the single sign-on can be enabled<br />

to the Web sites shown in the Web sites field. We put<br />

http://wtsc58a.kkdc.test.com in our configuration. Click OK to complete this<br />

step and close the Local intranet window. See Figure 11-14.<br />

Figure 11-14 Internet Explorer Local intranet window<br />

420 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


5. On the Internet Options window, click the Advanced tab and scroll to Security<br />

settings. Ensure that the Enable Integrated Windows Authentication (requires<br />

restart) box is selected. Click OK. See Figure 11-15.<br />

Figure 11-15 Internet Explorer Internet Options window<br />

6. Restart Microsoft Internet Explorer to activate this configuration.<br />

Configuring Mozilla Firefox<br />

Complete the following steps to ensure that Mozilla Firefox is enabled to perform<br />

SPNEGO authentication.<br />

1. Using the user workstation, log on to the Active Directory domain.<br />

2. Launch Mozilla Firefox.<br />

3. In the browser address field, type about:config.<br />

4. In the filter field, type network.n.<br />

Chapter 11. SPNEGO and Windows single sign-on 421


5. Double-click network.negotiate-auth.trusted-uris. This preference lists the<br />

sites that are permitted to engage in SPNEGO authentication with the<br />

browser. Enter a comma-delimited list of trusted domains or URLs. We enter<br />

http://wtsc58a.kkdc.test.com in our environment. See Figure 11-16.<br />

Figure 11-16 Mozilla Firefox configuration window<br />

If the deployed SPNEGO solution uses the advanced Kerberos feature of<br />

credential delegation double-click network.negotiate-auth.delegation-uris.<br />

This preference lists the sites for which the browser may delegate user<br />

authorization to the server. Enter a comma-delimited list of trusted domains or<br />

URLs.<br />

6. Click OK and the configuration appears as updated.<br />

7. Restart the Firefox browser to activate this configuration.<br />

11.3.5 Tips for troubleshooting the SPNEGO TAI configuration<br />

For troubleshooting the SPNEGO TAI configuration on the WebSphere side, we<br />

recommend turning on the following traces:<br />

► With the Administrative Console in Troubleshooting → Logging and<br />

Tracing → → Change Log Detail Levels:<br />

com.ibm.ws.security.spnego.*<br />

422 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


► With the Administrative Console in Servers → Application servers →<br />

server_name → Java and Process management → Process Definition →<br />

Servant → Java Virtual Machine, locate the Generic JVM arguments text<br />

box. Add the following options in this text box to enable JGSS and KRB5<br />

traces:<br />

-Dcom.ibm.security.jgss.debug=all<br />

-Dcom.ibm.security.krb5.Krb5Debug=all<br />

The trace appears in the Servant region.<br />

Here are some ideas for troubleshooting a new SPNEGO TAI configuration:<br />

► Make sure that you are trying to access WebSphere Application Server with a<br />

user that is logged into the domain.<br />

► Make sure that you are not trying to access the application server from the<br />

domain controller.<br />

► Make sure that the TAI initialized successfully with a message such as the<br />

following in the servant region:<br />

CWSPN0006I: SPNEGO Trust Association Interceptor initialialization<br />

is complete.<br />

► Make sure that you have the correct encryption types specified in your<br />

Kerberos configuration file and that all encryption type configurations match.<br />

► Make sure that you have the same time on the WebSphere Application<br />

Server host and the domain controller.<br />

► On the user workstation side, use kerbtray.exe to see what tickets have been<br />

granted to the user logged in. This utility is provided with the Windows Server<br />

2003 Resource Kit Tools.<br />

► Restart the user workstation. Sometimes if the client was brought up before<br />

the domain controller, then this can have adverse affects.<br />

► Remove any filters you have specified for the TAI. Try to get a connection<br />

working before you start filtering requests.<br />

► Make sure that you have SPNEGO authentication enabled on the client’s<br />

browser.<br />

Some other good tips are available in the InfoCenter at the following URL:<br />

http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/<br />

com.ibm.websphere.zseries.doc/info/zseries/ae/rsec_SPNEGO_trouble_shoot<br />

.html<br />

Chapter 11. SPNEGO and Windows single sign-on 423


11.4 Validating single sign-on using the SPNEGO TAI<br />

In this section we validate the single sign-on scenario between a Windows<br />

workstation.<br />

Using the user workstation, log on to the Windows Active Directory domain. We<br />

use the Valence user ID in our configuration. This user ID exists both in Active<br />

Directory and in RACF.<br />

Using the kerbtray.exe utility, it is possible to see the Kerberos tickets acquired<br />

by the user. The kerbtray.exe utility is available from the Windows Server 2003<br />

Resource Kit Tools. Right after logon, we can verify that the workstation obtained<br />

the ticket granting ticket from the Windows KDC.<br />

This TGT is named krbtgt/KKDC.TEST.COM in our example (Figure 11-17).<br />

Figure 11-17 User Kerberos tickets after logon<br />

Launch a Web browser such as Microsoft Internet Explorer. Enter the URL<br />

address of the application that you want to single sign-on with. We use the<br />

WebSphere embedded snoop servlet in our example at the following address:<br />

http://wtsc58a.kkdc.test.com:49080/snoop/<br />

When security is on with WebSphere, the embedded snoop servlet asks for<br />

authentication. Because we use the SPNEGO TAI, because we configured the<br />

424 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


owser accordingly, because the Windows KDC, the browser asks the KDC for<br />

a Service Ticket to use the HTTP service with wtsc58a. Then the browser sends<br />

the HTTP request including a SPNEGO token with the user identity (Valence) to<br />

WebSphere Application Server for z/OS.<br />

The detailed communication steps are described in the scenario description<br />

shown in Figure 11-4 on page 402.<br />

Figure 11-18 Internet Explorer Snoop servlet display<br />

The browser displays the snoop servlet, which shows the authenticated user.<br />

The WebSphere authenticated user (Valence) is the Windows domain<br />

authenticated user. Single sign-on occurred between the Windows domain and<br />

WebSphere Application Server for z/OS using the SPNEGO TAI.<br />

Chapter 11. SPNEGO and Windows single sign-on 425


The same behavior happens with another Web browser such as Mozilla Firefox,<br />

as shown on Figure 11-19.<br />

Figure 11-19 Mozilla Firefox Snoop servlet display<br />

The WebSphere for z/OS servant region log confirms this scenario, shows that<br />

the SPNEGO token is processed, and highlights the authenticated user.<br />

Example 11-6 shows this log.<br />

Example 11-6 WebSphere z/OS servant region log with traces on<br />

Trace: 2006/11/16 14:26:31.280 01 t=8C7718 c=UNK key=P8 (13007002)<br />

ThreadId: 00000029<br />

FunctionName: handleRequest<br />

SourceId: com.ibm.ws.security.spnego.SpnegoHandler<br />

Category: FINER<br />

ExtendedMessage: SPNEGO request token successfully processed.<br />

Trace: 2006/11/16 14:26:31.281 01 t=8C7718 c=UNK key=P8 (13007002)<br />

ThreadId: 00000029<br />

FunctionName: handleRequest<br />

SourceId: com.ibm.ws.security.spnego.SpnegoHandler<br />

Category: INFO<br />

ExtendedMessage: CWSPN0023I: Username VALENCE@KKDC.TEST.COM Token<br />

size 1662.<br />

Trace: 2006/11/16 14:26:31.282 01 t=8C7718 c=UNK key=P8 (13007002)<br />

ThreadId: 00000029<br />

426 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


FunctionName: trimUsername<br />

SourceId: com.ibm.ws.security.spnego.SpnegoHandler<br />

Category: FINER<br />

ExtendedMessage: Principal name was trimmed to: VALENCE<br />

Trace: 2006/11/16 14:26:31.283 01 t=8C7718 c=UNK key=P8 (13007002)<br />

ThreadId: 00000029<br />

FunctionName: negotiateValidateandEstablishTrust<br />

SourceId: com.ibm.ws.security.spnego.TrustAssociationInterceptorImpl<br />

Category: FINER<br />

ExtendedMessage: Authenticated user: VALENCE Subject: Subject:<br />

Principal: VALENCE@KKDC.TEST.COM<br />

It is also interesting to look at the Kerberos tickets acquired by the user<br />

workstation after running the HTTP request. Using the kerbtray.exe utility, it is<br />

possible to see the Kerberos tickets acquired by the user. The kerbtray.exe utility<br />

is available from the Windows Server 2003 Resource Kit Tools. This utility shows<br />

that the user obtained a service ticket to access the WebSphere for z/OS<br />

kerberized service.<br />

This ST is named HTTP/wtsc58a.kkdc.test.com in our example (Figure 11-20).<br />

Figure 11-20 User Kerberos tickets after HTTP request<br />

Chapter 11. SPNEGO and Windows single sign-on 427


We use Ethereal software to sniff the network and see the communication flows<br />

between the user workstation and the other parties. It shows the first<br />

unauthorized HTTP request to WebSphere, then the service ticket request to the<br />

ticket granting server (TGS-REQ and TGS-REP) and the single sign-on HTTP<br />

request to WebSphere. Figure 11-21 shows the communications from the user<br />

workstation.<br />

Figure 11-21 Etheral output showing single sign-on steps<br />

All this validates the scenario described in Figure 11-4 on page 402 and confirms<br />

the single sign-on between the Windows domain and WebSphere Application<br />

Server for z/OS.<br />

428 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Chapter 12. Operating system security<br />

In this chapter we introduce some new security features for WebSphere<br />

Application Server Version 6.1 for z/OS administrative security.<br />

We cover the following topics:<br />

► “Out-of-the-box administrative security” on page 430<br />

► “Automatically generated server IDs” on page 441<br />

► “RACF - mixed-case password support” on page 443<br />

► “Sync-to-OS thread update” on page 444<br />

12<br />

© Copyright <strong>IBM</strong> Corp. 2007. All rights reserved. 429


12.1 Out-of-the-box administrative security<br />

When installing WebSphere Application Server Version 6.1 for z/OS you may<br />

notice some differences from previous versions. WebSphere Application Server<br />

Version 6.1 for z/OS contains improved security features. One of the most<br />

remarkable new options is out-of-the-box administrative security. Out-of-the-box<br />

administrative security gives you the option to enable administrative security at<br />

installation and configuration time to prevent unauthorized access to the<br />

administrative console.<br />

In previous versions of WebSphere Application Server the initial installation of<br />

the server did not have a security configuration (yet). Access to the<br />

administrative system and its configuration data were not protected by default. If<br />

you needed security enabled, you had to activate global security, which<br />

activates security for both administration and applications.<br />

In WebSphere Application Server V6.1 for z/OS, global security has been split<br />

into administrative and application security. By enabling administrative security<br />

by default, you can keep unauthorized users from accessing the administrative<br />

console and your business applications. Administrative security should be<br />

enabled to restrict access.<br />

In this section we introduce the new configuration options in the installation<br />

process from a security point of view.<br />

There are two installation/customization tools to install WebSphere Application<br />

Server Version 6.1 for z/OS: the ISPF (Interactive System Productivity Facility)<br />

Customization Dialog and the zPMT(z/OS Profile Management Tool), which is<br />

AST (Eclipse) based. They both generate batch jobs, scripts, and data files that<br />

you use to perform WebSphere Application Server for z/OS customization tasks.<br />

The panels shown in this chapter to illustrate the security setup options are<br />

based on the ISPF Customization Dialog.<br />

12.1.1 Cell-wide common user groups and IDs<br />

Before introducing the WebSphere Application Server security options we first<br />

provide common definitions of groups and users.<br />

In earlier versions of WAS for z/OS, cell-wide security information is set up in the<br />

Security domain configuration option. It defines user groups and user IDs<br />

including the application server administrator, SSL customization, security<br />

domain name, and more. In Version 6.1, this is now done in the “Configure<br />

common MVS groups and users” option, and its parameters have been changed.<br />

In Figure 12-1, all the definitions are shown. Note that they are cell-wide. Other<br />

430 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


security values, which were part of the security domain configuration in the<br />

previous version of WAS, are now specified in the process of the application<br />

server configuration. There you can specify additional detailed security settings<br />

for each application server in the same cell.<br />

------------ WebSphere Application Server for z/OS Customization --------<br />

Option ===><br />

Configure common MVS groups and users (1 of 1)<br />

Specify the following to configure common MVS groups and users,<br />

then press Enter to continue.<br />

WebSphere Application Server Configuration Group Information<br />

Group....: WSCFG1 GID..: 2500<br />

WebSphere Application Server HFS Owner Information<br />

User ID..: WSOWNER UID..: 2405<br />

WebSphere Application Server Servant Group Information<br />

Group....: WSSR1 GID..: 2501<br />

WebSphere Application Server Local User Group Information<br />

Group....: WSCLGP GID..: 2502<br />

WebSphere Application Server user ID home directory:<br />

/var/WebSphere/home<br />

Figure 12-1 Common MVS groups and users customization panel<br />

WebSphere Application Server HFS owner is a new user ID added in WAS V6.1.<br />

This user ID owns many of the cell's files in the configuration file system. It<br />

should have the WebSphere Application Server configuration group (see the<br />

example below) as its default group.<br />

The following is an example of a RACF group and user ID set up by a RACF<br />

command. You can find these commands in hlq.DATA(BBOSBRAK), which is<br />

one of the generated customization jobs.<br />

Create a new WebSphere Application Server configuration group:<br />

ADDGROUP WSCFG1 OMVS(GID(2500))<br />

Chapter 12. Operating system security 431


Add a new HFS owner user ID:<br />

ADDUSER WSOWNER DFLTGRP(WSCFG1) OMVS(UID(2405)<br />

HOME(/var/WebSphere/home/WSCFG1) PROGRAM(/bin/sh)) NAME('WAS HFS<br />

OWNER') NOPASSWORD NOOIDCARD<br />

The NOPASSWORD parameter sets the PROTECTED attribute.<br />

12.1.2 Security configuration options<br />

There are three administration security options. Figure 12-2 shows the security<br />

customization options.<br />

------------ WebSphere Application Server for z/OS Customization --------<br />

Option ===><br />

Security Customization<br />

Specify a number and press Enter to customize security for WebSphere<br />

Application Server for z/OS. You should review all of the variables in<br />

in the section you select, even if you are using all of the<br />

<strong>IBM</strong>-supplied defaults. Press PF3 to return to the main menu.<br />

How do you want to manage user identities and authorization policy?<br />

1 - Use a z/OS security product<br />

The z/OS security product manages users, groups, and the<br />

authorization policy.<br />

2 - Use WebSphere Application Server<br />

WebSphere Application Server manages users, groups, and the<br />

authorization policy.<br />

3 - Do not enable security<br />

Figure 12-2 Security Customization panel<br />

In the following sections we explain the features of each option.<br />

432 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Option 1: Use a z/OS security product<br />

If you want to enable administrative security and use a local z/OS repository for<br />

authentication and authorization, you must choose this option. These are the<br />

characteristics of this option:<br />

► Each WebSphere Application Server user and group identity corresponds to a<br />

user ID or group in the z/OS system's SAF-compliant security server, such as<br />

RACF.<br />

► Access to WebSphere Application Server J2EE roles is controlled using the<br />

SAF EJBROLE class profiles in conjunction with the GEJBROLE class, if you<br />

choose to use the grouping class.<br />

► Digital certificates for SSL communication are stored in the z/OS security<br />

product.<br />

On z/OS, RACF is always used to control WebSphere Application Server started<br />

task identities and the digital certificate of the location service daemon. However,<br />

when the “Use a z/OS security product” option is selected, all WebSphere<br />

Application Server administrators and administrative groups must be defined to<br />

SAF as well. Later, when (and if) application security is enabled, the SAF security<br />

database will need to hold J2EE roles and identities permitted to these<br />

applicative roles.<br />

The “Use a z/OS security product” option is appropriate when servers or cells<br />

reside entirely on z/OS systems, with SAF as the user registry. Customers who<br />

plan to implement an LDAP or a custom user registry and plan to map<br />

LDAP/CUR identities to SAF identities and use SAF authorization should also<br />

choose this option so that initial SAF EJBROLE setup is performed.<br />

The following SAF user IDs are created:<br />

► WebSphere Application Server Administrator user ID<br />

► WebSphere Application Server unauthenticated user ID (to represent a<br />

WebSphere Application Server ID that has not been authenticated, also<br />

referred to as the public user ID)<br />

The server ministration user ID needs to be defined with a password. The expiry<br />

policies for passwords need to be checked with your security administrators. It is<br />

advisable to either assign a non expiring password or have good password reset<br />

policies. Your cell will not function if the administrators password has expired.<br />

Chapter 12. Operating system security 433


It is common practice to define the unauthenticated user ID with both the<br />

restricted and protected attributes. See Figure 12-3.<br />

------------ WebSphere Application Server for z/OS Customization --------<br />

Option ===><br />

z/OS security product<br />

Specify the following to customize your system environment, then<br />

press Enter to continue.<br />

Use security domain identifier in RACF profiles: N<br />

Security domain identifier.................:<br />

WebSphere Application Server Administrator Information<br />

User ID..: WSADMIN UID..: 2403<br />

WebSphere Application Server Unauthenticated User Information<br />

User ID..: WSGUEST UID..: 2402<br />

Figure 12-3 Use a z/OS security product panel<br />

If you want to prefix the EJBROLE class RACF profiles with a security domain<br />

and include this domain in CBIND profiles (see below), set “Use security domain<br />

identifier in RACF profiles” to Y and enter the security domain name.<br />

The following is an example of the RACF command if no security domain is used:<br />

RDEFINE CBIND CB.BIND.** UACC(READ)<br />

PERMIT CB.BIND.** CLASS(CBIND) ID(WSCFG1) ACCESS(CONTROL)<br />

If you set “Use security domain identifier” to Y and specify the security domain<br />

identifier, the domain name is added to the profile. The resulting RACF command<br />

would be:<br />

RDEFINE CBIND CB.BIND..** UACC(READ)<br />

PERMIT CB.BIND..** CLASS(CBIND) ID(WSCFG1) ACCESS(CONTROL)<br />

434 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


You can verify the current WebSphere Application Server security settings via<br />

the administrative console by clicking Security → Secure Administration,<br />

applications, and infrastructure. Figure 12-4 shows the current z/OS security<br />

settings for option 1.<br />

Figure 12-4 Security configuration page using a z/OS security product<br />

Option 2: Use WebSphere Application Server security<br />

In option 1 the user authentication and authorization policy is managed through<br />

SAF. In option 2, as in options 1 and 3, RACF is used to control WebSphere<br />

Application Server for z/OS started task identities, as well as the location service<br />

daemon's digital certificate. However, users and groups are defined in the<br />

WebSphere Application Server user registry and authorization is managed by<br />

WebSphere Application Server. These are the characteristics of option 2:<br />

► Each WebSphere Application Server user and group identity corresponds to<br />

an entry in a WebSphere Application Server user registry. The initial user<br />

registry is a federated repository, a simple file-based user registry created<br />

during customization and residing in the configuration file system.<br />

Chapter 12. Operating system security 435


► Access to WebSphere Application Server roles is controlled using<br />

WebSphere role bindings. In particular, administrative role bindings are set<br />

through the Administrative User Roles and Administrative Group Roles<br />

settings in the admin console.<br />

► Digital certificates for SSL communication are stored in the configuration file<br />

system.<br />

Self-signed digital certificates for servers are created in the configuration file<br />

system automatically by WebSphere Application Server.<br />

When selecting option 2 you will be presented with the customization panel, as<br />

shown in Figure 12-5. The user ID that you specify here is stored in the<br />

file-based user registry and used as initial administrative user. The sample user<br />

ID is optional. This field appears once you have selected to install the sample<br />

application.<br />

------------ WebSphere Application Server for z/OS Customization --------<br />

Option ===><br />

WebSphere Application Server Security<br />

Specify a user name and password to login to the administrative console<br />

and perform administrative tasks.<br />

User ID.: WSADMIN<br />

Password:<br />

Confirm Password:<br />

The Sample applications require an account in the profile. Assign a<br />

password to the samples user account.<br />

User ID.: samples<br />

Password:<br />

Confirm Password:<br />

Figure 12-5 WebSphere Application Server security panel<br />

436 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


You can verify the current WebSphere Application Server security settings via<br />

the administrative console by clicking Security → Secure Administration,<br />

applications, and infrastructure. Figure 12-6 shows the current settings of<br />

option 2.<br />

Figure 12-6 Security configuration page using WebSphere Application Server security<br />

Option 3: Do not enable security<br />

If you select Do not enable security, administrative security will not be activated.<br />

Note: If you aim to enable SAF security for your application server<br />

environment in the future, but choose to do initial setup with security disabled,<br />

you should reconsider. Contrary to previous versions of WebSphere, where<br />

security was disabled by default, choosing option 3 in Version 6.1 would mean<br />

having to configure the complete security infrastructure without the help of<br />

generated installation jobs. Refer to Technote swg1237841:<br />

http://www-1.ibm.com/support/docview.wss?uid=swg21237841<br />

Chapter 12. Operating system security 437


12.1.3 Security customization jobs<br />

Regardless of the administrative security option selected, you submit the<br />

customization jobs to define the desired security infrastructure as part of the<br />

server configuration process. Profiles in the STARTED class, for instance, need<br />

to be defined in any case when running WebSphere on z/OS. In the process of<br />

configuring a base application server member hlq.DATA(BBOWBRAK) contains<br />

all RACF commands. The commands in BBOWBRAK are generated by<br />

submitting hlq.CNTL(BBOCBRAJ). If you browse hlq.DATA(BBOWBRAK) you<br />

can examine the generated RACF commands.<br />

The RACF commands generated are:<br />

► Common RACF security setup, which is required regardless of security<br />

option:<br />

– Activate RACF SERVER, STARTED, and FACILITY classes.<br />

– Add user for WebSphere Application Server regions.<br />

– Add default asynchronous admin task user.<br />

– Connect servants to the WebSphere configuration group.<br />

– Define and permit access for the log stream profile.<br />

– Define and permit access for SERVER CB profiles. Determine whether a<br />

servant region can initialize.<br />

– Define FACILITY BPX.WLMSERVER profiles. Authorize servants to use<br />

WLM services.<br />

– Assign user IDs to STARTED tasks.<br />

– Define permissions to work with certificates.<br />

– Create a certificate authority certificate.<br />

– Create SSL keyring (WAS CA certificates/commercial CAs) for the location<br />

service daemon.<br />

– Generate a certificate for the location service daemon.<br />

– Connect a certificate to the keyring for the location service daemon.<br />

► Additional security setup for z/OS product security use:<br />

– Activate RACF CBIND and SURROGAT classes. The SURROGAT class<br />

profile relating to the Sync-to-OS feature is new in WAS Version 6.1.<br />

– Create a WAS administrator user ID and an unauthenticated user ID.<br />

– Set up the RACF APPL class profile.<br />

– Set up CBIND class profiles. CBIND profiles are created, and granted to<br />

the configuration group.<br />

438 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


– Set up EJBROLE class profiles:<br />

Administrative roles (administrator, monitor, configurator, operator,<br />

deployer, and adminSecurityManager) are created, and the<br />

administrator user ID is granted the administrator role.<br />

Naming roles (CosNamingRead, CosNamingWrite, CosNamingCreate,<br />

and CosNamingDelete) are created. You should permit the<br />

configuration group for WebSphere Application Server (servers and<br />

administrators) READ access to all of these profiles.<br />

– Create an SSL keyring (WAS CA certificates/commercial CAs) for the<br />

application server. Digital keyrings are created for the administrator,<br />

controller, controller region adjunct, and server user IDs.<br />

– Generate a certificate. Digital certificates are created for each server<br />

controller.<br />

– Connect the certificate to the keyring.<br />

– Create Sync-to-OS thread profile (new in WAS Version 6.1). See<br />

“Sync-to-OS thread update” on page 444 for more information.<br />

– Create a facility class profile for trusted applications (new in WAS Version<br />

6.1)<br />

A trusted application is an application that requires WebSphere<br />

Application Server to build SAF credentials without an authenticator, for<br />

instance, a TCB level ACEE being created if SyncToOSthread is enabled.<br />

The facility class profile is BBO.TRUSTEDAPPS... The<br />

control region user ID needs to be permitted with access READ and the<br />

custom property EnableTrustedApplications needs to be set to true in<br />

Security → Secure administration, applications and infrastructure.<br />

Chapter 12. Operating system security 439


12.1.4 Comparison of security settings<br />

For a clear comparison of WebSphere Application Server security configurations<br />

see Table 12-1.<br />

Table 12-1 Comparison of default security settings<br />

User account<br />

repository<br />

Authorization<br />

technology<br />

(external<br />

authenticated<br />

provider<br />

security)<br />

Administrative<br />

role definition<br />

z/OS security WebSphere Application<br />

Server security<br />

Local operating system<br />

User IDs, groups, and<br />

passwords are stored in RACF.<br />

System Authorization Facility<br />

(SAF) authorization<br />

Use the authorization policy that<br />

is stored in RACF.<br />

RACF EJBROLE profile<br />

Mapping information is stored in<br />

RACF.<br />

Definition of EJBROLE profiles<br />

is required. (Default roles are<br />

defined during server<br />

installation process.)<br />

Key store type System Authorization Facility<br />

keyring<br />

Stored in RACF DB<br />

Key store PATH: safkeyring:///<br />

<br />

Type: JCERACFKS<br />

440 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS<br />

Federated repository<br />

User IDs and passwords are<br />

stored in file-based placed<br />

UNIX System Service.<br />

User IDs and passwords are<br />

stored in fileRegistry.xml<br />

Default authorization<br />

Use WebSphere Security<br />

authorization.<br />

WebSphere Admin Role<br />

Mapping information is stored in<br />

UNIX System Services.<br />

► Information of user IDs and<br />

roles is stored in<br />

admin-auth.xml.<br />

► Primary admin user ID,<br />

which is used to log on to<br />

the administrative console,<br />

is stored in security.xml.<br />

File-based key store<br />

Stored in UNIX System<br />

Services.<br />

Key store PATH:<br />

${CONFIG_ROOT}/cells//nodes//<<br />

key_file><br />

Type: PKCS12


Application<br />

deployment<br />

(role mapping)<br />

z/OS security WebSphere Application<br />

Server security<br />

Security Authorization<br />

Facility (SAF)-based mapping<br />

► Need to define new<br />

EJBROLE profiles in RACF.<br />

► The “Map security roles to<br />

users or groups” step in the<br />

deployment of an<br />

application is ineffective.<br />

In addition to the mentioned application deployment on Table 12-1, when you<br />

deploy an application that has security constraints defined on servlets, EJBs, or<br />

something else, one of the deployment steps consists of mapping users and<br />

groups to security roles. Remember that only administrative security is enabled<br />

initially (if chosen). Application security must be enabled as well in order to have<br />

the mapping take effect.<br />

If you want only to enable administrative security, we recommend choosing<br />

security using a z/OS security product for the following two reasons:<br />

► Risk of falsification of data<br />

RACF user control is much more difficult to be falsified than WebSphere<br />

Application Server Security user control, in which case information is stored in<br />

flat files.<br />

► Easy to change security configuration<br />

It is easier to change from z/OS security to another option than the other way<br />

around regarding RACF setup.<br />

12.2 Automatically generated server IDs<br />

File-based mapping<br />

Need to map user and role in<br />

the “Map security roles to users<br />

or groups” step in the<br />

deployment of application.<br />

Server IDs are used for authentication on server-to-server communication.<br />

Automatically generated server IDs support improved auditability for cells.<br />

In previous versions the administrative user ID and password are used not only<br />

for administrative purposes but also for internal server-to-server communication.<br />

There was a possibility of password exposure during server-to-server<br />

communication. WebSphere V6.1 makes a distinction between the<br />

administrative user ID and the server ID. Automatically generated server IDs do<br />

not require a password and are not stored in any registry. By default, the server<br />

ID is the cell name. The administrative user ID is stored in a registry. This ID is<br />

used to log on to the administrative console when administrative security is<br />

Chapter 12. Operating system security 441


enabled and no console users or groups are defined yet. As a result of<br />

separating the function of server IDs and the administrative ID, administrative<br />

actions can be audited.<br />

Using internally generated server IDs is a default setting in WebSphere V6.1. To<br />

maintain backwards compatibility in a mixed cell environment you will need to<br />

specify the server ID and its password in the WebSphere configuration.<br />

To change from the internally generated server ID to the z/OS started task<br />

identity follow the next steps.<br />

1. Go to Security → Secure administration, applications, and<br />

infrastructure.<br />

2. Click the Available realm definitions drop-down list and select your<br />

repository under User account repository.<br />

3. Click Configure.<br />

This configuration option differs for each registry. Figure 12-7 illustrates the<br />

server identity setting for the local operating system user registry.<br />

Figure 12-7 Server user identity configuration for local operating system registry<br />

442 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


12.3 RACF - mixed-case password support<br />

The password is important in protecting users, applications, and systems. The<br />

harder it is to guess a password the better the protection level. Mixed case<br />

passwords provide a higher level of security and are harder to break.<br />

WebSphere for z/OS V6.1 supports multiple user registries. Both file-based<br />

repositories and a Lightweight Directory Access Protocol repository support<br />

case-sensitive passwords. In z/OS v1.7 RACF mixed-case password support<br />

has been introduced.<br />

WebSphere Application Server V6.1 for z/OS supports RACF mixed-case<br />

passwords. The support applies both to a local OS User Registry and LDAP<br />

TDBM native authentication or SDBM. With both LDAP back ends passwords are<br />

validated in RACF.<br />

RACF mixed-case password support is disabled by default. To enable<br />

mixed-case password support you must comply with the following prerequisites:<br />

► Use z/OS Version 1.7 or later.<br />

► In WebSphere, either local operating system registry LDAP TDBM NA or<br />

LDAP SDBM is the configured registry.<br />

The SETROPTS option to enable or disable mixed-case passwords is not<br />

available through the RACF panels. You need to issue one of the following<br />

commands.<br />

To turn on the MIXEDCASE option:<br />

SETROPTS PASSWORD(MIXEDCASE)<br />

To turn off the MIXEDCASE option:<br />

SETROPTS PASSWORD(NOMIXEDCASE)<br />

To display the current system-wide RACF options for your environment issue:<br />

SETROPTS LIST<br />

Chapter 12. Operating system security 443


PASSWORD PROCESSING OPTIONS:<br />

PASSWORD CHANGE INTERVAL IS 90 DAYS.<br />

PASSWORD MINIMUM CHANGE INTERVAL IS 0 DAYS.<br />

MIXED CASE PASSWORD SUPPORT IS IN EFFECT<br />

NO PASSWORD HISTORY BEING MAINTAINED.<br />

USERIDS NOT BEING AUTOMATICALLY REVOKED.<br />

PASSWORD EXPIRATION WARNING LEVEL IS 10 DAYS.<br />

NO INSTALLATION PASSWORD SYNTAX RULES ARE PRESENT.<br />

Figure 12-8 Password excerpt of the SETROPTS LIST command output<br />

Note: The use of mixed-case passwords on your z/OS systems needs to be<br />

very carefully planned. Instructing your users is of utmost importance to avoid<br />

confusion after having entered a new password. Falling back to<br />

NOMIXEDCASE has an even bigger impact, since all mixed-case passwords<br />

will need to be reset.<br />

12.4 Sync-to-OS thread update<br />

The Sync-To-OS thread security concept is unique to WebSphere Application<br />

Server on z/OS. It allows the current J2EE thread identity to be propagated to the<br />

OS thread for use by z/OS resource managers outside the scope of the J2EE<br />

container. It effectively sets the servant regions TCB level ACEE to the current<br />

JAAS principal. On other platforms this would always be the user ID that the EJB<br />

container is running under. In the case of WebSphere Application Server on<br />

z/OS, the user ID under which the servant region STC is running would be used<br />

to access back-end systems (also referred to Enterprise Information Systems, or<br />

EIS) or other resources on z/OS if the Sync-To-OS thread option is set to false.<br />

Prior to WebSphere V6.1, Sync-to-OS thread was controlled in two ways.<br />

► The WebSphere Application Server developer had to configure the<br />

application to declare that it needs to run with application Sync-to-OS thread.<br />

► The WebSphere Application Server administrator had to configure the<br />

application server to enable application Sync-to-OS thread allowed.<br />

What is new in Version 6.1<br />

Additional controls have been added to secure thread security and thread<br />

identity support. A new FACILITY class profile must be defined in order for<br />

Sync-to-OS thread to be allowed. The control region user ID need READ or<br />

CONTROL access to enable Sync-to-OS thread. With READ access, only<br />

444 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


security environments representing users in the SURROGAT class are allowed,<br />

while CONTROL allows for security environments to represent any RACF<br />

defined user ID.<br />

For this function, the following conditions must all be true:<br />

► The Sync-to-OS thread allowed value is true.<br />

If set through the administrative console, go to Security → Secure<br />

administration, applications, and infrastructure → z/OS security<br />

options.<br />

Figure 12-9 Enable z/OS thread identity synchronization<br />

► An application includes within its deployment descriptor an env-entry of<br />

com.ibm.websphere.security.SyncToOSThread=true.<br />

► The configured user registry is the local operating system.<br />

► The new FACILITY class profile and optional SURROGAT class profiles are<br />

defined.<br />

Define the new controls in RACF<br />

To enable Sync-to-OS thread you need to define new RACF profiles. If you<br />

create an application server with the local operating system option, the<br />

generated customization job contains the command to define the FACILITY class<br />

profile but it does not contain permit commands to that profile, nor the define and<br />

permit commands for the SURROGAT class profiles.<br />

Chapter 12. Operating system security 445


Create the Sync-to-OS thread profile:<br />

RDEFINE FACILITY BBO.SYNC.. UACC(NONE)<br />

PERMIT BBO.SYNC.. CLASS(FACILITY)<br />

ID(CR_user_id) ACC(READ or CONTROL)<br />

Create the SURROGAT class profile to optionally establish permission to allow<br />

Sync-to-OS thread:<br />

RDEFINE SURROGAT BBO.SYNC. UACC(NONE)<br />

PERMIT BBO.SYNC. CLASS(SURROGAT) ID(J2EE identity)<br />

ACC(READ)<br />

The Java principal (J2EE identity) requesting the synchronization of the OS<br />

thread needs READ access to a surrogat profile in the form as described above,<br />

where SR_user_id stands for the user ID under which the application server’s<br />

servant region is running. Again, this SURROGAT profile is optional. It will only<br />

be checked if the control region user ID has READ access to the BBO.SYNC<br />

FACILITY class profile.<br />

446 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Chapter 13. WAS administrative security<br />

On the z/OS platform the term administrative security refers to the security<br />

configuration that is in effect for the WebSphere Application Server cell.<br />

The configuration of administrative security for a security domain encompasses<br />

authentication of HTTP clients, authentication of IIOP clients, administrative<br />

console security, and naming security.<br />

In this chapter we focus on configuring administrative roles, resource instance<br />

access, and naming service security.<br />

These subtopics are addressed:<br />

► “Security configuration and administration” on page 448<br />

► “Role-based administrative security” on page 460<br />

► “Naming service security” on page 467<br />

13<br />

© Copyright <strong>IBM</strong> Corp. 2007. All rights reserved. 447


13.1 Security configuration and administration<br />

In this section we introduce the helpful security administration tools provided in<br />

V6.1 and show an example of a security implementation using the security<br />

wizard.<br />

13.1.1 Simplified security administration<br />

WebSphere Application Server V6.1 has an improved administrative console<br />

interface, which is different from V6.0. A more user-friendly interface simplifies<br />

the configuration of security settings and administrative operations.<br />

After installation and initial configuration of an application server environment<br />

you would normally first customize your security environment. The security<br />

wizard is helpful for basic security customization if your server is running with<br />

security disabled. The security configuration reporting tool is useful to display an<br />

overview of your current security settings.<br />

Security wizard<br />

The security wizard helps you to configure an existing user registry and to enable<br />

administrative, application, and resource security.<br />

Security configuration reporting tool<br />

The security configuration reporting tools’ output is somewhat limited, but it does<br />

display the core security settings as defined in your WebSphere environment.<br />

The report is divided into four columns:<br />

► Console Name<br />

► Security Configuration Name<br />

► Value<br />

► Console Path Name<br />

The console name entry is the name of the security setting or variable as it is<br />

presented in the admin console. The security configuration name is the name of<br />

the same variable as used internally by WebSphere. The security configuration<br />

name is what you would find in the configuration file system if you browse files<br />

like security.xml.<br />

448 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Figure 14-1 shows an example of a security configuration report.<br />

Figure 13-1 Security configuration report, example<br />

13.1.2 Administrative security implementation<br />

The installation dialogs offer two options to configure administrative security:<br />

► Provider configuration with the z/OS security product option in the ISPF<br />

panels (or zPMT)<br />

► Provider configuration with the WebSphere Application Server option in the<br />

ISPF panels (or zPMT)<br />

We strongly recommend enabling administrative security in order to restrict<br />

access to the administrative console. Sometimes WebSphere environments with<br />

Chapter 13. WAS administrative security 449


disabled security may be required, for instance, in a developer environment. In<br />

that case it might be a good idea to restrict access to the administrative console’s<br />

TCP/IP port by means of the TCP/IP SAF keyword in the TCP/IP PORT<br />

configuration and SERVAUTH class profiles, or by means of other IP-elated<br />

SERVAUTH profiles.<br />

Before enabling administrative security you need to choose an authorization<br />

provider. Authorization information determines whether a user or group has the<br />

necessary privileges to access resources. WebSphere Application Server for<br />

z/OS supports the following three authorization providers:<br />

► Default authorization<br />

Default authorization does not require special setup. The default authorization<br />

engine makes all of the authorization decisions.<br />

► External authorization using a JACC provider<br />

The JACC-based authorization provider enables third-party security providers<br />

(like Tivoli Access Manager) to handle the J2EE authorization.<br />

► System Authorization Facility (SAF) authorization<br />

SAF-based authorization uses the SAF EJBROLE class to control client<br />

access to Java 2 Enterprise Edition (J2EE) roles in EJBs and Web<br />

applications.<br />

13.1.3 Administrative security with SAF authorization<br />

Here we show the necessary steps to enable administrative security. We did not<br />

enable administrative security during the installation process.<br />

In order to enable z/OS product security you have to decide on your<br />

authorization provider. If you choose default authorization, RACF is used as the<br />

user registry but it is not used as user-to-role mapping repository. If you choose<br />

SAF as your authorization provider, RACF is used both as the user registry and<br />

for user-to-role mapping.<br />

If you choose default authorization provider, follow these steps:<br />

1. Log on to the administrative console.<br />

2. Click Security → Secure administration, applications, and infrastructure.<br />

450 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


3. Click the Security Configuration Wizard button.<br />

a. Specify the extent of protection (see Figure 13-2). Optionally, enable<br />

application security and Java 2 security.<br />

Figure 13-2 Specify extent of protection<br />

Chapter 13. WAS administrative security 451


. Select user repository (see Figure 13-3). Select Local operating system.<br />

Figure 13-3 Select user repository<br />

c. Configure the user repository (see Figure 13-4). Enter the primary (RACF<br />

defined) administrative user ID.<br />

Figure 13-4 Specify primary administrative user for z/OS security default authorization<br />

d. Verify your settings in the summary.<br />

452 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


e. Click Finish.<br />

4. Select the authorization provider.<br />

a. Click Security → Secure administration, applications, and<br />

infrastructure → External authorization providers.<br />

b. Verify that Default authorization is selected.<br />

5. Save your changes.<br />

You can review which files are updated before saving changes.<br />

Administrative security will be active after restarting the server. When logging on<br />

to the admin console you will need to provide the primary administrative user ID<br />

and its password.<br />

If you choose the SAF authorization provider, follow these steps. Follow the<br />

same steps as for the default provider. In addition, RACF setup is required.<br />

Follow steps 1–3 of the default authorization provider.<br />

1. Log on to the administrative console.<br />

2. Click Security → Secure administration, applications, and infrastructure.<br />

3. Click the Security Configuration Wizard button.<br />

The primary administrative user specified in step 3 (c) is invalid when<br />

choosing SAF authorization provider. The administrative user ID needs to be<br />

defined in RACF.<br />

4. Select the authorization provider:<br />

a. Click Security → Secure administration, applications, and<br />

infrastructure →> External authorization providers.<br />

b. Select the SAF authorization provider.<br />

Important: The security configuration wizard turns off SAF<br />

authorization. If you run the security configuration wizard after having<br />

enabled SAF authorization, you need to manually turn on SAF<br />

authorization again.<br />

5. Save the changes.<br />

6. Optional: Create an administrative user ID.<br />

If you plan to create a new administrative user ID for the SAF authorization<br />

provider, define it in RACF.<br />

7. Define the RACF administrative roles.<br />

Chapter 13. WAS administrative security 453


EJBROLE class profiles are case sensitive. If you have a security domain<br />

enabled, prefix the administrative role names by the domain name.<br />

Otherwise, specify only the role name.<br />

RDEFINE EJBROLE administrator UACC(NONE)<br />

RDEFINE EJBROLE monitor UACC(NONE)<br />

RDEFINE EJBROLE configurator UACC(NONE)<br />

RDEFINE EJBROLE operator UACC(NONE)<br />

RDEFINE EJBROLE deployer UACC(NONE)<br />

RDEFINE EJBROLE adminsecuritymanager UACC(NONE)<br />

For a description of each administrative role see 13.2.1, “Administrative roles”<br />

on page 460.<br />

8. Permit access to the administrative role profiles. READ access is sufficient.<br />

Be careful granting ALTER access on a discrete resource profile. A user with<br />

ALTER access can alter the access list (ACL) of that profile.<br />

PERMIT role_name CLASS(EJBROLE) ID(user_id or group_id)<br />

ACCESS(READ)<br />

9. Refresh the RACLISTed class in order to activate the changes:<br />

SETROPTS RACLIST(EJBROLE) REFRESH<br />

To display an EJBROLE profile and its ACL execute the following command<br />

RLIST EJBROLE administrative_role ALL<br />

We recommend using JCL to execute RACF commands for ease of viewing the<br />

resulting output. A sample JCL to list all EJBROLE class profiles is shown in<br />

Example 13-1.<br />

Example 13-1 Sample JCL to display all profiles in the EJBROLE class<br />

//LSTRACF EXEC PGM=IKJEFT01<br />

//SYSLBC DD DSN=SYS1.BRODCAST,DISP=SHR<br />

//SYSTSPRT DD SYSOUT=*<br />

//SYSPRINT DD SYSOUT=*<br />

//SYSOUT DD SYSOUT=*<br />

//SYSIN DD DUMMY<br />

//SYSTSIN DD *<br />

RLIST EJBROLE * ALL<br />

/*<br />

Note that all security-related changes to the WebSphere configuration need a<br />

restart of your base server or network deployed cell in order to get activated.<br />

454 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


13.1.4 Administrative security with default authorization provider<br />

Here we show the necessary steps to enable administrative security. We did not<br />

enable administrative security during the installation process.<br />

1. Log on to the administrative console.<br />

2. Click Security → Secure administration, applications, and infrastructure.<br />

3. Click the Security Configuration Wizard button.<br />

a. Specify the extent of protection. Enable application security and Java 2<br />

security, if you need them.<br />

b. Select the user repository. Select federated repositories.<br />

c. Configure the user repository (see Figure 13-5). Specify an administrative<br />

user name. The administrative user ID and password are stored in the<br />

WebSphere Application Server file-based repository.<br />

Figure 13-5 Specify primary administrative user and password<br />

Chapter 13. WAS administrative security 455


d. Click Finish.<br />

4. Select an authorization provider. Click Security → Secure administration,<br />

applications, and infrastructure → External authorization providers.<br />

Verify that Default authorization is selected.<br />

5. Save the changes.<br />

You can review which files are updated before saving changes. In this case<br />

the security.xml file is updated (Figure 13-6) and the fileRegistry.xml file is<br />

created (Figure 13-7 on page 457).<br />

<br />

<br />

:<br />

<br />

:<br />

<br />

Figure 13-6 Updated security.xml<br />

456 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


<br />

<br />

<br />

<br />

<br />

<br />

<br />

2006-11-28T15:33:24.449+00:00<br />

U0hBLTE6ZW9oYTM4dnYxc3l6OnEwK2FFN2RRMUtVTldiVlVNdFJtdE5HWlZt<br />

dz0K<br />

itsouser<br />

itsouser<br />

itsouser<br />

<br />

<br />

<br />

Figure 13-7 Created fileRegistry.xml<br />

Administrative security is active after restarting your server. You need to log in to<br />

the admin console using the primary administrative user ID and its password.<br />

Disable administrative security<br />

If anything went wrong during the configuration of administrative security you<br />

might not be able to log on to the administrative console, or other security-related<br />

problems might occur. There are two ways to disable administrative security.<br />

If you can still log on to the administrative console you can disable security<br />

through the administrative console.<br />

1. Click Security → Secure administration, applications, and infrastructure.<br />

2. Uncheck the Enable administrative security check box.<br />

3. Save the changes and restart the server.<br />

If you cannot log on to the administrative console, you can disable the<br />

administrative security using the wsadmin command-line interface, as follows:<br />

1. Bring down the server.<br />

2. Log in to a UNIX System Services shell.<br />

Chapter 13. WAS administrative security 457


3. Go to the profile_root/bin directory.<br />

4. Enter wsadmin by entering the command wsadmin.sh -conntype NONE (never<br />

connect to conntype NONE when the server is still running. If you have a<br />

network deployed cell configured, execute the wsadmin.sh from the<br />

deploymentmanagers’ node bin subdirectory.).<br />

5. Enter securityoff and then exit wsadmin.<br />

6. Start the server.<br />

Example 13-2 shows an example of wsadmin execution output. The<br />

/WebSphereBS2/V6R1/AppServer/profiles/default directory is<br />

server_profile_root in this example.<br />

Example 13-2 Command execution output of disabling security<br />

/WebSphereBS2/V6R1/AppServer/profiles/default/bin # ./wsadmin.sh<br />

-conntype NONE<br />

WASX7357I: By request, this scripting client is not connected to any<br />

server process. Certain configuration and application operati<br />

ons will be available in local mode.<br />

WASX7029I: For help, enter: "$Help help"<br />

wsadmin>securityoff<br />

LOCAL OS security is off now but you need to restart server1 to make it<br />

affected.<br />

wsadmin>exit<br />

/WebSphereBS2/V6R1/AppServer/profiles/default/bin #<br />

Security trace<br />

When you have administrative security enabled but administrative operations fail<br />

to execute, you must search for the cause of the problem. Setting a security trace<br />

helps you identify the security configuration problem. If administering the server<br />

was without problems before enabling security, it is safe to assume that a<br />

problem exists in the security configuration.<br />

Three ways to set a security trace are:<br />

► Change the trace option through the administrative console:<br />

– Click Troubleshooting → Log and Trace → server_name → Change<br />

Log Detail Levels.<br />

– Change the trace level in the Configuration tab.<br />

► Change the trace level in the Runtime tab.<br />

458 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Figure 13-8 shows a trace options and trace level example.<br />

Figure 13-8 Trace options and levels<br />

► Change trace options/level using the MVS modify command:<br />

F CR_short_name,TRACEDETAIL=E<br />

This command is one of the available security trace options on the MVS<br />

modify command. For more information about the available modify command<br />

options refer to the InfoCenter at:<br />

http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic<br />

=/com.ibm.websphere.zseries.doc/info/zseries/ae/rxml_mvsmodify.html<br />

Note: The Runtime trace tab and the MVS modify command change trace<br />

options dynamically. The Configuration trace tab sets trace options<br />

permanently and requires a restart of the server.<br />

Chapter 13. WAS administrative security 459


13.2 Role-based administrative security<br />

WebSphere Application Server implements an extension to the Java 2 Platform,<br />

Enterprise Edition (J2EE) security role-based access control to protect the<br />

product administrative and naming subsystems.<br />

In this section we introduce the following topics:<br />

► Administrative roles.<br />

► Fine-grained administrative role security.<br />

13.2.1 Administrative roles<br />

Three new roles to secure administrative tasks have been added in WebSphere<br />

V6.1: iscadmins, Deployer, and AdminSecurityManager. Table 13-1 shows a<br />

description of each role. These roles are only in effect when administrative<br />

security is enabled.<br />

Table 13-1 Administrative roles description<br />

Role Description<br />

Monitor Least amount of privileges. A monitor is granted the<br />

following tasks:<br />

► View the WebSphere Application Server configuration.<br />

► View the current state of the application server.<br />

Configurator Monitor privilege plus the ability to change the WebSphere<br />

Application Server configuration. The configurator can<br />

perform all the day-to-day configuration tasks. For<br />

example, a configurator can do the following tasks:<br />

► Create a resource.<br />

► Map an application server.<br />

► Install and uninstall an application.<br />

► Deploy an application.<br />

► Assign users and groups to role mapping for<br />

applications.<br />

Operator Monitor privileges plus the ability to change the runtime<br />

state. For example, an operator can complete the following<br />

tasks:<br />

► Stop and start the server.<br />

► Monitor the server status in the administrative console,<br />

and so on.<br />

460 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Role Description<br />

Administrator Operator and configurator privileges plus additional<br />

privileges that are granted solely to the administrator role.<br />

For example, an administrator can complete the following<br />

tasks:<br />

► Modify the server user ID and password.<br />

► Configure authentication and authorization<br />

mechanisms.<br />

► Enable or disable administrative security, Java2<br />

security, application security.<br />

► Create, update, or delete users/groups in the federated<br />

repositories configuration.<br />

Note: An administrator cannot map users and groups to the<br />

administrator roles.<br />

iscadmins (New in V6.1)<br />

Only available for administrative console users<br />

The iscadmins role grants administrator privileges to<br />

manage users and groups in federated repositories.<br />

For example, a user of the iscadmins role can complete the<br />

following tasks:<br />

► Create, update, or delete users in the federated<br />

repositories configuration.<br />

► Create, update, or delete groups in the federated<br />

repositories configuration.<br />

Deployer (New in V6.1)<br />

Only available for wsadmin users<br />

Configuration actions and runtime operations on<br />

applications.<br />

adminsecuritymanager (New in V6.1)<br />

Only available for wsadmin users<br />

When using wsadmin, being able to map users to<br />

administrative roles. Also, when fine-grained admin<br />

security is used, users granted this role can manage<br />

authorization groups. See the AdminSecurityManager role<br />

section for more details.<br />

The primary administrative user ID, specified when enabling administrative<br />

security using the default authorization provider, is automatically mapped to the<br />

administrator role. You do not need to map this ID manually to the administrator<br />

role.<br />

If you install your application server with the z/OS security product option, all but<br />

one administrative role profile are defined in the SAF EJBROLE class. The<br />

iscadmins role is not defined because the purpose of this role is to secure the<br />

Chapter 13. WAS administrative security 461


management of users and groups in federated repositories. Therefore, there is<br />

no relation between SAF and the iscadmins role.<br />

When using the default authorization provider, users and groups are mapped to<br />

the administrative roles through the admin console (WebSphere bindings). When<br />

SAF is your authorization provider you need to permit users and groups to the<br />

EJBROLE administrative profiles (SAF bindings) with access READ.<br />

Permit users and groups to the appropriate role and refresh the RACLISTed<br />

class:<br />

PERMIT role_name CLASS(EJBROLE) ID(user_id or group_id)<br />

ACCESS(READ)<br />

SETROPTS RACLIST(EJBROLE) REFRESH<br />

13.2.2 Fine-grained administrative security<br />

In previous WebSphere versions, administrative roles allowed users to<br />

administer all WebSphere artifacts or resource instances (cell, nodes, servers,<br />

clusters, applications) in the realm of the cell. WebSphere Application Server<br />

V6.1 fine-grained administrative security gives you the possibility to define<br />

scopes of authorization at, for instance cell, node, or server level.<br />

The authorization group outlines the scope of authorization. Users can then be<br />

granted an administrative role in an authorization group. In this way users are<br />

only allowed to administer a delimited scope of resources.<br />

The following resource instances can be added to an authorization group:<br />

► Cell<br />

► Node<br />

► Server cluster<br />

► Server<br />

► Application<br />

► NodeGroup<br />

Note: A resource instance can only belong to one authorization group.<br />

The administrative roles are granted per authorization group and therefore per<br />

resource instance rather than to the entire cell. However, there is a cell-wide<br />

authorization group for compatibility with previous versions. Users assigned to<br />

administrative roles in the cell-wide authorization group can still access all of the<br />

resources within the cell.<br />

462 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Fine-grained administrative security can also be used in single-server<br />

environments. Various applications in the single server can be grouped and<br />

placed in different authorization groups.<br />

Note: The standalone server itself cannot be part of any authorization group.<br />

The AdminSecurityManager role is only available through wsadmin. Users<br />

granted this role can map users to administrative roles. Also, when fine-grained<br />

admin security is used, users granted this role can manage authorization groups.<br />

There is no on-off switch to activate fine-grained administrative security. Once<br />

you have set up an authorization group, it is active. In WebSphere Application<br />

Server for z/OS there are two ways to implement fine-grained administrative<br />

security control, just as there is in standard administrative security. One is<br />

through WebSphere Application security, which is used when selecting default<br />

authorization as the authorization provider, and the other is through RACF, which<br />

is used when SAF is the authorization provider.<br />

Fine-grained access is granted by performing the following steps:<br />

1. Connect to the application server with wsadmin.<br />

2. Create an authorization group.<br />

3. Add resource instances to the authorization group.<br />

4. Map users/groups to administrative roles at the authorization group level.<br />

Users and groups need to exist in the configured user registry.<br />

5. Save the changes.<br />

6. Restart the application server/cell to activate the changes.<br />

Steps 1 to 3, 5, and 6 are common for all authorization providers.<br />

Step 4 varies according to the chosen external authorization provider. We<br />

illustrate how to map users/groups to roles for both SAF authorization with the<br />

z/OS security product option and default authorization with WebSphere<br />

Application Server security by means of a scenario.<br />

This is the scenario setup, a user is granted deployer access to a specific<br />

resource only (an application). This user should not be able to administer any<br />

other resources outside of his authorization group. Users assigned to<br />

administrative roles in the cell-wide authorization group can still access all of the<br />

resources within the cell.<br />

Chapter 13. WAS administrative security 463


These are the values used in the following steps:<br />

[Users/Groups and resource instance]<br />

administrator role user: ITSOUSER is assigned cell level administrator<br />

role: create authorization group, add resources to the authorization<br />

group, etc.<br />

authorization group: APPG<br />

resource instance: an application named HelloApplication is added to<br />

APPG.<br />

security role user: APPUSER1 is mapped to the deployer role in the APPG<br />

authorization group<br />

[server environment]<br />

cell name: cl6582<br />

node name: nd6582<br />

server name: ws6582<br />

server_profile_root: /WebSphereBS2/V6R1/AppServer/profiles/default/bin<br />

The wsadmin commands are in the jython scripting language.<br />

Note: WebSphere administrative (wsadmin) scripting support for the JACL<br />

language is deprecated as of V6.1.<br />

1. Connect to the application server with wsadmin:<br />

wsadmin.sh -lang jython -user ITSOUSER -password pswd<br />

2. Create an authorization group:<br />

AdminTask.createAuthorizationGroup('[-authorizationGroupName APPG]')<br />

3. Add resource instances to the authorization group:<br />

AdminTask.addResourceToAuthorizationGroup('[-authorizationGroupName<br />

APPG -resourceName Application=HelloApplication]')<br />

Example 13-3 shows the commands and output of step 1 to 3.<br />

Example 13-3 Execution output of creating new security group<br />

/WebSphereBS2/V6R1/AppServer/profiles/default/bin: >wsadmin.sh -lang<br />

jython -user ITSOUSER -password pswd<br />

WASX7209I: Connected to process "ws6582" on node nd6582 using SOAP<br />

connector; The type of process is: UnManagedProcess<br />

WASX7031I: For help, enter: "print Help.help()"<br />

wsadmin>AdminTask.createAuthorizationGroup('[-authorizationGroupName<br />

APPG]')<br />

'cells/cl6582/authorizationgroups/APPG|authorizationgroup.xml#Authoriza<br />

tionGroup_1164863617316'<br />

464 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


wsadmin>AdminTask.addResourceToAuthorizationGroup('[-authorizationGroup<br />

Name APPG -resourceName Application=HelloApplication]')<br />

''<br />

4. Map users/groups to roles at authorization group scope.<br />

If you are using the default authorization provider as the authorization<br />

provider you need to issue this command:<br />

AdminTask.mapUsersToAdminRole ('[-authorizationGroupName APPG<br />

-roleName deployer -userids APPUSER1]')<br />

Example 13-4 execution output of role mapping<br />

wsadmin>AdminTask.mapUsersToAdminRole ('[-authorizationGroupName APPG<br />

-roleName deployer -userids APPUSER1]')<br />

'true'<br />

If you are using the SAF authorization provider as the authorization provider<br />

you need to define additional profiles to the EJBROLE class, as follows:<br />

a. Define . profiles in EJBROLE (again,<br />

prefix those profiles with your domain identifier if you have one<br />

configured):<br />

RDEFINE EJBROLE APPG.administrator UACC(NONE)<br />

RDEFINE EJBROLE APPG.configurator UACC(NONE)<br />

RDEFINE EJBROLE APPG.operator UACC(NONE)<br />

RDEFINE EJBROLE APPG.monitor UACC(NONE)<br />

RDEFINE EJBROLE APPG.deployer UACC(NONE)<br />

RDEFINE EJBROLE APPG.adminsecuritymanager UACC(NONE)<br />

Note: EJBROLE profiles for all of the roles in each authorization group<br />

should be created regardless of whether any user is mapped to its role,<br />

or at least define an appropriate catching profile at authorization group<br />

level.<br />

b. Permit the user to access the EJBROLE class profile:<br />

PERMIT APPG.deployer CLASS(EJBROLE) ID(APPUSER1)<br />

ACCESS(READ)<br />

c. Refresh the RACLISTed class in order to activate the changes:<br />

SETROPTS RACLIST(EJBROLE) REFRESH<br />

Chapter 13. WAS administrative security 465


5. Save the changes:<br />

AdminConfig.save()<br />

Example 13-5 Execution output of save command<br />

wsadmin>AdminConfig.save()<br />

''<br />

6. Restart the application server to activate the changes.<br />

APPUSER1 is assigned the deployer role for HelloApplication, but does not have<br />

administrative authority for other applications. Example 13-6 and Example 13-7<br />

show that the setup works well. ITSOUSER can list and control all deployed<br />

applications. APPUSER1 can list and control only the authorized resource.<br />

Example 13-6 ITSOUSER execution output<br />

/WebSphereBS2/V6R1/AppServer/profiles/default/bin # wsadmin.sh -lang<br />

jython -user ITSOUSER -password pswd<br />

WASX7209I: Connected to process "ws6582" on node nd6582 using<br />

SOAP connector; The type of process is: UnManagedProcess<br />

WASX7031I: For help, enter: "print Help.help()"<br />

wsadmin>print AdminApp.list()<br />

DefaultApplication<br />

HelloApplication<br />

ivtApp<br />

query<br />

wsadmin>appManager = AdminControl.queryNames('type=ApplicationManager,*<br />

')<br />

wsadmin>AdminControl.invoke(appManager,'stopApplication','HelloApplicat<br />

ion')<br />

''<br />

wsadmin>AdminControl.invoke(appManager,'stopApplication','DefaultApplic<br />

ation')<br />

''<br />

wsadmin><br />

Example 13-7 APPUSER1 execution output<br />

/WebSphereBS2/V6R1/AppServer/profiles/default/bin # wsadmin.sh -lang<br />

jython -user APPUSER1 -password pswd<br />

WASX7209I: Connected to process "ws6582" on node nd6582 using SOAP<br />

connector; The type of process is: UnManagedProcess<br />

WASX7031I: For help, enter: "print Help.help()"<br />

wsadmin>print AdminApp.list()<br />

HelloApplication<br />

466 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


wsadmin>appManager = AdminControl.queryNames('type=ApplicationManager,*<br />

')<br />

wsadmin>AdminControl.invoke(appManager,'stopApplication','HelloApplicat<br />

ion')<br />

''<br />

wsadmin>AdminControl.invoke(appManager,'stopApplication','DefaultApplic<br />

ation')<br />

WASX7015E: Exception running command:<br />

"AdminControl.invoke(appManager,'startApplication','DefaultApplication'<br />

)"; exception information:<br />

javax.management.JMRuntimeException: ADMN0022E: Access is denied for<br />

the startApplication operation on ApplicationManager MBean because of<br />

insufficient or empty credentials.<br />

wsadmin><br />

For more information about the AdminTask object related to fine-grained security<br />

refer to the InfoCenter. More information about implementing fine-grained<br />

security can be found in TechDoc TD103324:<br />

http://www-03.ibm.com/support/techdocs/atsmastr.nsf/WebIndex/TD103324<br />

13.3 Naming service security<br />

The naming service is used by clients of WebSphere Application Server<br />

applications to obtain references to objects related to these applications. These<br />

objects are bound into a mostly hierarchical structure, referred to as a name<br />

space. The name space structure consists of a set of name bindings, each<br />

consisting of a name relative to a specific context and the object bound with that<br />

name.<br />

The concept of role-based authorization has been extended to protect the<br />

WebSphere Common Object Request Broker Architecture (CORBA) naming<br />

service (CosNaming).<br />

13.3.1 CosNaming roles description<br />

CosNaming security offers increased granularity of security control. CosNaming<br />

functions are available on CosNaming servers. These functions affect the<br />

content of the WebSphere Application Server name space.<br />

Chapter 13. WAS administrative security 467


You can access and manipulate the name space through a name server. Users<br />

of a name server are referred to as naming clients. Naming clients typically use<br />

two interfaces:<br />

► Java Naming and Directory Interface (JNDI) Interface<br />

► Common object request broker architecture (CORBA) Naming Interface<br />

You can control access to the name space using CosNaming roles. All<br />

CosNaming roles are shown in Table 13-2.<br />

Table 13-2 CosNaming security roles description<br />

Role Description<br />

CosNamingRead Query the WebSphere Application Server name space<br />

using, for example, the JNDI lookup method.<br />

The EVERYONE special-subject is the default policy for<br />

this role.<br />

CosNamingWrite Perform write operations such as JNDI bind, rebind, or<br />

unbind, and CosNamingRead operations.<br />

The ALL_AUTHENTICATED special-subject is the default<br />

policy for this role.<br />

CosNamingCreate Create new objects in the name space through such<br />

operations as JNDI createSubcontext and<br />

CosNamingWrite operations.<br />

The ALL_AUTHENTICATED special-subject is the default<br />

policy for this role.<br />

CosNamingDelete Destroy objects in the name space, for example, using the<br />

JNDI destroySubcontext method and CosNamingCreate<br />

operations.<br />

The ALL_AUTHENTICATED special-subject is the default<br />

policy for this role.<br />

The CosNaming authorization policy is valid only when administrative security is<br />

enabled. When administrative security is enabled, attempts to do CosNaming<br />

operations without the proper role assignment result in an<br />

org.omg.CORBA.NO_PERMISSION exception from the CosNaming server.<br />

13.3.2 Mapping users or groups to CosNaming roles<br />

There are two ways to map users or groups to CosNaming roles: through the<br />

administrative console or through SAF EJBROLE profiles, depending on the<br />

authorization provider setting.<br />

468 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


In the administrative console, CosNaming roles mapping can be defined at the<br />

following panel: Environment → Naming → CORBA Naming Service Users<br />

or CORBA Naming Service Groups.<br />

Figure 13-9 shows a default role definition granting read access to EVERYONE.<br />

Figure 13-9 Default setting of the CosNamingRead role<br />

Users, groups, or the special-subjects ALL_AUTHENTICATED and EVERYONE<br />

can be added or removed at any time. However, a server restart is required for<br />

the changes to take effect.<br />

The role mappings that are added through the administrative console are ignored<br />

if SAF authorization is enabled. If you use SAF as the authorization provider,<br />

access to the naming role is controlled by RACF.<br />

These are the commands to define the naming profiles in the EJBROLE class.<br />

Prefix the profiles with your security domain identifier if you have one configured.<br />

RDEFINE EJBROLE CosNamingRead UACC(READ)<br />

PERMIT CosNamingRead CLASS(EJBROLE) ID(WSGUEST) ACCESS(READ)<br />

RDEFINE EJBROLE CosNamingWrite UACC(NONE)<br />

RDEFINE EJBROLE CosNamingCreate UACC(NONE)<br />

RDEFINE EJBROLE CosNamingDelete UACC(NONE)<br />

PERMIT CosNamingWrite CLASS(EJBROLE) ID(WSCFG1) ACCESS(READ)<br />

Chapter 13. WAS administrative security 469


PERMIT CosNamingCreate CLASS(EJBROLE) ID(WSCFG1) ACCESS(READ)<br />

PERMIT CosNamingDelete CLASS(EJBROLE) ID(WSCFG1) ACCESS(READ)<br />

SETROPTS RACLIST(EJBROLE) REFRESH<br />

WSGUEST is the unauthenticated user ID and WSCFG1 is the WebSphere<br />

Application Server Configuration Group name, as defined in the server<br />

configuration process. CosNamingRead is defined with UACC(READ), which is<br />

the closest thing in RACF to the EVERYONE special-subject. Note that we<br />

permit the unauthenticated user ID specifically to the CosNamingRead role<br />

because it has been defined with the RESTRICTED attribute. The server<br />

special-subject WSCFG1 should be permitted to all of the four CosNaming roles,<br />

because it provides processes that run under the server identity access to all the<br />

CosNaming operations.<br />

We recommend mapping groups or one of the special-subjects to naming roles.<br />

That is more flexible than mapping specific users and is easier to administer.<br />

When SAF authorization is the chosen authorization provider, you benefit from<br />

the fact that servers do not need to be restarted in order to activate changes in<br />

bindings to the naming roles.<br />

470 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Appendix A. Additional material<br />

This book refers to additional material that can be downloaded from the Internet<br />

as described below.<br />

Locating the Web material<br />

The Web material associated with this System Authorization Facility is available<br />

in softcopy on the Internet from the <strong>IBM</strong> <strong>Redbooks</strong> Web server. Point your Web<br />

browser to:<br />

ftp://www.redbooks.ibm.com/redbooks/SG247384<br />

Alternatively, you can go to the <strong>IBM</strong> <strong>Redbooks</strong> Web site at:<br />

ibm.com/redbooks<br />

A<br />

Select the Additional materials and open the directory that corresponds with<br />

the book form number, SG247384.<br />

© Copyright <strong>IBM</strong> Corp. 2007. All rights reserved. 471


Using the Web material<br />

The additional Web material that accompanies this book includes the following<br />

files:<br />

File name Description<br />

SG7348.zip Zipped code samples<br />

How to use the Web material<br />

Create a subdirectory (folder) on your workstation, and unzip the contents of the<br />

Web material zip file into this folder. This creates a directory tree with various<br />

.ear files. Locate the .ear file you wish to use and import it into your favorite J2EE<br />

application development workbench.<br />

Attention: We have developed and used the samples with <strong>IBM</strong> Rational<br />

Application Developer. We strongly recommend using this tool for using the<br />

samples. The samples are developed at the J2EE 1.4 level.<br />

472 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Related publications<br />

<strong>IBM</strong> <strong>Redbooks</strong><br />

The publications listed in this section are considered particularly suitable for a<br />

more detailed discussion of the topics covered in this book.<br />

For information about ordering these publications, see “How to get <strong>IBM</strong><br />

<strong>Redbooks</strong>” on page 475. Note that some of the documents referenced here may<br />

be available in softcopy only.<br />

► Understanding LDAP - Design and Implementation, SG24-4986<br />

► WebSphere for z/OS V6 Connectivity Handbook, SG24-7064<br />

► WebSphere Application Server for z/OS V5 and J2EE 1.3 Security Handbook,<br />

SG24-6086<br />

► Implementation and Practical Use of LDAP on the <strong>IBM</strong> eServer iSeries<br />

Server, SG24-6193<br />

► Using LDAP for Directory Integration, SG24-6163<br />

► Secure Production Deployment of B2B Solutions using WebSphere Business<br />

Integration Connect, SG24-6457<br />

► WebSphere Version 6 Web Services Handbook Development and<br />

Deployment, SG24-6461<br />

► Distributed Security and High Availability with Tivoli Access Manager and<br />

WebSphere Application Server for z/OS, SG24-6760<br />

► <strong>IBM</strong> WebSphere Application Server V6.1 Security Handbook, SG24-6316<br />

► WebSphere Application Server on z/OS and Security Integration, REDP-4161<br />

► Security with <strong>IBM</strong> Tivoli Access Manager V6 and <strong>IBM</strong> WebSphere Application<br />

Server V6 on <strong>IBM</strong> z/OS, REDP-4205<br />

► Enabling security after initial customization in Version 6.1, Technote 1237841<br />

► Configuration of WebSphere Application Server Security, TIPS0206<br />

© Copyright <strong>IBM</strong> Corp. 2007. All rights reserved. 473


Other publications<br />

Online resources<br />

These publications are also relevant as further information sources:<br />

► WebSphere MQ Clients, GC34-6590-01<br />

► z/OS V1R6.0 ICSF Administrator's Guide, SA22-7521-07<br />

► Security Server RACF Command Language Reference, SA22-7687-09<br />

► WebSphere MQ Security, SC34-6588<br />

These Web sites are also relevant as further information sources:<br />

► The specification for XML Signatures<br />

http://www.w3.org/Signature/<br />

► XML Encryption WG<br />

http://www.w3c.org/Encryption<br />

► WebSphere Application Server Version 6 and later support Organization for<br />

the Advancement of Structured Information (OASIS) Web services Security<br />

(WS-Security) specifications<br />

http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic<br />

=/com.ibm.websphere.zseries.doc/info/zseries/ae/cwbs_supportfunction.<br />

html<br />

► What is new for securing Web services<br />

http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic<br />

=/com.ibm.websphere.zseries.doc/info/zseries/ae/cwbs_welcwebsvcsec.<br />

html<br />

► <strong>IBM</strong> HTTP Server - setting up a secure server<br />

http://www-306.ibm.com/software/webservers/httpservers/doc/v51/icswg<br />

003.html<br />

► WebSphere Application Server documentation<br />

http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic<br />

=/com.ibm.websphere.zseries.doc/info/welcome_nd.html<br />

► <strong>IBM</strong> Education Assistant - CSIv2<br />

http://publib.boulder.ibm.com/infocenter/ieduasst/v1r1m0/index.jsp?<br />

topic=/com.ibm.iea.doc/welcome.htm&tab=search&searchWord=csiv2&maxHi<br />

ts=50<br />

474 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


► <strong>IBM</strong> WebSphere Developer Technical Journal: Securing connections<br />

between WebSphere Application Server and WebSphere MQ<br />

http://www-128.ibm.com/developerworks/websphere/techjournal/0601_<br />

ratnasinghe/0601_ratnasinghe.html<br />

► <strong>IBM</strong> SDKs - security information<br />

http://www-128.ibm.com/developerworks/java/jdk/security/index.html<br />

► <strong>IBM</strong> Tivoli Directory Server, Version 6.0 - Quick installation path for a server<br />

http://publib.boulder.ibm.com/infocenter/tivihelp/v2r1/index.jsp?topic<br />

=/com.ibm.<strong>IBM</strong>DS.doc/install04.htm<br />

► Windows Server 2003 Service Pack 1 32-bit Support Tools<br />

http://www.microsoft.com/downloads/details.aspx?familyid=6EC50B78-8B<br />

E1-4E81-B3BE-4E7AC4F0912D<br />

► Windows Server 2003 Resource Kit Tools<br />

http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57<br />

ff-4ae7-96ee-b18c4790cffd<br />

► SPNEGO TAI configuration requirements<br />

http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic<br />

=/com.ibm.websphere.zseries.doc/info/zseries/ae/rsec_SPNEGO_tai_reqs.<br />

html<br />

► SPNEGO TAI custom configuration attributes<br />

http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic<br />

=/com.ibm.websphere.zseries.doc/info/zseries/ae/rsec_SPNEGO_tai_<br />

attribs.html<br />

► SPNEGO trust association interceptor (TAI) troubleshooting tips<br />

http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic<br />

=/com.ibm.websphere.zseries.doc/info/zseries/ae/rsec_SPNEGO_trouble_<br />

shoot.html<br />

How to get <strong>IBM</strong> <strong>Redbooks</strong><br />

You can search for, view, or download <strong>Redbooks</strong>, Redpapers, Hints and Tips,<br />

draft publications and Additional materials, as well as order hardcopy <strong>Redbooks</strong><br />

or CD-ROMs, at this Web site:<br />

ibm.com/redbooks<br />

Related publications 475


Help from <strong>IBM</strong><br />

<strong>IBM</strong> Support and downloads<br />

ibm.com/support<br />

<strong>IBM</strong> Global Services<br />

ibm.com/services<br />

476 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Index<br />

Numerics<br />

128-bit encryption algorithm 268<br />

40-bit encryption algorithm 268<br />

A<br />

administration security<br />

options 432<br />

do not enable security 437<br />

use a z/OS security product 433<br />

use a z/OS security product, user IDs created<br />

433<br />

use WAS security 435<br />

Administrative Console<br />

Accessing ITDS configuration 378<br />

administrative security 449<br />

Certificate<br />

manage certificate expiration 218<br />

change internal server user id 442<br />

Configuring the JVM for the SPNEGO TAI 416<br />

Develop your own TAI 396<br />

LDAP<br />

TDBM<br />

Federate Repositories 368<br />

z/OS LDAP SDBM 344<br />

z/OS LDAP TDBM 355<br />

RunAs thread identity 388<br />

SAF authorization 383, 385<br />

Security Attribute Propagation<br />

Vertical propagation 331<br />

security configuration reporting tool 448<br />

Security role-based<br />

AdminSecurityManager 461<br />

Deployer 461<br />

iscadmins 461<br />

security wizard 448<br />

SPNEGO configuration 414<br />

z/OS thread identity synchronization 387<br />

administrative roles<br />

added in WAS V6.1 460<br />

Administrator 461<br />

AdminSecurityManager 460<br />

Configurator 460<br />

Deployer 460<br />

iscadmins 460<br />

Monitor 460<br />

Operator 460<br />

administrative security 72<br />

default authorization provider 455<br />

disabling<br />

using admin console 457<br />

disabling, using wsadmin 457<br />

options 449<br />

security trace 458<br />

administrative security, fine-grained 462<br />

options to implement 463<br />

adminstrative security<br />

what does it protect? 72<br />

Application Security<br />

enabling, in admin console 73<br />

application security 72<br />

asymmetric cipher algorithm 30<br />

Auditing 4<br />

authDataAlias 48<br />

Authentication 3<br />

authentication keys 32<br />

Authorization 3<br />

Default authorization 384<br />

External authorization using JACC provider 385<br />

SAF authorization 384<br />

authorization group 462<br />

authorization providers 450<br />

default authorization 450<br />

Java Contract for Containers (JACC)<br />

external authorization 450<br />

System Authorization Facility (SAF) 450<br />

authorization, SAF-based 25<br />

B<br />

base64 254<br />

Basic Authentication 72, 98, 246<br />

Identity assertion 193<br />

basic authentication 51<br />

Binary Der Data 254<br />

C<br />

CA - Top Secret 228<br />

© Copyright <strong>IBM</strong> Corp. 2007. All rights reserved. 477


callbackhandler 114<br />

caller part 114<br />

CBIND class 309<br />

Certificate<br />

Comparing the personal certificate 286<br />

Certificate Authority (CA) 117<br />

certificates<br />

comparing between z/OS and Windows 286<br />

extracting the z/OS signer certificate 254<br />

extracting the z/OS signer certificate, RACF<br />

command 254<br />

importing the server signer certificate into the client<br />

254<br />

CICS 336–337<br />

authorization and authentication support, in<br />

WAS 23<br />

CICS Transaction Gateway (CTG)<br />

CICSECIConnector 389<br />

JCA custom principal mapping 48<br />

cipher suite group, medium 268<br />

cipher suite group, strong 268<br />

Client Certificate Authentication 72, 98, 282<br />

Common Client Interface (CCI) 23<br />

Common Object Request Broker Architecture<br />

(CORBA) 467<br />

Common Secure Inter operability Version 2 (CSIv2)<br />

17<br />

Common Secure Interoperability Specification v2<br />

(CSIv2) 18<br />

Common Secure Interoperability Version 2 (CSIv2)<br />

98<br />

features in WAS for z/OS 306<br />

Common Secure Interoperability version 2 (CSIv2)<br />

5, 44, 305<br />

authentication mechanisms 307<br />

Basic Authentication 307<br />

client certificate authentication 307<br />

identity assertion 305–307<br />

configuration<br />

inbound authentication 317<br />

Basic Authentication 318<br />

client certificate authentication<br />

318<br />

client identity types 320<br />

inbound transport 315<br />

outbound authentication 312<br />

Basic authentication 313<br />

client certificate authentication<br />

313<br />

outbound transport 310<br />

example 321<br />

identity formats supported in WAS for z/OS<br />

308<br />

certificate 308<br />

Distinguished Name 308<br />

SAF identity 308<br />

trust relationship 308<br />

ways of establishing trust 308<br />

J2EE server authentication using CSIv2<br />

logical flow 45<br />

layers 306<br />

message layer authentication 306<br />

security attribute propagation 306<br />

transport layer authentication 306<br />

Confidentiality 3, 268<br />

CosNaming 467<br />

CosNaming security 467<br />

create 237<br />

cryptography 164<br />

CSIv2 5<br />

CSIv2 - Common Secure Interpretability<br />

What is CSIv2? 41<br />

custom login module 16<br />

D<br />

data encryption method algorithm 176<br />

Data Encryption Standard (DES) 164<br />

Data Replication Service (DRS) 299<br />

DB2 336–337, 340, 386, 388<br />

Universal JDBC Driver Provider<br />

type 2 390<br />

type 4 390<br />

z/OS local JDBC provider 390<br />

DefaultPrincipalMapping 48<br />

deployment descriptor 10<br />

digest code 88<br />

Digital Signature<br />

Identity assertion 193<br />

Digital signature<br />

how is it created? 88<br />

E<br />

EIS - Enterprise Information Systems 336–337,<br />

386, 388–389<br />

478 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


EJB<br />

execution identity 33<br />

Runas identity 33<br />

security identity 33<br />

security role 33<br />

EJB container<br />

programmatic security APIs 11<br />

ejbActivate() method 23<br />

ejbCreate() method 23<br />

ejbLoad() method 23<br />

Enterprise Information Systems (EIS) 22<br />

errors<br />

creating native credentials 291<br />

External Authorization Server<br />

Authorization using external authorization server<br />

configuration tasks 57<br />

F<br />

Federated 25<br />

Federated Repositories 363<br />

ITDS 378<br />

SPNEGO 399<br />

what are federated repositories? 363<br />

fingerprint 88<br />

fixes<br />

PK31729 291<br />

Form based authentication 72<br />

G<br />

General Inter-ORB Protocol (GIOP) 44<br />

Generic Security Services Username Password<br />

(GSSUP) token 315<br />

global security 71, 430<br />

group 430<br />

H<br />

Hardware Cryptography<br />

<strong>IBM</strong>JCE<br />

characteristics 227<br />

<strong>IBM</strong>JCECCA<br />

characteristics 227<br />

hardware cryptography 192<br />

HFS owner user ID, adding 432<br />

HTTP Server<br />

Authenticating in HTTP server<br />

configuration tasks 37<br />

HTTP server<br />

authenticating in HTTP server<br />

logic al flow 36<br />

HTTP(s) 13<br />

Hypertext Transfer Protocol (HTTP) 90<br />

Hyptertext Transfer protocol over SSL (HTTPS) 91<br />

I<br />

<strong>IBM</strong> SDKs 475<br />

<strong>IBM</strong> Tivoli Access Manager 3, 48, 360, 395, 397<br />

principal mapping module 48<br />

<strong>IBM</strong> Tivoli Access Manager for e-business (TAMeb)<br />

17<br />

<strong>IBM</strong> Tivoli Directory Server v6 (ITDS) 340, 356,<br />

367, 375, 475<br />

Configuration 375<br />

How to install 375<br />

WebSphere z/OS configuration 378<br />

<strong>IBM</strong>JCECCA 192, 222, 275<br />

ibm-webservices-bnd.xmi 112<br />

ibm-webservices-bnd.xml 110<br />

ibm-webservicesclient-bnd.xmi 111<br />

ibm-webservicesclient-ext.xmi 111<br />

ibm-webservices-ext.xmi 111<br />

ibm-webservices-ext.xml 110<br />

ICSF managed keys 192<br />

Identity Assertion<br />

Configuration<br />

z/OS provider 199<br />

Identity assertion 17<br />

IMS 336–337, 386, 388<br />

authorization and authentication support, in<br />

WAS 24<br />

Connector 389<br />

JDBC Connector 389<br />

INADDR_ANY parameter 14<br />

Integrity 3<br />

Intermediaries 80<br />

Internet 29<br />

Interoperable Inter-ORB Protocol (IIOP) 44<br />

IP/UDP layer 29<br />

J<br />

J2C<br />

application contract 23<br />

connector components 23<br />

container contract 23<br />

contracts 23<br />

system contract 23<br />

Index 479


J2EE 9<br />

Security 5<br />

J2EE client 13<br />

J2EE client authentication using CSIv2 40<br />

configuration tasks 43<br />

logical flow 41<br />

J2EE Connector Architecture (JCA)<br />

custom mapping 47<br />

JCA custom principal mapping 46<br />

J2EE deployment descriptor files 112<br />

J2EE security 10<br />

declarative security 10<br />

programmatic security 10<br />

J2EE security,architecture 11<br />

J2EE server<br />

J2EE server authentication using CSIv2 43<br />

JAAS login module 59<br />

JACC - Java Contract for Containers<br />

External authorization 385<br />

Java 2 security 5, 9<br />

Java Authentication and Authorization Service<br />

(JAAS) 19<br />

Java Authorization Contract for Containers (JACC)<br />

25<br />

Java Contract for Containers (JACC)<br />

authorization using external authorization server<br />

56<br />

Java Cryptography Extension (JCE) 222<br />

Java Cryptography Extension (JCE), <strong>IBM</strong> version<br />

222<br />

Java Message Service (JMS) 91<br />

Java security 5<br />

java.security file 223, 275<br />

JAX-RPC 91–92<br />

JCA - J2EE Connector Architecture<br />

JCA custom principal mapping<br />

configuration tasks 50<br />

resource adapter 389<br />

JCE - Java Cryptography Extension<br />

<strong>IBM</strong>JCECCA<br />

227<br />

What is JCE? 222<br />

JCECCRACFKS 276<br />

K<br />

KDC - Key Distribution Center 392–393, 395, 398,<br />

402, 412<br />

z/OS 399<br />

Kerberos 392, 397<br />

Authentication protocol 393<br />

Encryption types 411<br />

Keytab file 410<br />

Realm<br />

WinKerbRealm 399–400<br />

zOSKerbRealm 399–400<br />

Service Principal Name (SPN) 405<br />

key encryption method algorithm 177<br />

key information 114<br />

key locator 114<br />

key store path, WebSphere default 175<br />

keystore 226<br />

L<br />

LDAP - Lightweight Directory Access Protocol<br />

337–338, 378<br />

336–337, 340<br />

Active Directory 395<br />

JOBLOG 361<br />

messages 361<br />

SAF authorization 384<br />

SLAPDCNF member 341, 351<br />

SPNEGO 399<br />

z/OS<br />

SDBM 340–341<br />

schema 342<br />

WebSphere z/OS configuration 344<br />

TDBM 337, 340, 350, 367<br />

configuration 351<br />

Federated Repositories 368<br />

Native Authentication configuration 360<br />

WebSphere z/OS configuration 355<br />

WebSphere z/OS configuration for Native<br />

Authentication 362<br />

Lightweight Directory Access Protocol (LDAP) 30<br />

Lightweight Third Party Authentication (LTPA) 16<br />

link layer, 29<br />

LSA - Local Security Authority 395, 402<br />

LTPA token 116, 302<br />

keys 302<br />

LtpaToken 297<br />

LtpaToken2 297<br />

M<br />

Message Authentication Code (MAC) 222<br />

Microsoft Internet Explorer 398<br />

SPNEGO configuration 419<br />

480 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Microsoft Windows Active Directory (AD) 392,<br />

395–396, 398<br />

Create a user account for WebSphere Application<br />

Server for z/OS 405<br />

Microsoft Windows Server 2003 475<br />

SP 1 475<br />

SP1 401<br />

Microsoft Windows XP Professional 2002 SP2 401<br />

Mozilla Firefox 398<br />

SPNEGO configuration 421<br />

N<br />

naming service security 467<br />

Native Authentication 359, 373<br />

Why to use Native Authentication? 360<br />

nonce 115<br />

non-ICSF managed keys 192<br />

Non-repudiation 4<br />

NTLM credential 397<br />

O<br />

OASIS 21<br />

Object Management Group (OMG) 5<br />

Open System Interconnection (OSI) 29<br />

Operating System (OS) security 4<br />

org.omg.CORBA.NO_PERMISSION exception<br />

468<br />

Organization for the Advancement of Structured Information<br />

Standards (OASIS) 82<br />

OS thread identity 386<br />

P<br />

Presumed Trust<br />

Identity assertion 193<br />

R<br />

RACDCERT 218<br />

RACF 103<br />

Access Control Element (ACEE ) 7<br />

Attribute<br />

AUDITOR 343<br />

CLASS 8<br />

classes, relevant to WAS on z/OS 8<br />

APPL 8<br />

CBIND 8<br />

DIGTCERT 8<br />

DSNR 8<br />

EJBROLE 8<br />

FACILITY 8<br />

GEJBROLE 8<br />

KERBLINK 8<br />

LOGSTRM 8<br />

SERVAUTH 8<br />

SERVER 8<br />

STARTED 8<br />

SURROGAT 9<br />

Commands<br />

ADDUSER 432<br />

PERMIT 104, 434<br />

RACDCERT 284<br />

RDEFINE 104, 384–385, 434<br />

SETROPTS 104<br />

Cosnaming EJB Roles 9<br />

GROUP 7<br />

How to define an EJBROLE in RACF 384<br />

keystore 215<br />

MIXEDCASE option 443<br />

mixed-case password support, enabling 443<br />

profile<br />

segments 7<br />

profile, attributes 7<br />

RACO (ENVR Object) 7<br />

SPNEGO 399<br />

User Profiles 341<br />

<strong>Redbooks</strong> Web Site 475<br />

Contact us xvi<br />

Registries<br />

Introduction 336<br />

Local Operating System 336, 382<br />

Configurating WAS to use local z/OS for authorization<br />

433<br />

SPNEGO 399<br />

When 337<br />

Standalone Custom Registry 336, 338<br />

How to write a custom registry? 338<br />

SAF authorization 384<br />

Standalone LDAP Registry 336–337, 340<br />

SDBM 340–341<br />

configuration 341<br />

schema 342<br />

WebSphere z/OS configuration 344<br />

TDBM 337, 340, 350<br />

configuration 351<br />

WebSphere z/OS configuration 355<br />

Why should you use a LDAP registry? 337<br />

Remote Method Invocation over Internet Inter-ORB<br />

Index 481


Protocol (RMI-IIOP) 91<br />

Repositories<br />

Federated repositories 336, 338<br />

Resource Access Control Facility (RACF) 6<br />

functionality 6<br />

profile 6<br />

resource instances 462<br />

Reverse Proxy Security Server (RPSS)<br />

authenticating in reverse proxy security server<br />

37<br />

configuration tasks 40<br />

forwarding the user id mechanisms 38<br />

logical flow 39<br />

RMI-IIOP 13<br />

Using jax-rpc to support non-SOAP binding 92<br />

RPSS - Reverse Proxy Security Server<br />

TAI 395<br />

RunAS 33<br />

S<br />

SAF - System Authorization Facility 336<br />

Authorization 383<br />

Delegation 385<br />

EJBROLE 385<br />

Profile mapper 385<br />

Sample applications<br />

SecurityInfo 98<br />

sas.client.props file 310<br />

SDK 1.5 5<br />

Secure Hash Algorithm (SHA-1) 164<br />

Secure Sockets Layer (SSL) 30, 91<br />

aliases 211<br />

authentication keys 32<br />

Basic Authentication<br />

configuring 282<br />

centrally managed 210<br />

certificate request 31<br />

certificates<br />

deleting keystores and truststores 222<br />

deleting or adding to or from RACF keyring<br />

217<br />

RACF commands 218<br />

CERTB64 keyword 220<br />

CERTDER keyword 220<br />

connecting a personal certificate 230<br />

connecting to a ring 229<br />

creating a personal certificate 229<br />

creating a ring 229<br />

deleting a CA signer certificate 222<br />

deleting a keyring 221<br />

deleting a personal certificate 222<br />

exporting a personal certificate 220<br />

exporting a signer certificate to an HFS<br />

file 220<br />

generating a signer certificate 229<br />

PKCS12B64 keyword 220<br />

PKCS12DER keyword 220<br />

removing a CA signer certificate from a<br />

keyring 221<br />

removing a personal certificate from a<br />

keyring 221<br />

viewing a list of certificates on a keyring<br />

for a user ID 218<br />

viewing certificate authority information<br />

218<br />

viewing personal certificate information<br />

for a user ID 218<br />

viewing in Admin console 217<br />

WebSphere<br />

available export formats 221<br />

certificate expiration monitoring 218<br />

deleting 221<br />

expired certificates 218<br />

expired certificates, email notification<br />

218<br />

importing 220<br />

cipher suite 31<br />

client certificate authentication 282<br />

configuration the z/OS Web Service provider<br />

255<br />

configuring the Web Service requestor 261<br />

configuring the Web Service requestor endpoint<br />

URL 264<br />

creating a new SSL Configuration in WAS 256<br />

creating a new SSL inbound channel in WAS<br />

257<br />

enforcing confidentiality 271<br />

enforcing integrity 267<br />

errors<br />

CWPKI0022E 242<br />

ICSF address space unavailable 242<br />

signer certificate is from a client’s truststore<br />

242<br />

SSLC0008E 242<br />

starting Websphere using <strong>IBM</strong>JCECCA provider<br />

243<br />

handshake 30<br />

482 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


handshake errors 239<br />

handshake flow 95<br />

handshake, common errors 242<br />

hardware cryptographic support 272<br />

configuring the Web Service provider for<br />

confidentiality 281<br />

configuring the Web Service requestor for<br />

confidentiality 281<br />

configuring the Web Service requestor SSL<br />

configuration 280<br />

connecting a CA to a keyring 272<br />

connecting a personal certificate to a keyring<br />

273<br />

creating a new CA 272<br />

creating a new keyring 272<br />

creating a new personal certificate 273<br />

exporting the signer certificate 274<br />

HDWebServiceSSLConfig 280<br />

importing the signer certificate 274<br />

installing the unrestricted Java policy jars<br />

275<br />

JCECCRACFKS 276<br />

JCECCRACFKS, creating a new keystore<br />

276<br />

SSLException 281<br />

updating the JVM to use <strong>IBM</strong>JCECCA 275<br />

validating confidentiality 281<br />

viewing CA information 273<br />

viewing the personal certificate information<br />

274<br />

hardware cryptography<br />

Common Cryptographic Architecture (CCA)<br />

interfaces 222<br />

creatING a new keystore 237<br />

diagnosing SSL handshake issues 240<br />

<strong>IBM</strong>JCE4758 223<br />

<strong>IBM</strong>JCECCA 222<br />

<strong>IBM</strong>JCECCA, prereqs 223<br />

JCECCARACFKS keystore 233<br />

keys in hardware 234<br />

safkeyring URI 237<br />

unrestricted policy jars 236<br />

unrestricted policy jars, installing in Web-<br />

Sphere 236<br />

update the java.security file with the IB-<br />

MJCECCA provider 236<br />

<strong>IBM</strong>JCE provider<br />

keystore types<br />

JCECCAKS 226<br />

JCECCARACFKS 226<br />

JCEKS 225<br />

JCERACFKS 225<br />

JKS 225<br />

PKCS11 225<br />

PKCS12 225<br />

Java Secure Socket Extension (JSSE) 213<br />

JCE provider 223<br />

keystore 226<br />

storage 227<br />

keystore types 227–228<br />

JCECCAKS 229<br />

JCECCARACFKS 228<br />

JCEKS 228<br />

JCERACFKS 228<br />

JKS 228<br />

PKCS11KS 229<br />

PKCS12KS 228<br />

master secret 32<br />

NodeDefaultSSLSettings 211<br />

pre-master secret 32<br />

protocol version 31<br />

repertoire alias 210<br />

setting the cipher suite group, for Web Service<br />

provider 264<br />

symmetric encryption keys 32<br />

System SSL (SSSL) 213<br />

trace, enabling dynamically 242<br />

trace, JSSE 242<br />

traces 241<br />

traces, enabling 241<br />

transport chain 259<br />

truststore 227<br />

WebSphere<br />

keystores, available 224<br />

WebSphere V6.0 endpoint details 213<br />

WebSphere V6.1 210<br />

WebSphere V6.1 endpoint details 214<br />

X.509 v.3 certificates 31<br />

security attribute propagation 294<br />

attribute propagation 294<br />

benefits 295<br />

horizontal propagation 295, 298, 305<br />

configuration 301<br />

cross-cell considerations 302<br />

Data Replication Service (DRS) 299<br />

DynaCache 299<br />

example 300<br />

JMX 299<br />

Index 483


JMX calls 305<br />

LTPA key, sharing 303<br />

LTPA keys, sharing 304<br />

LTPA keys, sharing, automatically generated<br />

304<br />

mechanisms, in WebSphere 299<br />

performance implications 299<br />

Single Sign On, cross-cell 303<br />

SSO token 298<br />

identity propagation 294<br />

initial login 295<br />

JAAS Subject 294<br />

Java serialization 297<br />

Lightweight Third Party Authentication (LTPA)<br />

296<br />

Principal 294<br />

propagation login 295<br />

Reverse Proxy Security Server (RPSS) 295<br />

Run-As 295<br />

Single Sign On (SSO) 294<br />

styles 295<br />

token framework 297<br />

vertical propagation 295<br />

Webseal 295<br />

WebSphere token framework<br />

authentication token 297<br />

authorization token 297<br />

LtpaToken 297<br />

LtpaToken2 297<br />

propagation token 297<br />

Single Sign On 297<br />

Subject-based tokens 297<br />

thread-based token 297<br />

security attribute propoagation<br />

vertical propagation 328<br />

cross-cell considerations 334<br />

implementation 331<br />

Remote Method Invocation (RMI) over the<br />

Internet Inter-ORB Protocol (RMI over IIOP)<br />

328<br />

Security Attribute Service (SAS) 305<br />

Security Constraint 267<br />

security.xml file 218<br />

server ID 441<br />

Service Oriented Architecture (SOA) 51<br />

servlet<br />

execution identity 33<br />

Runas identity 33<br />

security identity 33<br />

security role 33<br />

Simple Object Access Protocol (SOAP) 90<br />

confidentiality 89<br />

identity assertion 90<br />

integrity 87<br />

Web Services authentication 51<br />

WS-Security standard 82<br />

Simple WebSphere Authentication Mechanism<br />

(SWAM) 16<br />

Single Sign On (SSO) 16<br />

authenticating in HTTP server 35<br />

SOA - Service Oriented Architecture<br />

Introduction to soa and z/OS security 76<br />

SOAP - Simple Object Access Protocol<br />

RMI-IIOP with multiprotocol jax-rpc 92<br />

SPNEGO 391<br />

Configuring Microsoft Internet Explorer 419<br />

Configuring Mozilla Firefox 421<br />

Configuring the JVM 416<br />

Configuring the Microsoft Windows server 404<br />

Configuring WebSphere Application Server for<br />

z/OS 414<br />

handshake 397<br />

RACF 399<br />

Troubleshooting 422<br />

What is SPNEGO? 396<br />

SSO - Single Sign On 16<br />

SPNEGO 392<br />

WebSphere Application Server for z/OS using<br />

SPNEGO 397<br />

z/OS KDC and Microsoft Windows KDC 399<br />

symmetric algorithm 30<br />

symmetric encryption keys 32<br />

Sync-to-OS Thread 386, 444<br />

activation 387<br />

defining RACF profile 446<br />

What’s new in Version 6.1? 444<br />

System Access Facility(SAF) 6<br />

System Authorization Facility (SAF) 5<br />

System Network Architecture (SNA) 29<br />

system.wssecurity.IDAssertionUsernameToken<br />

128<br />

system.wssecurity.PKCS7 128<br />

system.wssecurity.PkiPath 128<br />

system.wssecurity.UsernameToken 128<br />

system.wssecurity.X509BST 128<br />

484 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


T<br />

TCP layer 29<br />

Ticket<br />

Kerberos 392–393<br />

Ticket Granting Server (TGS) 393<br />

Ticket Granting Ticket (TGT) 393<br />

token generator 114<br />

Top Secret 5<br />

Trust association 17<br />

Trust Association Interceptor (TAI) 16, 38, 395<br />

Trust Relationship<br />

TAI 395<br />

trust store path, WebSphere default 180<br />

truststore 227<br />

U<br />

unrestricted policy jars 275<br />

user 430<br />

user account repository 440<br />

User registry<br />

federated repository 24<br />

Local Operating System (LocalOS) 24<br />

standalone custom registry 24–25<br />

standalone LDAP 24<br />

V<br />

Virtual Member Manager (VMM) 365<br />

W<br />

WAS - WebSphere Application Server<br />

Accessing ITDS 378<br />

Build Number<br />

cf20633.22 401<br />

Configuration<br />

administration security option<br />

Do not enable security 437<br />

Use a z/OS security product 433<br />

Use WebSphere Application Server security<br />

435<br />

Create a user account in the AD 405<br />

JMS Provider 390<br />

OS thread identity 386<br />

SPNEGO 391, 396<br />

Kerberos requirements 412<br />

trace 422<br />

z/OS KDC 399<br />

Web authentication<br />

for any URI 66<br />

for protected URIs only 65<br />

system properties<br />

com.ibm.wsspi.security.web.webauthreq<br />

67<br />

Web authentication behavior<br />

admin console, settings 65<br />

Web container<br />

programmatic security APIs 11<br />

Web Services<br />

Authentication<br />

logic flow 52<br />

authentication 51<br />

Confidentiality<br />

configure z/OS provider 183<br />

configure z/OS requestor 185<br />

Identity Assertion<br />

configure the z/OS provider 199<br />

Message layer security 21<br />

message layer security 78<br />

authentication<br />

configuring a token for Web Service provider<br />

123<br />

configuring a token for Web Service requestor<br />

119<br />

custom token 117<br />

LTPA token 116<br />

token generator, configuring 120<br />

token type 119<br />

custom 119<br />

Username 119<br />

X509 certificate token 119<br />

Username token 116<br />

X.509 certificate token 116<br />

XML digital signature 117<br />

components<br />

callbackhandler 114<br />

caller part 114<br />

key information 114<br />

key locator 114<br />

nonce 115<br />

timestamp 115<br />

token generator 114<br />

trust anchor 115<br />

confidentiality<br />

164<br />

asymmetric encryption algorithms 164<br />

configuring encryption, server 171<br />

Index 485


configuring provider 178<br />

configuring requestor 172<br />

configuring, encryption algorithm 171<br />

encryption, algorithms 164<br />

extracting WebSphere for z/OS signer<br />

certificate 167<br />

one-way encryption algorithm 164<br />

support in WS-Security 165<br />

symmetric encryption algorithms 164<br />

configuration components 114<br />

configuration files 111<br />

deployment descriptors 110<br />

deployment descriptors, editing tools 110<br />

deployment descriptors, format in Web-<br />

Sphere versions 110<br />

identity assertion 192<br />

configuring 195<br />

configuring Web Service requestor 196<br />

trust modes 193<br />

trust relationship 203<br />

WS-Security support 193<br />

integrity 131<br />

canonicalization method algorithm 143<br />

configuring the Web Service provider<br />

146<br />

configuring the Web Service requestor<br />

135<br />

configuring the z/OS provider for XML<br />

digital signature 154<br />

configuring the z/OS requestor for XML<br />

digital signature 159<br />

digest method algorithm 144<br />

signature method algorithm 143<br />

transform 145<br />

XML digital signature 131<br />

integritysignature algorithm 133<br />

security token 116<br />

SOAP security header 109<br />

when to use? 80<br />

WS Binding 113<br />

WS Extension 113<br />

security exposures 77<br />

Transport layer security 21<br />

transport layer security 78<br />

Basic Authentication, configuring 247<br />

Basic Authentication, validating 250<br />

configuring the requestor to authenticate<br />

249<br />

Enterprise Service Bus (ESB) 93<br />

HTTP(S)<br />

authentication 94<br />

Basic Authentication 94<br />

Basic Authentication information 94<br />

benefits 93<br />

client certificate authentication 94<br />

integrity and confidentiality 94<br />

Universal Resource Identifier (URI) 91<br />

JMS<br />

SSL 97<br />

point-to-point security 93<br />

Remote Method Invocation over Internet Inter-ORB<br />

Protocol (RMI-IIOP) 92<br />

RMI over IIOP 98<br />

CSIv2 98<br />

SOAP over HTTP 91<br />

SOAP over JMS 92<br />

when to use? 80<br />

Web Services Interpretability Organization (WS-I)<br />

84<br />

Web Services Security (WS-Security) 108<br />

WebSeal 17<br />

Webseal 395<br />

WebSphere Application Server<br />

What is new in v6.1 security? 2<br />

WebSphere Application Server (WAS)<br />

connections 13<br />

encryption algorithms 268<br />

security settings 440<br />

WebSphere Application Server configuration group,<br />

create 431<br />

WebSphere Application Server HFS Owner 431<br />

WebSphere Message Queueing<br />

WMQ client authentication 53<br />

WebSphere MQ 19<br />

communication protocols 97<br />

WebSphere MQ Extended Security Edition 97<br />

WebSphere token framework 297<br />

WebSphereCA 254<br />

WMQ - WebSphere Message Queueing<br />

JMS Provider 390<br />

World Wide Web (WWW) 29<br />

WS Binding 113<br />

WS Extension 113<br />

WS-Authorization 22<br />

WS-Federation 22<br />

WS-Policy 22<br />

WS-Privacy 22<br />

WS-SecureConversation 22<br />

486 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


WS-Security<br />

authentication mechanisms 86<br />

high level architecture 85<br />

identity assertion<br />

basic authentication 90<br />

digital signature<br />

90<br />

modes 90<br />

presumed trust 90<br />

Kerberos Token Profile 84<br />

Minimalist Profile (MProf) 84<br />

Rights Expression Language (REL) Token Profile<br />

83<br />

SAML Token Profile 83<br />

SOAP Message Security 1.0 83<br />

SOAP Message with Attachments (SwA) Profile<br />

84<br />

specifications 82<br />

support in WAS V6.x 84<br />

Web Services Security Username Token Profile<br />

1.0 83<br />

Web Services Security X.509 Certificate Token<br />

Profile 1.0 83<br />

WS-Authorization 83<br />

WS-Federation 83<br />

WS-I Basic Profile 84<br />

support in WAS v6.0 and later 84<br />

WS-I Basic Security Profile (BSP) v1.0 84<br />

WS-Policy 82<br />

WS-Privacy 83<br />

WS-Secure Conversation 83<br />

WS-Trust 83<br />

XML digital signature 87<br />

XML encryption standard 165<br />

Ws-Security<br />

XML encryption 89<br />

WS-Security authentication mechanism<br />

basic authentication 86<br />

custom 86<br />

ID assertion 86<br />

LTPA 86<br />

signature 86<br />

WS-Trust 22<br />

X<br />

X.509 certificate token 116<br />

X.509 v.3 certificates 31<br />

XML digital signature 117<br />

Z<br />

z/OS KDC 399<br />

z/OS thread identity 389<br />

RunAs 388<br />

synchronization 386<br />

activation 387<br />

Index 487


488 Security in WebSphere Application Server Version 6.1 and J2EE 1.4 on z/OS


Security in WebSphere Application Server Version 6.1 and J2EE 1.4<br />

Security in WebSphere Application Server Version 6.1 and<br />

Security in WebSphere Application<br />

Server Version 6.1 and J2EE 1.4 on z/OS<br />

Security in WebSphere<br />

Application Server Version 6.1<br />

and J2EE 1.4 on z/OS


Security in WebSphere<br />

Application Server<br />

Version 6.1 and J2EE<br />

Security in WebSphere<br />

Application Server<br />

Version 6.1 and J2EE


Security in WebSphere<br />

Application Server Version 6.1<br />

and J2EE 1.4 on z/OS<br />

WAS and J2EE<br />

security concepts<br />

and their<br />

implementation on<br />

z/OS<br />

Security integration<br />

scenarios, including<br />

SPNEGO and CSIv2<br />

Web services<br />

security and SSL in<br />

WAS V6.1<br />

SG24-7384-00 ISBN 0738488631<br />

Back cover<br />

This <strong>IBM</strong>® <strong>Redbooks</strong>® publication was written with the<br />

objective to provide a technical description of some of the<br />

most important security scenarios available with<br />

WebSphere® Application Server Version 6.1 for z/OS®. We<br />

chose scenarios that are not really documented elsewhere<br />

and that have had significant changes in Version 6.1.<br />

In the first two chapters we provide an overview of security<br />

with WAS on z/OS for those readers who are unfamiliar with<br />

the security landscape on z/OS. From Chapter 3 onwards we<br />

go into more technical depth.<br />

INTERNATIONAL<br />

TECHNICAL<br />

SUPPORT<br />

ORGANIZATION<br />

®<br />

BUILDING TECHNICAL<br />

INFORMATION BASED ON<br />

PRACTICAL EXPERIENCE<br />

<strong>IBM</strong> <strong>Redbooks</strong> are developed by<br />

the <strong>IBM</strong> International Technical<br />

Support Organization. Experts<br />

from <strong>IBM</strong>, Customers and<br />

Partners from around the world<br />

create timely technical<br />

information based on realistic<br />

scenarios. Specific<br />

recommendations are provided<br />

to help you implement IT<br />

solutions more effectively in<br />

your environment.<br />

For more information:<br />

ibm.com/redbooks

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

Saved successfully!

Ooh no, something went wrong!