Serve files securely from an S3 bucket with expiring links and other restrictions.
Modify the env_file
first and then run it with Docker:
docker run --env-file=env_file --rm -it -p9090:80 s3cr3t/s3cr3t-server
Support for Kubernetes deployment is on the way.
First, install the required requisites for python3 to work.
apt update && apt install python3 python3-pip -y
pip3 install -r requirements.txt
Then, generate a link using the secret-link-generator.py
utility.
Warning: If the -e
argument is not specified, the link will have a default duration of 1h.
./secret-link-generator.py \
-f oneregularfile.tar.gz \
-r 172.17.0.1 \
-u http://localhost:9090 \
-s CHANGEMEforducksake
Will return: http://localhost:9090/sur/oneregularfile.tar.gz?md5=Z8Dwsj1o4aTSbXHsLFeocQ&expires=1587238255
./secret-link-generator.py \
-f oneregularfile.tar.gz \
-u http://localhost:9090 \
-s CHANGEMEforducksake
Will return: http://localhost:9090/su/oneregularfile.tar.gz?md5=sUfTXNUYK3dRNm1jAdmq4A&expires=1587238234
./secret-link-generator.py \
-f oneregularfile.tar.gz \
-u http://localhost:9090 \
-s CHANGEMEforducksake \
-e never
Will return: http://localhost:9090/u/oneregularfile.tar.gz?md5=isbd6KzU2e7BnzgIMpikhQ
./secret-link-generator.py \
-f oneregularfile.tar.gz \
-u http://localhost:9090 \
-s CHANGEMEforducksake \
-e 1609419599
Will return: http://localhost:9090/su/oneregularfile.tar.gz?md5=nUi5yQNGt5O5dkcDQQ9NXA&expires=1609419599