Installs and configures Squid as a caching proxy with the squid custom resource.
This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If you’d like to know more please visit sous-chefs.org or come chat with us on the Chef Community Slack in #sous-chefs.
- Debian 12+
- Ubuntu 22.04+
- RHEL-compatible platforms 8+
- Amazon Linux 2023+
- openSUSE Leap 16+
- FreeBSD 13+
- Chef 15.3+
- none
This release removes recipes and attributes in favor of the squid custom resource. See
migration.md for the breaking-change guide.
Declare the squid resource on the server.
squid 'default' do
cache_size 10
cache_mem 10
endDatabags are able to be used for storing host & url acls and also which hosts/nets are able to access which hosts/url
-
Set
enable_ldap true. -
Set the LDAP properties for your environment.
- If you use anonymous bindings,
ldap_binddnandldap_bindpasswordare optional. - All other LDAP properties are required.
- See http://wiki.squid-cache.org/ConfigExamples/Authenticate/Ldap for further help.
- If you use anonymous bindings,
-
To create the ldap acls in squid.conf, you also need the two ldap_auth databag items as shown in the LDAP Databags below.
{
"urls": [
"^https://api.yubico.com/wsapi/2.0/verify"
],
"id": "yubikey"
}{
"type": "src",
"id": "bastion",
"net": [
"192.168.0.2/32"
]
}{
"id": "bastion",
"acl": [
[
"yubikey",
"allow"
],
[
"yubikey",
"deny",
"!"
],
[
"all",
"deny"
]
]
}The following two data bags are only required if you are using LDAP Authentication.
{
"type": "proxy_auth",
"id": "ldap_auth",
"net": [
"REQUIRED"
]
}{
"id": "ldap_auth",
"acl": [
[
"",
"allow"
]
]
}- Set
config_include_dirto the directory of your additional files, such as/etc/squid/conf.d. - It is recommended that you set
http_access_deny_all falseandicp_access_deny_all falsebecause the include statement is at the bottom ofsquid.conf. Otherwisehttp_access allowstatements may not be evaluated in the additional configuration files.
This project exists thanks to all the people who contribute.
Thank you to all our backers!
Support this project by becoming a sponsor. Your logo will show up here with a link to your website.