Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for CreateTokenPlugin (0.2 sec)

  1. security/pkg/credentialfetcher/plugin/token.go

    	"strings"
    
    	"istio.io/istio/pkg/log"
    	"istio.io/istio/pkg/security"
    )
    
    type KubernetesTokenPlugin struct {
    	path string
    }
    
    var _ security.CredFetcher = &KubernetesTokenPlugin{}
    
    func CreateTokenPlugin(path string) *KubernetesTokenPlugin {
    	return &KubernetesTokenPlugin{
    		path: path,
    	}
    }
    
    func (t KubernetesTokenPlugin) GetPlatformCredential() (string, error) {
    	if t.path == "" {
    		return "", nil
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  2. security/pkg/credentialfetcher/fetcher.go

    	case security.JWT, "":
    		// If unset, also default to JWT for backwards compatibility
    		if jwtPath == "" {
    			return nil, nil // no cred fetcher - using certificates only
    		}
    		return plugin.CreateTokenPlugin(jwtPath), nil
    	case security.Mock: // for test only
    		return plugin.CreateMockPlugin("test_token"), nil
    	default:
    		return nil, fmt.Errorf("invalid credential fetcher type %s", credtype)
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Oct 07 22:21:41 UTC 2022
    - 1.4K bytes
    - Viewed (0)
  3. security/pkg/nodeagent/caclient/providers/citadel/client_test.go

    		server := mockCAServer{Certs: fakeCert, Err: nil, Authenticator: security.NewFakeAuthenticator("ca")}
    		addr := serve(t, server, tlsOptions(t))
    		opts := &security.Options{
    			CAEndpoint:  addr,
    			CredFetcher: plugin.CreateTokenPlugin("testdata/token"),
    			ProvCert:    certDir,
    		}
    		rootCert := path.Join(certDir, constants.RootCertFilename)
    		key := path.Join(certDir, constants.KeyFilename)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 24 21:03:23 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  4. pkg/istio-agent/agent_test.go

    			a.Security.CertChainFilePath = cfg.CertificatePath
    			a.Security.KeyFilePath = cfg.PrivateKeyPath
    			a.Security.RootCertFilePath = cfg.CaCertificatePath
    			a.Security.CredFetcher = plugin.CreateTokenPlugin(filepath.Join(env.IstioSrc, "pkg/istio-agent/testdata/token"))
    			a.ProxyConfig.ProxyMetadata = map[string]string{}
    			a.ProxyConfig.ProxyMetadata[MetadataClientCertChain] = filepath.Join(dir, "cert-chain.pem")
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 16 22:12:28 UTC 2024
    - 33.4K bytes
    - Viewed (0)
Back to top