I want to restrict access to some static content, served using nginx, using an existing SAML 2.0 IdP. (In Apache, this would be done with a module such as mod_mellon or mod_auth_saml)

What is the best way to use SAML authentication for static content on nginx? If it is still the use of X-Accel headers, is there a helper script out there to proxy from a SAML authentication or do I need to start from scratch for this?

  • Anu possible option now with Openresty or nginx for SAML based authenication ?
    – Manu
    Jul 6, 2022 at 9:15

3 Answers 3


Someone or the shib project has a free SSO dynamic module for nginx.



You can try auth-request module as mentioned : SSO with Nginx


It's 2017 now and there is still no module in nginx, no matter free or paid, to get SAML authentication.

I wouldn't expect it to be available anytime soon, considering it's been missing for almost a decade.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .