Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dns/bind: Allow negation in ACL definitions (#4435) #4520

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jfieber
Copy link

@jfieber jfieber commented Feb 2, 2025

This adds a BindAddressMatchField and matching validator as a better match to the fairly ubiquitous address match list construct in the bind configuration. It allows ACLs to contain negation (!) and reference built-in ACLs. It does not (yet) support referencing other user defined ACLs, keys, or nested address match lists.

Since introducing negation makes ACL entry order critical, the user interface is updated from the tokenized address list to a textbox with one entry per line, which provides a better experience for controlling the entry order.

Lastly, this now blocks deletion of ACLs that are referenced elsewhere in the configuration, and better handles ACLs that are disabled when generating named.conf. Previously, deleting or disabling ACLs would typically cause an invalid configuration to be generated.

The BindAddressMatchField and validator implementation is based on (read: copied and modified) the core NetworkField type and validator to the extent that leaving the Deciso copyright seems appropriate.

There are no model or stored configuration changes, so no migration is needed.

…4435)

BindAddressMatchField and matching validator is derived from the standard NetworkField and validator.  Modifications permit supporting negation (!) and referencing built in ACLs.

At this time, it does not support referencing other user defined ACLs.
Switch the UI for ACL definitions and ACL for filter-aaaa to use the BindAddressMatchField type.

Because the introduction of negation makes the ACL entry order critical, this switches the user interface to a textbox, with one entry per line instead of the tokenized list. This interface allows much easier ordering of the entries.

This change intorduces no model changes and thus no upgrade migrations are necessary.

If ACLs are created with negation or references to the built-in ACLs, and the plugin is downgrated, the configuration templates will render correctly, but updating the configuration will require removing the negation and/or built-in ACL references to pass validation.
Deleting a referenced ACL will generally cause all sorts of things to break.
For a configuration item whose value is an ACL list, ensure that:

- If a referenced ACL is disabled, it is not included in the configuration.
- If all referenced ACLs are disabled, the configured item is treated as if no ACLs were specified.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant