Application Execution

Executing the application returns differing results depending on the user who was authenticated since different users (and their subjects) have different permissions.

As we saw in this chapter, the JAAS package is by design highly configurable. The JAAS configuration file for the execution of our demonstration program is as follows.

The DemoJAAS Configuration File
TextJAAS {
       DemoLoginModule required debug=true;
};

TestJAAS {
       DemoLoginModule required debug=true;
};

DemoJAAS {
       com.sun.security.auth.module.UnixLoginModule required debug=true;
};

JDBCJAAS {
       JDBCLoginModule required ;
};

Each of these LoginModule configurations is referenced and used in the DemoJAAS program as arguments to the LoginContext constructor.

In ...

Get J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.