diff --git a/Dockerfile b/Dockerfile index 2285f78..54c2662 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,6 +49,8 @@ COPY ./s3-gw/rules.json /config/bearer-rules.json COPY ./s3-gw/regions.json /config/regions.json COPY ./s3-gw/s3-gw-config.yaml /config/s3-gw-config.yaml COPY ./s3-gw/s3-gw-wallet.json /config/s3-gw-wallet.json +COPY ./s3-gw/s3-gw-tls.crt /config/s3-gw-tls.crt +COPY ./s3-gw/s3-gw-tls.key /config/s3-gw-tls.key COPY ./s3-gw/user-wallet.json /config/user-wallet.json COPY ./sn/cli-cfg.yaml /config/cli-cfg-sn.yaml COPY ./sn/wallet.json /config/wallet-sn.json diff --git a/Dockerfile.custom b/Dockerfile.custom index c7c2109..92d4618 100644 --- a/Dockerfile.custom +++ b/Dockerfile.custom @@ -49,6 +49,8 @@ COPY ./s3-gw/rules.json /config/bearer-rules.json COPY ./s3-gw/regions.json /config/regions.json COPY ./s3-gw/s3-gw-config.yaml /config/s3-gw-config.yaml COPY ./s3-gw/s3-gw-wallet.json /config/s3-gw-wallet.json +COPY ./s3-gw/s3-gw-tls.crt /config/s3-gw-tls.crt +COPY ./s3-gw/s3-gw-tls.key /config/s3-gw-tls.key COPY ./s3-gw/user-wallet.json /config/user-wallet.json COPY ./sn/cli-cfg.yaml /config/cli-cfg-sn.yaml COPY ./sn/wallet.json /config/wallet-sn.json diff --git a/Dockerfile.local b/Dockerfile.local index a463d30..b66c3c9 100644 --- a/Dockerfile.local +++ b/Dockerfile.local @@ -34,6 +34,8 @@ COPY ./s3-gw/rules.json /config/bearer-rules.json COPY ./s3-gw/regions.json /config/regions.json COPY ./s3-gw/s3-gw-config.yaml /config/s3-gw-config.yaml COPY ./s3-gw/s3-gw-wallet.json /config/s3-gw-wallet.json +COPY ./s3-gw/s3-gw-tls.crt /config/s3-gw-tls.crt +COPY ./s3-gw/s3-gw-tls.key /config/s3-gw-tls.key COPY ./s3-gw/user-wallet.json /config/user-wallet.json COPY ./sn/cli-cfg.yaml /config/cli-cfg-sn.yaml COPY ./sn/wallet.json /config/wallet-sn.json diff --git a/docker-compose.yml b/docker-compose.yml index 5dbed75..a708b60 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,6 +25,7 @@ services: - "30333:30333" # RPC - "8080:8080" # FrostFS API RPC - "8084:8084" # S3 Gateway + - "8184:8184" # S3 Gateway with TLS - "16513:16513" # Control service volumes: diff --git a/s3-gw/s3-gw-config.yaml b/s3-gw/s3-gw-config.yaml index f61728b..9a4f953 100644 --- a/s3-gw/s3-gw-config.yaml +++ b/s3-gw/s3-gw-config.yaml @@ -11,6 +11,11 @@ peers: server: - address: 0.0.0.0:8084 + - address: 0.0.0.0:8184 + tls: + enabled: true + cert_file: /config/s3-gw-tls.crt + key_file: /config/s3-gw-tls.key logger: level: debug diff --git a/s3-gw/s3-gw-tls.crt b/s3-gw/s3-gw-tls.crt new file mode 100644 index 0000000..352408c --- /dev/null +++ b/s3-gw/s3-gw-tls.crt @@ -0,0 +1,36 @@ +-----BEGIN CERTIFICATE----- +MIIGOzCCBCOgAwIBAgIUYWyZ9RMzV7CIRScF85cb8kmjUK4wDQYJKoZIhvcNAQEL +BQAwgawxCzAJBgNVBAYTAlJVMRkwFwYDVQQIDBBTYWludCBQZXRlcnNidXJnMRcw +FQYDVQQHDA5TdC4gUGV0ZXJzYnVyZzEXMBUGA1UECgwOVHJ1ZSBDbG91ZCBMYWIx +FzAVBgNVBAsMDlRydWUgQ2xvdWQgTGFiMRUwEwYDVQQDDAxmcm9zdGZzLmluZm8x +IDAeBgkqhkiG9w0BCQEWEWluZm9AZnJvc3Rmcy5pbmZvMB4XDTI0MTEwODA5MzQ0 +MFoXDTM0MTEwNjA5MzQ0MFowgawxCzAJBgNVBAYTAlJVMRkwFwYDVQQIDBBTYWlu +dCBQZXRlcnNidXJnMRcwFQYDVQQHDA5TdC4gUGV0ZXJzYnVyZzEXMBUGA1UECgwO +VHJ1ZSBDbG91ZCBMYWIxFzAVBgNVB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tdn2u5QpQd +KwO98HDpC5jVb77Z8Bthf0eKrqzjbr+m7WFa22CPgyav8vGlQ+sv1+4HjHclkeW8 +CEtf4k6YjM3//C03JN93Yvsu4zmGbFLkSUVujwLOx/LzF+PbWv6d6tbP8QNufaBx +vk74xc8icHBkyNnYhUddBXimpJEKAbGiF13Hf6M0Lbx/m8QIQ9P4VVR8FYdygYh3 +n7O7Ivusae3M+fapSYODwtp3OVC6lz07wC0+m+G08h7YBwcC7z+BofFawtilZuRg +bbtoy5PhQTSpLzYOUtJOA5ihM3EqXR4k4/oeitNF78ZZI27p8z2g6YJY9Mjk+AfL +f6jaBCSqJnnPB8NQtLN6VI2C3Q9/glhUkHLZkHs8DMxZsf+PpqjssU5kZGf0Viha +BCeClyHpK/sOWOYTKfprRtfcVEYmW7favXkhdfG3QaWc8bkpvfw7ZEVmfkUJ2iUB +xJ279uDAdnPcqA43Nw6BtRhxV5AVNfAOSzpsH9MIjRes5RS2FcAs/qt9p7ciCh3Z +QsrnZHUvbgpaWMJimS9bxcXAvWwGhjve/OUmpeXMrjrJfsRtjuK/w4sT9wXZUrbj +zp1TkSmKv3w1aF3xTsOv +-----END CERTIFICATE----- diff --git a/s3-gw/s3-gw-tls.key b/s3-gw/s3-gw-tls.key new file mode 100644 index 0000000..71d4a26 --- /dev/null +++ b/s3-gw/s3-gw-tls.key @@ -0,0 +1,52 @@ +-----BEGIN PRIVATE KEY----- +MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQDPq2A1cwJzowas +j/av8iWwXg2vr9GRfWS2L6Ef/drNuF5pMPutiqs/fsX+oWh5FjqNdjNbUHCGrmOq +tR6qcMM2xjoal52fYcmMPUDXOr3pK/dJTyBPRaxICsNoJBb2Ohh8iUpOM4FLVYEl +tZ80SpdHaV3r8v/HkOjI0nn4OR2dP6WPWwILLi4ogOCsz3a/o7kwcKNmTpOn23m3 +rgRuhcdbPeAkcJ0rvpWy1JYInoe7DqsdyopNuiVnLQKIz0b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