Skip to content

[Feature] Separate configuration, secrets, recovery state and disposable data with a tested backup/restore workflow #3151

Description

@nostalume

Please confirm the following

  • I have read and agree to AGPL-3.0 Section 15. The program is provided "as is" without any warranties; you bear all risks of using it.
  • I have read and agree to AGPL-3.0 Section 16. The copyright holders and distributors are not liable for any damages resulting from the use or inability to use the program.
  • I confirm my description is clear, polite, helps developers quickly locate the issue, and complies with community rules.
  • I have read the OpenList documentation.
  • I confirm there are no duplicate issues or discussions.
  • I believe this issue must be handled by OpenList and not by a third party.
  • I confirm this feature has not been implemented yet.
  • I confirm this feature is reasonable and has general demand, not just my personal need.
  • I have not read these checkboxes and therefore I just ticked them all, Please close this issue.

Feature Description

OpenList currently groups data by implementation location rather than by truth,
retention and sensitivity. config.json and environment variables jointly
determine process configuration; bootstrap rewrites the file before environment
overrides. The DB holds users, mounts, Driver Addition, settings, tasks and
other records; Driver initialization can refresh credentials into the storage
row. Settings flags distinguish public API visibility, not all secret handling.
Search state, multipart/temp bytes and task records have different recovery
needs despite sharing data-directory/storage mechanisms.

The frontend adds a separate client-device boundary: it stores an auth token
and a “remember password” value in localStorage. Its backup UI exports selected
settings/users/storages/metas/shares, optionally encrypted; no password yields
plaintext. That export is useful but does not by itself prove a full
disaster-recovery backup, and it may contain sensitive settings or Driver
Addition values.

Please define an operator workflow from first configuration through credential
rotation, consistent backup, isolated restore and verification, with explicit
classification of secret/public and authoritative/recoverable/rebuildable/
disposable state. Avoid a filesystem-only split that loses token refresh,
in-flight transfers or compatibility.

Suggested Solution

  1. Inventory every config field, DB record, browser value and data-directory
    artifact by owner/writer, source of truth, precedence, API visibility,
    sensitivity, retention, backup, restore and rotation rule. Mark mixed records
    rather than forcing each into one category. Define behavior for unknown or
    obsolete settings during migration.
  2. Define an explicit precedence/version contract for file, environment and
    admin-set values. Preserve Driver credential refresh and make effective
    sources inspectable without revealing values. Review sensitive logging,
    file creation/replacement permissions and redacted admin/export responses;
    do not assume one chmod rule works across platforms.
  3. Separate durable authoritative records from reconstructible search/cache,
    recoverable task/upload state and disposable temp/logs by lifecycle. Define
    crash cleanup and pending-operation reconciliation before changing startup
    temp cleanup or retention.
  4. Provide a consistent operator backup of the DB plus required config and
    secret sources; declare excluded projections and in-flight state. If a
    distributed pool is adopted, include committed manifests and stable account
    mapping. Restore into an isolated instance, rotate/resolve credentials,
    rebuild projections and verify list/read/write/authorization; pooled mode
    must also verify full and Range reads and shard health.
  5. Review browser password/token persistence and the plaintext export path as
    a separate client-side secret workflow. Label configuration export honestly
    if it cannot restore all required server state.

Additional Information

Relevant source: internal/conf/config.go, internal/bootstrap/config.go,
internal/bootstrap/data/setting.go, internal/db/db.go, internal/op/storage.go,
model/storage.go, internal/bootstrap/task.go, internal/multipart,
internal/search, frontend src/utils/request.ts,
src/pages/login/index.tsx, src/pages/manage/backup-restore.tsx.
This proposal does not assert a verified exploit or a tested restore. It asks
for a contract and bounded validation before migration. Existing issues about
config behavior should be reviewed for overlap before posting: #1887 describes
a config rewrite bug and #1736 asks for temp cleanup, while this issue owns the
broader truth/secret/recovery classification.

AI Generated Content

  • I used AI tools to generate this content
  • I did not use AI tools to generate this content

AI model used

OpenAI Codex (exact model identifier not exposed to the agent)

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions