Skip to content

Windows: owner-only DACL for created data directory and more broad SIDs #1751

Backlog

Description

@smart-ssh-planner

Goal

On Windows, a data directory that the app creates itself is accessible to its owner only, and further broad principals are treated as untrusted.

Context

Follow-up of #1717 (PR #1734): a newly created data directory on Windows inherits the parent's ACL and is then checked (crates/persistence-sqlite/src/paths.rs:315-320); on Linux/macOS the leaf is 0700. The broad-principal list in data_dir_trust.rs:156-175 covers BUILTIN\Users, Guests and Anonymous only. Spec 0115 §4.1.

Requirements

  • When the app creates the data directory on Windows, set a protected DACL granting full control to the current user only (no inheritance).
  • Extend the broad-SID list with Everyone (S-1-1-0), Authenticated Users (S-1-5-11) and INTERACTIVE (S-1-5-4) if not already covered; verify each by test.
  • Update Spec 0115 and THREAT-MODEL.md wording accordingly.

Acceptance Criteria

  • A directory created by the app on Windows has a protected owner-only DACL (Windows test)
  • An existing directory granting modify rights to Everyone, Authenticated Users or INTERACTIVE is refused (pure-function tests)
  • Linux/macOS behaviour is unchanged
  • Spec, threat model and changelog fragment updated
  • Relevant automated tests pass

Technical Notes

Security-critical path. Windows code runs only in the Windows CI job.

Files: crates/persistence-sqlite/src/data_dir_trust.rs, crates/persistence-sqlite/src/data_dir_trust/tests.rs, crates/persistence-sqlite/src/paths.rs, docs/specs/0115-datenverzeichnis-override.md, THREAT-MODEL.md, changelog.d

Spec impact: update 0115

Open questions

  • Everyone on the DACL of an existing directory: recommended to refuse, as for Users. Alternative: warn only.

Related Work

Activity

  1. added
    follow-up
    on Dec 5, 2026
  2. smart-ssh-coder commented on Dec 5, 2026

    @smart-ssh-coder
    Contributor

    Needs maintainer: The issue waits for #1733, but "blocked by" could not be set. Set it on the issue (Relationships), then remove needs-maintainer: The code this issue extends (data_dir_trust.rs and its tests, from #1717/PR #1734) was merged into release/0.8.0 only and is not on develop yet; the back-merge PR #1733 is still open. Nothing to attach the owner-only DACL and extra broad SIDs to until it lands.

  3. added
    needs-maintainer
    question-triage
    and removed
    question-triage
    needs-maintainer
    on Dec 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    follow-uppersistencesecurity

    Type

    Fields

    Priority

    P3 - Low

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions