mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 11:30:43 +00:00
fix(gateway): avoid echoing rotated device tokens
This commit is contained in:
@@ -102,7 +102,10 @@ caller already has.
|
||||
openclaw devices rotate --device <deviceId> --role operator --scope operator.read --scope operator.write
|
||||
```
|
||||
|
||||
Returns the new token payload as JSON.
|
||||
Returns rotation metadata as JSON. If the caller is rotating its own token while
|
||||
authenticated with that device token, the response also includes the replacement
|
||||
token so the client can persist it before reconnecting. Shared/admin rotations
|
||||
do not echo the bearer token.
|
||||
|
||||
### `openclaw devices revoke --device <id> --role <role>`
|
||||
|
||||
|
||||
@@ -553,6 +553,10 @@ rather than the pre-handshake defaults.
|
||||
reused when the client is reusing the stored per-device token.
|
||||
- Device tokens can be rotated/revoked via `device.token.rotate` and
|
||||
`device.token.revoke` (requires `operator.pairing` scope).
|
||||
- `device.token.rotate` returns rotation metadata. It echoes the replacement
|
||||
bearer token only for same-device calls that are already authenticated with
|
||||
that device token, so token-only clients can persist their replacement before
|
||||
reconnecting. Shared/admin rotations do not echo the bearer token.
|
||||
- Token issuance, rotation, and revocation stay bounded to the approved role set
|
||||
recorded in that device's pairing entry; token mutation cannot expand or
|
||||
target a device role that pairing approval never granted.
|
||||
|
||||
Reference in New Issue
Block a user