[Security] Credentials are not device-bound — copying ~/.config/gws grants full account access on any machine #338
t3cknic1an
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
|
I think this might be only for windows? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
The credential store at
~/.config/gws/(includingcredentials.jsonand the associated keyring-derived encryption key) can be copied to any other machine and used to authenticate with full OAuth scope access. This bypasses device-based access controls that organizations rely on — such as Google Workspace's [Context-Aware Access](https://support.google.com/a/answer/9275380) and [device trust policies](https://support.google.com/a/answer/7587183) — which are designed to ensure data can only be accessed from managed, enrolled devices.Steps to Reproduce
gws auth login~/.config/gws/to Machine B (unmanaged/personal device)gws drive files liston Machine B — succeeds without re-authenticationExpected Behavior
Credentials should be bound to the originating device. If the credential store is detected on a different device, the CLI should invalidate the session and force re-authentication.
Impact
gwsis deployed with broad OAuth scopes (drive,gmail,admin, etc.)Proposed Fix
Bind credentials to the device by incorporating a stable, machine-unique identifier into the encryption key derivation. On first auth, derive and store a device fingerprint. On each subsequent use, verify the fingerprint matches before decrypting credentials.
The re-auth error message should be explicit and actionable, e.g.:
Additional Context
gws auth export) explicitly documents copying credentials between machines, which is a valid use case. Any fix should preserve this workflow with an explicit opt-in flag (e.g.--portable) while making device-bound credentials the secure default.Beta Was this translation helpful? Give feedback.
All reactions