Closed (fixed)
Project:
Key
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
8 Feb 2016 at 20:41 UTC
Updated:
3 Mar 2016 at 17:14 UTC
Jump to comment: Most recent, Most recent file
Key will include a generic Encryption key type that can be extended by other plugins, such as AES Encryption. However, the Encrypt module should define that key type, so it should be removed from Key.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | remove_aes_encryption-2664912-3.patch | 2.65 KB | rlhawk |
Comments
Comment #2
rlhawkSome of the functionality currently in AES Encryption should be moved into the generic Encryption key type. I'm thinking these ones:
buildConfigurationForm: This should be a form with one field for key size.validateConfigurationForm: This is empty, because validation of the form is optional.submitConfigurationForm: Default behavior, take the form values and using them to set the plugin configuration.generateKeyValue: This looks for a field named 'key_size' in the configuration and, if it exists, uses its value to generate a random key of the specified length.validateKeyValue: This looks for a field named 'key_size' in the form values and, if it exists, uses the value to validate the key size.Comment #3
rlhawkHere's the patch to remove the AES Encryption plugin from Key.
Comment #4
rlhawkComment #5
nerdsteinAssigning to myself to review.
Comment #6
nerdsteinAll automated tests passed.
Smoke test failed due to no data cleanup.
I had an existing Key with type aes_encryption.
I'm wondering if we should add a cleanup routine to delete existing keys that match.
Thoughts?
Comment #7
nerdsteinWhen reversing the patch, I was able to delete the config entity with type aes_encryption. I reloaded the patch and smoke tested, looks good.
Comment #8
svendecabooterAn update hook could be added in order to remove keys that have key type "aes_encryption".
Be aware, however, of the scenario when this update hook gets called after the Encrypt-module version of key type "aes_encryption" (see https://github.com/d8-contrib-modules/encrypt/pull/82) would already be enabled. In that case, it would remove valid keys.
Comment #9
svendecabooterPerhaps a clear warning in the release notes for the next version of Key 8.x could be sufficient, given the (currently) low number of implementations?
Comment #10
rlhawkI think that's a good plan.
Comment #11
svendecabooterSeems like we can get this in then?
The same keytype is already defined in the current D8 version of Encrypt BTW.
Comment #13
rlhawkCommitted.