Skip to content

firewall: T9076: document remote-group update interval - #2148

Open
BradKollmyer wants to merge 3 commits into
vyos:rollingfrom
BradKollmyer:T9076-remote-group-interval
Open

firewall: T9076: document remote-group update interval#2148
BradKollmyer wants to merge 3 commits into
vyos:rollingfrom
BradKollmyer:T9076-remote-group-interval

Conversation

@BradKollmyer

@BradKollmyer BradKollmyer commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Change Summary

Document the new set firewall group remote-group <name> interval command: per-group update interval from 60 seconds to 4 weeks, given as plain seconds or with s/m/h/d/w suffixes (e.g. 4h), falling back to the global resolver-interval when unset.

Related Task(s)

Related PR(s)

Backport

Not applicable — rolling-only feature.

Checklist:

🤖 Generated with Claude Code

Document the new 'set firewall group remote-group <name> interval'
command: per-group update interval from 60 seconds to 4 weeks, given
as plain seconds or with s/m/h/d/w suffixes (e.g. 4h), falling back
to the global resolver-interval when unset.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: defcb2ad-f826-49a0-b4ce-860c25ec90a6

📥 Commits

Reviewing files that changed from the base of the PR and between 191f7cd and 1ab5317.

📒 Files selected for processing (1)
  • docs/configuration/firewall/groups.md
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • ansible/ansible (manual)
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/configuration/firewall/groups.md
📜 Recent review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: Mergify Merge Protections
  • GitHub Check: Summary
⚠️ CI failures not shown inline (5)

GitHub Actions: AI Validation / validate: firewall: T9076: document remote-group update interval

Conclusion: failure

View job details

##[group]Run set -euo pipefail
 �[36;1mset -euo pipefail�[0m
 �[36;1mTARGET="rolling"�[0m
 �[36;1mMAPPED=$(jq -r --arg b "$TARGET" '.[$b] // empty' reviewer/branches.json)�[0m
 �[36;1mif [ -z "$MAPPED" ]; then�[0m
 �[36;1m  echo "::error::Docs branch '$TARGET' is not configured for AI validation. Add it to branches.json in vyos-docs-opus-reviewer (known: $(jq -c 'keys' reviewer/branches.json))."�[0m

GitHub Actions: AI Validation / validate: firewall: T9076: document remote-group update interval

Conclusion: failure

View job details

##[group]Removing auth
 Removing SSH command configuration
 [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
 [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
 Removing HTTP extra header
 [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
 [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
 Removing includeIf entries pointing to credentials config files
 [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir:
 includeif.gitdir:/home/runner/work/vyos-documentation/vyos-documentation/.vyos-1x/.git.path
 includeif.gitdir:/home/runner/work/vyos-documentation/vyos-documentation/.vyos-1x/.git/worktrees/*.path
 includeif.gitdir:/github/workspace/.vyos-1x/.git.path
 includeif.gitdir:/github/workspace/.vyos-1x/.git/worktrees/*.path
 [command]/usr/bin/git config --local --get-all includeif.gitdir:/home/runner/work/vyos-documentation/vyos-documentation/.vyos-1x/.git.path
 /home/runner/work/_temp/git-credentials-e08ac887-890d-4d11-a3ec-fb6b9e4e38b8.config
 [command]/usr/bin/git config --local --unset includeif.gitdir:/home/runner/work/vyos-documentation/vyos-documentation/.vyos-1x/.git.path /home/runner/work/_temp/git-credentials-e08ac887-890d-4d11-a3ec-fb6b9e4e38b8.config
 [command]/usr/bin/git config --local --get-all includeif.gitdir:/home/runner/work/vyos-documentation/vyos-documentation/.vyos-1x/.git/worktrees/*.path
 /home/runner/work/_temp/git-credentials-e08ac887-890d-4d11-a3ec-fb6b9e4e38b8.config
 [command]/usr/bin/git config --local --unset includeif.gitdir:/home/runner/work/vyos-documentation/vyos-documentation/.vyos-1x/.git/worktrees/*.path /home/runne...

GitHub Actions: AI Validation / prepare: firewall: T9076: document remote-group update interval

Conclusion: failure

View job details

##[group]Run set -euo pipefail
 �[36;1mset -euo pipefail�[0m
 �[36;1m# Fetch the base branch explicitly by refname to avoid ambiguity with�[0m
 �[36;1m# same-named tags (e.g., a `rolling` tag), then diff against FETCH_HEAD.�[0m
 �[36;1mgit fetch --no-tags --depth=1 origin "refs/heads/rolling"�[0m
 �[36;1mBASE="FETCH_HEAD"�[0m
 �[36;1m# --diff-filter=ACMRT excludes Deleted entries so the bundling�[0m
 �[36;1m# loop below (`git show HEAD:<path>`) doesn't try to extract�[0m
 �[36;1m# blobs for files that no longer exist in the merge ref.�[0m
 �[36;1m# Deletions still appear in diff-md.patch (full diff) but not�[0m
 �[36;1m# in changed-md.txt (which drives the bundling step).�[0m
 �[36;1mgit diff "$BASE...HEAD" --name-only --diff-filter=ACMRT -z -- ':(glob)docs/**/*.md'  > changed-md.z�[0m
 �[36;1mgit diff "$BASE...HEAD" --name-only --diff-filter=ACMRT -z -- ':(glob)docs/**/*.rst' > changed-rst.z�[0m
 �[36;1m# Reject paths containing line-disrupting control bytes (LF, CR,�[0m
 �[36;1m# other 0x01-0x1F + 0x7F) before generating the newline-delimited�[0m
 �[36;1m# *.txt manifests. NUL itself can't appear in a git pathname�[0m
 �[36;1m# (it's the on-disk tree-entry terminator), so it stays out of�[0m
 �[36;1m# the rejection class and remains the legitimate record delimiter�[0m
 �[36;1m# for `git diff -z` — `grep -z` honors that contract.�[0m
 �[36;1m#�[0m
 �[36;1m# POSIX filesystems generally allow LF/CR in filenames and git�[0m
 �[36;1m# stores them fine; the hazard is purely in our line-delimited�[0m
 �[36;1m# downstream tooling. Without this guard, `tr '\0' '\n'` on a�[0m
 �[36;1m# path like `docs/foo\nbar.md` would split it into two logical�[0m
 �[36;1m# lines — downstream consumers reading line-by-line would miss�[0m
 �[36;1m# validation coverage on the real file (or worse, act on a�[0m
 �[36;1m# synthetic path). Fail fast at this seam.�[0m
 �[36;1m#�[0m
 �[36;1m# An earlier `tr -d '\0\n\r' | grep [\x00-\x1F\x7F]` form�[0m
 �[36;1m# stripped the very bytes it was m...

GitHub Actions: AI Validation / 1_prepare.txt: firewall: T9076: document remote-group update interval

Conclusion: failure

View job details

##[group]Run set -euo pipefail
 �[36;1mset -euo pipefail�[0m
 �[36;1m# Fetch the base branch explicitly by refname to avoid ambiguity with�[0m
 �[36;1m# same-named tags (e.g., a `rolling` tag), then diff against FETCH_HEAD.�[0m
 �[36;1mgit fetch --no-tags --depth=1 origin "refs/heads/rolling"�[0m
 �[36;1mBASE="FETCH_HEAD"�[0m
 �[36;1m# --diff-filter=ACMRT excludes Deleted entries so the bundling�[0m
 �[36;1m# loop below (`git show HEAD:<path>`) doesn't try to extract�[0m
 �[36;1m# blobs for files that no longer exist in the merge ref.�[0m
 �[36;1m# Deletions still appear in diff-md.patch (full diff) but not�[0m
 �[36;1m# in changed-md.txt (which drives the bundling step).�[0m
 �[36;1mgit diff "$BASE...HEAD" --name-only --diff-filter=ACMRT -z -- ':(glob)docs/**/*.md'  > changed-md.z�[0m
 �[36;1mgit diff "$BASE...HEAD" --name-only --diff-filter=ACMRT -z -- ':(glob)docs/**/*.rst' > changed-rst.z�[0m
 �[36;1m# Reject paths containing line-disrupting control bytes (LF, CR,�[0m
 �[36;1m# other 0x01-0x1F + 0x7F) before generating the newline-delimited�[0m
 �[36;1m# *.txt manifests. NUL itself can't appear in a git pathname�[0m
 �[36;1m# (it's the on-disk tree-entry terminator), so it stays out of�[0m
 �[36;1m# the rejection class and remains the legitimate record delimiter�[0m
 �[36;1m# for `git diff -z` — `grep -z` honors that contract.�[0m
 �[36;1m#�[0m
 �[36;1m# POSIX filesystems generally allow LF/CR in filenames and git�[0m
 �[36;1m# stores them fine; the hazard is purely in our line-delimited�[0m
 �[36;1m# downstream tooling. Without this guard, `tr '\0' '\n'` on a�[0m
 �[36;1m# path like `docs/foo\nbar.md` would split it into two logical�[0m
 �[36;1m# lines — downstream consumers reading line-by-line would miss�[0m
 �[36;1m# validation coverage on the real file (or worse, act on a�[0m
 �[36;1m# synthetic path). Fail fast at this seam.�[0m
 �[36;1m#�[0m
 �[36;1m# An earlier `tr -d '\0\n\r' | grep [\x00-\x1F\x7F]` form�[0m
 �[36;1m# stripped the very bytes it was m...

GitHub Actions: AI Validation / 0_validate.txt: firewall: T9076: document remote-group update interval

Conclusion: failure

View job details

##[group]Run set -euo pipefail
 �[36;1mset -euo pipefail�[0m
 �[36;1mTARGET="rolling"�[0m
 �[36;1mMAPPED=$(jq -r --arg b "$TARGET" '.[$b] // empty' reviewer/branches.json)�[0m
 �[36;1mif [ -z "$MAPPED" ]; then�[0m
 �[36;1m  echo "::error::Docs branch '$TARGET' is not configured for AI validation. Add it to branches.json in vyos-docs-opus-reviewer (known: $(jq -c 'keys' reviewer/branches.json))."�[0m
🧰 Additional context used
🔍 Remote MCP vyos.dev

Relevant task context

  • T9076 — “Add per-group update interval for firewall remote-group” is Resolved, marked Normal priority, and targets 1.5-rolling.
  • The task specifies a fallback to the global firewall global-options resolver-interval, with a requested range of 60 seconds to 1 day and suffixes s/m/h/d.
  • The PR documentation instead states 60 seconds to 4 weeks, supports w, and allows stacked units. This appears broader than the task description and should be verified against the implementation/CLI validation.
  • The task’s only recorded comment links PR vyos-1x#5327; no additional acceptance criteria or implementation discussion is present.

📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Expanded Remote Groups guidance to clarify that fetching is controlled by a per-group interval (or falls back to the global resolver interval).
    • Documented commands to configure remote-group URL and interval, including allowed interval range and time-unit suffixes.
    • Added tips for handling URLs with query strings (quoting to avoid truncation) and how to enter a literal ?.
    • Clarified persistent caching for continued rule operation and failure logging with redacted URLs, plus how to verify the configured URL.

Walkthrough

Changes

Remote group configuration documentation

Layer / File(s) Summary
Document remote group settings
docs/configuration/firewall/groups.md:46-83
Documents per-group or global resolver intervals, persistent remote-list caching, URL configuration and query-string quoting, redacted download-failure logging, verification commands, and supported interval formats.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed firewall: T9076: document remote-group update interval matches the main docs change in docs/configuration/firewall/groups.md.
Description check ✅ Passed The description accurately covers the new remote-group interval command, range, suffixes, and fallback behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Claude finished @BradKollmyer's task in 3m 12s —— View job


VyOS Documentation Review — PR #2148

  • Read pass1-findings.json (empty — no deterministic findings)
  • Read the changed doc: docs/configuration/firewall/groups.md
  • Cross-reference against .vyos-1x/current sources (XML + Python)
  • Verify range, defaults, and behavior claims
  • Post inline comment for the finding
  • Post summary comment

Issues

None confirmed as factually wrong at ERROR level given the branch-pin caveat below.

Needs Verification

  • WARNING — new interval node under remote-group cannot be verified against pinned vyos-1x source. The PR documents set firewall group remote-group <name> interval <interval> with a 60s–4w range and s/m/h/d/w suffixes, falling back to resolver-interval. In .vyos-1x/current (commit 80e17646):

    • interface-definitions/firewall.xml.in:141-153 — the remote-group tagNode declares only url and description children; no interval leafNode.
    • include/firewall/global-options.xml.i:242-254resolver-interval is u32:10-3600 seconds (no suffix parsing), defaultValue 300.
    • src/services/vyos-domain-resolver — a single global timeout drives one time.sleep(timeout) loop that iterates over all remote groups; there is no per-remote_group interval read or per-group scheduling.
    • Repository-wide grep for T9076 in .vyos-1x/ returns nothing.

    This is either (a) a very-recent vyos-1x change not yet in the pinned checkout, or (b) documentation ahead of the code. Please link the vyos-1x commit/PR that adds the node so the range (602419200?), suffix parsing, and default fall-back can be confirmed from the source. See inline comment on lines 57–63 for the full detail.

Stats

Validated 1 MyST file. Skipped 0 RST files awaiting MyST migration. Files reviewed: 1. Commands checked: set firewall group remote-group <name> interval, resolver-interval. Branch reviewed: rolling (vyos-1x: current @ 80e17646).
· Branch: T9076-remote-group-interval

Comment on lines +57 to +63
```{cfgcmd} set firewall group remote-group \<name\> interval \<interval\>

Set the update interval for this remote group, from 60 seconds to 4 weeks.
The interval can be given in seconds (e.g. `300`) or with the time unit
suffixes `s`, `m`, `h`, `d` or `w` (e.g. `4h`). If not set, the group
follows the global `firewall global-options resolver-interval`.
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING — cannot verify this command against the pinned vyos-1x source

Doc says: set firewall group remote-group <name> interval <interval> accepts 60s–4w with s/m/h/d/w suffixes and falls back to firewall global-options resolver-interval when unset.

Source (.vyos-1x/current):

  • interface-definitions/firewall.xml.in:141-153 — the remote-group tagNode declares only two children: url (via include/url-http-https.xml.i) and description (via include/generic-description.xml.i). No interval leafNode exists under remote-group.
  • include/firewall/global-options.xml.i:242-254resolver-interval is u32:10-3600 (seconds, no suffixes), defaultValue 300.
  • src/services/vyos-domain-resolver:74-79, 307-315 — the resolver uses a single global timeout derived from resolver_interval and calls time.sleep(timeout) in one loop; there is no per-remote_group interval read or scheduling.
  • No T9076 reference is present in .vyos-1x/current.

Branch: rolling (vyos-1x: current)

If T9076 has already landed in vyos-1x on a commit newer than this repo's pin, this is a false positive — please share the vyos-1x commit / PR that introduces the node so we can confirm:

  • exact CLI path (interval vs. e.g. update-interval)
  • validator range (is 60s–4w == 602419200?)
  • accepted formats (are s/m/h/d/w suffixes actually parsed, or is it plain u32 seconds?)
  • whether an XML <defaultValue> exists, or fallback is implemented only in code

If T9076 has not landed yet, please hold the doc until it does, so the values above can be pulled straight from the XML / conf_mode source.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The interval node is added by vyos/vyos-1x#5327 (T9076), which this docs PR accompanies — it isn't in the pinned vyos-1x commit yet. The PRs are cross-linked and intended to merge together.

Warn that remote-group URLs with query strings must be quoted (unquoted
'&' silently truncates the value; literal '?' may need Ctrl-V, see
T9077) and that vyos-domain-resolver logs redact the query string on
download failures (T8829).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Claude finished @BradKollmyer's task in 2m 15s —— View job


VyOS Documentation Review — PR #2148 (synchronize)

  • Loaded pass1-findings.json (empty)
  • Re-checked .vyos-1x/current @ 80e17646 — unchanged since prior run
  • Verified new notes (URL quoting + log redaction) against vyos-domain-resolver
  • Filed inline on lines 68–73 for the redaction claim
  • Summary posted

Issues

None confirmed as factually wrong at ERROR level given the branch-pin caveat below.

Needs Verification

  • WARNING — interval node under remote-group still absent from pinned vyos-1x (unchanged from prior review). interface-definitions/firewall.xml.in:141-153 @ 80e17646 declares only url + description under the remote-group tagNode; resolver-interval remains u32:10-3600 (no suffix parsing); vyos-domain-resolver still uses a single global time.sleep(timeout) for all remote groups with no per-group scheduling. See inline on line 81 from the previous run.

  • WARNING (new commit 191f7cd) — log-redaction claim not present in pinned source. The added note (docs/configuration/firewall/groups.md:68–73) says the resolver "logs a redacted URL with the query string removed". At .vyos-1x/src/services/vyos-domain-resolver:158-160 the download-failure path logs only the set name (Failed to download list-file for {set_name} remote group) — there is no URL in the log line and no urlparse/query-stripping code. Filed inline for this. Either (a) T9076 (firewall: T9076: add per-remote-group update interval vyos-1x#5327) adds it on a commit newer than the pin, or (b) the wording is ahead of the code — please link the vyos-1x commit that introduces the redaction.

  • INFO — URL-quoting + ? completion note (lines 57–66). The advice to single-quote URLs containing & and to enter ? via Ctrl-V ? is a CLI-shell UX claim, not something the firewall source can confirm or refute. Fine to keep, but a link to whichever shell/completion doc governs this would help future readers.

Stats

Validated 1 MyST file. Skipped 0 RST files awaiting MyST migration. Files reviewed: 1. Commands checked: set firewall group remote-group <name> {url, interval, description}, firewall global-options resolver-interval. Behaviors checked: vyos-domain-resolver per-group scheduling, download-failure log line, URL redaction. Branch reviewed: rolling (vyos-1x: current @ 80e17646).
· Branch: T9076-remote-group-interval

Comment on lines +68 to +73
::::{note}
When a download fails, `vyos-domain-resolver` logs a redacted URL with the
query string removed, keeping API keys out of the system log. A logged URL
without its query parameters does not mean the configured value is wrong —
verify it with `show firewall group remote-group <name> url` instead.
::::

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING — the log-redaction claim cannot be verified against the pinned vyos-1x source

Doc says: "When a download fails, vyos-domain-resolver logs a redacted URL with the query string removed…"

Source (.vyos-1x/src/services/vyos-domain-resolver:158-160, pin 80e17646):

except:
    logger.error(f'Failed to download list-file for {set_name} remote group')
    logger.info(f'Using cached list-file for {set_name} remote group')

On download failure the resolver logs only the set name, not the URL at all — so there is nothing to redact in this branch. There is no urlparse / query-stripping code path in the file.

Branch: rolling (vyos-1x: current)

Same branch-pin caveat as the interval finding: if T9076 (vyos/vyos-1x#5327) adds the redaction, please link the vyos-1x commit that introduces it so the wording ("query string removed") can be verified. Otherwise consider softening to something like "the domain resolver logs failures by remote-group name only; use show firewall group remote-group <name> url to view the configured URL" until the redaction actually lands.

@BradKollmyer BradKollmyer Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The redaction is in vyos-1x upstream already, just newer than the pinned commit: vyos/vyos-1x@516eccd41 (remote: T8829: fall back to GET when HEAD is not supported, merged via vyos/vyos-1x#5275) added the redacted-URL logging to vyos-domain-resolver — on download failure it logs the URL with userinfo, query string and fragment stripped. Related: vyos/vyos-1x@e51e53bf3 (T4732) does the same for upload errors in vyos/remote.py.

@alexandr-san4ez

Copy link
Copy Markdown
Contributor

@LiudmylaNad could you look at the PR? Thank you.

@LiudmylaNad LiudmylaNad left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexandr-san4ez, the description looks good to me. I only added a small suggestion about combined suffixes

…ined

Address review feedback: document that s/m/h/d/w units can be stacked
(e.g. 1h30m), matching human_to_seconds and the CLI regex.
@BradKollmyer

Copy link
Copy Markdown
Contributor Author

@LiudmylaNad thanks — applied your combined-suffixes note. The interval section now states that units may be stacked (e.g. 1h30m), matching human_to_seconds and the CLI regex (\d+[smhdw])+.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants