@@ -165,38 +165,42 @@ func newServerConfig(ctx context.Context, config *Config) (*auth_providers.Serve
165165
166166 nonAmbientCredentialsConfigured := false
167167
168- if config .BasicAuth != nil {
169- basicAuthConfig := auth_providers .NewBasicAuthAuthenticatorBuilder ().
170- WithUsername (config .BasicAuth .Username ).
171- WithPassword (config .BasicAuth .Password )
172- basicAuthConfig .CommandAuthConfig = authConfig
173- server = basicAuthConfig .GetServerConfig ()
174-
175- nonAmbientCredentialsConfigured = true
176- }
168+ // TODO: Uncomment the below section
169+ /*
170+ if config.BasicAuth != nil {
171+ basicAuthConfig := auth_providers.NewBasicAuthAuthenticatorBuilder().
172+ WithUsername(config.BasicAuth.Username).
173+ WithPassword(config.BasicAuth.Password)
174+ basicAuthConfig.CommandAuthConfig = authConfig
175+ server = basicAuthConfig.GetServerConfig()
176+
177+ nonAmbientCredentialsConfigured = true
178+ }
177179
178- if config .OAuth != nil {
179- oauthConfig := auth_providers .NewOAuthAuthenticatorBuilder ().
180- WithTokenUrl (config .OAuth .TokenURL ).
181- WithClientId (config .OAuth .ClientID ).
182- WithClientSecret (config .OAuth .ClientSecret )
180+ if config.OAuth != nil {
181+ oauthConfig := auth_providers.NewOAuthAuthenticatorBuilder().
182+ WithTokenUrl(config.OAuth.TokenURL).
183+ WithClientId(config.OAuth.ClientID).
184+ WithClientSecret(config.OAuth.ClientSecret)
183185
184- if len (config .OAuth .Scopes ) > 0 {
185- oauthConfig .WithScopes (config .OAuth .Scopes )
186- }
187- if config .OAuth .Audience != "" {
188- oauthConfig .WithAudience (config .OAuth .Audience )
189- }
186+ if len(config.OAuth.Scopes) > 0 {
187+ oauthConfig.WithScopes(config.OAuth.Scopes)
188+ }
189+ if config.OAuth.Audience != "" {
190+ oauthConfig.WithAudience(config.OAuth.Audience)
191+ }
190192
191- oauthConfig .CommandAuthConfig = authConfig
192- server = oauthConfig .GetServerConfig ()
193+ oauthConfig.CommandAuthConfig = authConfig
194+ server = oauthConfig.GetServerConfig()
193195
194- nonAmbientCredentialsConfigured = true
195- }
196+ nonAmbientCredentialsConfigured = true
197+ }
198+ */
196199
197200 // If direct basic-auth/OAuth credentials were configured, continue. Otherwise,
198201 // we look for ambient credentials configured on the environment where we're running.
199202 if ! nonAmbientCredentialsConfigured {
203+ log .Info ("Using ambient credentails" )
200204 source := getAmbientTokenCredentialSource ()
201205 if source == nil {
202206 log .Info ("no direct credentials provided; attempting to use ambient credentials. trying Azure DefaultAzureCredential first" )
0 commit comments