parse-community / parse-server

Parse Server for Node.js / Express
https://parseplatform.org
Apache License 2.0
20.73k stars 4.76k forks source link

LiveQuery Redis does not match ACL users properly #8817

Open andreafalzetti opened 8 months ago

andreafalzetti commented 8 months ago

New Issue Checklist

Issue Description

I am using parse-server@6.4.0, I am running two Parse instances, one configured as LiveQueryParseServer, the other as regular Parse Server. I use Redis to implement cross instance pubsub of the Live Queries.

I have successfully configured it to publish and subscribe, however, when the messages should be sent to the client (FE app), the LiveQuery server cannot match the user and does not send the message.

In the FE app, I am subscribing sending the session token, I've verified the token in the subscription request being correct.

If I remove the ACL from the obejct, the FE app receives the message.

By using the default pubsub provider (EventEmitter) in a single instance, the same ACL and FE code to subscribe, works perfectly. This indicates a high proability of a bug in the Redis PubSub logic to match users based on their session tokens.

Steps to reproduce

  1. Using ParseServer and LiveQueryParseServer
  2. Using Redis as PubSub
  3. Have a client subscribe to LiveQueryParseServer using the sessionToken
  4. Create an object with ACL pointing to a specific user id
  5. Observe how the message does not reach the FE app.
  6. Now remove the ACL, and try creating a new object
  7. Observe how the message now reaches successfully the FE app

Actual Outcome

No messages received.

Expected Outcome

All messages using the right ACL should be received

Environment

Server

Database

Client

Logs

Even using the VERBOSE level, LiveQueryParseServer logs very little, almost nothing.

parse-github-assistant[bot] commented 8 months ago

Thanks for opening this issue!