Skip to content

Commit 4cc447b

Browse files
committed
revert changes to squid - now broken out as #718
no-checks: true # Please enter the commit message for your changes. Lines starting # with '#' will be kept; you may remove them yourself if you want to. # An empty message aborts the commit. # # Date: Tue Jun 24 15:30:50 2025 +0000 # # On branch feat/isolated-env-2 # Your branch is ahead of 'origin/feat/isolated-env-2' by 1 commit. # (use "git push" to publish your local commits) # # Changes to be committed: # modified: ansible/roles/squid/README.md # modified: ansible/roles/squid/defaults/main.yml # modified: ansible/roles/squid/templates/squid.conf.j2 # # Changes not staged for commit: # modified: ansible/slurm.yml # modified: environments/.stackhpc/hooks/pre.yml # modified: environments/.stackhpc/inventory/group_vars/all/bastion.yml # modified: environments/.stackhpc/tofu/SMS.tfvars # modified: environments/.stackhpc/tofu/cluster_image.auto.tfvars.json # modified: environments/.stackhpc/tofu/main.tf # # Untracked files: # NOTES-feat-isolated-env.md # NOTES.md # activate # ansible/image-pull.yml # ansible/roles/basic_users/filter_plugins/__pycache__/ # environments/.stackhpc/SMS-steveb.pkrvars.hcl # environments/.stackhpc/inventory/group_vars/all/squid.yml.orig # environments/.stackhpc/inventory/group_vars/all/steveb_ark.yml # environments/.stackhpc/inventory/hosts.yml # environments/.stackhpc/inventory/network_groups # environments/.stackhpc/tofu/SMS-NO-GATEWAY.tfvars # environments/.stackhpc/tofu/cluster_name.auto.tfvars # packer/sms-build.sh #
1 parent 417b63c commit 4cc447b

File tree

3 files changed

+18
-23
lines changed

3 files changed

+18
-23
lines changed

ansible/roles/squid/README.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,20 @@ Where noted these map to squid parameters of the same name without the `squid_`
2020
- `squid_maximum_object_size_in_memory`: Optional str. Upper size limit for objects in memory cache, default '64 MB'. See squid parameter.
2121
- `squid_maximum_object_size`: Optional str. Upper size limit for objects in disk cache, default '200 MB'. See squid parameter.
2222
- `squid_http_port`: Optional str. Socket addresses to listen for client requests, default '3128'. See squid parameter.
23-
- `squid_acls`: Optional list of strs. Define access lists. Default: `['acl anywhere src all']`, i.e. allow connection from anywhere, relying on OpenStack security groups (or other firewall if deployed). See squid parameter `acl`. NB: The default template also defines acls for `SSL_ports` and `Safe_ports` as is common practice.
24-
- `squid_http_access`: Optional str, can be multiline. Allow/deny access based on access lists. The default will:
25-
- Deny requests to certain unsafe ports (see `squid.conf.j2`)
26-
- Deny CONNECT to other than secure SSL ports
27-
- Only allow cachemgr access from localhost
28-
- Allow access for all ACLs defined in `squid_acls`
29-
- Allow access for localhost
30-
- Deny all other access
23+
- `squid_acls`: Optional str, can be multiline. Define access lists. Default `acl anywhere src all`, i.e. rely on OpenStack security groups (or other firewall if deployed). See squid parameter `acl`. NB: The default template also defines acls for `SSL_ports` and `Safe_ports` as is common practice.
24+
- `squid_http_access`: Optional str, can be multiline. Allow/deny access based on access lists. Default:
3125

26+
# Deny requests to certain unsafe ports
27+
http_access deny !Safe_ports
28+
# Deny CONNECT to other than secure SSL ports
29+
http_access deny CONNECT !SSL_ports
30+
# Only allow cachemgr access from localhost
31+
http_access allow localhost manager
32+
http_access deny manager
33+
# Rules allowing http access
34+
http_access allow anywhere
35+
http_access allow localhost
36+
# Finally deny all other access to this proxy
37+
http_access deny all
38+
3239
See squid parameter.
33-
34-
- `squid_auth_param`: Optional str, can be multiline. Parameters for authentication schemes. Default empty string.

ansible/roles/squid/defaults/main.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ squid_cache_disk: "{{ undef(hint='squid_cache_disk (in MB) required, e.g. \"1024
88
squid_maximum_object_size_in_memory: '64 MB'
99
squid_maximum_object_size: '200 MB'
1010
squid_http_port: 3128
11-
squid_acls:
12-
- acl anywhere src all # rely on openstack security groups
11+
squid_acls: acl anywhere src all # rely on openstack security groups
1312
squid_http_access: |
1413
# Deny requests to certain unsafe ports
1514
http_access deny !Safe_ports
@@ -19,10 +18,7 @@ squid_http_access: |
1918
http_access allow localhost manager
2019
http_access deny manager
2120
# Rules allowing http access
22-
{% for acl in squid_acls %}
23-
http_access allow {{ (acl | split)[1] }}
24-
{% endfor %}
21+
http_access allow anywhere
2522
http_access allow localhost
2623
# Finally deny all other access to this proxy
2724
http_access deny all
28-
squid_auth_param: ''

ansible/roles/squid/templates/squid.conf.j2

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,8 @@
44
# - https://github.com/drosskopp/squid-cache/blob/main/squid.conf
55
#
66

7-
# Configure authentication parameters
8-
# NB: required before ACL definitions using them
9-
{{ squid_auth_param }}
10-
117
# Define ACLs:
12-
{% for acl in squid_acls %}
13-
{{ acl }}
14-
{% endfor %}
8+
{{ squid_acls }}
159

1610
acl SSL_ports port 443
1711
acl Safe_ports port 80 # http

0 commit comments

Comments
 (0)