X-Pack Run As documentation incorrect

The documentation for how to run a request as a given user for X-Pack 5.0.0-alpha3 suggests it can be done by setting the header 'es-security-runas-user'. However, this does not work.

The Shield 2.3 documentation references a different header to use: 'es-shield-runas-user'.

The second header 'es-shield-runas-user' works in X-Pack 5.0.0-alpha3.

It seems like the former is the X-Pack way of doing this, but there appears to be a bug or incomplete functionality update.

Thanks for pointing this out, I have raised it internally (as the repo isn't public).