From 2d4f7269de3343dedc8191a46f90136acd178dff Mon Sep 17 00:00:00 2001 From: Wen Zhou Date: Fri, 11 Oct 2024 09:32:14 +0200 Subject: [PATCH] feat: Operator disable create usergroup if detect users enabled external auth - use internal Authentication CR Type indicate if Operator should create usergroup or not CRD has validation to only allow "IntegratedOAuth", "", "None" or "OIDC" - only grant "get, watch , list" as least permission - remove duplicated rbac for "ingress", has been defined in other places - add object into cache - add CRD into unit-test - add unit-test: since we dont have auth CR, it should not create usergroup Signed-off-by: Wen Zhou --- README.md | 21 +-- ...atahub-operator.clusterserviceversion.yaml | 1 + .../config.openshift.io_authentications.yaml | 175 ++++++++++++++++++ config/rbac/role.yaml | 1 + .../dscinitialization_controller.go | 17 +- .../dscinitialization_test.go | 14 +- controllers/dscinitialization/suite_test.go | 2 + main.go | 5 + pkg/cluster/cluster_config.go | 20 +- 9 files changed, 228 insertions(+), 28 deletions(-) create mode 100644 config/crd/external/config.openshift.io_authentications.yaml diff --git a/README.md b/README.md index cbbd737b852..e9860a1b0bb 100644 --- a/README.md +++ b/README.md @@ -66,26 +66,7 @@ Additionally installing `Authorino operator` & `Service Mesh operator` enhances sourceNamespace: openshift-marketplace EOF ``` - If user would prefer skipping group "odh-admin" to be created by DSCI CR automatically, explicitly set env variable ODH_USE_EXTERNAL_AUTH to "true". example: - - ```console - cat <