Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create new variable for project seed #2859

Merged
merged 2 commits into from
Oct 14, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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