Skip to content

Commit

Permalink
use node crypto for random password
Browse files Browse the repository at this point in the history
  • Loading branch information
atomfrede committed Sep 12, 2019
1 parent 79fc081 commit b22fb1d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions generators/kubernetes-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
const shelljs = require('shelljs');
const chalk = require('chalk');
const crypto = require('crypto');
const { loadFromYoRc } = require('./docker-base');
const constants = require('./generator-constants');

Expand Down Expand Up @@ -49,9 +50,7 @@ function loadConfig() {
this.kubernetesServiceType = this.config.get('kubernetesServiceType');
this.ingressDomain = this.config.get('ingressDomain');
this.istio = this.config.get('istio');
this.dbRandomPassword = Math.random()
.toString(36)
.slice(-8);
this.dbRandomPassword = crypto.randomBytes(128).toString('hex');
}

function saveConfig() {
Expand Down

0 comments on commit b22fb1d

Please sign in to comment.