Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e0ff6623bb | ||
|
|
3d59e9ac30 | ||
|
|
cff712f071 | ||
|
|
b8bca9d2fe | ||
|
|
a6ccae52d2 | ||
|
|
bdfa6dc9bf | ||
|
|
6eb5731eb5 |
@@ -47,12 +47,12 @@ var serverCmd = cli.Command{
|
|||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "tls-host",
|
Name: "tls-host",
|
||||||
Value: restapi.GetSSLHostname(),
|
Value: restapi.GetTLSHostname(),
|
||||||
Usage: "HTTPS server hostname",
|
Usage: "HTTPS server hostname",
|
||||||
},
|
},
|
||||||
cli.IntFlag{
|
cli.IntFlag{
|
||||||
Name: "tls-port",
|
Name: "tls-port",
|
||||||
Value: restapi.GetSSLPort(),
|
Value: restapi.GetTLSPort(),
|
||||||
Usage: "HTTPS server port",
|
Usage: "HTTPS server port",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
|
|||||||
8
go.mod
8
go.mod
@@ -16,14 +16,14 @@ require (
|
|||||||
github.com/jessevdk/go-flags v1.4.0
|
github.com/jessevdk/go-flags v1.4.0
|
||||||
github.com/minio/cli v1.22.0
|
github.com/minio/cli v1.22.0
|
||||||
github.com/minio/kes v0.11.0
|
github.com/minio/kes v0.11.0
|
||||||
github.com/minio/mc v0.0.0-20200725183142-90d22b271f60
|
github.com/minio/mc v0.0.0-20200808005614-7e52c104bee1
|
||||||
github.com/minio/minio v0.0.0-20200725154241-abbf6ce6ccf8
|
github.com/minio/minio v0.0.0-20200808024306-2a9819aff876
|
||||||
github.com/minio/minio-go/v7 v7.0.2
|
github.com/minio/minio-go/v7 v7.0.5-0.20200807085956-d7db33ea7618
|
||||||
github.com/minio/operator v0.0.0-20200806194125-c2ff646f4af1
|
github.com/minio/operator v0.0.0-20200806194125-c2ff646f4af1
|
||||||
github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 // indirect
|
github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 // indirect
|
||||||
github.com/stretchr/testify v1.6.1
|
github.com/stretchr/testify v1.6.1
|
||||||
github.com/unrolled/secure v1.0.7
|
github.com/unrolled/secure v1.0.7
|
||||||
golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899
|
golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de
|
||||||
golang.org/x/net v0.0.0-20200707034311-ab3426394381
|
golang.org/x/net v0.0.0-20200707034311-ab3426394381
|
||||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
|
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
|
||||||
gopkg.in/yaml.v2 v2.3.0
|
gopkg.in/yaml.v2 v2.3.0
|
||||||
|
|||||||
35
go.sum
35
go.sum
@@ -465,24 +465,26 @@ github.com/minio/highwayhash v1.0.0 h1:iMSDhgUILCr0TNm8LWlSjF8N0ZIj2qbO8WHp6Q/J2
|
|||||||
github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc=
|
github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc=
|
||||||
github.com/minio/kes v0.11.0 h1:8ma6OCVSxKT50b1uYXLJro3m7PmZtCLxBaTddQexI5k=
|
github.com/minio/kes v0.11.0 h1:8ma6OCVSxKT50b1uYXLJro3m7PmZtCLxBaTddQexI5k=
|
||||||
github.com/minio/kes v0.11.0/go.mod h1:mTF1Bv8YVEtQqF/B7Felp4tLee44Pp+dgI0rhCvgNg8=
|
github.com/minio/kes v0.11.0/go.mod h1:mTF1Bv8YVEtQqF/B7Felp4tLee44Pp+dgI0rhCvgNg8=
|
||||||
github.com/minio/mc v0.0.0-20200725183142-90d22b271f60 h1:LevaZ33nx+rUzRsuU7rVvqXUP7VCu2BQanhITw4Z9rA=
|
github.com/minio/mc v0.0.0-20200808005614-7e52c104bee1 h1:OrcFWsUIzKoXeIXVReZ7AryDtbPBLtkjDDOBnuU9RWY=
|
||||||
github.com/minio/mc v0.0.0-20200725183142-90d22b271f60/go.mod h1:Hvnyrb/NMM+pJ53JO/J3jxGtwPDYJh7K6c1D+RR2h2g=
|
github.com/minio/mc v0.0.0-20200808005614-7e52c104bee1/go.mod h1:OGP9+cwQ174WKwZTgJOIFstVv19CH0wdSDZSG6NyTuE=
|
||||||
github.com/minio/md5-simd v1.1.0 h1:QPfiOqlZH+Cj9teu0t9b1nTBfPbyTl16Of5MeuShdK4=
|
github.com/minio/md5-simd v1.1.0 h1:QPfiOqlZH+Cj9teu0t9b1nTBfPbyTl16Of5MeuShdK4=
|
||||||
github.com/minio/md5-simd v1.1.0/go.mod h1:XpBqgZULrMYD3R+M28PcmP0CkI7PEMzB3U77ZrKZ0Gw=
|
github.com/minio/md5-simd v1.1.0/go.mod h1:XpBqgZULrMYD3R+M28PcmP0CkI7PEMzB3U77ZrKZ0Gw=
|
||||||
github.com/minio/minio v0.0.0-20200722004956-c43da3005ae8/go.mod h1:Eu2KC2p+vW03rnYY/6R/D+QduPB7/j4kBaVA/EDLjWM=
|
|
||||||
github.com/minio/minio v0.0.0-20200723003940-b9be841fd222 h1:+XFGpEsqmA033nDX8LtjyPZy01Shivf6E2OL67WoGiE=
|
github.com/minio/minio v0.0.0-20200723003940-b9be841fd222 h1:+XFGpEsqmA033nDX8LtjyPZy01Shivf6E2OL67WoGiE=
|
||||||
github.com/minio/minio v0.0.0-20200723003940-b9be841fd222/go.mod h1:Eu2KC2p+vW03rnYY/6R/D+QduPB7/j4kBaVA/EDLjWM=
|
github.com/minio/minio v0.0.0-20200723003940-b9be841fd222/go.mod h1:Eu2KC2p+vW03rnYY/6R/D+QduPB7/j4kBaVA/EDLjWM=
|
||||||
github.com/minio/minio v0.0.0-20200725154241-abbf6ce6ccf8 h1:H0tUGnx1zkZCtqQp3LuV2GNjOasrJ9gmvlwOeDJDvzI=
|
github.com/minio/minio v0.0.0-20200807001021-adcaa6f9de88 h1:v2mCqNx6N02jcYHWjMPHdTN9+ogxEN9L+cCQJ+8j2AU=
|
||||||
github.com/minio/minio v0.0.0-20200725154241-abbf6ce6ccf8/go.mod h1:NBWtYp4t5pt3TmbpW7FHChY6ZCs8n/gTRxZCF0mCcn8=
|
github.com/minio/minio v0.0.0-20200807001021-adcaa6f9de88/go.mod h1:r+PkhkMRxudvboO0Wa7F7nMiDfI8Rz1HZSza0uIhtMU=
|
||||||
|
github.com/minio/minio v0.0.0-20200808024306-2a9819aff876 h1:e5114Mb8Evzt1QsA8b6PrXZ1KqBLts0CokpKeU1DV2U=
|
||||||
|
github.com/minio/minio v0.0.0-20200808024306-2a9819aff876/go.mod h1:r+PkhkMRxudvboO0Wa7F7nMiDfI8Rz1HZSza0uIhtMU=
|
||||||
github.com/minio/minio-go/v7 v7.0.1/go.mod h1:dJ80Mv2HeGkYLH1sqS/ksz07ON6csH3S6JUMSQ2zAns=
|
github.com/minio/minio-go/v7 v7.0.1/go.mod h1:dJ80Mv2HeGkYLH1sqS/ksz07ON6csH3S6JUMSQ2zAns=
|
||||||
github.com/minio/minio-go/v7 v7.0.2-0.20200722162308-e0105ca08252 h1:V2JkMDoSmEIhRcMJwX3qeJVOzy1B5bHpHbZaQu77vbs=
|
|
||||||
github.com/minio/minio-go/v7 v7.0.2-0.20200722162308-e0105ca08252/go.mod h1:dJ80Mv2HeGkYLH1sqS/ksz07ON6csH3S6JUMSQ2zAns=
|
|
||||||
github.com/minio/minio-go/v7 v7.0.2 h1:P/7wFd4KrRBHVo7AKdcqO+9ReoS+XpMjfRFoE5quH0E=
|
github.com/minio/minio-go/v7 v7.0.2 h1:P/7wFd4KrRBHVo7AKdcqO+9ReoS+XpMjfRFoE5quH0E=
|
||||||
github.com/minio/minio-go/v7 v7.0.2/go.mod h1:dJ80Mv2HeGkYLH1sqS/ksz07ON6csH3S6JUMSQ2zAns=
|
github.com/minio/minio-go/v7 v7.0.2/go.mod h1:dJ80Mv2HeGkYLH1sqS/ksz07ON6csH3S6JUMSQ2zAns=
|
||||||
|
github.com/minio/minio-go/v7 v7.0.3/go.mod h1:TA0CQCjJZHM5SJj9IjqR0NmpmQJ6bCbXifAJ3mUU6Hw=
|
||||||
|
github.com/minio/minio-go/v7 v7.0.5-0.20200807085956-d7db33ea7618 h1:8iTb0TFs6kDGAUnhI/s2QCZOYcSTtYmY9dF+Cbc0WJo=
|
||||||
|
github.com/minio/minio-go/v7 v7.0.5-0.20200807085956-d7db33ea7618/go.mod h1:CSt2ETZNs+bIIhWTse0mcZKZWMGrFU7Er7RR0TmkDYk=
|
||||||
github.com/minio/operator v0.0.0-20200806194125-c2ff646f4af1 h1:ijXSIPjn/GZx1+RW1HQpScoifLNr8lVw5LNVKxysMWg=
|
github.com/minio/operator v0.0.0-20200806194125-c2ff646f4af1 h1:ijXSIPjn/GZx1+RW1HQpScoifLNr8lVw5LNVKxysMWg=
|
||||||
github.com/minio/operator v0.0.0-20200806194125-c2ff646f4af1/go.mod h1:V8RL9xPw3C9rC7DuEy7JHeSiOlTWvQhZvh2+YySBFbk=
|
github.com/minio/operator v0.0.0-20200806194125-c2ff646f4af1/go.mod h1:V8RL9xPw3C9rC7DuEy7JHeSiOlTWvQhZvh2+YySBFbk=
|
||||||
github.com/minio/selfupdate v0.3.0 h1:1qfaZscU3hWwX1cF5m5Dov8Z5aZNvPHk9LROzIkas1k=
|
github.com/minio/selfupdate v0.3.1 h1:BWEFSNnrZVMUWXbXIgLDNDjbejkmpAmZvy/nCz1HlEs=
|
||||||
github.com/minio/selfupdate v0.3.0/go.mod h1:b8ThJzzH7u2MkF6PcIra7KaXO9Khf6alWPvMSyTDCFM=
|
github.com/minio/selfupdate v0.3.1/go.mod h1:b8ThJzzH7u2MkF6PcIra7KaXO9Khf6alWPvMSyTDCFM=
|
||||||
github.com/minio/sha256-simd v0.1.1 h1:5QHSlgo3nt5yKOJrC7W8w7X+NFl8cMPZm96iu8kKUJU=
|
github.com/minio/sha256-simd v0.1.1 h1:5QHSlgo3nt5yKOJrC7W8w7X+NFl8cMPZm96iu8kKUJU=
|
||||||
github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM=
|
github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM=
|
||||||
github.com/minio/simdjson-go v0.1.5-0.20200303142138-b17fe061ea37 h1:pDeao6M5AEd8hwTtGmE0pVKomlL56JFRa5SiXDZAuJE=
|
github.com/minio/simdjson-go v0.1.5-0.20200303142138-b17fe061ea37 h1:pDeao6M5AEd8hwTtGmE0pVKomlL56JFRa5SiXDZAuJE=
|
||||||
@@ -599,6 +601,8 @@ github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR
|
|||||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||||
github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik=
|
github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik=
|
||||||
github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
|
github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
|
||||||
|
github.com/rs/xid v1.2.1 h1:mhH9Nq+C1fY2l1XIpgxIiUOfNpRBYH1kKcr+qfKgjRc=
|
||||||
|
github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
|
||||||
github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
||||||
github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk=
|
github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk=
|
||||||
github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc=
|
github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc=
|
||||||
@@ -674,6 +678,7 @@ github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0
|
|||||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8=
|
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8=
|
||||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
||||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
|
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0=
|
go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0=
|
||||||
go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
|
go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
|
||||||
go.etcd.io/etcd/v3 v3.3.0-rc.0.0.20200707003333-58bb8ae09f8e h1:HZQLoe71Q24wVyDrGBRcVuogx32U+cPlcm/WoSLUI6c=
|
go.etcd.io/etcd/v3 v3.3.0-rc.0.0.20200707003333-58bb8ae09f8e h1:HZQLoe71Q24wVyDrGBRcVuogx32U+cPlcm/WoSLUI6c=
|
||||||
@@ -719,6 +724,8 @@ golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPh
|
|||||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||||
golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899 h1:DZhuSZLsGlFL4CmhA8BcRA0mnthyA/nZ00AqCUo7vHg=
|
golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899 h1:DZhuSZLsGlFL4CmhA8BcRA0mnthyA/nZ00AqCUo7vHg=
|
||||||
golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||||
|
golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de h1:ikNHVSjEfnvz6sxdSPCaPt572qowuyMDMJLLm3Db3ig=
|
||||||
|
golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||||
@@ -729,6 +736,8 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl
|
|||||||
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
|
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
|
||||||
golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ=
|
golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ=
|
||||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||||
|
golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
|
||||||
|
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||||
golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
@@ -752,6 +761,7 @@ golang.org/x/net v0.0.0-20191112182307-2180aed22343/go.mod h1:z5CRVTTTmAJ677TzLL
|
|||||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
golang.org/x/net v0.0.0-20200602114024-627f9648deb9 h1:pNX+40auqi2JqRfOP1akLGtYcn15TUbkhwuCO3foqqM=
|
golang.org/x/net v0.0.0-20200602114024-627f9648deb9 h1:pNX+40auqi2JqRfOP1akLGtYcn15TUbkhwuCO3foqqM=
|
||||||
golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||||
|
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||||
golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU=
|
golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU=
|
||||||
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||||
@@ -767,6 +777,7 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEha
|
|||||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY=
|
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY=
|
||||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
|
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
@@ -799,8 +810,8 @@ golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20u
|
|||||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae h1:Ih9Yo4hSPImZOpfGuA4bR/ORKTAbhZo2AbWNRCnevdo=
|
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae h1:Ih9Yo4hSPImZOpfGuA4bR/ORKTAbhZo2AbWNRCnevdo=
|
||||||
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20200720211630-cb9d2d5c5666 h1:gVCS+QOncANNPlmlO1AhlU3oxs4V9z+gTtPwIk3p2N8=
|
golang.org/x/sys v0.0.0-20200806125547-5acd03effb82 h1:6cBnXxYO+CiRVrChvCosSv7magqTPbyAgz1M8iOv5wM=
|
||||||
golang.org/x/sys v0.0.0-20200720211630-cb9d2d5c5666/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200806125547-5acd03effb82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
@@ -835,6 +846,8 @@ golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtn
|
|||||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.0.0-20200425043458-8463f397d07c h1:iHhCR0b26amDCiiO+kBguKZom9aMF+NrFxh9zeKR/XU=
|
golang.org/x/tools v0.0.0-20200425043458-8463f397d07c h1:iHhCR0b26amDCiiO+kBguKZom9aMF+NrFxh9zeKR/XU=
|
||||||
golang.org/x/tools v0.0.0-20200425043458-8463f397d07c/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
golang.org/x/tools v0.0.0-20200425043458-8463f397d07c/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||||
|
golang.org/x/tools v0.0.0-20200724172932-b5fc9d354d99 h1:OHn441rq5CeM5r1xJ0OmY7lfdTvnedi6k+vQiI7G9b8=
|
||||||
|
golang.org/x/tools v0.0.0-20200724172932-b5fc9d354d99/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ spec:
|
|||||||
serviceAccountName: console-sa
|
serviceAccountName: console-sa
|
||||||
containers:
|
containers:
|
||||||
- name: console
|
- name: console
|
||||||
image: minio/console:v0.3.9
|
image: minio/console:v0.3.11
|
||||||
imagePullPolicy: "IfNotPresent"
|
imagePullPolicy: "IfNotPresent"
|
||||||
args:
|
args:
|
||||||
- server
|
- server
|
||||||
|
|||||||
@@ -426,7 +426,7 @@ spec:
|
|||||||
externalCertSecret:
|
externalCertSecret:
|
||||||
description:
|
description:
|
||||||
ExternalCertSecret allows a user to specify custom
|
ExternalCertSecret allows a user to specify custom
|
||||||
CA certificate, and private key for group replication SSL.
|
CA certificate, and private key for group replication TLS.
|
||||||
properties:
|
properties:
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ spec:
|
|||||||
serviceAccountName: console-sa
|
serviceAccountName: console-sa
|
||||||
containers:
|
containers:
|
||||||
- name: console
|
- name: console
|
||||||
image: minio/console:v0.3.9
|
image: minio/console:v0.3.11
|
||||||
imagePullPolicy: "IfNotPresent"
|
imagePullPolicy: "IfNotPresent"
|
||||||
env:
|
env:
|
||||||
- name: CONSOLE_OPERATOR_MODE
|
- name: CONSOLE_OPERATOR_MODE
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ type CreateTenantRequest struct {
|
|||||||
// enable console
|
// enable console
|
||||||
EnableConsole *bool `json:"enable_console,omitempty"`
|
EnableConsole *bool `json:"enable_console,omitempty"`
|
||||||
|
|
||||||
// enable ssl
|
// enable tls
|
||||||
EnableSsl *bool `json:"enable_ssl,omitempty"`
|
EnableTLS *bool `json:"enable_tls,omitempty"`
|
||||||
|
|
||||||
// encryption
|
// encryption
|
||||||
Encryption *EncryptionConfiguration `json:"encryption,omitempty"`
|
Encryption *EncryptionConfiguration `json:"encryption,omitempty"`
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ import (
|
|||||||
"github.com/go-openapi/errors"
|
"github.com/go-openapi/errors"
|
||||||
"github.com/go-openapi/strfmt"
|
"github.com/go-openapi/strfmt"
|
||||||
"github.com/go-openapi/swag"
|
"github.com/go-openapi/swag"
|
||||||
"github.com/go-openapi/validate"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// EncryptionConfiguration encryption configuration
|
// EncryptionConfiguration encryption configuration
|
||||||
@@ -38,7 +37,7 @@ type EncryptionConfiguration struct {
|
|||||||
Aws *AwsConfiguration `json:"aws,omitempty"`
|
Aws *AwsConfiguration `json:"aws,omitempty"`
|
||||||
|
|
||||||
// client
|
// client
|
||||||
Client *EncryptionConfigurationClient `json:"client,omitempty"`
|
Client *KeyPairConfiguration `json:"client,omitempty"`
|
||||||
|
|
||||||
// gemalto
|
// gemalto
|
||||||
Gemalto *GemaltoConfiguration `json:"gemalto,omitempty"`
|
Gemalto *GemaltoConfiguration `json:"gemalto,omitempty"`
|
||||||
@@ -47,7 +46,7 @@ type EncryptionConfiguration struct {
|
|||||||
Image string `json:"image,omitempty"`
|
Image string `json:"image,omitempty"`
|
||||||
|
|
||||||
// server
|
// server
|
||||||
Server *EncryptionConfigurationServer `json:"server,omitempty"`
|
Server *KeyPairConfiguration `json:"server,omitempty"`
|
||||||
|
|
||||||
// vault
|
// vault
|
||||||
Vault *VaultConfiguration `json:"vault,omitempty"`
|
Vault *VaultConfiguration `json:"vault,omitempty"`
|
||||||
@@ -190,139 +189,3 @@ func (m *EncryptionConfiguration) UnmarshalBinary(b []byte) error {
|
|||||||
*m = res
|
*m = res
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// EncryptionConfigurationClient encryption configuration client
|
|
||||||
//
|
|
||||||
// swagger:model EncryptionConfigurationClient
|
|
||||||
type EncryptionConfigurationClient struct {
|
|
||||||
|
|
||||||
// crt
|
|
||||||
// Required: true
|
|
||||||
Crt *string `json:"crt"`
|
|
||||||
|
|
||||||
// key
|
|
||||||
// Required: true
|
|
||||||
Key *string `json:"key"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this encryption configuration client
|
|
||||||
func (m *EncryptionConfigurationClient) Validate(formats strfmt.Registry) error {
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
if err := m.validateCrt(formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := m.validateKey(formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *EncryptionConfigurationClient) validateCrt(formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
if err := validate.Required("client"+"."+"crt", "body", m.Crt); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *EncryptionConfigurationClient) validateKey(formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
if err := validate.Required("client"+"."+"key", "body", m.Key); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *EncryptionConfigurationClient) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *EncryptionConfigurationClient) UnmarshalBinary(b []byte) error {
|
|
||||||
var res EncryptionConfigurationClient
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// EncryptionConfigurationServer encryption configuration server
|
|
||||||
//
|
|
||||||
// swagger:model EncryptionConfigurationServer
|
|
||||||
type EncryptionConfigurationServer struct {
|
|
||||||
|
|
||||||
// crt
|
|
||||||
// Required: true
|
|
||||||
Crt *string `json:"crt"`
|
|
||||||
|
|
||||||
// key
|
|
||||||
// Required: true
|
|
||||||
Key *string `json:"key"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this encryption configuration server
|
|
||||||
func (m *EncryptionConfigurationServer) Validate(formats strfmt.Registry) error {
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
if err := m.validateCrt(formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := m.validateKey(formats); err != nil {
|
|
||||||
res = append(res, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *EncryptionConfigurationServer) validateCrt(formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
if err := validate.Required("server"+"."+"crt", "body", m.Crt); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *EncryptionConfigurationServer) validateKey(formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
if err := validate.Required("server"+"."+"key", "body", m.Key); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *EncryptionConfigurationServer) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *EncryptionConfigurationServer) UnmarshalBinary(b []byte) error {
|
|
||||||
var res EncryptionConfigurationServer
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -130,8 +130,8 @@ type IdpConfigurationActiveDirectory struct {
|
|||||||
// server insecure
|
// server insecure
|
||||||
ServerInsecure bool `json:"server_insecure,omitempty"`
|
ServerInsecure bool `json:"server_insecure,omitempty"`
|
||||||
|
|
||||||
// skip ssl verification
|
// skip tls verification
|
||||||
SkipSslVerification bool `json:"skip_ssl_verification,omitempty"`
|
SkipTLSVerification bool `json:"skip_tls_verification,omitempty"`
|
||||||
|
|
||||||
// url
|
// url
|
||||||
// Required: true
|
// Required: true
|
||||||
|
|||||||
98
models/key_pair_configuration.go
Normal file
98
models/key_pair_configuration.go
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
// Code generated by go-swagger; DO NOT EDIT.
|
||||||
|
|
||||||
|
// This file is part of MinIO Console Server
|
||||||
|
// Copyright (c) 2020 MinIO, Inc.
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Affero General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU Affero General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
|
||||||
|
package models
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
"github.com/go-openapi/validate"
|
||||||
|
)
|
||||||
|
|
||||||
|
// KeyPairConfiguration key pair configuration
|
||||||
|
//
|
||||||
|
// swagger:model keyPairConfiguration
|
||||||
|
type KeyPairConfiguration struct {
|
||||||
|
|
||||||
|
// crt
|
||||||
|
// Required: true
|
||||||
|
Crt *string `json:"crt"`
|
||||||
|
|
||||||
|
// key
|
||||||
|
// Required: true
|
||||||
|
Key *string `json:"key"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this key pair configuration
|
||||||
|
func (m *KeyPairConfiguration) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateCrt(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.validateKey(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *KeyPairConfiguration) validateCrt(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := validate.Required("crt", "body", m.Crt); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *KeyPairConfiguration) validateKey(formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := validate.Required("key", "body", m.Key); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *KeyPairConfiguration) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *KeyPairConfiguration) UnmarshalBinary(b []byte) error {
|
||||||
|
var res KeyPairConfiguration
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
||||||
@@ -26,7 +26,6 @@ import (
|
|||||||
"github.com/go-openapi/errors"
|
"github.com/go-openapi/errors"
|
||||||
"github.com/go-openapi/strfmt"
|
"github.com/go-openapi/strfmt"
|
||||||
"github.com/go-openapi/swag"
|
"github.com/go-openapi/swag"
|
||||||
"github.com/go-openapi/validate"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// TLSConfiguration tls configuration
|
// TLSConfiguration tls configuration
|
||||||
@@ -34,24 +33,22 @@ import (
|
|||||||
// swagger:model tlsConfiguration
|
// swagger:model tlsConfiguration
|
||||||
type TLSConfiguration struct {
|
type TLSConfiguration struct {
|
||||||
|
|
||||||
// crt
|
// console
|
||||||
// Required: true
|
Console *KeyPairConfiguration `json:"console,omitempty"`
|
||||||
Crt *string `json:"crt"`
|
|
||||||
|
|
||||||
// key
|
// minio
|
||||||
// Required: true
|
Minio *KeyPairConfiguration `json:"minio,omitempty"`
|
||||||
Key *string `json:"key"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate validates this tls configuration
|
// Validate validates this tls configuration
|
||||||
func (m *TLSConfiguration) Validate(formats strfmt.Registry) error {
|
func (m *TLSConfiguration) Validate(formats strfmt.Registry) error {
|
||||||
var res []error
|
var res []error
|
||||||
|
|
||||||
if err := m.validateCrt(formats); err != nil {
|
if err := m.validateConsole(formats); err != nil {
|
||||||
res = append(res, err)
|
res = append(res, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := m.validateKey(formats); err != nil {
|
if err := m.validateMinio(formats); err != nil {
|
||||||
res = append(res, err)
|
res = append(res, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,19 +58,37 @@ func (m *TLSConfiguration) Validate(formats strfmt.Registry) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *TLSConfiguration) validateCrt(formats strfmt.Registry) error {
|
func (m *TLSConfiguration) validateConsole(formats strfmt.Registry) error {
|
||||||
|
|
||||||
if err := validate.Required("crt", "body", m.Crt); err != nil {
|
if swag.IsZero(m.Console) { // not required
|
||||||
return err
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Console != nil {
|
||||||
|
if err := m.Console.Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("console")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *TLSConfiguration) validateKey(formats strfmt.Registry) error {
|
func (m *TLSConfiguration) validateMinio(formats strfmt.Registry) error {
|
||||||
|
|
||||||
if err := validate.Required("key", "body", m.Key); err != nil {
|
if swag.IsZero(m.Minio) { // not required
|
||||||
return err
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Minio != nil {
|
||||||
|
if err := m.Minio.Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("minio")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ const AddTenant = ({
|
|||||||
const [accessKey, setAccessKey] = useState<string>("");
|
const [accessKey, setAccessKey] = useState<string>("");
|
||||||
const [secretKey, setSecretKey] = useState<string>("");
|
const [secretKey, setSecretKey] = useState<string>("");
|
||||||
const [enableConsole, setEnableConsole] = useState<boolean>(true);
|
const [enableConsole, setEnableConsole] = useState<boolean>(true);
|
||||||
const [enableSSL, setEnableSSL] = useState<boolean>(false);
|
const [enableTLS, setEnableTLS] = useState<boolean>(false);
|
||||||
const [sizeFactor, setSizeFactor] = useState<string>("Gi");
|
const [sizeFactor, setSizeFactor] = useState<string>("Gi");
|
||||||
const [storageClasses, setStorageClassesList] = useState<Opts[]>([]);
|
const [storageClasses, setStorageClassesList] = useState<Opts[]>([]);
|
||||||
const [validationErrors, setValidationErrors] = useState<any>({});
|
const [validationErrors, setValidationErrors] = useState<any>({});
|
||||||
@@ -274,7 +274,7 @@ const AddTenant = ({
|
|||||||
name: tenantName,
|
name: tenantName,
|
||||||
service_name: tenantName,
|
service_name: tenantName,
|
||||||
image: imageName,
|
image: imageName,
|
||||||
enable_ssl: enableSSL,
|
enable_tls: enableTLS,
|
||||||
enable_console: enableConsole,
|
enable_console: enableConsole,
|
||||||
access_key: accessKey,
|
access_key: accessKey,
|
||||||
secret_key: secretKey,
|
secret_key: secretKey,
|
||||||
@@ -750,17 +750,17 @@ const AddTenant = ({
|
|||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
<CheckboxWrapper
|
<CheckboxWrapper
|
||||||
value="enable_ssl"
|
value="enable_tls"
|
||||||
id="enable_ssl"
|
id="enable_tls"
|
||||||
name="enable_ssl"
|
name="enable_tls"
|
||||||
checked={enableSSL}
|
checked={enableTLS}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const targetD = e.target;
|
const targetD = e.target;
|
||||||
const checked = targetD.checked;
|
const checked = targetD.checked;
|
||||||
|
|
||||||
setEnableSSL(checked);
|
setEnableTLS(checked);
|
||||||
}}
|
}}
|
||||||
label={"Enable SSL"}
|
label={"Enable TLS"}
|
||||||
/>
|
/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
@@ -882,9 +882,9 @@ const AddTenant = ({
|
|||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell align="right" className={classes.tableTitle}>
|
<TableCell align="right" className={classes.tableTitle}>
|
||||||
Enable SSL
|
Enable TLS
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell>{enableSSL ? "Enabled" : "Disabled"}</TableCell>
|
<TableCell>{enableTLS ? "Enabled" : "Disabled"}</TableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell align="right" className={classes.tableTitle}>
|
<TableCell align="right" className={classes.tableTitle}>
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ func getTenantScheme(mi *operator.Tenant) string {
|
|||||||
return scheme
|
return scheme
|
||||||
}
|
}
|
||||||
|
|
||||||
func getTenantAdminClient(ctx context.Context, client K8sClient, namespace, tenantName, serviceName, scheme string) (*madmin.AdminClient, error) {
|
func getTenantAdminClient(ctx context.Context, client K8sClient, namespace, tenantName, serviceName, scheme string, insecure bool) (*madmin.AdminClient, error) {
|
||||||
// get admin credentials from secret
|
// get admin credentials from secret
|
||||||
creds, err := client.getSecret(ctx, namespace, fmt.Sprintf("%s-secret", tenantName), metav1.GetOptions{})
|
creds, err := client.getSecret(ctx, namespace, fmt.Sprintf("%s-secret", tenantName), metav1.GetOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -194,11 +194,7 @@ func getTenantAdminClient(ctx context.Context, client K8sClient, namespace, tena
|
|||||||
log.Println("tenant's secret doesn't contain secretkey")
|
log.Println("tenant's secret doesn't contain secretkey")
|
||||||
return nil, errorGeneric
|
return nil, errorGeneric
|
||||||
}
|
}
|
||||||
service, err := client.getService(ctx, namespace, serviceName, metav1.GetOptions{})
|
mAdmin, pErr := NewAdminClientWithInsecure(scheme+"://"+net.JoinHostPort(serviceName, strconv.Itoa(operator.MinIOPort)), string(accessKey), string(secretkey), insecure)
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
mAdmin, pErr := NewAdminClient(scheme+"://"+net.JoinHostPort(service.Spec.ClusterIP, strconv.Itoa(operator.MinIOPort)), string(accessKey), string(secretkey))
|
|
||||||
if pErr != nil {
|
if pErr != nil {
|
||||||
return nil, pErr.Cause
|
return nil, pErr.Cause
|
||||||
}
|
}
|
||||||
@@ -424,7 +420,7 @@ func getTenantCreatedResponse(session *models.Principal, params admin_api.Create
|
|||||||
url := *tenantReq.Idp.ActiveDirectory.URL
|
url := *tenantReq.Idp.ActiveDirectory.URL
|
||||||
userNameFormat := *tenantReq.Idp.ActiveDirectory.UsernameFormat
|
userNameFormat := *tenantReq.Idp.ActiveDirectory.UsernameFormat
|
||||||
userSearchFilter := *tenantReq.Idp.ActiveDirectory.UserSearchFilter
|
userSearchFilter := *tenantReq.Idp.ActiveDirectory.UserSearchFilter
|
||||||
tlsSkipVerify := tenantReq.Idp.ActiveDirectory.SkipSslVerification
|
tlsSkipVerify := tenantReq.Idp.ActiveDirectory.SkipTLSVerification
|
||||||
serverInsecure := tenantReq.Idp.ActiveDirectory.ServerInsecure
|
serverInsecure := tenantReq.Idp.ActiveDirectory.ServerInsecure
|
||||||
groupSearchDN := tenantReq.Idp.ActiveDirectory.GroupSearchBaseDn
|
groupSearchDN := tenantReq.Idp.ActiveDirectory.GroupSearchBaseDn
|
||||||
groupSearchFilter := tenantReq.Idp.ActiveDirectory.GroupSearchFilter
|
groupSearchFilter := tenantReq.Idp.ActiveDirectory.GroupSearchFilter
|
||||||
@@ -470,26 +466,26 @@ func getTenantCreatedResponse(session *models.Principal, params admin_api.Create
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// operator request AutoCert feature
|
isEncryptionAvailable := false
|
||||||
encryption := false
|
if tenantReq.EnableTLS != nil && *tenantReq.EnableTLS {
|
||||||
if tenantReq.EnableSsl != nil {
|
// If user request autoCert, Operator will generate certificate keypair for MinIO (server), Console (server) and KES (server and app mTLS)
|
||||||
encryption = true
|
isEncryptionAvailable = true
|
||||||
minInst.Spec.RequestAutoCert = *tenantReq.EnableSsl
|
minInst.Spec.RequestAutoCert = *tenantReq.EnableTLS
|
||||||
}
|
}
|
||||||
|
|
||||||
// User provided TLS certificates (this will take priority over autoCert)
|
if !minInst.Spec.RequestAutoCert && tenantReq.TLS != nil && tenantReq.TLS.Minio != nil {
|
||||||
if tenantReq.TLS != nil && tenantReq.TLS.Crt != nil && tenantReq.TLS.Key != nil {
|
// User provided TLS certificates for MinIO
|
||||||
encryption = true
|
isEncryptionAvailable = true
|
||||||
externalTLSCertificateSecretName := fmt.Sprintf("%s-instance-external-certificates", secretName)
|
externalTLSCertificateSecretName := fmt.Sprintf("%s-instance-external-certificates", secretName)
|
||||||
// disable autoCert
|
// disable autoCert
|
||||||
minInst.Spec.RequestAutoCert = false
|
minInst.Spec.RequestAutoCert = false
|
||||||
|
|
||||||
tlsCrt, err := base64.StdEncoding.DecodeString(*tenantReq.TLS.Crt)
|
tlsCrt, err := base64.StdEncoding.DecodeString(*tenantReq.TLS.Minio.Crt)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
tlsKey, err := base64.StdEncoding.DecodeString(*tenantReq.TLS.Key)
|
tlsKey, err := base64.StdEncoding.DecodeString(*tenantReq.TLS.Minio.Key)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -516,16 +512,18 @@ func getTenantCreatedResponse(session *models.Principal, params admin_api.Create
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if tenantReq.Encryption != nil && encryption {
|
if tenantReq.Encryption != nil && isEncryptionAvailable {
|
||||||
// Enable auto encryption
|
// Enable auto encryption
|
||||||
minInst.Spec.Env = append(minInst.Spec.Env, corev1.EnvVar{
|
minInst.Spec.Env = append(minInst.Spec.Env, corev1.EnvVar{
|
||||||
Name: "MINIO_KMS_AUTO_ENCRYPTION",
|
Name: "MINIO_KMS_AUTO_ENCRYPTION",
|
||||||
Value: "on",
|
Value: "on",
|
||||||
})
|
})
|
||||||
// KES client mTLSCertificates used by MinIO instance
|
// KES client mTLSCertificates used by MinIO instance, only if autoCert is not enabled
|
||||||
minInst.Spec.ExternalClientCertSecret, err = getTenantExternalClientCertificates(ctx, clientset, ns, tenantReq.Encryption, secretName)
|
if !minInst.Spec.RequestAutoCert {
|
||||||
if err != nil {
|
minInst.Spec.ExternalClientCertSecret, err = getTenantExternalClientCertificates(ctx, clientset, ns, tenantReq.Encryption, secretName)
|
||||||
return nil, err
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// KES configuration for Tenant instance
|
// KES configuration for Tenant instance
|
||||||
minInst.Spec.KES, err = getKESConfiguration(ctx, clientset, ns, tenantReq.Encryption, secretName, minInst.Spec.RequestAutoCert)
|
minInst.Spec.KES, err = getKESConfiguration(ctx, clientset, ns, tenantReq.Encryption, secretName, minInst.Spec.RequestAutoCert)
|
||||||
@@ -539,7 +537,7 @@ func getTenantCreatedResponse(session *models.Principal, params admin_api.Create
|
|||||||
var consoleSecret string
|
var consoleSecret string
|
||||||
|
|
||||||
enableConsole := true
|
enableConsole := true
|
||||||
if tenantReq.EnableConsole != nil {
|
if tenantReq.EnableConsole != nil && *tenantReq.EnableConsole {
|
||||||
enableConsole = *tenantReq.EnableConsole
|
enableConsole = *tenantReq.EnableConsole
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -589,7 +587,7 @@ func getTenantCreatedResponse(session *models.Principal, params admin_api.Create
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
const consoleVersion = "minio/console:v0.3.9"
|
const consoleVersion = "minio/console:v0.3.11"
|
||||||
minInst.Spec.Console = &operator.ConsoleConfiguration{
|
minInst.Spec.Console = &operator.ConsoleConfiguration{
|
||||||
Replicas: 2,
|
Replicas: 2,
|
||||||
Image: consoleVersion,
|
Image: consoleVersion,
|
||||||
@@ -600,6 +598,39 @@ func getTenantCreatedResponse(session *models.Principal, params admin_api.Create
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !minInst.Spec.RequestAutoCert && tenantReq.TLS != nil && tenantReq.TLS.Console != nil {
|
||||||
|
consoleExternalTLSCertificateSecretName := fmt.Sprintf("%s-console-external-certificates", secretName)
|
||||||
|
tlsCrt, err := base64.StdEncoding.DecodeString(*tenantReq.TLS.Console.Crt)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
tlsKey, err := base64.StdEncoding.DecodeString(*tenantReq.TLS.Console.Key)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
consoleExternalTLSCertificateSecret := corev1.Secret{
|
||||||
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
|
Name: consoleExternalTLSCertificateSecretName,
|
||||||
|
},
|
||||||
|
Type: corev1.SecretTypeTLS,
|
||||||
|
Immutable: &imm,
|
||||||
|
Data: map[string][]byte{
|
||||||
|
"tls.crt": tlsCrt,
|
||||||
|
"tls.key": tlsKey,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
_, err = clientset.CoreV1().Secrets(ns).Create(ctx, &consoleExternalTLSCertificateSecret, metav1.CreateOptions{})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
// Certificates used by the minio instance
|
||||||
|
minInst.Spec.Console.ExternalCertSecret = &operator.LocalCertificateReference{
|
||||||
|
Name: consoleExternalTLSCertificateSecretName,
|
||||||
|
Type: "kubernetes.io/tls",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// set the service name if provided
|
// set the service name if provided
|
||||||
@@ -858,15 +889,10 @@ func getTenantUsageResponse(session *models.Principal, params admin_api.GetTenan
|
|||||||
log.Println("error getting minioTenant:", err)
|
log.Println("error getting minioTenant:", err)
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
minTenant.EnsureDefaults()
|
||||||
tenantScheme := getTenantScheme(minTenant)
|
tenantScheme := getTenantScheme(minTenant)
|
||||||
|
|
||||||
svcName := minTenant.Spec.ServiceName
|
svcName := fmt.Sprintf("%s.%s.svc.cluster.local", minTenant.MinIOCIServiceName(), minTenant.Namespace)
|
||||||
if svcName == "" {
|
|
||||||
svcName = minTenant.Name
|
|
||||||
// TODO:
|
|
||||||
// 1 get tenant services
|
|
||||||
// 2 filter out cluster ip svc
|
|
||||||
}
|
|
||||||
|
|
||||||
mAdmin, err := getTenantAdminClient(
|
mAdmin, err := getTenantAdminClient(
|
||||||
ctx,
|
ctx,
|
||||||
@@ -874,7 +900,8 @@ func getTenantUsageResponse(session *models.Principal, params admin_api.GetTenan
|
|||||||
params.Namespace,
|
params.Namespace,
|
||||||
params.Tenant,
|
params.Tenant,
|
||||||
svcName,
|
svcName,
|
||||||
tenantScheme)
|
tenantScheme,
|
||||||
|
true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println("error getting tenant's admin client:", err)
|
log.Println("error getting tenant's admin client:", err)
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -1509,6 +1536,7 @@ func getKESConfiguration(ctx context.Context, clientSet *kubernetes.Clientset, n
|
|||||||
// Vault mTLS kesConfiguration
|
// Vault mTLS kesConfiguration
|
||||||
if encryptionCfg.Vault.TLS != nil {
|
if encryptionCfg.Vault.TLS != nil {
|
||||||
vaultTLSConfig := encryptionCfg.Vault.TLS
|
vaultTLSConfig := encryptionCfg.Vault.TLS
|
||||||
|
kesConfig.Keys.Vault.TLS = &kes.VaultTLS{}
|
||||||
if vaultTLSConfig.Crt != "" {
|
if vaultTLSConfig.Crt != "" {
|
||||||
clientCrt, err := base64.StdEncoding.DecodeString(vaultTLSConfig.Crt)
|
clientCrt, err := base64.StdEncoding.DecodeString(vaultTLSConfig.Crt)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ func Test_TenantInfoTenantAdminClient(t *testing.T) {
|
|||||||
tenantName string
|
tenantName string
|
||||||
serviceName string
|
serviceName string
|
||||||
scheme string
|
scheme string
|
||||||
|
insecure bool
|
||||||
}
|
}
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
@@ -236,7 +237,7 @@ func Test_TenantInfoTenantAdminClient(t *testing.T) {
|
|||||||
k8sclientGetSecretMock = tt.mockGetSecret
|
k8sclientGetSecretMock = tt.mockGetSecret
|
||||||
k8sclientGetServiceMock = tt.mockGetService
|
k8sclientGetServiceMock = tt.mockGetService
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
got, err := getTenantAdminClient(tt.args.ctx, tt.args.client, tt.args.namespace, tt.args.tenantName, tt.args.serviceName, tt.args.scheme)
|
got, err := getTenantAdminClient(tt.args.ctx, tt.args.client, tt.args.namespace, tt.args.tenantName, tt.args.serviceName, tt.args.scheme, tt.args.insecure)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if tt.wantErr {
|
if tt.wantErr {
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -54,7 +54,8 @@ func NewAdminClientWithInsecure(url, accessKey, secretKey string, insecure bool)
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err.Trace(url)
|
return nil, err.Trace(url)
|
||||||
}
|
}
|
||||||
s3Client.SetCustomTransport(STSClient.Transport)
|
stsClient := PrepareSTSClient(insecure)
|
||||||
|
s3Client.SetCustomTransport(stsClient.Transport)
|
||||||
return s3Client, nil
|
return s3Client, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -266,7 +267,8 @@ func newAdminFromClaims(claims *models.Principal) (*madmin.AdminClient, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
adminClient.SetCustomTransport(STSClient.Transport)
|
stsClient := PrepareSTSClient(false)
|
||||||
|
adminClient.SetCustomTransport(stsClient.Transport)
|
||||||
return adminClient, nil
|
return adminClient, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -164,7 +164,6 @@ func (s consoleSTSAssumeRole) IsExpired() bool {
|
|||||||
|
|
||||||
// STSClient contains http.client configuration need it by STSAssumeRole
|
// STSClient contains http.client configuration need it by STSAssumeRole
|
||||||
var (
|
var (
|
||||||
STSClient = PrepareSTSClient()
|
|
||||||
MinioEndpoint = getMinIOServer()
|
MinioEndpoint = getMinIOServer()
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -204,8 +203,9 @@ func newConsoleCredentials(accessKey, secretKey, location string) (*credentials.
|
|||||||
Location: location,
|
Location: location,
|
||||||
DurationSeconds: xjwt.GetConsoleSTSAndJWTDurationInSeconds(),
|
DurationSeconds: xjwt.GetConsoleSTSAndJWTDurationInSeconds(),
|
||||||
}
|
}
|
||||||
|
stsClient := PrepareSTSClient(false)
|
||||||
stsAssumeRole := &credentials.STSAssumeRole{
|
stsAssumeRole := &credentials.STSAssumeRole{
|
||||||
Client: STSClient,
|
Client: stsClient,
|
||||||
STSEndpoint: MinioEndpoint,
|
STSEndpoint: MinioEndpoint,
|
||||||
Options: opts,
|
Options: opts,
|
||||||
}
|
}
|
||||||
@@ -234,10 +234,11 @@ func getConsoleCredentialsFromSession(claims *models.Principal) *credentials.Cre
|
|||||||
// from the provided jwt
|
// from the provided jwt
|
||||||
func newMinioClient(claims *models.Principal) (*minio.Client, error) {
|
func newMinioClient(claims *models.Principal) (*minio.Client, error) {
|
||||||
creds := getConsoleCredentialsFromSession(claims)
|
creds := getConsoleCredentialsFromSession(claims)
|
||||||
|
stsClient := PrepareSTSClient(false)
|
||||||
minioClient, err := minio.New(getMinIOEndpoint(), &minio.Options{
|
minioClient, err := minio.New(getMinIOEndpoint(), &minio.Options{
|
||||||
Creds: creds,
|
Creds: creds,
|
||||||
Secure: getMinIOEndpointIsSecure(),
|
Secure: getMinIOEndpointIsSecure(),
|
||||||
Transport: STSClient.Transport,
|
Transport: stsClient.Transport,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -248,7 +249,7 @@ func newMinioClient(claims *models.Principal) (*minio.Client, error) {
|
|||||||
// newS3BucketClient creates a new mc S3Client to talk to the server based on a bucket
|
// newS3BucketClient creates a new mc S3Client to talk to the server based on a bucket
|
||||||
func newS3BucketClient(claims *models.Principal, bucketName string) (*mc.S3Client, error) {
|
func newS3BucketClient(claims *models.Principal, bucketName string) (*mc.S3Client, error) {
|
||||||
endpoint := getMinIOServer()
|
endpoint := getMinIOServer()
|
||||||
useSSL := getMinIOEndpointIsSecure()
|
useTLS := getMinIOEndpointIsSecure()
|
||||||
|
|
||||||
if strings.TrimSpace(bucketName) != "" {
|
if strings.TrimSpace(bucketName) != "" {
|
||||||
endpoint += fmt.Sprintf("/%s", bucketName)
|
endpoint += fmt.Sprintf("/%s", bucketName)
|
||||||
@@ -258,7 +259,7 @@ func newS3BucketClient(claims *models.Principal, bucketName string) (*mc.S3Clien
|
|||||||
return nil, fmt.Errorf("the provided credentials are invalid")
|
return nil, fmt.Errorf("the provided credentials are invalid")
|
||||||
}
|
}
|
||||||
|
|
||||||
s3Config := newS3Config(endpoint, claims.AccessKeyID, claims.SecretAccessKey, claims.SessionToken, !useSSL)
|
s3Config := newS3Config(endpoint, claims.AccessKeyID, claims.SecretAccessKey, claims.SessionToken, !useTLS)
|
||||||
client, pErr := mc.S3New(s3Config)
|
client, pErr := mc.S3New(s3Config)
|
||||||
if pErr != nil {
|
if pErr != nil {
|
||||||
return nil, pErr.Cause
|
return nil, pErr.Cause
|
||||||
|
|||||||
@@ -105,15 +105,15 @@ func GetPort() int {
|
|||||||
return port
|
return port
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetSSLHostname gets console ssl hostname set on env variable
|
// GetTLSHostname gets console tls hostname set on env variable
|
||||||
// or default one
|
// or default one
|
||||||
func GetSSLHostname() string {
|
func GetTLSHostname() string {
|
||||||
return strings.ToLower(env.Get(ConsoleTLSHostname, TLSHostname))
|
return strings.ToLower(env.Get(ConsoleTLSHostname, TLSHostname))
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetSSLPort gets console ssl port set on env variable
|
// GetTLSPort gets console tls port set on env variable
|
||||||
// or default one
|
// or default one
|
||||||
func GetSSLPort() int {
|
func GetTLSPort() int {
|
||||||
port, err := strconv.Atoi(env.Get(ConsoleTLSPort, TLSPort))
|
port, err := strconv.Atoi(env.Get(ConsoleTLSPort, TLSPort))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
port = 9443
|
port = 9443
|
||||||
@@ -171,14 +171,14 @@ func getSecureHostsProxyHeaders() []string {
|
|||||||
return []string{}
|
return []string{}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If SSLRedirect is set to true, then only allow HTTPS requests. Default is true.
|
// If TLSRedirect is set to true, then only allow HTTPS requests. Default is true.
|
||||||
func getSSLRedirect() bool {
|
func getTLSRedirect() bool {
|
||||||
return strings.ToLower(env.Get(ConsoleSecureSSLRedirect, TLSRedirect)) == "on"
|
return strings.ToLower(env.Get(ConsoleSecureTLSRedirect, TLSRedirect)) == "on"
|
||||||
}
|
}
|
||||||
|
|
||||||
// SSLHost is the host name that is used to redirect HTTP requests to HTTPS. Default is "", which indicates to use the same host.
|
// TLSHost is the host name that is used to redirect HTTP requests to HTTPS. Default is "", which indicates to use the same host.
|
||||||
func getSecureSSLHost() string {
|
func getSecureTLSHost() string {
|
||||||
return env.Get(ConsoleSecureSSLHost, fmt.Sprintf("%s:%s", TLSHostname, TLSPort))
|
return env.Get(ConsoleSecureTLSHost, fmt.Sprintf("%s:%s", TLSHostname, TLSPort))
|
||||||
}
|
}
|
||||||
|
|
||||||
// STSSeconds is the max-age of the Strict-Transport-Security header. Default is 0, which would NOT include the header.
|
// STSSeconds is the max-age of the Strict-Transport-Security header. Default is 0, which would NOT include the header.
|
||||||
@@ -200,9 +200,9 @@ func getSecureSTSPreload() bool {
|
|||||||
return strings.ToLower(env.Get(ConsoleSecureSTSPreload, "off")) == "on"
|
return strings.ToLower(env.Get(ConsoleSecureSTSPreload, "off")) == "on"
|
||||||
}
|
}
|
||||||
|
|
||||||
// If SSLTemporaryRedirect is true, the a 302 will be used while redirecting. Default is false (301).
|
// If TLSTemporaryRedirect is true, the a 302 will be used while redirecting. Default is false (301).
|
||||||
func getSecureSSLTemporaryRedirect() bool {
|
func getSecureTLSTemporaryRedirect() bool {
|
||||||
return strings.ToLower(env.Get(ConsoleSecureSSLTemporaryRedirect, "off")) == "on"
|
return strings.ToLower(env.Get(ConsoleSecureTLSTemporaryRedirect, "off")) == "on"
|
||||||
}
|
}
|
||||||
|
|
||||||
// STS header is only included when the connection is HTTPS.
|
// STS header is only included when the connection is HTTPS.
|
||||||
|
|||||||
@@ -149,12 +149,12 @@ func setupGlobalMiddleware(handler http.Handler) http.Handler {
|
|||||||
AllowedHosts: getSecureAllowedHosts(),
|
AllowedHosts: getSecureAllowedHosts(),
|
||||||
AllowedHostsAreRegex: getSecureAllowedHostsAreRegex(),
|
AllowedHostsAreRegex: getSecureAllowedHostsAreRegex(),
|
||||||
HostsProxyHeaders: getSecureHostsProxyHeaders(),
|
HostsProxyHeaders: getSecureHostsProxyHeaders(),
|
||||||
SSLRedirect: getSSLRedirect(),
|
SSLRedirect: getTLSRedirect(),
|
||||||
SSLHost: getSecureSSLHost(),
|
SSLHost: getSecureTLSHost(),
|
||||||
STSSeconds: getSecureSTSSeconds(),
|
STSSeconds: getSecureSTSSeconds(),
|
||||||
STSIncludeSubdomains: getSecureSTSIncludeSubdomains(),
|
STSIncludeSubdomains: getSecureSTSIncludeSubdomains(),
|
||||||
STSPreload: getSecureSTSPreload(),
|
STSPreload: getSecureSTSPreload(),
|
||||||
SSLTemporaryRedirect: getSecureSSLTemporaryRedirect(),
|
SSLTemporaryRedirect: getSecureTLSTemporaryRedirect(),
|
||||||
SSLHostFunc: nil,
|
SSLHostFunc: nil,
|
||||||
ForceSTSHeader: getSecureForceSTSHeader(),
|
ForceSTSHeader: getSecureForceSTSHeader(),
|
||||||
FrameDeny: getSecureFrameDeny(),
|
FrameDeny: getSecureFrameDeny(),
|
||||||
|
|||||||
@@ -41,9 +41,9 @@ const (
|
|||||||
ConsoleSecureSTSSeconds = "CONSOLE_SECURE_STS_SECONDS"
|
ConsoleSecureSTSSeconds = "CONSOLE_SECURE_STS_SECONDS"
|
||||||
ConsoleSecureSTSIncludeSubdomains = "CONSOLE_SECURE_STS_INCLUDE_SUB_DOMAINS"
|
ConsoleSecureSTSIncludeSubdomains = "CONSOLE_SECURE_STS_INCLUDE_SUB_DOMAINS"
|
||||||
ConsoleSecureSTSPreload = "CONSOLE_SECURE_STS_PRELOAD"
|
ConsoleSecureSTSPreload = "CONSOLE_SECURE_STS_PRELOAD"
|
||||||
ConsoleSecureSSLRedirect = "CONSOLE_SECURE_SSL_REDIRECT"
|
ConsoleSecureTLSRedirect = "CONSOLE_SECURE_TLS_REDIRECT"
|
||||||
ConsoleSecureSSLHost = "CONSOLE_SECURE_SSL_HOST"
|
ConsoleSecureTLSHost = "CONSOLE_SECURE_TLS_HOST"
|
||||||
ConsoleSecureSSLTemporaryRedirect = "CONSOLE_SECURE_SSL_TEMPORARY_REDIRECT"
|
ConsoleSecureTLSTemporaryRedirect = "CONSOLE_SECURE_TLS_TEMPORARY_REDIRECT"
|
||||||
ConsoleSecureForceSTSHeader = "CONSOLE_SECURE_FORCE_STS_HEADER"
|
ConsoleSecureForceSTSHeader = "CONSOLE_SECURE_FORCE_STS_HEADER"
|
||||||
ConsoleSecurePublicKey = "CONSOLE_SECURE_PUBLIC_KEY"
|
ConsoleSecurePublicKey = "CONSOLE_SECURE_PUBLIC_KEY"
|
||||||
ConsoleSecureReferrerPolicy = "CONSOLE_SECURE_REFERRER_POLICY"
|
ConsoleSecureReferrerPolicy = "CONSOLE_SECURE_REFERRER_POLICY"
|
||||||
|
|||||||
@@ -2028,7 +2028,7 @@ func init() {
|
|||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": true
|
"default": true
|
||||||
},
|
},
|
||||||
"enable_ssl": {
|
"enable_tls": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": true
|
"default": true
|
||||||
},
|
},
|
||||||
@@ -2108,18 +2108,7 @@ func init() {
|
|||||||
},
|
},
|
||||||
"client": {
|
"client": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"$ref": "#/definitions/keyPairConfiguration"
|
||||||
"crt",
|
|
||||||
"key"
|
|
||||||
],
|
|
||||||
"properties": {
|
|
||||||
"crt": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"key": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"gemalto": {
|
"gemalto": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@@ -2130,18 +2119,7 @@ func init() {
|
|||||||
},
|
},
|
||||||
"server": {
|
"server": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"$ref": "#/definitions/keyPairConfiguration"
|
||||||
"crt",
|
|
||||||
"key"
|
|
||||||
],
|
|
||||||
"properties": {
|
|
||||||
"crt": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"key": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"vault": {
|
"vault": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@@ -2257,7 +2235,7 @@ func init() {
|
|||||||
"server_insecure": {
|
"server_insecure": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"skip_ssl_verification": {
|
"skip_tls_verification": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"url": {
|
"url": {
|
||||||
@@ -2311,6 +2289,21 @@ func init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"keyPairConfiguration": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"crt",
|
||||||
|
"key"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"crt": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"key": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"listBucketEventsResponse": {
|
"listBucketEventsResponse": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@@ -3034,16 +3027,14 @@ func init() {
|
|||||||
},
|
},
|
||||||
"tlsConfiguration": {
|
"tlsConfiguration": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
|
||||||
"crt",
|
|
||||||
"key"
|
|
||||||
],
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"crt": {
|
"console": {
|
||||||
"type": "string"
|
"type": "object",
|
||||||
|
"$ref": "#/definitions/keyPairConfiguration"
|
||||||
},
|
},
|
||||||
"key": {
|
"minio": {
|
||||||
"type": "string"
|
"type": "object",
|
||||||
|
"$ref": "#/definitions/keyPairConfiguration"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -5258,36 +5249,6 @@ func init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"EncryptionConfigurationClient": {
|
|
||||||
"type": "object",
|
|
||||||
"required": [
|
|
||||||
"crt",
|
|
||||||
"key"
|
|
||||||
],
|
|
||||||
"properties": {
|
|
||||||
"crt": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"key": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"EncryptionConfigurationServer": {
|
|
||||||
"type": "object",
|
|
||||||
"required": [
|
|
||||||
"crt",
|
|
||||||
"key"
|
|
||||||
],
|
|
||||||
"properties": {
|
|
||||||
"crt": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"key": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"GemaltoConfigurationKeysecure": {
|
"GemaltoConfigurationKeysecure": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"required": [
|
||||||
@@ -5380,7 +5341,7 @@ func init() {
|
|||||||
"server_insecure": {
|
"server_insecure": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"skip_ssl_verification": {
|
"skip_tls_verification": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"url": {
|
"url": {
|
||||||
@@ -5981,7 +5942,7 @@ func init() {
|
|||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": true
|
"default": true
|
||||||
},
|
},
|
||||||
"enable_ssl": {
|
"enable_tls": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": true
|
"default": true
|
||||||
},
|
},
|
||||||
@@ -6061,18 +6022,7 @@ func init() {
|
|||||||
},
|
},
|
||||||
"client": {
|
"client": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"$ref": "#/definitions/keyPairConfiguration"
|
||||||
"crt",
|
|
||||||
"key"
|
|
||||||
],
|
|
||||||
"properties": {
|
|
||||||
"crt": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"key": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"gemalto": {
|
"gemalto": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@@ -6083,18 +6033,7 @@ func init() {
|
|||||||
},
|
},
|
||||||
"server": {
|
"server": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"$ref": "#/definitions/keyPairConfiguration"
|
||||||
"crt",
|
|
||||||
"key"
|
|
||||||
],
|
|
||||||
"properties": {
|
|
||||||
"crt": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"key": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"vault": {
|
"vault": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@@ -6210,7 +6149,7 @@ func init() {
|
|||||||
"server_insecure": {
|
"server_insecure": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"skip_ssl_verification": {
|
"skip_tls_verification": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"url": {
|
"url": {
|
||||||
@@ -6264,6 +6203,21 @@ func init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"keyPairConfiguration": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"crt",
|
||||||
|
"key"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"crt": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"key": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"listBucketEventsResponse": {
|
"listBucketEventsResponse": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@@ -6921,16 +6875,14 @@ func init() {
|
|||||||
},
|
},
|
||||||
"tlsConfiguration": {
|
"tlsConfiguration": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
|
||||||
"crt",
|
|
||||||
"key"
|
|
||||||
],
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"crt": {
|
"console": {
|
||||||
"type": "string"
|
"type": "object",
|
||||||
|
"$ref": "#/definitions/keyPairConfiguration"
|
||||||
},
|
},
|
||||||
"key": {
|
"minio": {
|
||||||
"type": "string"
|
"type": "object",
|
||||||
|
"$ref": "#/definitions/keyPairConfiguration"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -30,12 +30,24 @@ var (
|
|||||||
certDontExists = "File certificate doesn't exists: %s"
|
certDontExists = "File certificate doesn't exists: %s"
|
||||||
)
|
)
|
||||||
|
|
||||||
func prepareSTSClientTransport() *http.Transport {
|
func prepareSTSClientTransport(insecure bool) *http.Transport {
|
||||||
// This takes github.com/minio/minio/pkg/madmin/transport.go as an example
|
// This takes github.com/minio/minio/pkg/madmin/transport.go as an example
|
||||||
//
|
//
|
||||||
// DefaultTransport - this default transport is similar to
|
// DefaultTransport - this default transport is similar to
|
||||||
// http.DefaultTransport but with additional param DisableCompression
|
// http.DefaultTransport but with additional param DisableCompression
|
||||||
// is set to true to avoid decompressing content with 'gzip' encoding.
|
// is set to true to avoid decompressing content with 'gzip' encoding.
|
||||||
|
|
||||||
|
// Keep TLS config.
|
||||||
|
tlsConfig := &tls.Config{
|
||||||
|
// Can't use SSLv3 because of POODLE and BEAST
|
||||||
|
// Can't use TLSv1.0 because of POODLE and BEAST using CBC cipher
|
||||||
|
// Can't use TLSv1.1 because of RC4 cipher usage
|
||||||
|
MinVersion: tls.VersionTLS12,
|
||||||
|
}
|
||||||
|
if insecure {
|
||||||
|
tlsConfig.InsecureSkipVerify = true
|
||||||
|
}
|
||||||
|
|
||||||
DefaultTransport := &http.Transport{
|
DefaultTransport := &http.Transport{
|
||||||
Proxy: http.ProxyFromEnvironment,
|
Proxy: http.ProxyFromEnvironment,
|
||||||
DialContext: (&net.Dialer{
|
DialContext: (&net.Dialer{
|
||||||
@@ -49,6 +61,7 @@ func prepareSTSClientTransport() *http.Transport {
|
|||||||
TLSHandshakeTimeout: 10 * time.Second,
|
TLSHandshakeTimeout: 10 * time.Second,
|
||||||
ExpectContinueTimeout: 1 * time.Second,
|
ExpectContinueTimeout: 1 * time.Second,
|
||||||
DisableCompression: true,
|
DisableCompression: true,
|
||||||
|
TLSClientConfig: tlsConfig,
|
||||||
}
|
}
|
||||||
// If Minio instance is running with TLS enabled and it's using a self-signed certificate
|
// If Minio instance is running with TLS enabled and it's using a self-signed certificate
|
||||||
// or a certificate issued by a custom certificate authority we prepare a new custom *http.Transport
|
// or a certificate issued by a custom certificate authority we prepare a new custom *http.Transport
|
||||||
@@ -86,10 +99,11 @@ func prepareSTSClientTransport() *http.Transport {
|
|||||||
|
|
||||||
// PrepareSTSClient returns an http.Client with custom configurations need it by *credentials.STSAssumeRole
|
// PrepareSTSClient returns an http.Client with custom configurations need it by *credentials.STSAssumeRole
|
||||||
// custom configurations include the use of CA certificates
|
// custom configurations include the use of CA certificates
|
||||||
func PrepareSTSClient() *http.Client {
|
func PrepareSTSClient(insecure bool) *http.Client {
|
||||||
transport := prepareSTSClientTransport()
|
transport := prepareSTSClientTransport(insecure)
|
||||||
// Return http client with default configuration
|
// Return http client with default configuration
|
||||||
return &http.Client{
|
c := &http.Client{
|
||||||
Transport: transport,
|
Transport: transport,
|
||||||
}
|
}
|
||||||
|
return c
|
||||||
}
|
}
|
||||||
|
|||||||
34
swagger.yml
34
swagger.yml
@@ -1822,7 +1822,7 @@ definitions:
|
|||||||
enable_console:
|
enable_console:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: true
|
||||||
enable_ssl:
|
enable_tls:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: true
|
||||||
namespace:
|
namespace:
|
||||||
@@ -1845,7 +1845,7 @@ definitions:
|
|||||||
type: object
|
type: object
|
||||||
$ref: "#/definitions/encryptionConfiguration"
|
$ref: "#/definitions/encryptionConfiguration"
|
||||||
|
|
||||||
tlsConfiguration:
|
keyPairConfiguration:
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
- crt
|
- crt
|
||||||
@@ -1856,6 +1856,16 @@ definitions:
|
|||||||
key:
|
key:
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
|
tlsConfiguration:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
minio:
|
||||||
|
type: object
|
||||||
|
$ref: "#/definitions/keyPairConfiguration"
|
||||||
|
console:
|
||||||
|
type: object
|
||||||
|
$ref: "#/definitions/keyPairConfiguration"
|
||||||
|
|
||||||
idpConfiguration:
|
idpConfiguration:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@@ -1891,7 +1901,7 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
group_name_attribute:
|
group_name_attribute:
|
||||||
type: string
|
type: string
|
||||||
skip_ssl_verification:
|
skip_tls_verification:
|
||||||
type: boolean
|
type: boolean
|
||||||
server_insecure:
|
server_insecure:
|
||||||
type: boolean
|
type: boolean
|
||||||
@@ -1903,24 +1913,10 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
server:
|
server:
|
||||||
type: object
|
type: object
|
||||||
required:
|
$ref: "#/definitions/keyPairConfiguration"
|
||||||
- crt
|
|
||||||
- key
|
|
||||||
properties:
|
|
||||||
crt:
|
|
||||||
type: string
|
|
||||||
key:
|
|
||||||
type: string
|
|
||||||
client:
|
client:
|
||||||
type: object
|
type: object
|
||||||
required:
|
$ref: "#/definitions/keyPairConfiguration"
|
||||||
- crt
|
|
||||||
- key
|
|
||||||
properties:
|
|
||||||
crt:
|
|
||||||
type: string
|
|
||||||
key:
|
|
||||||
type: string
|
|
||||||
gemalto:
|
gemalto:
|
||||||
type: object
|
type: object
|
||||||
$ref: "#/definitions/gemaltoConfiguration"
|
$ref: "#/definitions/gemaltoConfiguration"
|
||||||
|
|||||||
Reference in New Issue
Block a user