Skip to content

Commit

Permalink
Removing deprecated var
Browse files Browse the repository at this point in the history
  • Loading branch information
cniackz committed Aug 11, 2023
1 parent 1557ba0 commit e89d27c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 4 additions & 3 deletions api/tenant-handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"fmt"
"net"
"strconv"
"strings"
"time"

utils2 "github.com/minio/operator/pkg/http"
Expand Down Expand Up @@ -406,7 +407,7 @@ func getTenantIdentityProvider(ctx context.Context, clientSet K8sClientI, tenant

if tenantConfiguration["MINIO_IDENTITY_OPENID_CONFIG_URL"] != "" {

callbackURL := tenantConfiguration["MINIO_IDENTITY_OPENID_REDIRECT_URI"]
callbackURL := tenantConfiguration["MINIO_BROWSER_REDIRECT_URL"] + "/oauth_callback"
claimName := tenantConfiguration["MINIO_IDENTITY_OPENID_CLAIM_NAME"]
clientID := tenantConfiguration["MINIO_IDENTITY_OPENID_CLIENT_ID"]
configurationURL := tenantConfiguration["MINIO_IDENTITY_OPENID_CONFIG_URL"]
Expand Down Expand Up @@ -482,7 +483,7 @@ func updateTenantIdentityProvider(ctx context.Context, operatorClient OperatorCl
tenantConfiguration["MINIO_IDENTITY_OPENID_CLIENT_ID"] = clientID
tenantConfiguration["MINIO_IDENTITY_OPENID_CLIENT_SECRET"] = secretID
tenantConfiguration["MINIO_IDENTITY_OPENID_CLAIM_NAME"] = claimName
tenantConfiguration["MINIO_IDENTITY_OPENID_REDIRECT_URI"] = callbackURL
tenantConfiguration["MINIO_BROWSER_REDIRECT_URL"] = strings.ReplaceAll(callbackURL, "oauth_callback", "")
if scopes == "" {
scopes = "openid,profile,email"
}
Expand All @@ -494,7 +495,7 @@ func updateTenantIdentityProvider(ctx context.Context, operatorClient OperatorCl
delete(tenantConfiguration, "MINIO_IDENTITY_OPENID_CONFIG_URL")
delete(tenantConfiguration, "MINIO_IDENTITY_OPENID_SCOPES")
delete(tenantConfiguration, "MINIO_IDENTITY_OPENID_CLIENT_SECRET")
delete(tenantConfiguration, "MINIO_IDENTITY_OPENID_REDIRECT_URI")
delete(tenantConfiguration, "MINIO_BROWSER_REDIRECT_URL")
}
ldapConfig := params.Body.ActiveDirectory
// set new active directory configuration fields
Expand Down
2 changes: 0 additions & 2 deletions examples/kustomization/tenant-external-idp-oidc/tenant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,3 @@ spec:
value: "openid,profile,email"
- name: MINIO_IDENTITY_OPENID_CLAIM_NAME
value: "https://min.io/policy"
- name: MINIO_IDENTITY_OPENID_REDIRECT_URI
value: "https://your-console-endpoint.com/oauth_callback"

0 comments on commit e89d27c

Please sign in to comment.