Commit e6018fd6 authored by Franco Fichtner's avatar Franco Fichtner

proxy: allow alt auth framework config file

We fall back to the local authentication if not found.

PR: https://github.com/opnsense/plugins/issues/43
(cherry picked from commit 35122576)
parent 13a6db0c
......@@ -655,6 +655,7 @@
/usr/local/opnsense/service/templates/OPNsense/Proxy/rc.conf.d
/usr/local/opnsense/service/templates/OPNsense/Proxy/squid.acl.conf
/usr/local/opnsense/service/templates/OPNsense/Proxy/squid.conf
/usr/local/opnsense/service/templates/OPNsense/Proxy/squid.user.local_auth.conf
/usr/local/opnsense/service/templates/OPNsense/Sample/+TARGETS
/usr/local/opnsense/service/templates/OPNsense/Sample/example_config.txt
/usr/local/opnsense/service/templates/OPNsense/Sample/example_parent.txt
......
......@@ -255,19 +255,7 @@ icap_enable off
# Authentication Settings
{% if helpers.exists('OPNsense.proxy.forward.authentication.method') and OPNsense.proxy.forward.authentication.method != '' %}
# Configure Local User Authentication helper
auth_param basic program /usr/local/etc/inc/squid.auth-user.php
{% if helpers.exists('OPNsense.proxy.forward.authentication.realm') %}
auth_param basic realm {{OPNsense.proxy.forward.authentication.realm}}
{% endif %}
{% if helpers.exists('OPNsense.proxy.forward.authentication.credentialsttl') %}
auth_param basic credentialsttl {{OPNsense.proxy.forward.authentication.credentialsttl}} hours
{% endif %}
{% if helpers.exists('OPNsense.proxy.forward.authentication.children') %}
auth_param basic children {{OPNsense.proxy.forward.authentication.children}}
{% endif %}
# ACL - Local Authorized Users - local_auth
acl local_auth proxy_auth REQUIRED
{% include ['OPNsense/Proxy/squid.user.alt_auth.conf', 'OPNsense/Proxy/squid.user.local_auth.conf'] %}
{% endif %}
{% include "OPNsense/Proxy/squid.user.pre_auth.conf" ignore missing with context %}
......
# Configure Local User Authentication helper
auth_param basic program /usr/local/etc/inc/squid.auth-user.php
{% if helpers.exists('OPNsense.proxy.forward.authentication.realm') %}
auth_param basic realm {{OPNsense.proxy.forward.authentication.realm}}
{% endif %}
{% if helpers.exists('OPNsense.proxy.forward.authentication.credentialsttl') %}
auth_param basic credentialsttl {{OPNsense.proxy.forward.authentication.credentialsttl}} hours
{% endif %}
{% if helpers.exists('OPNsense.proxy.forward.authentication.children') %}
auth_param basic children {{OPNsense.proxy.forward.authentication.children}}
{% endif %}
# ACL - Local Authorized Users - local_auth
acl local_auth proxy_auth REQUIRED
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment