Sometimes the principal from the login modules in the JAAS stack may be a long representation such as a certificate DN.
Eg: UID=007, EMAILADDRESS=something@something, CN=James Bond, O=SpyAgency'
Now if we need to seek the roles for this user via a login module such as LdapExtLoginModule, we need to pick the username from the principal using a regular expression. In this example, it is "007".
Create a login module that needs to be added to the JAAS stack such that username can be extracted from the principal on the shared map.
|