13.07.2015 Views

IBM WebSphere V5.0 Security - CGISecurity

IBM WebSphere V5.0 Security - CGISecurity

IBM WebSphere V5.0 Security - CGISecurity

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

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

Example 8-5 login.configWSLogin {com.ibm.ws.security.common.auth.module.proxy.WSLoginModuleProxy requireddelegate=com.ibm.ws.security.common.auth.module.WSLoginModuleImpl;};The configuration file can have multiple definitions, each definition has an aliasname, which can be used in the application to set the login module. The entrydefines the Java class for the login module; the "required" means that this class'sapproval is necessary for login to succeed. The entry can optionally define adelegation class for the login module.There can be a policy file for JAAS defined, similar to the policy files used in Java2 security. Actually, the Java 2 <strong>Security</strong> and JAAS policy files may be merged inthe next release of Java, in J2EE V1.4. This policy file is optional.Example 8-6 jaas.policygrant Principal SamplePrincipal "user01" {permission java.util.PropertyPermission"user.home", "read";};The policy file defines the access policy for the resources in an application. Thepolicy defines the principal for the resources.8.7 Programmatic loginWhen you want to implement your own login mechanism for your application, youmay want to use JAAS and implement the required programmatic login.Figure 8-8 shows the activity diagram for JAAS and how the differentcomponents are working together during a login process.Chapter 8. Programmatic security 207

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

Saved successfully!

Ooh no, something went wrong!