Skip to content

Commit fd536f7

Browse files
author
Dmitriy Rabotyagov
committed
Enable encrypted connection to minio
In order to test out server-side encryption we need to use secure connection fisrt. This way we generate self-signed certificates for minio.
1 parent 7be517a commit fd536f7

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

Diff for: .ci.s3cfg

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ add_headers =
66
bucket_location = us-east-1
77
ca_certs_file =
88
cache_file =
9-
check_ssl_certificate = True
9+
check_ssl_certificate = False
1010
check_ssl_hostname = True
1111
cloudfront_host = cloudfront.amazonaws.com
1212
default_mime_type = binary/octet-stream
@@ -67,9 +67,9 @@ stop_on_error = False
6767
storage_class =
6868
urlencoding_mode = normal
6969
use_http_expect = False
70-
use_https = False
70+
use_https = True
7171
use_mime_magic = True
7272
verbosity = WARNING
73-
website_endpoint = http://%(bucket)s.s3-website-%(location)s.amazonaws.com/
73+
website_endpoint = https://%(bucket)s.s3-website-%(location)s.amazonaws.com/
7474
website_error =
7575
website_index = index.html

Diff for: .github/workflows/test.yml

+17-4
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,32 @@ jobs:
2828
with:
2929
path: ~/cache
3030
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.cache-revision }}
31-
- name: Download minio on cache miss
32-
if: steps.cache-minio.outputs.cache-hit != 'true'
31+
- name: Cache certgen
32+
id: cache-certgen
33+
uses: actions/cache@v2
34+
env:
35+
cache-name: cache-certgen
36+
with:
37+
path: ~/cache
38+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.cache-revision }}
39+
- name: Download minio and certgen on cache miss
40+
if: steps.cache-minio.outputs.cache-hit != 'true' || steps.cache-certgen.outputs.cache-hit != 'true'
3341
run: |
3442
mkdir -p ~/cache
3543
test ! -e ~/cache/minio && wget -O ~/cache/minio https://dl.minio.io/server/minio/release/linux-amd64/minio || echo "Minio already in cache"
44+
test ! -e ~/cache/certgen && wget -O ~/cache/certgen https://github.com/minio/certgen/releases/download/v0.0.2/certgen-linux-amd64 || echo "Certgen already in cache"
3645
- name: Start a local instance of minio
3746
run: |
3847
export AWS_ACCESS_KEY_ID=Q3AM3UQ867SPQQA43P2F
3948
export AWS_SECRET_ACCESS_KEY=zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG
40-
export MINIO_ACCESS_KEY=Q3AM3UQ867SPQQA43P2F
41-
export MINIO_SECRET_KEY=zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG
49+
export MINIO_ROOT_USER=Q3AM3UQ867SPQQA43P2F
50+
export MINIO_ROOT_PASSWORD=zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG
4251
chmod +x ~/cache/minio
52+
chmod +x ~/cache/certgen
4353
mkdir -p ~/minio_tmp
54+
mkdir -p ~/.minio/certs
55+
cd ~/.minio/certs
56+
~/cache/certgen -ca -host "localhost,127.0.0.1,172.17.0.1"
4457
~/cache/minio server ~/minio_tmp &
4558
sleep 4 # give minio some time to start
4659
- name: Run tests

0 commit comments

Comments
 (0)