0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-04-21 03:06:08 +02:00

Compare commits

...

4 commits

Author SHA1 Message Date
Hector Manuel
c0558d1168
Merge 6c82d82549 into 7da5fa1c6b 2025-04-11 01:32:41 +00:00
Hector Manuel
6c82d82549
Merge branch 'master' into feat/support-aws-session-token 2025-03-06 15:36:50 +01:00
Hector Valcarcel
ecbd2ab480 docs(readme): add new variable for the Object Storage section
- variable "OBJECTSTORE_S3_SESSION_TOKEN" to support AWS STS auth workflow

Signed-off-by: Hector Valcarcel <hmvalcarcel@gmail.com>
2025-02-10 10:28:44 +01:00
Hector Valcarcel
dc7b7af9eb feat(s3_config): add support for S3 session token configuration
- Introduced logic to handle S3 session token using environment variables.
- Supports session token from both a file and direct environment variable.
- Defaults to an empty token if no value is provided.

Signed-off-by: Hector Valcarcel <hmvalcarcel@gmail.com>
2025-02-10 10:28:44 +01:00
2 changed files with 9 additions and 0 deletions

View file

@ -40,6 +40,14 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) {
$CONFIG['objectstore']['arguments']['secret'] = '';
}
if (getenv('OBJECTSTORE_S3_SESSION_TOKEN_FILE')) {
$CONFIG['objectstore']['arguments']['session_token'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SESSION_TOKEN_FILE')));
} elseif (getenv('OBJECTSTORE_S3_SESSION_TOKEN')) {
$CONFIG['objectstore']['arguments']['session_token'] = getenv('OBJECTSTORE_S3_SESSION_TOKEN');
} else {
$CONFIG['objectstore']['arguments']['session_token'] = '';
}
if (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')) {

View file

@ -282,6 +282,7 @@ To use an external S3 compatible object store as primary storage, set the follow
- `OBJECTSTORE_S3_PORT`: The port that the object storage server is being served over
- `OBJECTSTORE_S3_KEY`: AWS style access key
- `OBJECTSTORE_S3_SECRET`: AWS style secret access key
- `OBJECTSTORE_S3_SESSION_TOKEN`: AWS style session token for STS auth workflows
- `OBJECTSTORE_S3_STORAGE_CLASS`: The storage class to use when adding objects to the bucket
- `OBJECTSTORE_S3_SSL` (default: `true`): Whether or not SSL/TLS should be used to communicate with object storage server
- `OBJECTSTORE_S3_USEPATH_STYLE` (default: `false`): Not required for AWS S3