-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Parse Server option masterKeyIps not working #8512
Comments
Thanks for opening this issue!
|
Is there any server log message? May be related to #8421. |
As soon as we enable all ips its it works fine. Localhost also obviously works fine. It's only when we specify. I thought it might be because server was behind proxy or load balancers but we created multiple server instances with fixed ips. Tried in multiple environments and are experiencing the same issue. Unless we're doing something completely wrong but I think the documentation is fairly self explanatory. We dug deep into the parse-server code. The ips definitely get validated not sure at what point it all falls over. We run on dokku and there's no output logs. Bootstrapping on top of express '4.17.3' The only middleware we use is Sentry to trap all errors
As soon as we turn on the tap we start to get thousands of errors and most of them are in the following format 'Error: Permission denied for action find on class' Regarding permissions they're tied down but currently not via the ParseOptionsSchema, will be raising a few bugs there. Again on version 4 everything runs fine, so currently we have two production servers running simultaneously until we can kill version 4 because of this issue. Edit: To answer your questions @mtrezza yes we looked in depth at that issue because it's really the only one that exists out there but I don't think it applies. We're not using ip ranges, and it's no ipv6 and were we to use local host we can replicate that just fine. Normally we wouldn't run a separate server and access via masterkey but we have some brutal long queries that affect performance on the parse server and link to other external services so we've decoupled the two. We could probably setup another full parse server there but we didn't think the masterIp list would become an issue. |
Parse Server should output the IP address that has been blocked in the logs (not sure from which version though). Adding exactly that IP address should work. Is there no way for you to access the logs? |
I had a chance to and the output seems empty parse-server.err.2023-04-15 parse-server.info.2023-04-15 |
With some luck @magnacartatron my pr will fix your issue: #8510 |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
@magnacartatron Were you able to try out the PR suggested in #8512 (comment) to fix this issue? For off-topic discussions we recommend our community forum or community chat. Regarding the logs, they should not be empty, at least a start-up log entry should be written by Parse Server. And if you set the appropriate log level and/or the env var |
Closing, as this seems to be have been fixed and no further update provided. |
New Issue Checklist
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
Actual Outcome
Permission denied for action find on class ClassName.
Expected Outcome
Actual result of the query
Environment
Server
6.1.0-alpha.2
Ubuntu20
AWS
Database
MongoDB
MongoDB Atlas
Client
Javascript
4.0.1
Logs
The text was updated successfully, but these errors were encountered: