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

PostgreSQL DSN appears in logs with plaintext password #101

Open
ShisheerBitgo opened this issue Nov 12, 2024 · 0 comments
Open

PostgreSQL DSN appears in logs with plaintext password #101

ShisheerBitgo opened this issue Nov 12, 2024 · 0 comments

Comments

@ShisheerBitgo
Copy link

I have a Dockerfile and entrypoint.sh that runs the event-classifier in a container. When I look at the container logs for event-classifier, I see that the DSN is logged with the password appearing in plaintext. This is how it looks:

Using postgres connection with password
postgresql+asyncpg://ton:plaintext@ton-node-1-postgres:5432/ton
postgresql://ton:plaintext@ton-node-1-postgres:5432/ton
INFO:main:Starting processing events from db
INFO:main:Creating pool of 4 workers
INFO:main:fetching unclassified traces...
INFO:main:Processing first batch of 10000 traces, queue size: 165

In other words, if I were to use the password (in this case, "plaintext") to log into the psql database, it would work.

It seems to me that the two DSN logs (postgresql+asyncpg: ... and postgresql: ...) are coming from this line and this line, respectively.

I assume these shouldn't be logged? In either case, can we go about masking this so the psql database credentials are not logged (at least in plaintext)

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

No branches or pull requests

1 participant