Open sudhishkr opened 1 year ago
Similar issue https://github.com/parse-community/parse-dashboard/issues/602
@andrewfelker I know the previous issue is quite old, but do you have any insights here?
Similar issue https://github.com/parse-community/parse-dashboard/issues/2349
@zhangwb1996 do you see any issue with the way I have set up "masterKeyIps": ["127.0.0.1"]
It would be relating to masterKeyIps
, If you have a look at the Parse Server logs, it should tell you the IP that was rejected. Adding that to the masterKeyIps
will resolve the issue
It would be relating to
masterKeyIps
, If you have a look at the Parse Server logs, it should tell you the IP that was rejected. Adding that to themasterKeyIps
will resolve the issue
Thanks @dblythy .. I am going to try it on my parse-server. Also looks like this fix is out in the beta
release as per this https://github.com/parse-community/parse-server/issues/8316#issuecomment-1409693198
Yay! I got this working .. thanks @dblythy! Going to close this issue.
Would you want to add the step to the Parse Dashboard installation instructions in the README?
It should say that for Parse Server 6 the masterKeyIps
needs to be configured.
I've reopened this as a docs issue.
Yay! I got this working .. thanks @dblythy! Going to close this issue.
hello, I have same problem. but it's not worked after adding the rejected IP. why?
Is there any documentation to this property masterKeyIps
?
Because how should we define a IP whitelist when i.e. the dashboard is running in a Kubernetes cluster? Yes, I could define IPs but this is not how you should provision your cluster. Or do I have missed something on this feature?
Is it possible at least to set an IP range by CIDR?
Yes, you can use CIDR syntax to enable for example all IPs.
The Parse Server docs for that option have been improved but it's not merged into stable release yet hence they are not published.
/* (Optional) Restricts the use of master key permissions to a list of IP addresses.<br><br>This option accepts a list of single IP addresses, for example:<br>`['10.0.0.1', '10.0.0.2']`<br><br>You can also use CIDR notation to specify an IP address range, for example:<br>`['10.0.1.0/24']`<br><br>Special cases:<br>- Setting an empty array `[]` means that `masterKey` cannot be used even in Parse Server Cloud Code.<br>- Setting `['0.0.0.0/0']` means disabling the filter and the master key can be used from any IP address.<br><br>To connect Parse Dashboard from a different server requires to add the IP address of the server that hosts Parse Dashboard because Parse Dashboard uses the master key.<br><br>Defaults to `['127.0.0.1', '::1']` which means that only `localhost`, the server itself, is allowed to use the master key.
:DEFAULT: ["127.0.0.1","::1"] */
masterKeyIps: ?(string[]);
@mtrezza let me take a stab at fixing the docs. I read somewhere that this issue was fixed in the upcoming new release (not sure if thats still true).
@sudhishkr hi, I have 'unauthorized: master key is required' problem but can't solve this. Can you explain to me? But basic please :D
I think this info will be important for someone having trouble when trying to run parse-server + parse-dashboard on docker-compose: When listing ips on PARSE_SERVER_MASTER_KEY_IPS, the syntax is not an array like on javascript, this catch errors on server start, you need to list ips splitted by comma on environment variable. Ex: PARSE_SERVER_MASTER_KEY_IPS: 172.0.0.0/1,::1
@edson-gaspar Would you want to open a PR to add this to the docs?
@mtrezza I don't feel quite sure how I should document it.
@mtrezza - if you can assign this to me, I can try to take a stab on Thursday.
@sudhishkr We don't "assign" issues, please feel free to open a PR and link this issue so that others can see you're working on it.
I ran up against this today and struggled a bit. Hope this helps someone. If you encounter the error "Server not reachable: unauthorized: master key is required" while setting up Parse Server, you might need to specify the IP addresses allowed to use the master key. To resolve this issue, add the PARSE_SERVER_MASTER_KEY_IPS environment variable to your configuration, using the CIDR notation 0.0.0.0/0 to allow all IPs. In my docker-compose.yml
I added:
parse:
image: parseplatform/parse-server
environment:
- # OTHER ENV VARS
- PARSE_SERVER_MASTER_KEY_IPS=0.0.0.0/0
Be cautious with this setting as it opens up master key access to all IP addresses, which could pose a security risk. If you want to tighten it up, add your own local IP address that you are accessing the dashboard from (e.g. your laptop's IP).
New Issue Checklist
Issue Description
Parse Dashboard not connecting Parse Server (err: master key is required)
Steps to reproduce
Actual Outcome
Expected Outcome
Successful Login
Environment
Dashboard
Server
Database
Logs
on browser ^