Questions tagged [auth-request]

53 questions
3
votes
0 answers

In Nginx with auth_request, how do I redirect to original location after authentication?

How do I store and retrieve the original request location (/secure) to return a user back to that location when they log in? Everything works really well for Nginx auth_request. If a user is authenticated, the internal /access_token returns 200 and…
3
votes
1 answer

CORS headers with NginX and the auth_request module

I have an NginX box with the auth_request module installed, which authorises each request via our authentication service, and forwards the request on to our backend services if the request is authorised, and also adds CORS headers. The issue that…
Dave Harding
  • 481
  • 1
  • 4
  • 19
3
votes
0 answers

Nginx auth_request redirect to specific url

How to redirect user from 401 page to specific url if user click on Cancel button on basic auth form? (I use auth_request)
edenisn
  • 157
  • 1
  • 12
2
votes
1 answer

Nginx 431 - Request Header Fields Too Large - in reverse proxy

I am using auth_request module in nginx to act as an authentication module. location ~ ^/apigw/cws/(.*)$ { log_subrequest on; auth_request /_sessionvalidate; auth_request_set $token $upstream_http_authorization; …
user3602300
  • 129
  • 7
2
votes
1 answer

Pass a custom fixed header to auth_request in nginx

I need some guidance to pass a static header to auth_request in nginx. My locations config is as below: location = /auth { internal; proxy_pass http://authserver.com:8009/auth; proxy_pass_request_body off; proxy_set_header…
2
votes
1 answer

Why does NGINX authverify of multipart file upload request receive an immediate closed connection?

NGINX serves our gateway on 8080, authenticating via our AAA server at 8100 and then passing authenticated requests to NGINX on 8081 for routing. Everything works fine straight out of the box with the exception of File Upload requests (of ANY size)…
koan911
  • 360
  • 1
  • 3
  • 13
2
votes
1 answer

Nginx, auth_request with dynamic path param

My web service has serveral urls like this: POST /service GET /service/a59aeaba-7f3f-4826-896a-aeb48e1db256 POST /service/a59aeaba-7f3f-4826-896a-aeb48e1db256/action1 POST /service/a59aeaba-7f3f-4826-896a-aeb48e1db256/action2 ... Also, I have…
Mr.D
  • 7,353
  • 13
  • 60
  • 119
2
votes
1 answer

how to Add $request_uri to auth_request module?

Here is my nginx config file: location ~* ^/admin-panel/rest/(.*) { auth_request /admin/admin_authentication/check_access?url=$request_uri; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; …
Mojtaba Kamyabi
  • 3,440
  • 3
  • 29
  • 50
2
votes
0 answers

Nginx not redirecting to url on successful authentication

I am working on nginx auth_request module to put an authentication layer on all incoming requests to my server. The goal is to pass each url request first to a login page ,check for authorization and then redirect to the specific page mentioned for…
2
votes
2 answers

Nginx reverse proxy using auth_request module and external authentication API - error 404

I am trying to configure nginx as a reverse proxy to protect another server (kibana) using an external authentication API. This is the url that should log me into kibana dashboard - http://127.0.0.1/kibana_proxy?username=my.user&password=test67 Once…
2
votes
1 answer

How can i handle session cookie setting to then use it with NGINX auth_request?

We are trying to implement a simple authentication mechanism using NGINX as a proxy server and auth_request to protect some static files. The static documents are in docs.mydomain.com The API to generate a session token with an email/password is in…
acadavid
  • 506
  • 6
  • 14
2
votes
1 answer

Nginx Single Sign On - auth_request module

The flow that I wish to implement Requests with Client +------------------------>Nginx Access token set + …
Megh Parikh
  • 924
  • 2
  • 7
  • 25
2
votes
1 answer

How to set variable value based on a subrequest

I am trying to set the value of a variable based on the result if the user is correctly logged in. I will use this variable for conditional ssi. I am using the auth_request module to authorise the user. This authorisation happens for all pages. The…
RijulB
  • 565
  • 1
  • 4
  • 10
2
votes
1 answer

nginx auth_request_set does not allow test the variable in the context

I look for a work around for fcgi authorizer and this is how my test config looks: location ~* "f4m$" { limit_except GET { deny all; } auth_request /clu; …
wick
  • 1,995
  • 2
  • 20
  • 31
1
vote
0 answers

Nginx `auth_request` vs Nodejs Authentication Middleware

I have a NodeJS Restful API server which is publicly accessible to consume Rest API Services. I have JWT authentication implementation in place as middleware method when any request comes in to access secure end-point. These services are exposed…
Nah
  • 1,690
  • 2
  • 26
  • 46