Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a4139c8e7 | ||
|
|
34bcd25c9f | ||
|
|
7853aa6bb9 |
@@ -6,8 +6,8 @@ COPY LICENSE /licenses/LICENSE
|
|||||||
LABEL name="MinIO" \
|
LABEL name="MinIO" \
|
||||||
vendor="MinIO Inc <dev@min.io>" \
|
vendor="MinIO Inc <dev@min.io>" \
|
||||||
maintainer="MinIO Inc <dev@min.io>" \
|
maintainer="MinIO Inc <dev@min.io>" \
|
||||||
version="v0.6.0" \
|
version="v0.6.2" \
|
||||||
release="v0.6.0" \
|
release="v0.6.2" \
|
||||||
summary="A graphical user interface for MinIO" \
|
summary="A graphical user interface for MinIO" \
|
||||||
description="MinIO object storage is fundamentally different. Designed for performance and the S3 API, it is 100% open-source. MinIO is ideal for large, private cloud environments with stringent security requirements and delivers mission-critical availability across a diverse range of workloads."
|
description="MinIO object storage is fundamentally different. Designed for performance and the S3 API, it is 100% open-source. MinIO is ideal for large, private cloud environments with stringent security requirements and delivers mission-critical availability across a diverse range of workloads."
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ spec:
|
|||||||
serviceAccountName: console-sa
|
serviceAccountName: console-sa
|
||||||
containers:
|
containers:
|
||||||
- name: console
|
- name: console
|
||||||
image: minio/console:v0.6.0
|
image: minio/console:v0.6.2
|
||||||
imagePullPolicy: "IfNotPresent"
|
imagePullPolicy: "IfNotPresent"
|
||||||
args:
|
args:
|
||||||
- server
|
- server
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ spec:
|
|||||||
serviceAccountName: console-sa
|
serviceAccountName: console-sa
|
||||||
containers:
|
containers:
|
||||||
- name: console
|
- name: console
|
||||||
image: minio/console:v0.6.0
|
image: minio/console:v0.6.2
|
||||||
imagePullPolicy: "IfNotPresent"
|
imagePullPolicy: "IfNotPresent"
|
||||||
env:
|
env:
|
||||||
- name: CONSOLE_OPERATOR_MODE
|
- name: CONSOLE_OPERATOR_MODE
|
||||||
|
|||||||
@@ -26,3 +26,7 @@ import (
|
|||||||
func GetOperatorMode() bool {
|
func GetOperatorMode() bool {
|
||||||
return strings.ToLower(env.Get(consoleOperatorMode, "off")) == "on"
|
return strings.ToLower(env.Get(consoleOperatorMode, "off")) == "on"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func GetLDAPEnabled() bool {
|
||||||
|
return strings.ToLower(env.Get(ConsoleLDAPEnabled, "off")) == "on"
|
||||||
|
}
|
||||||
|
|||||||
@@ -18,4 +18,6 @@ package acl
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
consoleOperatorMode = "CONSOLE_OPERATOR_MODE"
|
consoleOperatorMode = "CONSOLE_OPERATOR_MODE"
|
||||||
|
// const for ldap configuration
|
||||||
|
ConsoleLDAPEnabled = "CONSOLE_LDAP_ENABLED"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -243,6 +243,17 @@ var healthInfoActionSet = ConfigurationActionSet{
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var displayRules = map[string]func() bool{
|
||||||
|
// disable users page if LDAP is enabled
|
||||||
|
users: func() bool {
|
||||||
|
return !GetLDAPEnabled()
|
||||||
|
},
|
||||||
|
// disable groups page if LDAP is enabled
|
||||||
|
groups: func() bool {
|
||||||
|
return !GetLDAPEnabled()
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
// endpointRules contains the mapping between endpoints and ActionSets, additional rules can be added here
|
// endpointRules contains the mapping between endpoints and ActionSets, additional rules can be added here
|
||||||
var endpointRules = map[string]ConfigurationActionSet{
|
var endpointRules = map[string]ConfigurationActionSet{
|
||||||
configuration: configurationActionSet,
|
configuration: configurationActionSet,
|
||||||
@@ -337,6 +348,15 @@ func GetAuthorizedEndpoints(actions []string) []string {
|
|||||||
userAllowedAction := actionsStringToActionSet(actions)
|
userAllowedAction := actionsStringToActionSet(actions)
|
||||||
var allowedEndpoints []string
|
var allowedEndpoints []string
|
||||||
for endpoint, rules := range rangeTake {
|
for endpoint, rules := range rangeTake {
|
||||||
|
|
||||||
|
// check if display rule exists for this endpoint, this will control
|
||||||
|
// what user sees on the console UI
|
||||||
|
if rule, ok := displayRules[endpoint]; ok {
|
||||||
|
if rule != nil && !rule() {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// check if user policy matches s3:* or admin:* typesIntersection
|
// check if user policy matches s3:* or admin:* typesIntersection
|
||||||
endpointActionTypes := rules.actionTypes
|
endpointActionTypes := rules.actionTypes
|
||||||
typesIntersection := endpointActionTypes.Intersection(userAllowedAction)
|
typesIntersection := endpointActionTypes.Intersection(userAllowedAction)
|
||||||
|
|||||||
@@ -1028,7 +1028,7 @@ func Test_UpdateTenantAction(t *testing.T) {
|
|||||||
},
|
},
|
||||||
params: admin_api.UpdateTenantParams{
|
params: admin_api.UpdateTenantParams{
|
||||||
Body: &models.UpdateTenantRequest{
|
Body: &models.UpdateTenantRequest{
|
||||||
ConsoleImage: "minio/console:v0.6.0",
|
ConsoleImage: "minio/console:v0.6.2",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ const (
|
|||||||
// Image versions
|
// Image versions
|
||||||
const (
|
const (
|
||||||
KESImageVersion = "minio/kes:v0.13.4"
|
KESImageVersion = "minio/kes:v0.13.4"
|
||||||
ConsoleImageDefaultVersion = "minio/console:v0.6.0"
|
ConsoleImageDefaultVersion = "minio/console:v0.6.2"
|
||||||
)
|
)
|
||||||
|
|
||||||
// K8s
|
// K8s
|
||||||
|
|||||||
@@ -58,7 +58,9 @@ func registerServiceAccountsHandlers(api *operations.ConsoleAPI) {
|
|||||||
|
|
||||||
// createServiceAccount adds a service account to the userClient and assigns a policy to him if defined.
|
// createServiceAccount adds a service account to the userClient and assigns a policy to him if defined.
|
||||||
func createServiceAccount(ctx context.Context, userClient MinioAdmin, policy string) (*models.ServiceAccountCreds, error) {
|
func createServiceAccount(ctx context.Context, userClient MinioAdmin, policy string) (*models.ServiceAccountCreds, error) {
|
||||||
iamPolicy := &iampolicy.Policy{}
|
// By default a nil policy will be used so the service account inherit the parent account policy, otherwise
|
||||||
|
// we override with the user provided iam policy
|
||||||
|
var iamPolicy *iampolicy.Policy
|
||||||
if strings.TrimSpace(policy) != "" {
|
if strings.TrimSpace(policy) != "" {
|
||||||
iamp, err := iampolicy.ParseConfig(bytes.NewReader([]byte(policy)))
|
iamp, err := iampolicy.ParseConfig(bytes.NewReader([]byte(policy)))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user