Forum: NGINX Local and Remote User Authentication

F51894acc29ed922dcd2fa386414b616?d=identicon&s=25 Hari Miriyala (Guest)
on 2014-04-24 18:41
(Received via mailing list)
Hi All,

We have nginx1.4.7 with ngx_http_auth_request_module and
ngx_http_auth_basic_module besides few other modules. There are few
other
modules also, but have mentioned above two modules only due to relevance
to
this discussion.

Our application requires to have local user (meaning - store user name
and
passwd and authenticate at our server) and remote user (meaning -
delegate
authentication to remote servers like Radius/TACACS+, in this case, our
application is aware of only user name and which remote server to send
authentication request).

The goal is to configure nginx as following:

1. Configure nginx to prompt username/passwd
2. Once user enters username and passwd, get access to these fields and
pass to our web application which looks at local database and decides
whether user is local or remote.
3. If user is local, authenticate using ngx_http_auth_basic_module
(htpasswd style)
4. If user is remote, delegate authentication to remote server using
ngx_http_auth_request_module
5. Once authentication is successful (either in step 3 or step 4), pass
control back to our application for some book-keeping
6. Let authenticated user access application

Any suggestions how do we configure nginx to achieve above? please share
your thoughts/ideas/sample configs etc.

Regards,
Hari
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.