Skip to content

Rework authentication and harden sync reliability - #164

Merged
D-VR merged 23 commits into
masterfrom
full-auth-rework
Jul 14, 2026
Merged

D-VR merged 23 commits into
masterfrom
full-auth-rework

Conversation

@D-VR

@D-VR D-VR commented Jul 14, 2026 •

Copy link
Copy Markdown
Collaborator

This is a fundamental change to how syncMyMoodle works with a wide range of benefits!

Short summary of what this introduces:

  • Switch normal syncs to validated Moodle tokens stored in the keyring or a protected environment file.
  • Add setup, login, status, migration, reset, and forget workflows, including password-manager and command-based secret providers.
  • Improve legacy configuration migration while preserving compatible defaults and example comments.
  • Harden HTTP requests, downloads, caches, session storage, and cross-platform paths.
  • Add --show-filtered to explain which courses and files were excluded.
  • Refresh documentation and cross-platform CI coverage.

Based on top of #162

Closes #63
Closes #69
Closes #159

D-VR added 21 commits July 8, 2026 13:55
Prevents an attacker from placing config.toml in a users current CWD to execute arbitrary commands when syncMyMoodle is run.
No reason to place session cookies in random CWDs
Acquire and validate Moodle mobile tokens, persist them through the configured secure store, and bootstrap browser sessions only when required.

Rework configuration, setup, login, status, forget, and legacy migration flows around the token-first model while keeping secrets out of TOML and diagnostics.
Use the authenticated Moodle API for module metadata and quiz reviews, bound remote reads, validate redirects and response bodies, and handle transient Opencast, Sciebo, link, H5P, and quiz failures without leaking request secrets.
Make path materialization collision-safe and cross-platform, validate resumed transfers, preserve trustworthy metadata across incomplete scans, and keep conflict/cache cleanup behavior unambiguous and atomic.
Track the exact course, section, module, URL, and size rule that excludes an item, summarize exclusions after each run, and expose grouped redacted details through --show-filtered.
Rewrite installation, setup, token storage, migration, filtering, cleanup, and troubleshooting guidance; add the project logo; exercise Linux, macOS, and Windows in CI; and enforce the refactor's complexity ceiling.
@D-VR D-VR self-assigned this Jul 14, 2026
@D-VR D-VR added documentation Improvements or additions to documentation enhancement New feature or request maintenance Chore or refactor security For potential security issues or general hardening. labels Jul 14, 2026
@D-VR D-VR added the semver:major For major changes label Jul 14, 2026
@D-VR
D-VR merged commit fb0def0 into master Jul 14, 2026
6 checks passed
@D-VR
D-VR deleted the full-auth-rework branch July 14, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request maintenance Chore or refactor security For potential security issues or general hardening. semver:major For major changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for additional secrets managers Support reading password from file Use wstoken instead of SSO password

1 participant