Skip to content

feat: Add secrecy crate feature #1219

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

Closed
wants to merge 1 commit into from

Conversation

scott-rc
Copy link

Hey 👋

This PR adds the ability to use secrecy::Secret<T> from the secrecy crate as an sqlx::Type.

Example:

#[derive(Debug, FromRow)]
pub struct User {
    pub id: i32,
    pub email_address: String,
    pub password_hash: secrecy::Secret<String>,
}

@abonander
Copy link
Collaborator

abonander commented May 21, 2021

I'm personally not inclined to merge this because I still stand by what I stated in #613. Using secrecy is just plugging one hole in a very leaky dam and I'm worried about luring people into a false sense of security.

If you really care about security then using secrecy should be only one small part of a comprehensive hardening effort. Until such effort materializes I feel like using secrecy is just security theater.

The one thing I can get behind with secrecy is that it prevents logging of sensitive information, which is pretty important. If that was all it purported to do I'd include it in a heartbeat.

@scott-rc
Copy link
Author

@abonander Your concerns are fair and I didn't notice #613 before making this PR.

I'll close this for now.

@scott-rc scott-rc closed this May 26, 2021
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