lively-beard-47107
04/05/2022, 8:30 AMdamp-sunset-69236
04/05/2022, 8:32 AMlively-beard-47107
04/05/2022, 8:32 AMlively-beard-47107
04/05/2022, 8:33 AMlively-beard-47107
04/05/2022, 8:34 AMdamp-sunset-69236
04/05/2022, 8:35 AMdamp-sunset-69236
04/05/2022, 8:36 AMdamp-sunset-69236
04/05/2022, 8:37 AMlively-beard-47107
04/05/2022, 8:42 AM<http://nginx.ingress.kubernetes.io/auth-url|nginx.ingress.kubernetes.io/auth-url>: <http://custom-nginx.auth-test.svc.cluster.local/decisions$request_uri>
Then, custom-nginx.auth-test
is a NGINX deployment where I have customised the nginx.conf
file and have set the following configs:
proxy_pass <http://ory-oathkeeper.auth-test.svc.cluster.local:4456>;
lively-beard-47107
04/05/2022, 8:42 AMlively-beard-47107
04/05/2022, 8:45 AMlively-beard-47107
04/05/2022, 8:45 AMdamp-sunset-69236
04/05/2022, 9:05 AMlively-beard-47107
04/05/2022, 9:05 AMdamp-sunset-69236
04/05/2022, 9:09 AMdamp-sunset-69236
04/05/2022, 9:11 AMproxy_pass_request_headers on
for your location in nginxdamp-sunset-69236
04/05/2022, 10:33 AMX-user
variablelively-beard-47107
04/05/2022, 10:34 AMdamp-sunset-69236
04/05/2022, 10:34 AMauth_request_set $x_user $upstream_http_X_User;
...
proxy_set_header X-User $x_user;
for your location /
damp-sunset-69236
04/05/2022, 10:34 AMdamp-sunset-69236
04/05/2022, 10:34 AMdamp-sunset-69236
04/05/2022, 10:35 AMdamp-sunset-69236
04/05/2022, 10:36 AM<http://127.0.0.1:8080/hello>
url in your browser, authenticate and open it again.damp-sunset-69236
04/05/2022, 10:36 AMdamp-sunset-69236
04/05/2022, 10:37 AMlively-beard-47107
04/05/2022, 12:31 PM2022/04/05 12:29:28 [error] 36#36: *1 no resolver defined to resolve ory-oathkeeper.auth-test.svc.cluster.local, client: 172.16.0.49, server: , request: "GET /decisions/ HTTP/1.1", subrequest: "/auth-decision", host: "oathkeeper-proxy.auth-test.svc.cluster.local", referrer: "<http://hello-world.example.com/>"
2022/04/05 12:29:28 [error] 36#36: *1 auth request unexpected status: 502 while sending to client, client: 172.16.0.49, server: , request: "GET /decisions/ HTTP/1.1", host: "oathkeeper-proxy.auth-test.svc.cluster.local", referrer: "<http://hello-world.example.com/>"
lively-beard-47107
04/05/2022, 12:32 PMlively-beard-47107
04/05/2022, 12:34 PMlively-beard-47107
04/05/2022, 2:13 PMnginx_1 | 172.18.0.1 - - [05/Apr/2022:14:12:02 +0000] "GET /hello HTTP/1.1" 500 177 "<http://127.0.0.1:8080/>" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0"
nginx_1 | 2022/04/05 14:12:02 [error] 28#28: *22 auth request unexpected status: 404 while sending to client, client: 172.18.0.1, server: , request: "GET /hello HTTP/1.1", host: "localhost:8080", referrer: "<http://127.0.0.1:8080/>"
By using the example you created, I get the following logsdamp-sunset-69236
04/05/2022, 3:02 PM