Bad Message 431 in a single SP environment

Nate Klingenstein ndk at sudonym.me
Fri Sep 7 00:46:57 EDT 2018


Kylie,

That's a new one for me.  These are just some observations.

First, I think that's the right setting to be examining.  Have you tried
simply increasing the maximum header size setting in Jetty in your test
environment as a sanity check?

I would suppose that the reason it works on the first login but not
subsequent logins is that the second cycle has an SSO session and other
cookies set by the IdP, Jetty, or whatever else is involved in the first
round-trip.

Second, according to the second answer at:

https://stackoverflow.com/questions/686217/maximum-on-http-header-values

the limit applies to the sum of the headers *and* the request line for most
web servers, and as HTTP-Redirect bound SAML AuthnRequests can be of decent
size, that 500 byte overhead is not that significant.  An example
AuthnRequest from SAMLtest:

https://samltest.id/idp/profile/SAML2/Redirect/SSO?SAMLRequest=fZFfa4MwFMW%2FiuS9jdrWaqiCax9W6Fapbg97GVGvM6CJy4378%2B2ntYMORt8COed3OOdukLdNx%2BLe1PIE7z2gsb7aRiI7f4Sk15IpjgKZ5C0gMwVL44cDc%2Bc267QyqlANsWJE0EYouVUS%2BxZ0CvpDFPB0OoSkNqZDRulINEPAXJQ0rUWeqwZMPUdUdES6NDmmGbF2g0RIPtL%2B94qyo0N0JRq4GE9QCg2FoWl6JNZ%2BF5JX382XXrXIK8%2BrgFee7zi%2BGwSrvFytS75yBxliD3uJhksTEtd2%2FJkdzOx1Zi%2FZImAL94VYyaXhnZClkG%2B358gnEbL7LEtmU5ln0HguMghItBlrsHOwvpr5Npb%2Fbkui%2F9YY3xS7Db1iT0Edexxg%2B12iGlF8W3HTqM%2BtBm4gJA6h0WT5e%2FzoBw%3D%3D&RelayState=ss%3Amem%3A0002e12f35f8cedebf8403e8ac65e9c79522daf1d66940bc73088ba7c8296f65

is 604 bytes.  That would be just about right given the 150 byte
discrepancy between test and prod and and 500 byte headroom.

That's where I'd start, but I haven't encountered this issue myself before,
nor do I recall it coming up on the list before.

I hope this isn't too wrong,
Nate.



On Fri, Sep 7, 2018 at 2:32 AM, Kylie Lunghusen <kylie.lunghusen at rmit.edu.au
> wrote:

> Hi folks,
>
> We've got a problem in which the Test and Production versions of a
> particular SP behave differently.
>
> Background:
> SP [ORG]-test.[APP].com.au uses our Test IdP
> SP [ORG].[APP].com.au user our Production IdP
> (Both IdPs defer to CAS/AD for authentication.)
>
> Problem:
> Production SP works fine.
> On first login to the Test SP, it works. On subsequent logins, it gives
> the error:
> "Bad Message 431
> reason: Request Header Fields Too Large"
> This behaviour is consistent, and applies across browsers and operating
> systems.
>
> Investigations so far:
> * I'm told the SPs are configured more or less identically.
> * requestHeaderSize in jetty.xml is set to 8192 on all of our IdP
> environments.
> * In second-access request headers captured via Dev Tools, the Test
> headers are usually slightly longer than the Prod ones, but still well
> below 8192 (eg. Test 7627, Prod 7458).
>
> Only things I can think of are:
> * requestHeaderSize is not the only setting (or is the wrong setting) to
> be checking?
> * There are wrappers that make the thing bigger than it looks (like the
> way an email in transit is bigger than in the inbox)?
> * Bytes != characters (I know some characters use two bytes, dunno if that
> includes any of these ones) so the Test headers really are over 8192?
> (Apologies if stupid questions, am learning on the job with no mentor.)
>
> I've failed to answer these questions via Googling, so it's time to ask
> the folks who know a lot more than I do.
>
> Any ideas on what/where I should be checking?
>
> Thanks,
>
> K
>
>
> --
> Kylie Lunghusen
> Technical Tools Administrator, University Operations
> Information Technology Services, RMIT University
>
>
>
> --
> For Consortium Member technical support, see https://wiki.shibboleth.net/
> confluence/x/coFAAg
> To unsubscribe from this list send an email to
> users-unsubscribe at shibboleth.net
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20180907/23574708/attachment.html>


More information about the users mailing list