<div dir="ltr">Hi,<br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 24, 2015 at 2:00 AM, Stuart Douglas <span dir="ltr">&lt;<a href="mailto:sdouglas@redhat.com" target="_blank">sdouglas@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Looks like I made a mistake in the JIRA, it should already be in Wildfly. Can you test it out?<br></blockquote><div><br></div><div>I just did the check again and lo and behold, the fix is indeed already there. I&#39;m not really sure what went wrong with my quick test the other day but it clearly works now. Double checked the source of undertow-servlet-1.3.11.Final and the fix is really there, so this is absolutely great. Thanks again!</div><div><br></div><div>One question about the commit though, when it was committed here: <a href="https://github.com/undertow-io/undertow/commit/6e9663576fcaaa14f5a9cedf4ae1a144b20fd09e">https://github.com/undertow-io/undertow/commit/6e9663576fcaaa14f5a9cedf4ae1a144b20fd09e</a></div><div><br></div><div>It was committed in the master, but master was already 1.4.x at Nov 6, or did I miss something here? Doesn&#39;t matter much for the end result but just curious.</div><div><br></div><div>Kind regards,</div><div>Arjan Tijms</div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Stuart<br>
<div><div class="h5"><br>
----- Original Message -----<br>
&gt; From: &quot;arjan tijms&quot; &lt;<a href="mailto:arjan.tijms@gmail.com">arjan.tijms@gmail.com</a>&gt;<br>
&gt; To: &quot;undertow-dev&quot; &lt;<a href="mailto:undertow-dev@lists.jboss.org">undertow-dev@lists.jboss.org</a>&gt;<br>
&gt; Sent: Wednesday, 23 December, 2015 11:24:57 PM<br>
&gt; Subject: [undertow-dev] UNDERTOW-577 - response code from SAM<br>
&gt;<br>
&gt; Hi,<br>
&gt;<br>
&gt; I wonder if it would make sense to port the (small) fix for UNDERTOW-577 back<br>
&gt; to Undertow 1.3.x, and hopefully still include this with WF 10 final.<br>
&gt;<br>
&gt; This concerns one of the last (known) larger bugs with JASPIC in WildFly.<br>
&gt; Without this being fixed, something like the 403 or 404 from a SAM is not<br>
&gt; possible, Returning a 403 is specifically needed for the BASIC scheme.<br>
&gt;<br>
&gt; For instance, the following JSR 375 authentication mechanism now works on<br>
&gt; GlassFish, but throws a &quot;UT010019: Response already commited&quot; on WildFly<br>
&gt; 10rc4/Undertow 1.3.11:<br>
&gt;<br>
&gt; public AuthStatus validateRequest(HttpServletRequest request,<br>
&gt; HttpServletResponse response, HttpMsgContext httpMsgContext) throws<br>
&gt; AuthException {<br>
&gt; String[] credentials = getCredentials(request);<br>
&gt; if (!isEmpty(credentials)) {<br>
&gt; IdentityStore identityStore =<br>
&gt; CDI.current().select(IdentityStore.class).get();<br>
&gt; CredentialValidationResult result = identityStore.validate(<br>
&gt; new UsernamePasswordCredential(credentials[0], new<br>
&gt; Password(credentials[1])));<br>
&gt;<br>
&gt; if (result.getStatus() == VALID) {<br>
&gt; return httpMsgContext.notifyContainerAboutLogin(<br>
&gt; result.getCallerName(), result.getCallerGroups());<br>
&gt; }<br>
&gt; }<br>
&gt; if (httpMsgContext.isProtected()) {<br>
&gt; response.setHeader(&quot;WWW-Authenticate&quot;, basicHeaderValue);<br>
&gt; return httpMsgContext.responseUnAuthorized();<br>
&gt; }<br>
&gt; return httpMsgContext.doNothing();<br>
&gt; }<br>
&gt;<br>
&gt; The problem is the &quot;httpMsgContext.responseUnAuthorized();&quot; which does:<br>
&gt;<br>
&gt; try {<br>
&gt; getResponse().sendError(SC_UNAUTHORIZED);<br>
&gt; } catch (IOException e) {<br>
&gt; throw new IllegalStateException(e);<br>
&gt; }<br>
&gt; return SEND_FAILURE;<br>
&gt;<br>
&gt; I&#39;m not really sure what the schedule is for Undertow 1.4 vs a potential WF<br>
&gt; 11 and/or EAP 7. If WF 11 is still far away and EAP 7 will be based on WF<br>
&gt; 10, then it would really be great if this small but rather important fix<br>
&gt; could still be included in WF 10.<br>
&gt;<br>
&gt; Kind regards,<br>
&gt; Arjan Tijms<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; undertow-dev mailing list<br>
&gt; <a href="mailto:undertow-dev@lists.jboss.org">undertow-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/undertow-dev</a><br>
</blockquote></div><br></div></div>