<div dir="ltr">Hi,<div><br></div><div>I noticed that JBoss&#39; JACCAuthorizationManager only passes the role principals (if any) into a JACC module, as per the following code:</div><div><br></div><div><div>// create a protection domain with the user roles (or account principal if no roles are found)</div><div>        final Map&lt;String, Set&lt;String&gt;&gt; principalVersusRolesMap = deployment.getDeploymentInfo().getPrincipalVersusRolesMap();</div><div>        final Principal[] principals = this.getPrincipals(account, principalVersusRolesMap);</div><div>        final CodeSource codeSource = servletInfo.getServletClass().getProtectionDomain().getCodeSource();</div><div>        final ProtectionDomain protectionDomain = new ProtectionDomain(codeSource, null, null, principals);</div></div><div><br></div><div>If there happen to be no roles, then and only then is the caller principal passed to the JACC module.</div><div><br></div><div>I wonder if there was any specific idea here. The comment explicitly indicates this, so it doesn&#39;t just seem a bug. But this is quite, unusual, and also a bit confusing for a JACC module to work with. </div><div><br></div><div>As far as I know, no other server does this (at least GF, Payara, Geronimo, JEUS and TomEE don&#39;t do this). You always see all the principals from the Subject being passed in.</div><div><br></div><div>A JACC module can work around this by obtaining the subject directly using &quot;PolicyContext.getContext(&quot;javax.security.auth.Subject.container&quot;)&quot;, but still wondering why JBoss doesn&#39;t just pass all principals here.</div><div><br></div><div>Any insight would be appreciated.</div><div><br></div><div>Kind regards,</div><div>Arjan Tijms</div><div><br></div></div>