Skip to content

Commit

Permalink
Add code to encode and decode os and pg passwords in case of fresh de…
Browse files Browse the repository at this point in the history
…ployment

Signed-off-by: Rensy Thomas <[email protected]>
  • Loading branch information
rensycthomas committed Jan 29, 2025
1 parent b12c47a commit a133eab
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -780,16 +780,23 @@ func writeGoogleserviceJsonFile(filePath string, serviceAccount GoogleServiceAcc
}

func (e *existingInfra) encodePasswordFields() {
e.log.Debug("RT Value of isManagedServicesOn", isManagedServicesOn())
if isManagedServicesOn() {

e.log.Debug("RT Inside ManagedServices", isManagedServicesOn())
if len(e.config.ExternalDB.Database.Opensearch.OpensearchSuperUserPassword) > 0 {
e.log.Debug("RT OS SUP", e.config.ExternalDB.Database.Opensearch.OpensearchSuperUserPassword)

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information High

Sensitive data returned by an access to OpensearchSuperUserPassword
flows to a logging call.
e.config.ExternalDB.Database.Opensearch.OpensearchSuperUserPassword = base64.StdEncoding.EncodeToString([]byte((e.config.ExternalDB.Database.Opensearch.OpensearchSuperUserPassword)))
e.log.Debug("RT OS SUP Encoded", e.config.ExternalDB.Database.Opensearch.OpensearchSuperUserPassword)

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information High

Sensitive data returned by an access to OpensearchSuperUserPassword
flows to a logging call.
}
if len(e.config.ExternalDB.Database.PostgreSQL.PostgreSQLSuperUserPassword) > 0 {
e.log.Debug("RT PS SUP", e.config.ExternalDB.Database.PostgreSQL.PostgreSQLSuperUserPassword)

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information High

Sensitive data returned by an access to PostgreSQLSuperUserPassword
flows to a logging call.
e.config.ExternalDB.Database.PostgreSQL.PostgreSQLSuperUserPassword = base64.StdEncoding.EncodeToString([]byte((e.config.ExternalDB.Database.PostgreSQL.PostgreSQLSuperUserPassword)))
e.log.Debug("RT PS SUP Encoded", e.config.ExternalDB.Database.PostgreSQL.PostgreSQLSuperUserPassword)

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information High

Sensitive data returned by an access to PostgreSQLSuperUserPassword
flows to a logging call.
}
if len(e.config.ExternalDB.Database.PostgreSQL.PostgreSQLDBUserPassword) > 0 {
e.log.Debug("RT PS DBUP", e.config.ExternalDB.Database.PostgreSQL.PostgreSQLDBUserPassword)

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information High

Sensitive data returned by an access to PostgreSQLDBUserPassword
flows to a logging call.
e.config.ExternalDB.Database.PostgreSQL.PostgreSQLDBUserPassword = base64.StdEncoding.EncodeToString([]byte((e.config.ExternalDB.Database.PostgreSQL.PostgreSQLDBUserPassword)))
e.log.Debug("RT PS DBUP Encoded", e.config.ExternalDB.Database.PostgreSQL.PostgreSQLDBUserPassword)

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information High

Sensitive data returned by an access to PostgreSQLDBUserPassword
flows to a logging call.
}
}
}

0 comments on commit a133eab

Please sign in to comment.