Menu

Can You Protect Sensitive Data Even if Your Database Is Compromised? Column Encryption with AWS KMS
📰

Can You Protect Sensitive Data Even if Your Database Is Compromised? Column Encryption with AWS KMS

DEV Community: encryption·kawasaki031677·2 days ago
#dtJNB3Ae
Long article (709 words) — no AI summary yet.
Reading 0:00
15s threshold

Introduction

RDS and Aurora support storage encryption, but if someone gains database access privileges, there's a risk they could view the data in plaintext.

This article introduces how to encrypt specific columns before storing them in a database using AWS KMS and AWS Encryption SDK.

1. How Encryption Works

We'll use envelope encryption in this approach.

We generate a data key with KMS and then use that data key to encrypt data on the application side.

Generate a data key with KMS

Encrypt the target data with the data key

Store both the encrypted data and encrypted data key in the database

On read, decrypt the data key with KMS, then decrypt the data itself

The key point here is that KMS protects the data key rather than directly encrypting the data itself.

2.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.