Skip to content

todo(profile): redesign profile management with ClawPal as SSOT and no secret reads from remote OpenClaw #94

@Akane-CN

Description

@Akane-CN

TODO: Refactor profile management to ClawPal-first SSOT (no secret pull from remote OpenClaw)

Context

Current profile/auth flows still have mixed authority between ClawPal and remote OpenClaw instances in some paths. This creates ambiguity and security risk, especially around secret resolution and sync behavior.

Goal

Refactor profile management so that ClawPal is the single source of truth (SSOT) for profile definitions and credential intent, then distribute to OpenClaw targets as needed.

Hard rule:

  • ClawPal must never read/pull secrets from OpenClaw running on VPS/remote hosts.

Requirements

  1. SSOT ownership model

    • Profiles are authored and stored in ClawPal domain.
    • Remote OpenClaw receives derived/configured outputs only.
    • No reverse-sync of secrets from remote OpenClaw back to ClawPal.
  2. Secret handling boundary

    • Secret ingestion happens only on trusted ClawPal side.
    • Remote sync can push needed secret material (or references), but must not fetch remote secret stores.
    • Remove/disable any code paths that attempt remote secret discovery for profile resolution.
  3. Deterministic distribution

    • Define a clear projection model from ClawPal profile -> remote OpenClaw config/auth store.
    • Include idempotency guarantees and conflict behavior.
  4. Migration/backward compatibility

    • Provide migration path for existing installs using remote-derived auth/profile behavior.
    • Add explicit behavior flags if staged rollout is needed.
  5. Observability and auditability

    • Record profile distribution events and outcomes.
    • Expose clear diagnostics for “what was pushed”, “when”, and “why”.

Deliverable requested in this issue

Please produce a complete design before implementation, including:

  • Problem statement + threat model
  • Source-of-truth architecture
  • Data model / schema changes
  • API contracts (create/update/list/distribute)
  • Secret boundary and trust assumptions
  • Sync protocol (idempotency, retries, partial failure handling)
  • Migration plan and rollback strategy
  • Test plan (unit/integration/e2e)
  • Operational runbook and success metrics

Acceptance criteria (for design phase)

  • Design doc is complete and implementation-ready
  • Explicitly proves “no secret read from remote OpenClaw VPS”
  • Defines transition strategy for existing users
  • Defines verification strategy and CI coverage expectations

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