Securing Application Clients
The Java EE authentication requirements for application clients are the same as for other Java EE components, and the same authentication techniques can be used as for other Java EE application components. No authentication is necessary when accessing unprotected web resources.
When accessing protected web resources, the usual varieties of authentication can be used: HTTP basic authentication, HTTP login-form authentication, or SSL client authentication. Specifying an Authentication Mechanism in the Deployment Descriptor describes how to specify HTTP basic authentication and HTTP login-form authentication. Client Authentication describes how to specify SSL client authentication.
Authentication is required when accessing protected enterprise beans. The authentication mechanisms for enterprise beans are discussed in Securing Enterprise Beans.
An application client makes use of an authentication service provided by the application client container for authenticating its users. The container’s service can be integrated with the native platform’s authentication system so that a single sign-on capability is used. The container can authenticate the user either when the application is started or when a protected resource is accessed.
An application client can provide a class, called a login module, to
gather authentication data. If so, the
Using Login Modules
An application client can use the Java Authentication and Authorization
Service (JAAS) to create login modules for authentication. A JAAS-based
application implements the
Applications implement the
For example, the implementation of a callback handler for a GUI application might display a window to solicit user input, or the implementation of a callback handler for a command-line tool might simply prompt the user for input directly from the command line.
The login module passes an array of appropriate callbacks to the
For more information on using JAAS for authentication in login modules, refer to the documentation listed in Further Information about Advanced Security Topics.
Using Programmatic Login
Programmatic login enables the client code to supply user credentials.
If you are using an EJB client, you can use the