Skip to content

Commit

Permalink
Merge pull request #2859 from shreddedbacon/project-secret
Browse files Browse the repository at this point in the history
  • Loading branch information
tobybellwood authored Oct 14, 2021
2 parents a82afe2 + 49ed01a commit 35cfbdf
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions node-packages/commons/src/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ const lagoonEnvironmentType = process.env.LAGOON_ENVIRONMENT_TYPE || "developmen
const overwriteOCBuildDeployDindImage = process.env.OVERWRITE_OC_BUILD_DEPLOY_DIND_IMAGE
const overwriteKubectlBuildDeployDindImage = process.env.OVERWRITE_KUBECTL_BUILD_DEPLOY_DIND_IMAGE
const overwriteActiveStandbyTaskImage = process.env.OVERWRITE_ACTIVESTANDBY_TASK_IMAGE
const jwtSecret = process.env.JWTSECRET || "super-secret-string"
const jwtSecretString = process.env.JWTSECRET || "super-secret-string"
const projectSeedString = process.env.PROJECTSEED || "super-secret-string"

class UnknownActiveSystem extends Error {
constructor(message) {
Expand Down Expand Up @@ -310,8 +311,9 @@ const getControllerBuildData = async function(deployData: any) {
var graphqlEnvironmentType = environmentType.toUpperCase()
var graphqlGitType = type.toUpperCase()
var openshiftPromoteSourceProject = promoteSourceEnvironment ? `${projectName}-${makeSafe(promoteSourceEnvironment)}` : ""
// A secret which is the same across all Environments of this Lagoon Project
var projectSecret = crypto.createHash('sha256').update(`${projectName}-${jwtSecret}`).digest('hex');
// A secret seed which is the same across all Environments of this Lagoon Project
var projectSeedVal = projectSeedString || jwtSecretString
var projectSecret = crypto.createHash('sha256').update(`${projectName}-${projectSeedVal}`).digest('hex');
var alertContactHA = ""
var alertContactSA = ""
var uptimeRobotStatusPageIds = []
Expand Down

0 comments on commit 35cfbdf

Please sign in to comment.