mirror of
https://github.com/nextcloud/docker.git
synced 2025-01-23 14:13:54 +01:00
Allow setting AWS S3 SSE-C key (#2151)
The AWS S3 SSE-C key for server side encryption can now be set using the environment variable `OBJECTSTORE_S3_SSE_C_KEY`. Signed-off-by: Patrick Hobusch <patrick@hobusch.net>
This commit is contained in:
parent
c88d31e3b8
commit
2e9139bac8
2 changed files with 7 additions and 0 deletions
|
@ -39,4 +39,10 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) {
|
|||
} else {
|
||||
$CONFIG['objectstore']['arguments']['secret'] = '';
|
||||
}
|
||||
|
||||
if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))) {
|
||||
$CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE')));
|
||||
} elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) {
|
||||
$CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -191,6 +191,7 @@ To use an external S3 compatible object store as primary storage, set the follow
|
|||
- `OBJECTSTORE_S3_LEGACYAUTH` (default: `false`): Not required for AWS S3
|
||||
- `OBJECTSTORE_S3_OBJECT_PREFIX` (default: `urn:oid:`): Prefix to prepend to the fileid
|
||||
- `OBJECTSTORE_S3_AUTOCREATE` (default: `true`): Create the container if it does not exist
|
||||
- `OBJECTSTORE_S3_SSE_C_KEY` (not set by default): Base64 encoded key with a maximum length of 32 bytes for server side encryption (SSE-C)
|
||||
|
||||
Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/primary_storage.html#simple-storage-service-s3) for more information.
|
||||
|
||||
|
|
Loading…
Reference in a new issue