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

E-Mail Hashing - Privacy Improvment #22470

Closed
NilsBaumgartner1994 opened this issue May 12, 2024 · 6 comments
Closed

E-Mail Hashing - Privacy Improvment #22470

NilsBaumgartner1994 opened this issue May 12, 2024 · 6 comments

Comments

@NilsBaumgartner1994
Copy link
Contributor

Describe the Improvement

As users can register via different auth providers as for example Google, their external identifier is their email adress. This works totally fine, but considering privacy policies it would be nice to have an option of a hook to hash the email, adress into a string.

@br41nslug
Copy link
Member

Can you elaborate on how this would work? After the email has been hashed it can no longer be used to send mails to that user like, notifications or password resets 🤔

@NilsBaumgartner1994
Copy link
Contributor Author

These are 2 features currently.
There is a need for the separation of: email address and external identifier.

if you want pseudonym users you would leave out the email adress, users can’t reset password but for SSO logins not necessarily and it would be more privacy policy friendly.

By default the email would be saved

@NilsBaumgartner1994
Copy link
Contributor Author

@br41nslug as some auth. providers like Apple create relay emails for the external identifiers they secure this.

but I don’t see why we could not just save the email address in the email field of the Directus user (or a field like registered with email), and a hashed external identifier.

this would only improve the security. Sure by migrating up, existing instances would hash once the external identifiers.

@br41nslug
Copy link
Member

but I don’t see why we could not just save the email address in the email field of the Directus user (or a field like registered with email), and a hashed external identifier.

You can configure this for the SSO provider your using _IDENTIFIER_KEY and _EMAIL_KEY. Since this seems to already be covered by configuration i'll be closing this issue.

@br41nslug br41nslug closed this as not planned Won't fix, can't repro, duplicate, stale May 14, 2024
@NilsBaumgartner1994
Copy link
Contributor Author

but I don’t see why we could not just save the email address in the email field of the Directus user (or a field like registered with email), and a hashed external identifier.

You can configure this for the SSO provider your using _IDENTIFIER_KEY and _EMAIL_KEY. Since this seems to already be covered by configuration i'll be closing this issue.

But the identifier key will not be hashed? For example for the Google login?

@br41nslug
Copy link
Member

Identifiers will not be hashed no, and shouldnt be necessary if you're not using the email or another privacy sensitive key. This can however be achieved using flows/hooks by hooking into the auth.create/auth.update events. To implement this hashing in core more than a "tiny tweak" and i want to ask you to make a proper feature request for that as all various SSO providers need to be considered for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

No branches or pull requests

2 participants