Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for isAllowedKubernetesAudience (0.44 sec)

  1. security/pkg/server/ca/authenticate/kubeauth/kube_jwt_test.go

    		{"foo.default.svc:80", false},
    		{"https://foo.default.svc:80", false},
    	}
    	for _, tt := range tests {
    		t.Run(tt.in, func(t *testing.T) {
    			if got := isAllowedKubernetesAudience(tt.in); got != tt.want {
    				t.Errorf("isAllowedKubernetesAudience() = %v, want %v", got, tt.want)
    			}
    		})
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  2. security/pkg/server/ca/authenticate/kubeauth/kube_jwt.go

    		clusterID:              clusterID,
    		remoteKubeClientGetter: remoteKubeClientGetter,
    	}
    }
    
    func (a *KubeJWTAuthenticator) AuthenticatorType() string {
    	return KubeJWTAuthenticatorType
    }
    
    func isAllowedKubernetesAudience(a string) bool {
    	// We do not use url.Parse() as it *requires* the protocol.
    	a = strings.TrimPrefix(a, "https://")
    	a = strings.TrimPrefix(a, "http://")
    	return strings.HasPrefix(a, "kubernetes.default.svc")
    }
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 5K bytes
    - Viewed (0)
Back to top