Encrypt and decrypt Django rest framework field as superuser?

I read the answers here: plaintext API secret and have read about encryption and decryption of API keys and secrets.

In django Rest Framework,

1- store the API key and Secret in plain text in Django REST framework DB.

2- An endpoint, only accessible by superuser(I could limit this further to IP address), gives all users API keys and secrets to be used in another script. TLS communication.

I am not sure if this is the best approach.

Back to Top