<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">writing your own X509 flow with a different<br>
bean definition at the end in place of ValidateX509Certificate should work<br>
around the issue for now.<br></blockquote><div><br></div><div>That's what I'm actively working on now. I'll follow up with results.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If you create a version of that class that builds its own Subject or<br>
explicitly removes Principals from the input parameter, I think it will do<br>
what you want.<br></blockquote><div><br></div><div>I'm going with the removal route. Based on my analysis I also have to do something like the following:</div><div><br></div><div><div> final RequestedPrincipalContext rpCtx = authenticationContext.getSubcontext(RequestedPrincipalContext.class);</div><div> // Clear any previously-set matching principal</div><div> rpCtx.setMatchingPrincipal(null);</div></div><div> // Set the first requested principal type that matches on the authenticated subject</div><div> for (Principal requested : rpCtx.getRequestedPrincipals()) {</div><div> for (Principal supplied : subject.getPrincipals()) {</div><div> if (requested.equals(supplied)) {</div><div> rpCtx.setMatchingPrincipal(supplied);</div><div> return;</div><div> }</div><div> }</div><div> }</div><div><br></div><div>The matchingPrincipal field is what drives population of the SAML AuthnContextClassRef in the message actions down in the SAML profile flows. I didn't see any existing action that sets that field from subject principals, so it seems I have to explicitly deal with it.</div><div><br></div><div>M<br></div><div><br></div></div></div>