b4tman/docker-squid

squid_db_auth is not included?

39ff opened this issue · 9 comments

39ff commented

Required for managing credentials on mysql, but not included?
https://wiki.squid-cache.org/ConfigExamples/Authenticate/Mysql

b4tman/squid:5.2


/ $ ls -alh /usr/lib/squid
total 508K
drwxr-xr-x    2 root     root        4.0K Oct  4 13:58 .
drwxr-xr-x    1 root     root        4.0K Oct  4 13:58 ..
-rwxr-xr-x    1 root     root       13.8K Oct  4 13:58 basic_getpwnam_auth
-rwxr-xr-x    1 root     root       26.0K Oct  4 13:58 basic_ncsa_auth
-rwxr-xr-x    1 root     root       82.1K Oct  4 13:58 cachemgr.cgi
-rwxr-xr-x    1 root     root       21.8K Oct  4 13:58 digest_file_auth
-rwxr-xr-x    1 root     root       21.8K Oct  4 13:58 diskd
-rwxr-xr-x    1 root     root       17.8K Oct  4 13:58 ext_file_userip_acl
-rwxr-xr-x    1 root     root       17.8K Oct  4 13:58 ext_unix_group_acl
-rwxr-xr-x    1 root     root        5.0K Oct  4 13:58 ext_wbinfo_group_acl
-rwxr-xr-x    1 root     root        7.0K Oct  4 13:58 helper-mux
-rwxr-xr-x    1 root     root       12.7K Oct  4 13:58 log_db_daemon
-rwxr-xr-x    1 root     root       13.8K Oct  4 13:58 log_file_daemon
-rwxr-xr-x    1 root     root       13.7K Oct  4 13:58 negotiate_kerberos_auth
-rwxr-xr-x    1 root     root       13.6K Oct  4 13:58 negotiate_kerberos_auth_test
-rwxr-xr-x    1 root     root       21.7K Oct  4 13:58 negotiate_wrapper_auth
-rwxr-xr-x    1 root     root       25.8K Oct  4 13:58 ntlm_fake_auth
-rwxr-xr-x    1 root     root        7.3K Oct  4 13:58 security_fake_certverify
-rwxr-xr-x    1 root     root       94.1K Oct  4 13:58 security_file_certgen
-rwxr-xr-x    1 root     root        4.0K Oct  4 13:58 storeid_file_rewrite
-rwxr-xr-x    1 root     root       14.0K Oct  4 13:58 unlinkd
-rwxr-xr-x    1 root     root       13.8K Oct  4 13:58 url_fake_rewrite
-rwxr-xr-x    1 root     root        2.5K Oct  4 13:58 url_fake_rewrite.sh
-rwxr-xr-x    1 root     root        4.6K Oct  4 13:58 url_lfs_rewrite

39ff commented

I added the following two lines to the Dockerfile, and it worked

--enable-auth-basic="getpwnam,NCSA,DB" \
--enable-basic-auth-helpers=DB \
/ $ ls -alh /usr/lib/squid
total 520K
-rwxr-xr-x    1 root     root        5.6K Dec 21 09:04 basic_db_auth
-rwxr-xr-x    1 root     root       13.9K Dec 21 09:04 basic_getpwnam_auth
-rwxr-xr-x    1 root     root       26.2K Dec 21 09:04 basic_ncsa_auth

I will add it, thanks

39ff commented

Hello.
I'm sorry. I'd forgotten about the three dependencies.

RUN apk add --no-cache perl
RUN apk add --no-cache perl-dbi
RUN apk add --no-cache perl-dbd-mysql

However, this is not the minimum configuration for squid.
Please consider whether to include the above dependencies

39ff commented

@b4tman
I've uploaded all the configuration examples here.
https://github.com/39ff/docker-squid-mysql

uqix commented

@b4tman /usr/lib/squid/storeid_file_rewrite not works due to lack of perl dependency.

@uqix
perl package adds 37.64 MB, so it's not currently included

better way to include it, is to write your own Dockerfile like this

FROM docker.io/b4tman/squid

RUN apk add --no-cache perl
RUN apk add --no-cache perl-dbi
RUN apk add --no-cache perl-dbd-mysql

(based on @39ff suggestion )

maybe i should add this to examples folder

uqix commented

Thanks for the tip, it works

Marking stale due to inactivity. Remove stale label or comment or this will be closed in 7 days.

Closing due to inactivity.