Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for NewFakeAuthenticator (0.19 sec)

  1. security/pkg/nodeagent/caclient/providers/citadel/client_test.go

    		}
    	}
    	certDir := filepath.Join(env.IstioSrc, "./tests/testdata/certs/pilot")
    	t.Run("cert always present", func(t *testing.T) {
    		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,
    		}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 24 21:03:23 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  2. pkg/security/mock.go

    	}
    }
    
    type FakeAuthenticator struct {
    	AllowedToken string
    	AllowedCert  string
    	Name         string
    
    	Successes *atomic.Int32
    	Failures  *atomic.Int32
    
    	mu sync.Mutex
    }
    
    func NewFakeAuthenticator(name string) *FakeAuthenticator {
    	return &FakeAuthenticator{
    		Name:      name,
    		Successes: atomic.NewInt32(0),
    		Failures:  atomic.NewInt32(0),
    	}
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  3. pkg/istio-agent/agent_test.go

    	agent *Agent
    }
    
    func Setup(t *testing.T, opts ...func(a AgentTest) AgentTest) *AgentTest {
    	d := t.TempDir()
    	resp := AgentTest{
    		XdsAuthenticator: security.NewFakeAuthenticator("xds").Set("fake", ""),
    		CaAuthenticator:  security.NewFakeAuthenticator("ca").Set("fake", ""),
    		ProxyConfig:      mesh.DefaultProxyConfig(),
    	}
    	// Run through opts one time just to get the authenticators.
    	for _, opt := range opts {
    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