mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-17 01:54:49 +00:00
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
This commit is contained in:
parent
2d450939a0
commit
35122576f4
1
plist
1
plist
@ -674,6 +674,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 %}
|
||||
|
||||
@ -0,0 +1,13 @@
|
||||
# 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
|
||||
Loading…
x
Reference in New Issue
Block a user