Added Swift location security.
When using swift as a backend store a request to the registry may display the swift user's credentials in plaintext. Change this to have the credentials encrypted.
- Jay Pipes
- Stuart McLaren
- Stuart McLaren
- Series goal:
- Accepted for essex
- Milestone target:
- Started by
- Thierry Carrez on 2011-11-14
- Completed by
- Thierry Carrez on 2011-11-15
One potential way to do this would be as follows:
1) introduce a new parameter in glance-api.conf
If present this would signal both that the 'swift_store_key' is
encrypted, and the specified swift_encryptio
the encryption. The swift_encryptio
the swift 'Store'.
If absent behaviour would be unchanged from what it is currently.
2) store the encrypted swift_store_key rather than the plaintext in the
3) decrypt the key when needed using the swift_encryptio
Note that this change is not intended to make the configuration file
more secure, just the location parameter.
Potentially the entire location could be encrypted, alternatively the
user's credentials (username/password) could be padded to a
There are some corner cases at the moment where swift credentials
containing characters which are not 'URL safe' eg '/',':' may not be handled properly.
I'm not intending to handle that here, but this feature should be implemented
not to introduce additional such corner cases if possible.
The python 'Crypto' library's AES function may be the way to go here -- note that this would
add an additional package dependency.
Some additional thoughts from Jay:
* Why just the Swift store? Any location field for any driver may contain sensitive information (creds, filepaths, etc). What about making the configuration file option just "location_
Addressed by: https:/
Adds option to encrypt 'location' metadata.