This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/scripts/create_bucket.sh
Marc 'risson' Schmitt 9619c2433f
root: add support for storing media files in S3
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
2023-12-20 09:44:02 +01:00

17 lines
559 B
Bash

#!/usr/bin/env -S bash -e
AWS_ACCESS_KEY_ID=accessKey1 AWS_SECRET_ACCESS_KEY=secretKey1 aws \
s3api \
--endpoint-url http://localhost:8020 \
create-bucket \
--acl private \
--bucket authentik-media
AWS_ACCESS_KEY_ID=accessKey1 AWS_SECRET_ACCESS_KEY=secretKey1 aws \
s3api \
--endpoint-url http://localhost:8020 \
put-bucket-cors \
--bucket authentik-media \
--cors-configuration \
'{"CORSRules": [{"AllowedOrigins": ["*"], "AllowedHeaders": ["Authorization"], "AllowedMethods": ["GET"], "MaxAgeSeconds": 3000}]}'