IBM Websphere Application Server V6.1 Security Handbook
Total Page:16
File Type:pdf, Size:1020Kb
Front cover IBM WebSphere Application Server V6.1 Security Handbook J2EE application server and enterprise application security Additional security components including Tivoli Access Manager Sample code and applications for security examples Rufus Credle Tony Chen Asish Kumar James Walton Paul Winters ibm.com/redbooks International Technical Support Organization WebSphere Application Server V6.1 Security Handbook December 2006 SG24-6316-01 Note: Before using this information and the product it supports, read the information in “Notices” on page xiii. Second Edition (December 2006) This book was updated on June 15, 2009. This edition applies to WebSphere Application Server V6.1 (base) on IBM AIX V5.2, Red Hat Enterprise Linux V3, Microsoft Windows 2000; WebSphere Application Server V6.1 Network Deployment on IBM AIX V5.2, Red Hat Enterprise Linux V3, Windows 2000; and Tivoli Access Manager V5.1 on IBM AIX V5.2, Red Hat Enterprise Linux V3, and Windows 2000. © Copyright International Business Machines Corporation 2005, 2006. All rights reserved. Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Notices . xiii Trademarks . xiv Preface . xv The team that wrote this IBM Redbook . xvi Become a published author . xix Comments welcome. xix Part 1. Application server security . 1 Chapter 1. Introduction to this book . 3 1.1 A focus on security . 4 1.2 Scenario-based chapters . 4 1.3 Sample applications . 5 1.4 WebSphere Information Center. 5 Chapter 2. Configuring the user registry . 7 2.1 User registries and repositories. 8 2.2 Stand-alone LDAP registry . 10 2.2.1 Stand-alone LDAP registry for WebSphere Application Server V6.1 14 2.2.2 Configuring the advanced LDAP user registry . 19 2.3 Local OS registry. 23 2.3.1 Configuring WebSphere Application Server V6.1 . 24 2.3.2 Stand-alone custom registry . 26 2.4 Federated repository . 39 2.4.1 Connecting WebSphere Application Server to a federated repository40 2.4.2 Configuring supported entity types in a federated repository . 42 2.4.3 Configuring an entry mapping repository in a federated repository . 43 2.4.4 Configuring a property extension repository in a federated repository44 Chapter 3. Administrative security . 49 3.1 Enabling administrative security . 50 3.1.1 Main components of WebSphere security . 51 3.1.2 Security Configuration Wizard. 53 3.1.3 Other security properties. 55 3.1.4 Stopping the application server. 57 3.2 Disabling administrative security . 58 3.3 Administrative roles . 59 3.3.1 Mapping a user to an administrative role . 61 © Copyright IBM Corp. 2006. All rights reserved. iii 3.3.2 Mapping a group to an administrative role . 62 3.3.3 Fine-grained administrative security . 63 3.4 Naming service security: CosNaming roles. 64 3.4.1 Mapping a user or a group to a CosNaming role . 65 3.4.2 Applying CosNaming security: An example . 65 Chapter 4. SSL administration and configuration management . 69 4.1 Creating a new SSL key store entry . 70 4.2 Managing SSL certificates. 74 4.2.1 Expiring certificates . 74 4.2.2 Managing Web server and plug-in certificates . 74 4.3 Creating a new SSL configuration. 76 4.4 Additional SSL configuration attributes . 78 4.4.1 Federal Information Processing Standard. 78 4.4.2 Dynamic SSL configuration updates . 78 4.5 Trust managers . 79 4.5.1 Custom trust managers. 80 4.6 Key managers . 83 4.6.1 Custom key managers . 83 Chapter 5. JAAS for authentication in WebSphere Application Server . 85 5.1 The importance of JAAS . 86 5.2 JAAS in WebSphere . 86 5.3 Custom JAAS login in WebSphere . 88 5.3.1 Callback handler . 88 5.3.2 Login module. 89 5.3.3 Principal . 95 5.3.4 Configuration. 97 5.3.5 Viewing the sample JAAS module in action . 99 5.3.6 Programming authentication . 99 5.4 J2C authentication data. 99 Chapter 6. Application security . 101 6.1 Application security . 102 6.1.1 Enabling application security. 102 6.1.2 Testing application security. 103 6.1.3 Application considerations . 103 6.2 Deploying a secured enterprise application . 105 6.2.1 Role mapping during application installation. 105 6.2.2 Role mapping after installation . 106 Chapter 7. Securing a Web application. 109 7.1 Transport channel . 110 7.2 Securing the static content . 110 iv WebSphere Application Server V6.1 Security Handbook 7.2.1 Securing the transport channel between the Web browser and Web server . 111 7.2.2 Authentication by using a Web server. 113 7.2.3 Authorization by uisng aWeb server . 116 7.3 Securing the Web server plug-in for WebSphere . 117 7.3.1 Securing the transport channel between the Web server and WebSphere. 118 7.3.2 Testing the secure connection . 124 7.4 Securing the Web container of the application server. 126 7.4.1 Securing the transport channel . 126 7.4.2 Authentication by using the Web container. 127 7.4.3 Authorization by using the Web container. 132 7.4.4 Programmatic security . 141 7.5 Additional transport security, authentication, and authorization options . 147 7.5.1 Configuring LDAP authentication with IBM HTTP Server . 147 7.5.2 Configuring SSL certificate-based client authentication for the IBM HTTP Server. 152 7.5.3 Configuring SSL certificate-based client authentication for WebSphere Application Server. 156 Chapter 8. Securing an EJB application . 171 8.1 Programmatic login (server-side) using JAAS. 173 8.2 Declarative J2EE security . 174 8.2.1 Defining J2EE security roles for EJB modules . 174 8.2.2 Security role references . 175 8.2.3 Configuring method access control. 180 8.2.4 Enterprise JavaBeans Run-As delegation policy . 186 8.2.5 Bean-level delegation . ..