Search Options

Results per page
Sort
Preferred Languages
Advance

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

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

    // MockPlugin is the plugin object.
    type MockPlugin struct {
    	token string
    }
    
    // CreateMockPlugin creates a mock credential fetcher plugin. Return the pointer to the created plugin.
    func CreateMockPlugin(token string) *MockPlugin {
    	p := &MockPlugin{
    		token: token,
    	}
    	return p
    }
    
    // GetPlatformCredential returns a constant token string.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 3K bytes
    - Viewed (0)
  2. security/pkg/credentialfetcher/fetcher.go

    		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

    					t.Logf("failed to serve: %v", err)
    				}
    			}()
    
    			opts := &security.Options{CAEndpoint: lis.Addr().String(), ClusterID: constants.DefaultClusterName, CredFetcher: plugin.CreateMockPlugin(tc.token)}
    			err = retry.UntilSuccess(func() error {
    				cli, err := NewCitadelClient(opts, nil)
    				if err != nil {
    					return fmt.Errorf("failed to create ca client: %v", err)
    				}
    				t.Cleanup(cli.Close)
    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 := Setup(t, func(a AgentTest) AgentTest {
    			// Make CA deny all requests to simulate downtime
    			a.CaAuthenticator.Set("", "")
    			a.XdsAuthenticator.Set("", fakeSpiffeID)
    			a.Security.CredFetcher = plugin.CreateMockPlugin("some-token")
    			a.Security.OutputKeyCertToDir = dir
    			a.Security.ProvCert = dir
    			a.AgentConfig.XDSRootCerts = filepath.Join(certDir, "root-cert.pem")
    			return a
    		})
    
    		go func() {
    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