const AliceToken …
const BobToken …
const UnknownToken …
func getTestWebhookTokenAuth(serverURL string, customDial utilnet.DialFunc) (authenticator.Request, error) { … }
func getTestWebhookTokenAuthCustomDialer(serverURL string) (authenticator.Request, error) { … }
func path(resource, namespace, name string) string { … }
func pathWithPrefix(prefix, resource, namespace, name string) string { … }
func pathWithSubResource(resource, namespace, name, subresource string) string { … }
func timeoutPath(resource, namespace, name string) string { … }
var aPod …
var aRC …
var aService …
var aNode …
func aEvent(namespace string) string { … }
var aBinding …
var emptyEndpoints …
var aEndpoints …
var deleteNow …
func addTimeoutFlag(URLString string) string { … }
type testRequest …
func getTestRequests(namespace string) []testRequest { … }
func TestAuthModeAlwaysAllow(t *testing.T) { … }
func parseResourceVersion(response []byte) (string, float64, error) { … }
func getPreviousResourceVersionKey(url, id string) string { … }
func TestAuthModeAlwaysDeny(t *testing.T) { … }
func TestAliceNotForbiddenOrUnauthorized(t *testing.T) { … }
func TestBobIsForbidden(t *testing.T) { … }
func TestUnknownUserIsUnauthorized(t *testing.T) { … }
type impersonateAuthorizer …
func (impersonateAuthorizer) Authorize(ctx context.Context, a authorizer.Attributes) (authorizer.Decision, string, error) { … }
func TestImpersonateIsForbidden(t *testing.T) { … }
func TestImpersonateWithUID(t *testing.T) { … }
func csrPEM(t *testing.T) []byte { … }
func newABACFileWithContents(t *testing.T, contents string) string { … }
type trackingAuthorizer …
func (a *trackingAuthorizer) Authorize(ctx context.Context, attributes authorizer.Attributes) (authorizer.Decision, string, error) { … }
func TestAuthorizationAttributeDetermination(t *testing.T) { … }
func TestNamespaceAuthorization(t *testing.T) { … }
func TestKindAuthorization(t *testing.T) { … }
func TestReadOnlyAuthorization(t *testing.T) { … }
func TestWebhookTokenAuthenticator(t *testing.T) { … }
func TestWebhookTokenAuthenticatorCustomDial(t *testing.T) { … }
func testWebhookTokenAuthenticator(customDialer bool, t *testing.T) { … }
func newTestWebhookTokenAuthServer() *httptest.Server { … }