-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add encrypted_string as a possible type for Preferences
The new type encrypted_string encrypt the content of the preferences, the original value can be read-only using the preferences accessor method. It's still recommended to use env variables to manage secrets, but if it's needed to save the preference on the database, now it's possible to use encrypted_string to add a security layer. The encryption key can be passed using the encryption_key option of the preference, if the option is missing the system fallback to the env variable SOLIDUS_PREFERENCES_MASTER_KEY, it even this env variable is missing the system will use the Rails master key. If a default value it's assigned to an encrypted_string preference, this will not be encrypted.
- Loading branch information
1 parent
97f6fe3
commit e05da68
Showing
3 changed files
with
75 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters