-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
LadyK-21/parse-server
#8Description
Issue Description
- set READ Only CLP (Simple Config)
- try to update an entry / create a new entry
According to the Parse Docs, using the master key for an action should bypass all security checks:
The master key, on the other hand, is definitely a security mechanism. Using the master key allows you to bypass all of your app's security mechanisms, such as class-level permissions and ACLs. Having the master key is like having root access to your app's servers, and you should guard your master key with the same zeal with which you would guard your production machines' root password.
Steps to reproduce
- Create a Custom Table, set CLP to read only
- Use this code to create a new entry:
exports.createNewEntry = function(param) {
const ParseEntry = Parse.Object.extend('Yourname');
let parseEntry = new ParseEntry();
parseEntry.set('param', param);
let acl = new Parse.ACL();
acl.setPublicReadAccess(true);
acl.setPublicWriteAccess(false);
parseEntry.setACL(acl);
return parseEntry.save({}, { useMasterKey: true })
.then(parseEntry => {
...
});
};
- Result:
ERROR: ParseError { code: 119, message: 'Permission denied for this action.' }
When I edit the CLP and allow write permission (or only the Create in the advanced section) this code works.
Expected Results
Bypass CLP/ACL Permission when using Master Key
Actual Outcome
No Permission
Environment Setup
- Server
- parse-server version: 2.2.11
- Operating System: Linux (Ubuntu)
Metadata
Metadata
Assignees
Labels
No labels