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.

8.7.1 JAAS in <strong>WebSphere</strong>In the previous version of <strong>WebSphere</strong> Application Server V4.0, othermechanisms were used to perform programmatic login. There was a distinctionbetween server-side and client-side programmatic login. One was using theLoginHelper class together with CORBA authentication methods, while the otherwas utilizing the ServerSideAuthenticator class. In <strong>WebSphere</strong> <strong>V5.0</strong> theseclasses, together with the mechanism, are deprecated; use the JAASprogrammatic login instead.With JAAS the client-side and server-side login work in the same way, but thechallenge for authentication works a bit differently. On the client-side, anychallenge mechanism can be used that is compatible with the client’s runtimeenvironment; while on the server side there is no place to pull up anauthentication challenge window or provide a command line prompt forusername and password. On the server-side, credentials have to be collected inthe code, then provided to the JAAS login facility.8.7.2 Client-side login with JAASClient-side login is useful when the user needs to log in to the security domain ona remote system using the client application. In this case, the client applicationhas to collect the login information for authentication purposes. <strong>WebSphere</strong>provides built-in mechanisms to collect the necessary information: user name,password, realm.There are two scenarios in this client-side login section, one is an example forJ2EE Java applications, and the other is for thin Java applications. For moreinformation about Java client security, refer to Chapter 6, “Securing Java clients”on page 97.J2EE Java applicationThe following code snippet shows how to perform various types of login usingcharacter-based console (stdin), graphical user interface, and direct login withouta login prompt.Example 8-7 Client side login in the ITSOBank J2EE client...private static void loginClient() {LoginContext lc = null;try {// using the console (stdin) to collect the login informationif(logintype.equals("stdin")) {System.out.println("Performing stdin login...");Chapter 8. Programmatic security 209

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

Saved successfully!

Ooh no, something went wrong!