@duffcloudservices/cli 0.3.2 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -151,9 +151,33 @@ The CLI uses OAuth 2.0 Device Authorization Grant (RFC 8628):
151
151
  2. CLI displays a URL and code
152
152
  3. Open URL in browser, enter code
153
153
  4. Sign in with Google
154
- 5. CLI receives and stores tokens securely
154
+ 5. CLI receives and stores tokens locally
155
155
 
156
- Tokens are stored encrypted in your OS keychain/credential store.
156
+ ### Token storage
157
+
158
+ Tokens (access token, refresh token, and basic user info) are stored **encrypted
159
+ at rest**, using the best secret store available on your machine. The CLI never
160
+ writes the tokens to disk in plaintext.
161
+
162
+ | Platform | Backend | Where |
163
+ | --- | --- | --- |
164
+ | macOS | Keychain (`security` generic password) | login keychain, service `dcs-cli` |
165
+ | Linux | libsecret (`secret-tool`) when present | Secret Service (GNOME Keyring / KWallet) |
166
+ | Windows | DPAPI (`ProtectedData`, CurrentUser scope) | `%APPDATA%\dcs-cli-nodejs\auth.dpapi` (ciphertext) |
167
+ | Fallback | AES-256-GCM encrypted file (machine/user-derived key) | `<config dir>/auth.enc` |
168
+
169
+ `dcs whoami` prints which backend is active. Run `dcs logout` to delete the
170
+ stored tokens.
171
+
172
+ The encrypted-file fallback is only used when no OS keychain and no DPAPI is
173
+ available (e.g. a headless Linux box with no Secret Service daemon). Its key is
174
+ derived from the machine + user identity, so it is stronger than plaintext but
175
+ is **not** a substitute for an OS keychain against a determined local attacker;
176
+ prefer installing `libsecret` (`secret-tool`) on such hosts.
177
+
178
+ **Migration:** if you previously authenticated with a build that stored a
179
+ plaintext `conf` JSON, your existing tokens are moved into the keychain
180
+ automatically on the next command, and the plaintext file entry is deleted.
157
181
 
158
182
  ## Site Access Validation
159
183