tosdr / edit.tosdr.org

👍👎 A new web app to rate services
https://edit.tosdr.org
GNU Affero General Public License v3.0
213 stars 37 forks source link

Update sendgrid config to use API key + 2FA #949

Closed michielbdejong closed 3 years ago

michielbdejong commented 3 years ago

We need to enable 2FA before 9 December.

But to do that we need to migrate away from https://github.com/tosdr/edit.tosdr.org/blob/master/config/environments/production.rb#L16 See https://sendgrid.com/docs/for-developers/sending-email/authentication/#basic-authentication for the deprecation notice about it. See https://github.com/sendgrid/sendgrid-ruby for how to use the sendgrid-ruby gem.

michielbdejong commented 3 years ago

From https://sendgrid.com/blog/web-api-or-smtp-relay-how-should-you-send-your-mail/ I see that SMTP doesn't allow using an API key, and it doesn't say they are deprecating it, meaning it must be OK for us to keep using SMTP but without API key. So I'll enable 2FA to my personal mobile phone and then we double-check if emails stop on 9 December, but I think it will be fine.

Now also seeing "By enabling Two-Factor Authentication, SendGrid will reject any attempts to use basic authentication over the API for this user. " so I assume SMTP will be fine.

michielbdejong commented 3 years ago

done