Skip to content

PostgresDsn to hide password #11715

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

Open
2 of 13 tasks
kamikaze opened this issue Apr 8, 2025 · 2 comments
Open
2 of 13 tasks

PostgresDsn to hide password #11715

kamikaze opened this issue Apr 8, 2025 · 2 comments

Comments

@kamikaze
Copy link

kamikaze commented Apr 8, 2025

Initial Checks

  • I have searched Google & GitHub for similar requests and couldn't find anything
  • I have read and followed the docs and still think this feature is missing

Description

Hi. Is it possible for PostgresDsn to partially behave as a SecretStr for password part? Otherwise I have to pick SecretStr instead. I guess RedisDsn is the same.

Affected Components

@karta9821
Copy link
Contributor

karta9821 commented Apr 8, 2025

This looks like a simple feature, but a few questions arise:

Should this be a separate type, for example SecretXXXDsn, or should it be implemented as a constraint?
Which method should return the "revealed" content, similar to SecretStr – maybe secret_encoded_string, or should we stick with encoded_string?
Should the build and/or __init__ methods also accept a SecretStr as an additional input in that case?
Should only the password be masked with asterisks, or the host(s), or the entire URI, ?

@kamikaze
Copy link
Author

kamikaze commented Apr 8, 2025

Password is the only secret here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy