Skip to content

Commit

Permalink
Deny the TRACE method by default (#9789)
Browse files Browse the repository at this point in the history
  • Loading branch information
bryancall committed Jun 6, 2023
1 parent 35dd3ef commit b49ae06
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions configs/ip_allow.config.default
Expand Up @@ -23,5 +23,5 @@
src_ip=127.0.0.1 action=ip_allow method=ALL
src_ip=::1 action=ip_allow method=ALL
# Deny PURGE, DELETE, and PUSH for all (this implies allow other methods for all)
src_ip=0.0.0.0-255.255.255.255 action=ip_deny method=PUSH|PURGE|DELETE
src_ip=::-ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff action=ip_deny method=PUSH|PURGE|DELETE
src_ip=0.0.0.0-255.255.255.255 action=ip_deny method=PUSH|PURGE|DELETE|TRACE
src_ip=::-ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff action=ip_deny method=PUSH|PURGE|DELETE|TRACE
12 changes: 6 additions & 6 deletions doc/admin-guide/files/ip_allow.config.en.rst
Expand Up @@ -70,20 +70,20 @@ deny, one explicit and the other implicit. The ``src_ip`` rules are checked when
to |TS|. The ``dst_ip`` rules are checked when |TS| connects to another host.

By default the :file:`ip_allow.config` file contains the following lines, which allows all methods
to connections from localhost and denies the ``PUSH``, ``PURGE`` and ``DELETE`` methods to all other
IP addresses (note this allows all other methods to all IP addresses)::
to connections from localhost and denies the ``PUSH``, ``PURGE``, ``DELETE`` and ``TRACE`` methods
to all other IP addresses (note this allows all other methods to all IP addresses)::

src_ip=127.0.0.1 action=ip_allow method=ALL
src_ip=::1 action=ip_allow method=ALL
src_ip=0.0.0.0-255.255.255.255 action=ip_deny method=PUSH|PURGE|DELETE
src_ip=::-ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff action=ip_deny method=PUSH|PURGE|DELETE
src_ip=0.0.0.0-255.255.255.255 action=ip_deny method=PUSH|PURGE|DELETE|TRACE
src_ip=::-ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff action=ip_deny method=PUSH|PURGE|DELETE|TRACE

This could also be specified as::

src_ip=127.0.0.1 action=ip_allow method=ALL
src_ip=::1 action=ip_allow method=ALL
src_ip=0/0 action=ip_deny method=PUSH|PURGE|DELETE
src_ip=::/0 action=ip_deny method=PUSH|PURGE|DELETE
src_ip=0/0 action=ip_deny method=PUSH|PURGE|DELETE|TRACE
src_ip=::/0 action=ip_deny method=PUSH|PURGE|DELETE|TRACE

Examples
========
Expand Down
4 changes: 2 additions & 2 deletions tests/gold_tests/autest-site/min_cfg/ip_allow.config
@@ -1,4 +1,4 @@
src_ip=127.0.0.1 action=ip_allow method=ALL
src_ip=::1 action=ip_allow method=ALL
src_ip=0.0.0.0-255.255.255.255 action=ip_deny method=PUSH|PURGE|DELETE
src_ip=::-ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff action=ip_deny method=PUSH|PURGE|DELETE
src_ip=0.0.0.0-255.255.255.255 action=ip_deny method=PUSH|PURGE|DELETE|TRACE
src_ip=::-ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff action=ip_deny method=PUSH|PURGE|DELETE|TRACE

0 comments on commit b49ae06

Please sign in to comment.