If I'm right the test suite is against nginx 1.23 and less, so using 1.24 could be the problem, but I don't know how to either compile the module against the Ubuntu nginx version (1.18,0, not r1.18.0) nor install a packaged 1.22 version from nginx repository.
I followed the configuration instructions in https://github.com/nginx-shib/nginx-http-shibboleth/blob/master/CONFIG.rst.
When I try to access a normal (unprotected) resource, either http or https, everything work fine. The /Shibboleth.sso provides me the metadata, the /shibauthenticator location (if set not to private) works too redirecting to the IDP login page, so apparently Shibboleth is working.
However, when accessing a protected resource there is no request at all towards the IDP and the connection get reset on the client.
Expected behaviour
I would expect to be redirected to the IDP login page.
Steps to Reproduce Issue
1) install nginx 1.24.0 from nginx repository on Ubuntu 22.04
2) pkg-oss to build headers_more sudo sh build_module.sh -n headers_more_nginx -v 1.24.0 https://github.com/openresty/headers-more-nginx-module/archive/refs/tags/v0.36.tar.gz
3) pkg-oss to build shibboleth module sudo sh build_module.sh -n shibboleth -v 1.24.0 https://github.com/nginx-shib/nginx-http-shibboleth/archive/refs/tags/v2.0.1.tar.gz
4) install the modules produces at steps 2 and 3 via dpkg
5) configure nginx to protect a resource
6) restart nginx and access the resource
Setup & Logs
In the error logs I have:
$ sudo tail /var/log/nginx/error.log
2023/12/12 12:33:26 [notice] 42805#42805: start worker process 42818
2023/12/12 12:33:26 [notice] 42805#42805: signal 29 (SIGIO) received
2023/12/12 12:33:26 [notice] 42805#42805: signal 17 (SIGCHLD) received from 42817
2023/12/12 12:33:26 [alert] 42805#42805: worker process 42817 exited on signal 11 (core dumped)
2023/12/12 12:33:26 [notice] 42805#42805: start worker process 42819
2023/12/12 12:33:26 [notice] 42805#42805: signal 29 (SIGIO) received
2023/12/12 12:33:26 [notice] 42805#42805: signal 17 (SIGCHLD) received from 42818
2023/12/12 12:33:26 [alert] 42805#42805: worker process 42818 exited on signal 11 (core dumped)
2023/12/12 12:33:26 [notice] 42805#42805: start worker process 42820
2023/12/12 12:33:26 [notice] 42805#42805: signal 29 (SIGIO) received
I made nginx to produce a core dump in common location, but there is not enough information (or I cannot extract it):
$ sudo gdb $(which nginx) /tmp/core.nginx.42806
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/sbin/nginx...
(No debugging symbols found in /usr/sbin/nginx)
warning: Can't open file /[aio] (deleted) during file-backed mapping note processing
warning: Can't open file /dev/zero (deleted) during file-backed mapping note processing
[New LWP 42806]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `nginx: worker process '.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x000055997257da32 in ?? ()
(gdb) bt
#0 0x000055997257da32 in ?? ()
#1 0x00005599725e6a23 in ?? ()
#2 0x0000559972553994 in ngx_http_finalize_request ()
#3 0x0000559972546cec in ngx_http_core_access_phase ()
#4 0x00005599725408fd in ngx_http_core_run_phases ()
#5 0x000055997254b9b8 in ngx_http_run_posted_requests ()
#6 0x0000559972534503 in ?? ()
#7 0x000055997252fde4 in ngx_process_events_and_timers ()
#8 0x0000559972535bcb in ?? ()
#9 0x000055997252cf12 in ngx_spawn_process ()
#10 0x000055997252d978 in ?? ()
#11 0x0000559972534ae5 in ngx_master_process_cycle ()
#12 0x0000559972508d39 in main ()
Configuration of the resource:
server {
listen 80;
location /test {
alias /var/www/html/;
shib_request /shibauthorizer;
shib_request_use_headers on;
include shib_clear_headers;
}
#FastCGI authorizer for Auth Request module
location = /shibauthorizer {
# internal;
include fastcgi_params;
fastcgi_pass unix:///tmp/authorizer.socket;
}
#FastCGI responder
location /Shibboleth.sso {
include fastcgi_params;
fastcgi_pass unix:///tmp/responder.socket;
}
}
Description the bug
I have installed nginx 1.24.0 from nginx Ubuntu repositories, and then with pkg-oss I compiled and installed the modules:
If I'm right the test suite is against nginx 1.23 and less, so using 1.24 could be the problem, but I don't know how to either compile the module against the Ubuntu nginx version (1.18,0, not
r
1.18.0) nor install a packaged 1.22 version from nginx repository.I followed the configuration instructions in https://github.com/nginx-shib/nginx-http-shibboleth/blob/master/CONFIG.rst. When I try to access a normal (unprotected) resource, either http or https, everything work fine. The
/Shibboleth.sso
provides me the metadata, the/shibauthenticator
location (if set not toprivate
) works too redirecting to the IDP login page, so apparently Shibboleth is working. However, when accessing a protected resource there is no request at all towards the IDP and the connection get reset on the client.Expected behaviour
I would expect to be redirected to the IDP login page.
Steps to Reproduce Issue
1) install nginx 1.24.0 from nginx repository on Ubuntu 22.04 2) pkg-oss to build headers_more
sudo sh build_module.sh -n headers_more_nginx -v 1.24.0 https://github.com/openresty/headers-more-nginx-module/archive/refs/tags/v0.36.tar.gz
3) pkg-oss to build shibboleth modulesudo sh build_module.sh -n shibboleth -v 1.24.0 https://github.com/nginx-shib/nginx-http-shibboleth/archive/refs/tags/v2.0.1.tar.gz
4) install the modules produces at steps 2 and 3 viadpkg
5) configure nginx to protect a resource 6) restart nginx and access the resourceSetup & Logs
In the error logs I have:
I made nginx to produce a core dump in common location, but there is not enough information (or I cannot extract it):
Configuration of the resource:
Versions and Systems