Java Authentication and Authorization Service
Java Authentication and Authorization Service (JAAS) (https://docs.oracle.com/javase/6/docs/technotes/guides/security/jaas/JAASRefGuide.html) implements a Java version of the standard Pluggable Authentication Module (PAM) framework. It was introduced as an optional package (extension) to the J2SDK (1.3) and then was integrated into the J2SDK 1.4.
JAAS is a standard library which provides your application with the following:
- A representation of identity (principal) by providing credentials (username/password – subject).
- A login service that will call back your application to gather credentials from user and then returns a subject after successful authentication.
- A mechanism to grant necessary grants (authorization) to a user after successful authentication:
Figure 8: Working of JAAS
As shown in the preceding figure, JAAS has predefined login modules for most of the login mechanisms built in. Custom login modules can be imported or built according to...