parse-server
parse-server copied to clipboard
Parser Server not fully compatible with Mongo Atlas Serverless
New Issue Checklist
- [x] I am not disclosing a vulnerability.
- [x] I am not just asking a question.
- [x] I have searched through existing issues.
- [x] I can reproduce the issue with the latest version of Parse Server.
Issue Description
I currently checking if parse-server could run in a fully serverless env. The experiment is based on GCP Cloud Run and the new Mongo Atlas Serverless service (https://www.mongodb.com/cloud/atlas/serverless)
I found an issue (no current workarounds) about collation (case insensitive login/query/indexes). Mongo Serverless does not support collation. Developers are not able to "disable" collation. The collation fails will for example block logins, and block Defined Schema migration.
Steps to reproduce
Run a parse-server and connect to a Mongo Serverless Instance
Actual Outcome
All stuff related to case insensitive query/index will fail
Expected Outcome
To be able to disable the collation (mainly used on the Parse. User class)
Environment
Server
- Parse Server version:
5.3.0-alpha.6
Database
- System (MongoDB or Postgres):
Mongo Atlas Serverless - Database version:
5.3.1 - Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
remote
Logs
Collation is not supported on this Altas tier (Mongo Serverless)
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.
Here I'll suggest:
- Add an option to disable case insensitivity, and simply force "username/email" toLowerCase() when this feature is activated to prevent any login issue.
I think the tradeoff is understandable, and easy to implement in parse-server. Developers will have a super simple workaround if they want to keep casing for UI purposes. They can create a "uiUsername" string filed on Parse.User to store the username without forced lowerCase.
Forcing lowerCase on the server side will not introduce any breaking change on the client side. Signup/login with "Moumouls" or "moumouls" will resolve to the same user account.
Maybe Altas will support later collation on Serverless service but no current plan/roadmap/blog about this.
Goods news, Mongo announced that Serverless is now GA. Collation is still not supported so Parse Server needs a PR to disable collation.
Related news: https://www.mongodb.com/blog/post/embrace-benefits-serverless-development-atlas
🎉 This change has been released in version 6.4.0-alpha.8
🎉 This change has been released in version 6.5.0-beta.1
🎉 This change has been released in version 6.5.0-alpha.1
🎉 This change has been released in version 6.5.0
🎉 This change has been released in version 7.0.0