Skip to content

Commit 49a14b4

Browse files
committed
use encrypted password by default
1 parent b8b370d commit 49a14b4

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

.dockerignore

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
node_modules
22
coverage
33
tmp
4-
disti
54
heroku.yml
65
docker-compose.yml
6+
npm-debug.log
7+
*.md
8+
LICENSE
9+
Dockerfile
10+
.dockerignore
11+
.gitignore
12+
.istanbul.yml
13+
.git
14+
.github
715

app.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,13 @@
3030
"required": true
3131
},
3232
"PARSE_DASHBOARD_USER_PASSWORD": {
33-
"description": "Specify the user password to connect with. This is a password in plain text.",
33+
"description": "Specify the user password to connect with. This should be a hash of the password if PARSE_DASHBOARD_USER_PASSWORD_ENCRYPTED=true. Can use a hasher for generating, e.g. https://bcrypt-generator.com.",
3434
"required": true
3535
},
36+
"PARSE_DASHBOARD_USER_PASSWORD_ENCRYPTED": {
37+
"description": "Specify if the user parseword should be encrypted (true) or in plaintext (false).",
38+
"value": "true"
39+
},
3640
"PARSE_DASHBOARD_COOKIE_SESSION_SECRET": {
3741
"description": "The constant cookie session for dashboard.",
3842
"required": false

src/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const configAppId = process.env.PARSE_DASHBOARD_APP_ID;
2424
const configAppName = process.env.PARSE_DASHBOARD_APP_NAME;
2525
const configUserId = process.env.PARSE_DASHBOARD_USER_ID;
2626
const configUserPassword = process.env.PARSE_DASHBOARD_USER_PASSWORD;
27+
const configUserPasswordEncrypted = process.env.PARSE_DASHBOARD_USER_PASSWORD_ENCRYPTED || true;
2728

2829
if (!process.env.PARSE_DASHBOARD_CONFIG) {
2930
if (configServerURL && configPrimaryKey && configAppId) {
@@ -49,6 +50,7 @@ if (!process.env.PARSE_DASHBOARD_CONFIG) {
4950
pass: configUserPassword,
5051
}
5152
];
53+
configFromCLI.data.useEncryptedPasswords = configUserPasswordEncrypted;
5254
}
5355
} else if (!configServerURL && !configPrimaryKey && !configAppName) {
5456
configFile = path.join(__dirname, 'parse-dashboard-config.json');

0 commit comments

Comments
 (0)