The principal class in JBoss by default is the SimplePrincipal which just has the user name of the authenticated user. To have the full name of the DN either the user must enter the DN instead of the sAMAccount or userName or the SimplePrincipal needs to be replaced by an implementation of Principal that contains the DN of the user populated during the login process in a subclass of LDAPLoginModule.
If all the users of your application have a similar DN
then you can use the
attributes in the LDAPLoginModule to create the DN of the user. Look at the following...