Problem/Motivation
Per research done in #2894029: Security Analysis, Web Page Archive capture utilities should either encrypt API keys or exclude them from config exports altogether.
Proposed resolution
Use a hybrid of the approaches taken #2741225: Encrypt Akamai API credentials so they are not stored in plain text and #3041301: Setup Key module integration
Remaining tasks
None
User interface changes
This was the original UI:
This is the proposed change:
API changes
None
Data model changes
Change config entities storage from:
'wpt_api' => 'X.xxxxxxxxxxxxxxxxxxxxxxxx'
to:
api => [
'storage_method' => 'plaintext' or 'key'
'key_module' => key entity ID or '' (depending on storage method)
'key_plaintext' => 'X.xxxxxxxxxxxxxxxxxxxxxxxx' or '' (depending on storage method)
]
Release notes snippet
Adds optional support for the key module for more secure handling of api keys.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | old-storage-method.PNG | 10.19 KB | WidgetsBurritos |
| #5 | plaintext-storage.PNG | 33.36 KB | WidgetsBurritos |
| #5 | key-module-storage.PNG | 30.62 KB | WidgetsBurritos |
| #4 | 2907871-key-module-support-4.patch | 18.33 KB | WidgetsBurritos |
Comments
Comment #2
bighappyface commentedPropose to introduce encryption as seen in
Drupal\marketo_ma\Form\MarketoMASettingshttp://cgit.drupalcode.org/marketo_ma/tree/src/Form/MarketoMASettings.ph...
Comment #3
WidgetsBurritos commentedPer previous work done in #2741225: Encrypt Akamai API credentials so they are not stored in plain text and #3041301: Setup Key module integration, I'm proposing we provide support for handling the keys using the key module.
Unlike accessibility_scanner, I want to keep this dependency optional to avoid interfering with anybody who has been using this prior. I basically ripped off the work we did in the akamai module to provide a wrapper around the key module
Comment #4
WidgetsBurritos commentedComment #5
WidgetsBurritos commentedThis was the original UI:

This is the proposed change:


Comment #6
pobster commentedLGTM, code and tests make sense +1
Comment #8
WidgetsBurritos commentedComment #9
WidgetsBurritos commented