Skip to content

Parse Server option masterKeyIps not working #8512

Closed
@magnacartatron

Description

@magnacartatron

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

  1. Create a parse server
  2. Create a separate server
  3. Create a class and place security permissions to make it as tight as possible
  4. Set the ip of the second server in the masterKeyIps parse server option
  5. Initialise parse/node on the second server and provide the appId and valid masterKey of the parse server
  6. 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

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions