Comment 3 for bug 2018472

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thanks for reporting a bug and helping make Ubuntu better.

I tried to reproduce the problem here, but I think I'm missing something. Maybe you could help me figure it out.

First, I set up squid inside a Jammy container and added the following lines to /etc/squid/squid.conf:

auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/private/USERS.internet_plain
acl ncsa_users proxy_auth REQUIRED
http_access allow ncsa_users
http_access deny all
acl users_unlim proxy_auth test
delay_pools 1
delay_class 1 1
delay_parameters 1 1024/1024
delay_access 1 allow users_unlim
delay_access 1 deny all

Then, I created the file /etc/squid/private/USERS.internet_plain and added the "test" user to it:

# htpasswd -b /etc/squid/private/USERS.internet_plain test test

I restarted the service, then created another container and tried to use curl with the proxy. Here's what I'm getting:

# curl -vvvv -x test:test@10.96.142.20:3128 example.com
* Trying 10.96.142.20:3128...
* Connected to (nil) (10.96.142.20) port 3128 (#0)
* Proxy auth using Basic with user 'test'
> GET http://example.com/ HTTP/1.1
> Host: example.com
> Proxy-Authorization: Basic dGVzdDp0ZXN0
> User-Agent: curl/7.81.0
> Accept: */*
> Proxy-Connection: Keep-Alive
>
* Empty reply from server
* Closing connection 0
curl: (52) Empty reply from server

When I look at the squid logs, I see that apparently the basic_ncsa_auth script wasn't invoked:

2023/05/09 15:44:41 kid1| Set Current Directory to /var/spool/squid
2023/05/09 15:44:41 kid1| Starting Squid Cache version 5.2 for x86_64-pc-linux-gnu...
2023/05/09 15:44:41 kid1| Service Name: squid
2023/05/09 15:44:41 kid1| Process ID 2515
2023/05/09 15:44:41 kid1| Process Roles: worker
2023/05/09 15:44:41 kid1| With 1024 file descriptors available
2023/05/09 15:44:41 kid1| Initializing IP Cache...
2023/05/09 15:44:41 kid1| DNS Socket created at [::], FD 8
2023/05/09 15:44:41 kid1| DNS Socket created at 0.0.0.0, FD 9
2023/05/09 15:44:41 kid1| Adding nameserver 127.0.0.53 from /etc/resolv.conf
2023/05/09 15:44:41 kid1| Adding domain lxd from /etc/resolv.conf
2023/05/09 15:44:41 kid1| helperOpenServers: Starting 0/20 'basic_ncsa_auth' processes
2023/05/09 15:44:41 kid1| helperOpenServers: No 'basic_ncsa_auth' processes needed.
2023/05/09 15:44:41 kid1| Logfile: opening log daemon:/var/log/squid/access.log
2023/05/09 15:44:41 kid1| Logfile Daemon: opening log /var/log/squid/access.log
2023/05/09 15:44:41 kid1| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2023/05/09 15:44:41 kid1| Store logging disabled
2023/05/09 15:44:41 kid1| Swap maxSize 0 + 262144 KB, estimated 20164 objects
2023/05/09 15:44:41 kid1| Target number of buckets: 1008
2023/05/09 15:44:41 kid1| Using 8192 Store buckets
2023/05/09 15:44:41 kid1| Max Mem size: 262144 KB
2023/05/09 15:44:41 kid1| Max Swap size: 0 KB

Could you please take a look at what I did and let me know if there's anything missing?

I will mark this bug as Incomplete in order to make it clear that we're still missing some reproduction steps. Please mark it back to New once you provide the require info. Thanks.