当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: User authentication and access c
 

 

 ·a brief history of tags @ jdj    »显示摘要«
    摘要: custom tags in javaserver pages have come a long way since their inception. now that sun has provided some standards for these tags in the form of jstl (and the up-and-coming javaserver faces), and ......
    摘要: graphical user interface (gui) testing is a potentially problematic area because constructing effective test cases is more difficult than the corresponding application logic. the roadblocks to effec......


Extending JAAS @ JDJ
user authentication and access control are important security measures for most java applications, especially j2ee applications. the java authentication and authorization service (jaas), the core api of j2se 1.4 and 1.5, represents the new security standard. it provides a pluggable and flexible framework that allows developers to incorporate different security mechanisms and various security sources.

with the upcoming release of j2se 1.5, which includes a lot of enhancements to cryptography, xml security, public key infrastructure (pki), kerberos, and the federating identity, the jaas will play a more important role in j2ee security implementations.

overview of jaas

authentication

authentication is the process of verifying that a user has the right to use identities established by the enterprise user registry. the authentication mechanism of jaas is built on a set of pluggable modules (see figure 1). jaas allows different authentication models to be plugged in at runtime. the client applications always interact with jaas through the logincontext object.

the authentication process typically involves the following steps: create a logincontext object. the logincontext looks up the configuration file to determine which loginmodule to use. also, optionally, you can pass a callbackhandler to the logincontext. perform authentication by calling the login method of logincontext, which loads the predefined loginmodule to check if the user can be authenticated. associate principals and credentials with the subject if the user is authenticated. or throw a loginexception in case login failed. use the logout method of logincontext to log out. the login in jaas is a two-phase process. the first phase is the "login" phase (as described in step 2). the only task in this phase is authentication. once the process successfully passes this phase, the authentication process enters the "commit" phase (step 3) in which the commit method of loginmodule is called to associate the relevant principals and credentials with the subject.

a subject in jaas represents an authenticated entity, such as a person or device. it contains a set of principals and security-related attributes such as a password and cryptographic keys. in the jaas architecture, the subject, along with the permission, plays an important role in the authorization pr
...   下一页

 ·managing httpsession objects @ jdj    »显示摘要«
    摘要: java servlet technology provides developers with functionality, scalability, and portability that cant be found in other server-side languages. one feature of the java servlet specification thats co......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE