-
Notifications
You must be signed in to change notification settings - Fork 429
Open
Labels
Description
Summary
When authenticating with read-only scopes using gws auth login --readonly, exporting credentials with:
gws auth export --unmasked > credentials.jsonand then using those credentials on another machine (OpenClaw), the resulting access appears to still allow full/write operations.
Reproduction
- Run:
gws auth login --readonly
- Export credentials:
gws auth export --unmasked > credentials.json
- Move
credentials.jsonto an external machine/environment (OpenClaw). - Use the exported credentials with
gwsthere. - Attempt a write operation (for example, Gmail send).
Actual behavior
Write/full-access behavior is still possible on the external machine, even though login was done with --readonly.
Expected behavior
Read-only scope enforcement should persist with exported credentials and be enforced by Google-issued token scopes, not only by client-side command restrictions.
Questions
- Are
--readonlyscopes currently enforced only in the local client flow, rather than in the OAuth token/scopes themselves? - If so, what is the recommended way to ensure exported credentials are truly read-only on external machines?
- Can
--readonlybecome the default behavior in the installer/setup flow (or at least a strongly guided default), not just a local/client-side option?
Why this matters
Users exporting credentials for remote execution expect least-privilege guarantees to carry over across machines/environments.
Reactions are currently unavailable