Closed
Description
New Issue Checklist
- [x ] I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest version of Parse Server.
Issue Description
Parse Server Option masterKeyIps not working as intended.
We've set the field as where x and y are real ips redacted for security
masterKeyIps: ['x.x.x.x','y.y.y.y']
Using a query like
const result = new Parse.Query("ClassName").find({useMasterKey: true});
from an external server with said ip address 'x.x.x.x' or 'y.y.y.y' doesn't perform operation using masterKey.
Errors returned are e.g. Permission denied for action find on class ClassName.
This code works perfectly fine in Parse Version 4. We haven't tested on 5, but we're getting these results on 6.
Which indicates the useMasterKey option is not being passed through.
Steps to reproduce
- Create a parse server
- Create a separate server
- Create a class and place security permissions to make it as tight as possible
- Set the ip of the second server in the masterKeyIps parse server option
- Initialise parse/node on the second server and provide the appId and valid masterKey of the parse server
- Attempt to execute a query on the class using {useMasterKey: true}
Actual Outcome
Permission denied for action find on class ClassName.
Expected Outcome
Actual result of the query
Environment
Server
- Parse Server version:
6.1.0-alpha.2
- Operating system:
Ubuntu20
- Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
AWS
Database
- System (MongoDB or Postgres):
MongoDB
- Database version: `5.0.10
- 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.0.1