openedx / wg-security

A repo to keep public issues related to Security Working Group Work
1 stars 0 forks source link

Advise on library for Django model field encryption-at-rest #37

Open pshiu opened 11 months ago

pshiu commented 11 months ago

We received an inquiry about a choosing a library for encrypting Django model fields at rest.

This issue is to perform this research.

Research

Task

Symmetric encryption in DB of stored OAuth client secrets a Django service uses to contact external services.

Recommendation

Use django-fernet-fields-v2.

Threat vector

Context

Alternatives

django-fernet-fields

djfernet

pynacl

django-aesfield

django-fernet-fields-v2 (:star: Recommendation)

django-fernet-encrypted-fields

AWS Secrets Manager

Implementation considerations

Deployment considerations

pshiu commented 11 months ago

Added research to issue description. Submitting for review.

feanil commented 11 months ago

This looks good to me, I agree with the recommendation. Eventually this can be an ADR to https://github.com/openedx/open-edx-proposals/pull/518

jmbowman commented 11 months ago

Arbi-BOM already started switching things to django-fernet-fields-v2 in order to facilitate the Django 4.2 upgrade: https://github.com/edx/upgrades/issues/215 .

pshiu commented 10 months ago

Next steps:

Example of how to make an ADR to an OEP: [example]

Where to add summary of decision in OEP: [GitHub]