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

chore(@console|@profile): remove database credentials from logs #1164

Merged
merged 3 commits into from
Jan 6, 2025

Conversation

rodfsoares
Copy link
Contributor

@rodfsoares rodfsoares commented Jan 2, 2025

(rework of #1160)

Why

Currently, in the console app and profiles service database credentials were being exposed in logs when a new database client connection was established. This can lead to a secret leak which is undesirable.

What

This change removes the connection URL from logs since having this information on the connection step does not add any value and in case of failure, the error already shows its cause.

@@ -76,3 +76,13 @@ export function decrypt(secret: string, iv: string, value: string): string {
const decrypted = Buffer.concat([decipher.update(Buffer.from(value, "hex")), decipher.final()]);
return decrypted.toString();
}

export function hideSensitiveInfo(url: string) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved from webapps/ee-api/lib/store.ts as requested:
#1160 (comment)

@absorbb absorbb merged commit 5cc3840 into jitsucom:newjitsu Jan 6, 2025
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants