Restrict use of masterKey
to localhost by default
#8245
Labels
state:breaking
Breaking change requires major version increment and `BREAKING CHANGE` commit message
state:released
Released as stable version
state:released-beta
Released as beta version
type:feature
New feature or improvement of existing feature
New Feature / Enhancement Checklist
Current Limitation
By default, Parse Server allows to use the master key with remote access. This creates a security risk because an exposed master key allows to access Parse Server with highest privileges via remote network requests against the public Parse Server API.
Parse Server already recommends in the documentation that the master key should never be used client side. Having the master key usable via remote access by default is contradictory to that advice.
Feature / Enhancement Description
To improve the default security of Parse Server, default the existing Parse Server option
masterKeyIPs
to127.0.0.1
, i.e.localhost
.The most common use case for master key being used remotely may be Parse Dashboard, which unfortunately still requires the master key, but that will hopefully change soon.
The feature must consider dynamic IP addresses, so it must be possible to not set any IP address restriction. That is currently the default, by not setting
masterKeyIPs
. If the new default is127.0.0.1
, it's unclear how to set no restriction, becausemasterKeyIPs: []
currently means "don't allow any IP address".A suggested solution is to allow using CIDR notation in
masterKeyIPs
. If the string misses the CIDR range, it should be interpreted as using the range of/32
. This also causes the least adoption effort for developers.masterKeyIPs: []
masterKeyIPs: ['0.0.0.0/0']
masterKeyIPs: ['10.0.0.1/32']
ormasterKeyIPs: ['10.0.0.1']
masterKeyIPs: ['10.0.0.1/16']
Example Use Case
n/a
Alternatives / Workarounds
n/a
The text was updated successfully, but these errors were encountered: