- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for AuthenticateToken (0.2 sec)
-
staging/src/k8s.io/apiserver/pkg/authentication/token/cache/cached_token_authenticator_test.go
a.AuthenticateToken(context.Background(), "bad1") a.AuthenticateToken(context.Background(), "bad2") a.AuthenticateToken(context.Background(), "bad3") fakeClock.Step(2 * time.Microsecond) a.AuthenticateToken(context.Background(), "bad1") a.AuthenticateToken(context.Background(), "bad2") a.AuthenticateToken(context.Background(), "bad3") fakeClock.Step(2 * time.Microsecond)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jul 03 16:16:51 UTC 2023 - 20.3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/plugin/pkg/authenticator/token/oidc/metrics.go
delegate AuthenticatorTokenWithHealthCheck clock clock.PassiveClock } func (a *instrumentedAuthenticator) AuthenticateToken(ctx context.Context, token string) (*authenticator.Response, bool, error) { start := a.clock.Now() response, ok, err := a.delegate.AuthenticateToken(ctx, token) // this only happens when issuer doesn't match the authenticator // we don't want to record metrics for this case
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Mar 09 19:29:33 UTC 2024 - 3.3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/authentication/token/cache/cached_token_authenticator.go
hashPool: &sync.Pool{ New: func() interface{} { return hmac.New(sha256.New, randomCacheKey) }, }, } } // AuthenticateToken implements authenticator.Token func (a *cachedTokenAuthenticator) AuthenticateToken(ctx context.Context, token string) (*authenticator.Response, bool, error) { record := a.doAuthenticateToken(ctx, token) if !record.ok || record.err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jul 03 16:16:51 UTC 2023 - 9.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/authentication/group/token_group_adder.go
func NewTokenGroupAdder(auth authenticator.Token, groups []string) authenticator.Token { return &TokenGroupAdder{auth, groups} } func (g *TokenGroupAdder) AuthenticateToken(ctx context.Context, token string) (*authenticator.Response, bool, error) { r, ok, err := g.Authenticator.AuthenticateToken(ctx, token) if err != nil || !ok { return nil, ok, err } newGroups := make([]string, 0, len(r.User.GetGroups())+len(g.Groups))
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 11 20:04:50 UTC 2022 - 1.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/plugin/pkg/authenticator/token/oidc/metrics_test.go
t.Run(tt.name, func(t *testing.T) { jwtAuthenticatorLatencyMetric.Reset() RegisterMetrics() a := newInstrumentedAuthenticatorWithClock(testIssuer, tt.authenticator, dummyClock{}) _, _, _ = a.AuthenticateToken(context.Background(), "token") if err := testutil.GatherAndCompare(legacyregistry.DefaultGatherer, strings.NewReader(tt.expectedValue), "apiserver_authentication_jwt_authenticator_latency_seconds"); err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Mar 09 19:29:33 UTC 2024 - 8.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook/webhook_v1_test.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 18 00:47:42 UTC 2022 - 19.1K bytes - Viewed (0) -
plugin/pkg/auth/authenticator/token/bootstrap/bootstrap.go
func tokenErrorf(s *corev1.Secret, format string, i ...interface{}) { format = fmt.Sprintf("Bootstrap secret %s/%s matching bearer token ", s.Namespace, s.Name) + format klog.V(3).Infof(format, i...) } // AuthenticateToken tries to match the provided token to a bootstrap token secret // in a given namespace. If found, it authenticates the token in the // "system:bootstrappers" group and with the "system:bootstrap:(token-id)" username. //
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 30 20:38:15 UTC 2023 - 5.1K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/authentication/group/token_group_adder_test.go
authenticator.TokenFunc(func(ctx context.Context, token string) (*authenticator.Response, bool, error) { return response, true, nil }), []string{"added"}, ), ) r, _, _ := adder.AuthenticateToken(context.Background(), "") if !reflect.DeepEqual(r.User.GetGroups(), []string{"original", "added"}) { t.Errorf("Expected original,added groups, got %#v", r.User.GetGroups()) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 11 20:04:50 UTC 2022 - 1.6K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook/webhook_v1beta1_test.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 18 00:47:42 UTC 2022 - 19.2K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/authentication/request/bearertoken/bearertoken.go
// The space before the token case if len(parts) == 3 { warning.AddWarning(req.Context(), "", invalidTokenWithSpaceWarning) } return nil, false, nil } resp, ok, err := a.auth.AuthenticateToken(req.Context(), token) // if we authenticated successfully, go ahead and remove the bearer token so that no one // is ever tempted to use it inside of the API server if ok { req.Header.Del("Authorization") }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Apr 25 13:22:28 UTC 2022 - 2K bytes - Viewed (0)