generalpiston / typeorm-encrypted

Encrypted field for typeorm.
MIT License
75 stars 19 forks source link

[Question] How is key rotation handled? #60

Closed bombillazo closed 1 year ago

bombillazo commented 1 year ago

Hey, if one is using key rotation for improved security, how does that affect the use of this package?

generalpiston commented 1 year ago

@bombillazo key rotation requires re-encryption of encrypted columns. I believe https://github.com/generalpiston/typeorm-encrypted/issues/37 is intended to help, but we haven't implemented it yet.

Another option is to separate data encryption keys and key encryption keys and rotate the key encryption keys, only. Performing a shallow rotation like this usually meets company and auditor requirements IIRC.

bombillazo commented 1 year ago

After reading more on the topic seems like this is the common approach! Thanks for answering!

generalpiston commented 1 year ago

No problem.

Let's use https://github.com/generalpiston/typeorm-encrypted/issues/61 to document how to handle key rotation.

texiontech commented 1 year ago

any update

generalpiston commented 1 year ago

@texiontech the key rotation issue is tracked under https://github.com/generalpiston/typeorm-encrypted/issues/61