nginx-shib/nginx-http-shibboleth

No variables are copied to the header

greut opened this issue · 4 comments

greut commented

Description of Issue/Question

No variables are copied when using shib_request_use_headers on;.

I've added a couple of ngx_log_debug and came to the conclusion that no headers where available to the subrequest (sr).

if (ctx->status == NGX_HTTP_OK) {
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
"shib request authorizer allows access");
if (arcf->use_headers) {
/*
* 200 response may include headers prefixed with `Variable-`,
* copy these into main request headers
*/
part = &sr->headers_out.headers.part;
h = part->elts;

Do you have any leads to follow?

Kindest regards!

Setup

A mix of your setup and https://github.com/jnyryan/vagrant-shibboleth-sp-nginx
https://hesso.whut.ch/ (using http2)

Steps to Reproduce Issue

...

Versions and Systems

nginx version: nginx/1.10.1
built by gcc 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2.1) 
built with OpenSSL 1.0.2g-fips  1 Mar 2016
TLS SNI support enabled
configure arguments: --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --pid-path=/run/nginx.pid --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --with-http_ssl_module --with-ipv6 --with-http_v2_module --add-module=/opt/nginx-http-shibboleth --add-module=/opt/headers-more-nginx-module --with-debug

shibboleth 2.5.3
greut commented

Could it be a missing exportAssertion?

No worries, what was the config issue?

It's can be a pretty complicated setup so if the docs could be improved,
open a pull request 😃

greut commented

Adding a <RequestMapper> and making the fastcgi buffer insanely huge did it. I'll see if I have something worth a PR.