Summary
On UserDeleted, devices-owned artifacts for that user must be wiped: user MQTT credentials in Redis, role cache entries, and any device tokens that the user was the sole authorizer for (rare, mostly affects places#P2 cascade).
Changes
Blocked by
Verification
- Delete user U holding active MQTT WebSocket session.
- Session dropped within seconds; reconnect with old creds returns
auth_failed.
- Redis shows no
mqtt:cred:user:<uid> entry.
Summary
On
UserDeleted, devices-owned artifacts for that user must be wiped: user MQTT credentials in Redis, role cache entries, and any device tokens that the user was the sole authorizer for (rare, mostly affects places#P2 cascade).Changes
auth.user.deletedinbackend/devices/src/infra/broker/routes.py.mqtt_auth.invalidate_user_credentials(user_id)(extendbackend/devices/src/services/mqtt_auth.py).role_cache.remove_user(user_id).Blocked by
Verification
auth_failed.mqtt:cred:user:<uid>entry.