Parse Server 6.2: "Server not reachable: unauthorized: master key is required"

Issue Description

I have a docker-compose file that I am using in order to create the whole backend which is going to use ParseServer 6.2 version. But the problem is when I go to the page http://localhost:4040 and log in with user: admin and pw: admin. I will get the following error:

Server not reachable: unauthorized: master key is required

The interesting part is that this is only from ParseServer 6.2, if I am going to use the older version ParseServer 5.2 I don’t get any error at all and everything works perfectly.

Does anyone know what I am missing?

Also, the output from the logs server are as follows:

error: Request using master key rejected as the request IP address '10.5.0.1' is not set in Parse Server option 'masterKeyIps'.
2023-09-13T18:58:21.459971786Z Error: unauthorized: master key is required
2023-09-13T18:58:21.460007964Z     at promiseEnforceMasterKeyAccess (/parse-server/lib/middlewares.js:430:19)
2023-09-13T18:58:21.460015577Z     at /parse-server/lib/PromiseRouter.js:74:20
2023-09-13T18:58:21.460022142Z     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-09-13T18:58:21.488535271Z error: Request using master key rejected as the request IP address '10.5.0.1' is not set in Parse Server option 'masterKeyIps'.
2023-09-13T18:58:21.491460848Z Error: unauthorized: master key is required
2023-09-13T18:58:21.491524335Z     at promiseEnforceMasterKeyAccess (/parse-server/lib/middlewares.js:430:19)
2023-09-13T18:58:21.491535580Z     at /parse-server/lib/PromiseRouter.js:74:20
2023-09-13T18:58:21.491544729Z     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Steps to reproduce

  1. Run the following docker compose file:
version: '3.9'

services:
  database:
    image: mongo:3.6
    security_opt:
      - seccomp:unconfined
    ports:
      - 27017:27017
    environment:
      MONGO_INITDB_ROOT_USERNAME: admin
      MONGO_INITDB_ROOT_PASSWORD: admin
    volumes:
      - mongo_data:/data/db
    networks:
      - my_network

  server:
    image: parseplatform/parse-server:6.2.0
    ports:
      - 1337:1337
      - 9229:9229
    environment:
      - PARSE_SERVER_APPLICATION_ID=COOK_APP
      - PARSE_SERVER_APPLICATION_NAME=COOK_NAME
      - PARSE_SERVER_MASTER_KEY=MASTER_KEY_1
      - PARSE_SERVER_DATABASE_URI=mongodb://admin:admin@database:27017/parse_server?authSource=admin
      - PARSE_SERVER_URL=http://localhost:1337/parse
      - PARSE_PUBLIC_SERVER_URL=http://localhost:1337/parse
      - PARSE_ENABLE_FOR_ANONYMOUS_USERS=true
      - PARSE_ENABLE_FOR_PUBLIC_USERS=true
      - PARSE_SERVER_CLOUD=/parse-server/cloud/main.js
    links:
      - database
    depends_on:
      - database
      - search_engine
    entrypoint: "node --inspect=0.0.0.0:9229 /parse-server/bin/parse-server"
    volumes:
      - parse_server_cloud:/parse-server/cloud
    networks:
      - my_network

  dashboard:
    image: parseplatform/parse-dashboard:5.1.0
    ports:
      - "4040:4040"
    depends_on:
      - server
    environment:
      - PARSE_DASHBOARD_APP_ID=COOK_APP
      - PARSE_DASHBOARD_MASTER_KEY=MASTER_KEY_1
      - PARSE_DASHBOARD_USER_ID=admin
      - PARSE_DASHBOARD_USER_PASSWORD=admin
      - PARSE_DASHBOARD_ALLOW_INSECURE_HTTP=true
      - PARSE_DASHBOARD_SERVER_URL=http://localhost:1337/parse
    volumes:
      - parse_dashboard:/data/dashboard
    networks:
      - my_network

networks:
  my_network:
    driver: bridge
    ipam:
      config:
        - subnet: 10.5.0.0/16
          gateway: 10.5.0.1

volumes:
  mongo_data:
  parse_dashboard:
  search_engine:
  parse_server_cloud:
    driver: local
    driver_opts:
      type: none
      device: ../cloud_code
      o: bind
  1. Go to localhost:4040, 0.0.0.0:4040 or 127.0.0.1:4040 and login with the user admin and password admin

Actual Outcome

Server not reachable: unauthorized: master key is required

Expected Outcome

I would expect to not have that error message and be able to enter into my application properly.

Environment

Server

  • Parse Server version: 6.2.0
  • Operating system: Docker (parseplatform/parse-server:6.2.0)
  • Local or remote host: local

Database

  • System: MongoDB
  • Database version: 3.6
  • Local or remote host: local

Client

  • SDK: Dart
  • SDK version: 5.1.3

Try add your IP to PARSE_SERVER_MASTER_KEY_IPS