Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for SetTokenRotation (0.15 sec)

  1. security/pkg/credentialfetcher/fetcher_test.go

    			identityProvider: "",
    			expectedErr:      "invalid credential fetcher type foo",
    			expectedToken:    "",
    			expectedIdp:      "",
    		},
    	}
    
    	// Disable token refresh for GCE VM credential fetcher.
    	plugin.SetTokenRotation(false)
    	for id, tc := range testCases {
    		id, tc := id, tc
    		t.Run(id, func(t *testing.T) {
    			t.Parallel()
    			cf, err := NewCredFetcher(
    				tc.fetcherType, tc.trustdomain, tc.jwtPath, tc.identityProvider)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Feb 03 20:21:32 UTC 2023
    - 3K bytes
    - Viewed (0)
  2. security/pkg/credentialfetcher/plugin/gce.go

    // rotateToken determines whether to start periodic token rotation job.
    // This is enabled by default.
    var rotateToken = true
    
    // SetTokenRotation enable/disable periodic token rotation job.
    // This is only for testing purpose, not thread safe.
    func SetTokenRotation(enable bool) {
    	rotateToken = enable
    }
    
    // GCEPlugin is the plugin object.
    type GCEPlugin struct {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 30 13:56:46 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  3. security/pkg/credentialfetcher/plugin/gce_test.go

    			jwtPath:      fmt.Sprintf("/tmp/security-pkg-credentialfetcher-plugin-gcetest-%s", uuid.New().String()),
    		},
    	}
    
    	SetTokenRotation(false)
    	ms, err := StartMetadataServer()
    	if err != nil {
    		t.Fatalf("StartMetadataServer() returns err: %v", err)
    	}
    	t.Cleanup(func() {
    		ms.Stop()
    		SetTokenRotation(true)
    	})
    
    	for id, tc := range testCases {
    		p := GCEPlugin{
    			tokenCache: tc.jwt,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Aug 03 18:09:59 UTC 2021
    - 10.1K bytes
    - Viewed (0)
Back to top