Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e0ff6623bb | ||
|
|
3d59e9ac30 | ||
|
|
cff712f071 |
@@ -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{
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ spec:
|
|||||||
serviceAccountName: console-sa
|
serviceAccountName: console-sa
|
||||||
containers:
|
containers:
|
||||||
- name: console
|
- name: console
|
||||||
image: minio/console:v0.3.10
|
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.10
|
image: minio/console:v0.3.11
|
||||||
imagePullPolicy: "IfNotPresent"
|
imagePullPolicy: "IfNotPresent"
|
||||||
env:
|
env:
|
||||||
- name: CONSOLE_OPERATOR_MODE
|
- name: CONSOLE_OPERATOR_MODE
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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}>
|
||||||
|
|||||||
@@ -420,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
|
||||||
@@ -467,7 +467,7 @@ func getTenantCreatedResponse(session *models.Principal, params admin_api.Create
|
|||||||
}
|
}
|
||||||
|
|
||||||
isEncryptionAvailable := false
|
isEncryptionAvailable := false
|
||||||
if *tenantReq.EnableTLS {
|
if tenantReq.EnableTLS != nil && *tenantReq.EnableTLS {
|
||||||
// If user request autoCert, Operator will generate certificate keypair for MinIO (server), Console (server) and KES (server and app mTLS)
|
// If user request autoCert, Operator will generate certificate keypair for MinIO (server), Console (server) and KES (server and app mTLS)
|
||||||
isEncryptionAvailable = true
|
isEncryptionAvailable = true
|
||||||
minInst.Spec.RequestAutoCert = *tenantReq.EnableTLS
|
minInst.Spec.RequestAutoCert = *tenantReq.EnableTLS
|
||||||
@@ -536,8 +536,10 @@ func getTenantCreatedResponse(session *models.Principal, params admin_api.Create
|
|||||||
var consoleAccess string
|
var consoleAccess string
|
||||||
var consoleSecret string
|
var consoleSecret string
|
||||||
|
|
||||||
//enableConsole := true
|
enableConsole := true
|
||||||
enableConsole := *tenantReq.EnableConsole
|
if tenantReq.EnableConsole != nil && *tenantReq.EnableConsole {
|
||||||
|
enableConsole = *tenantReq.EnableConsole
|
||||||
|
}
|
||||||
|
|
||||||
if enableConsole {
|
if enableConsole {
|
||||||
consoleSelector := fmt.Sprintf("%s-console", *tenantReq.Name)
|
consoleSelector := fmt.Sprintf("%s-console", *tenantReq.Name)
|
||||||
@@ -585,7 +587,7 @@ func getTenantCreatedResponse(session *models.Principal, params admin_api.Create
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
const consoleVersion = "minio/console:v0.3.10"
|
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,
|
||||||
@@ -597,7 +599,7 @@ func getTenantCreatedResponse(session *models.Principal, params admin_api.Create
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
if !minInst.Spec.RequestAutoCert && tenantReq.TLS.Console != nil {
|
if !minInst.Spec.RequestAutoCert && tenantReq.TLS != nil && tenantReq.TLS.Console != nil {
|
||||||
consoleExternalTLSCertificateSecretName := fmt.Sprintf("%s-console-external-certificates", secretName)
|
consoleExternalTLSCertificateSecretName := fmt.Sprintf("%s-console-external-certificates", secretName)
|
||||||
tlsCrt, err := base64.StdEncoding.DecodeString(*tenantReq.TLS.Console.Crt)
|
tlsCrt, err := base64.StdEncoding.DecodeString(*tenantReq.TLS.Console.Crt)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -249,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)
|
||||||
@@ -259,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"
|
||||||
|
|||||||
@@ -2235,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": {
|
||||||
@@ -5341,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": {
|
||||||
@@ -6149,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": {
|
||||||
|
|||||||
@@ -1901,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
|
||||||
|
|||||||
Reference in New Issue
Block a user