Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gorm plugin for encrypted fields #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ismarc
Copy link

@ismarc ismarc commented Apr 19, 2021

This adds a gorm plugin that will automatically encrypt/decrypt
fields if they have silo:"encrypted" tags, using the silo:"aad"
tags as additional data. If encryption/decryption fails, the plugin
will panic so that further processing for writing/returning data
does not occur to prevent accidental writing of encrypted data.

The plugin is added to the db object and initialized within
keystore so it is fully transparent to the rest of the application.

This adds a gorm plugin that will automatically encrypt/decrypt
fields if they have `silo:"encrypted"` tags, using the `silo:"aad"`
tags as additional data.  If encryption/decryption fails, the plugin
will panic so that further processing for writing/returning data
does not occur to prevent accidental writing of encrypted data.

The plugin is added to the db object and initialized within
keystore so it is fully transparent to the rest of the application.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant