Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for HasAuthenticationCredentials (0.26 sec)

  1. cmd/kubeadm/app/util/kubeconfig/kubeconfig.go

    		return currentContext.Cluster, config.Clusters[currentContext.Cluster]
    	}
    	return "", nil
    }
    
    // HasAuthenticationCredentials returns true if the current user has valid authentication credentials for
    // token authentication, basic authentication or X509 authentication
    func HasAuthenticationCredentials(config *clientcmdapi.Config) bool {
    	authInfo := getCurrentAuthInfo(config)
    	if authInfo == nil {
    		return false
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 21 10:21:33 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  2. cmd/kubeadm/app/discovery/discovery.go

    			cfg.Discovery.TLSBootstrapToken,
    		), nil
    	}
    
    	// if the config returned from discovery has authentication credentials, proceed with the TLS boostrap process
    	if kubeconfigutil.HasAuthenticationCredentials(config) {
    		return config, nil
    	}
    
    	// if there are no authentication credentials (nor in the config returned from discovery, nor in the TLSBootstrapToken), fail
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Jan 14 13:07:56 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  3. cmd/kubeadm/app/discovery/file/file.go

    	if err := kubeconfigutil.EnsureCertificateAuthorityIsEmbedded(currentCluster); err != nil {
    		return nil, err
    	}
    
    	// If the discovery file config contains authentication credentials
    	if kubeconfigutil.HasAuthenticationCredentials(config) {
    		klog.V(1).Info("[discovery] Using authentication credentials from the discovery file for validating TLS connection")
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Jan 14 13:07:55 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  4. cmd/kubeadm/app/util/kubeconfig/kubeconfig_test.go

    			},
    			expected: true,
    		},
    	}
    	for _, rt := range testCases {
    		t.Run(rt.name, func(t *testing.T) {
    			r := HasAuthenticationCredentials(rt.config)
    			if rt.expected != r {
    				t.Errorf(
    					"failed TestHasCredentials:\n\texpected: %v\n\t  actual: %v",
    					rt.expected,
    					r,
    				)
    			}
    		})
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Aug 18 06:49:59 UTC 2023
    - 13.3K bytes
    - Viewed (0)
Back to top