Skip to content

Redact journal - #1745

Merged
mattiaswal merged 3 commits into
mainfrom
redact-journal
Oct 29, 2026
Merged

mattiaswal merged 3 commits into
mainfrom
redact-journal

Conversation

@mattiaswal

Copy link
Copy Markdown
Contributor
  • Move the redact code from copy to libsrx to enable sharing of code
  • Redact passwords from journal snapshots
  • Set umask to limit the journal snapshot to require root to read it.

Description

Checklist

Tick relevant boxes, this PR is-a or has-a:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Test changes
    • Checked in changed Readme.adoc (make test-spec)
    • Added new test to group Readme.adoc and yaml file
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
    • ChangeLog updated (for major changes)
  • Other (please describe):

The snapshots are taken with a root session and no NACM, so they hold
the running configuration with keystore secrets and password hashes.
They were written 0644 in a 0755 directory, readable by any local user.

Signed-off-by: Mattias Walström <lazzer@gmail.com>
The statd journal needs the same rule as copy -r, dropping every node
tagged nacm:default-deny-all plus the ietf-system user password.  Keep
one implementation in libsrx, as lydx_redact().

Signed-off-by: Mattias Walström <lazzer@gmail.com>
The snapshots are for post-mortem and trend analysis and are kept for
up to a year, so keystore keys and password hashes have no business in
them.  Redact them with lydx_redact(), the same rule copy -r uses.

Signed-off-by: Mattias Walström <lazzer@gmail.com>
@mattiaswal
mattiaswal requested a review from troglobit October 29, 2026 09:42
@mattiaswal
mattiaswal merged commit 54a7b48 into main Oct 29, 2026
7 checks passed
@mattiaswal
mattiaswal deleted the redact-journal branch October 29, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants