Skip to content

Server logs master key error even if it has been not used #8829

Closed
@suathh

Description

@suathh

New Issue Checklist

Issue Description

If masterKeyIps is defined and I try to access data in a public class via REST API and if the request has X-Parse-Master-Key header then the server returns the needed response but also logs this error error: Request using master key rejected as the request IP address '::1' is not set in Parse Server option 'masterKeyIps'.

Request (Has Master-Key header) ->(Tries to access a public class) -> Server (Gives response but logs error for IP is not allowed for masterKey)

Request (Has Master-Key header) ->(Tries to access a masterKey only class) -> Server (denies and logs error for IP is not allowed for masterKey)

Steps to reproduce

Set your masterKeyIps , add X-Parse-Master-Key to your header in the request and try to access a public class

Actual Outcome

error: Request using master key rejected as the request IP address '::1' is not set in Parse Server option 'masterKeyIps'.

Expected Outcome

Server should not log that since I was not trying to use Master Key for my operation cause it was a access request to a public class data

Environment

"dependencies": {
"axios": "1.6.0",
"dotenv": "^16.3.1",
"express": "4.18.2",
"ip-range-check": "^0.2.0",
"parse": "4.1.0",
"parse-server": "6.3.1"
}

Server

  • Parse Server version: 6.3.1
  • Operating system: Windows 10
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): Localhost

Database

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

Client

  • SDK (iOS, Android, JavaScript, PHP, Unity, etc): REST API
  • SDK version: None

Logs

error: Request using master key rejected as the request IP address '::1' is not set in Parse Server option 'masterKeyIps'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    block:majorNeeds to be resolved before next major release; remove label afterwardsstate:breakingBreaking change requires major version increment and `BREAKING CHANGE` commit messagetype: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