github.com/minio/minio@v0.0.0-20240328213742-3f72439b8a27/internal/config/identity/openid/help.go (about)

     1  // Copyright (c) 2015-2021 MinIO, Inc.
     2  //
     3  // This file is part of MinIO Object Storage stack
     4  //
     5  // This program is free software: you can redistribute it and/or modify
     6  // it under the terms of the GNU Affero General Public License as published by
     7  // the Free Software Foundation, either version 3 of the License, or
     8  // (at your option) any later version.
     9  //
    10  // This program is distributed in the hope that it will be useful
    11  // but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  // GNU Affero General Public License for more details.
    14  //
    15  // You should have received a copy of the GNU Affero General Public License
    16  // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  
    18  package openid
    19  
    20  import "github.com/minio/minio/internal/config"
    21  
    22  // Help template for OpenID identity feature.
    23  var (
    24  	defaultHelpPostfix = func(key string) string {
    25  		return config.DefaultHelpPostfix(DefaultKVS, key)
    26  	}
    27  
    28  	Help = config.HelpKVS{
    29  		config.HelpKV{
    30  			Key:         DisplayName,
    31  			Description: "Friendly display name for this Provider/App" + defaultHelpPostfix(DisplayName),
    32  			Optional:    true,
    33  			Type:        "string",
    34  		},
    35  		config.HelpKV{
    36  			Key:         ConfigURL,
    37  			Description: `openid discovery document e.g. "https://accounts.google.com/.well-known/openid-configuration"` + defaultHelpPostfix(ConfigURL),
    38  			Type:        "url",
    39  		},
    40  		config.HelpKV{
    41  			Key:         ClientID,
    42  			Description: `unique public identifier for apps e.g. "292085223830.apps.googleusercontent.com"` + defaultHelpPostfix(ClientID),
    43  			Type:        "string",
    44  		},
    45  		config.HelpKV{
    46  			Key:         ClientSecret,
    47  			Description: `secret for the unique public identifier for apps` + defaultHelpPostfix(ClientSecret),
    48  			Sensitive:   true,
    49  			Type:        "string",
    50  			Secret:      true,
    51  		},
    52  		config.HelpKV{
    53  			Key:         RolePolicy,
    54  			Description: `Set the IAM access policies applicable to this client application and IDP e.g. "app-bucket-write,app-bucket-list"` + defaultHelpPostfix(RolePolicy),
    55  			Optional:    true,
    56  			Type:        "string",
    57  		},
    58  		config.HelpKV{
    59  			Key:         ClaimName,
    60  			Description: `JWT canned policy claim name` + defaultHelpPostfix(ClaimName),
    61  			Optional:    true,
    62  			Type:        "string",
    63  		},
    64  		config.HelpKV{
    65  			Key:         Scopes,
    66  			Description: `Comma separated list of OpenID scopes for server, defaults to advertised scopes from discovery document e.g. "email,admin"` + defaultHelpPostfix(Scopes),
    67  			Optional:    true,
    68  			Type:        "csv",
    69  		},
    70  		config.HelpKV{
    71  			Key:         Vendor,
    72  			Description: `Specify vendor type for vendor specific behavior to checking validity of temporary credentials and service accounts on MinIO` + defaultHelpPostfix(Vendor),
    73  			Optional:    true,
    74  			Type:        "string",
    75  		},
    76  		config.HelpKV{
    77  			Key:         ClaimUserinfo,
    78  			Description: `Enable fetching claims from UserInfo Endpoint for authenticated user` + defaultHelpPostfix(ClaimUserinfo),
    79  			Optional:    true,
    80  			Type:        "on|off",
    81  		},
    82  		config.HelpKV{
    83  			Key:         KeyCloakRealm,
    84  			Description: `Specify Keycloak 'realm' name, only honored if vendor was set to 'keycloak' as value, if no realm is specified 'master' is default` + defaultHelpPostfix(KeyCloakRealm),
    85  			Optional:    true,
    86  			Type:        "string",
    87  		},
    88  		config.HelpKV{
    89  			Key:         KeyCloakAdminURL,
    90  			Description: `Specify Keycloak 'admin' REST API endpoint e.g. http://localhost:8080/auth/admin/` + defaultHelpPostfix(KeyCloakAdminURL),
    91  			Optional:    true,
    92  			Type:        "string",
    93  		},
    94  		config.HelpKV{
    95  			Key:         RedirectURIDynamic,
    96  			Description: `Enable 'Host' header based dynamic redirect URI` + defaultHelpPostfix(RedirectURIDynamic),
    97  			Optional:    true,
    98  			Type:        "on|off",
    99  		},
   100  		config.HelpKV{
   101  			Key:         ClaimPrefix,
   102  			Description: `[DEPRECATED use 'claim_name'] JWT claim namespace prefix e.g. "customer1/"` + defaultHelpPostfix(ClaimPrefix),
   103  			Optional:    true,
   104  			Type:        "string",
   105  		},
   106  		config.HelpKV{
   107  			Key:         RedirectURI,
   108  			Description: `[DEPRECATED use env 'MINIO_BROWSER_REDIRECT_URL'] Configure custom redirect_uri for OpenID login flow callback` + defaultHelpPostfix(RedirectURI),
   109  			Optional:    true,
   110  			Type:        "string",
   111  		},
   112  		config.HelpKV{
   113  			Key:         config.Comment,
   114  			Description: config.DefaultComment,
   115  			Optional:    true,
   116  			Type:        "sentence",
   117  		},
   118  	}
   119  )