Description
The JAASLoginInterceptor populates the DefaultSecurityContext using the authenticated JAAS Subject. It tries to find the user principal, as opposed to the roles, by finding the first non-Group principal. However, in the case of a JAAS implementation that doesn't store roles as Groups, it may end up storing a role as the user principal. This task is to first try to match the given username against the non-Group principals, and then to default to the old behaviour.