Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LiveQuery Redis does not match ACL users properly #8817

Open
4 tasks done
andreafalzetti opened this issue Nov 18, 2023 · 1 comment
Open
4 tasks done

LiveQuery Redis does not match ACL users properly #8817

andreafalzetti opened this issue Nov 18, 2023 · 1 comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@andreafalzetti
Copy link

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

  • Parse Server version: 6.4.0
  • Operating system: Linux
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): AWS

Database

  • System (MongoDB or Postgres): MongoDB
  • Database version: 6
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): MongoDB Atlas

Client

  • SDK (iOS, Android, JavaScript, PHP, Unity, etc): JavaScript
  • SDK version: 4.3.1

Logs

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

Copy link

Thanks for opening this issue!

  • 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.

@mtrezza mtrezza added the type:bug Impaired feature or lacking behavior that is likely assumed label Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

No branches or pull requests

2 participants