This is my index.js

var api = new ParseServer({  databaseURI: databaseUri || 'mongodb://localhost:27017/dev',  cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
  appId: process.env.APP_ID || 'myapp1',  masterKey: process.env.MASTER_KEY || 'thisismymasterkey', //Add your master key here. Keep it secret!  serverURL: process.env.SERVER_URL || 'localhost:3333/myapp1',  // Don't forget to change to https if needed  liveQuery: {    classNames: ["Posts", "Comments"] // List of classes to support for query subscriptions  }
// Client-keys like the javascript key or the .NET key are not necessary with parse-server
// If you wish you require them, you can set them as options in the initialization above:
// javascriptKey, restAPIKey, dotNetKey, clientKey
var trustProxy = true;
var config = {  "allowInsecureHTTP": true,   "trustProxy": 1,  "apps": [
    {      "serverURL": "http://localhost:3333/myapp1",      "appId": "myapp1",      "masterKey": "thisismymasterkey",      "appName": "thisistheapp"    },  ],"users": [    {      "user":"admin",      "pass":"12345"    }  ]

My current masterkey and appkey is the same and if I change the appkey to something different I cannot use the panel to edit or view my data. Including masterkey in the source ( client side ) is also damaging since anyone can use to manipulate the data with it.

What is parse server security measure to not provide masterkey or clientkey on the client side and still be able to use Parse.initialize.

How can I ensure security while using parse server and providing the key to connect to my db ?

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.