Issue Summary: We are encountering a blocker issue during our JBoss upgrade. Despite trying several solutions suggested by Copilot and Google, we are facing a new challenge: a white page error when logging in. It appears that Elytron is returning NamePrincipal instead of our custom principal (I_MyCustomSharedPrincipal) in the JSP using request.getUserPrincipal(). I_ MyCustomSharedPrincipal is an interface. Tech Stack: JBoss 8.0.6, Elytron 18, Java 21, PFA(standalone.xml and LdapMyCustomLoginModuleRealm class which implements I_MyCustomSharedPrincipal) Configurations Tried: Security Configuration: Wired security-domain, security-realm, http-authentication, and application-security-domain with custom-realm. Updated web.xml and jboss-web.xml to map to the correct security-domain and custom-realm. Custom Realm Implementation: Built the following APIs in the LdapMyCustomLoginModuleRealm class, which extends org.wildfly.security.auth.server.SecurityRealm: initialize method– invoked getRealmIdentity method– invoked verifyEvidence method– invoked exists method– invoked getAuthorizationIdentity method– invoked getAttributes method– invoked getRealmIdentityPrincipal method– not invoked Standalone Configuration: Mapped custom-realm in standalone.xml to LdapMyCustomLoginModuleRealm , which is invoked during login. Observed that the getRealmIdentityPrincipal methodAPI, which returns the Principal, is not being invoked. Since getRealmIdentityPrincipal methodnot getting invoked, I am not able return the custom principal(I_MyCustomSharedPrincipal) object in the JSP “request.getUserPrincipal()”. Continue reading...