Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for AddAuditAnnotation (0.38 sec)

  1. staging/src/k8s.io/apiserver/pkg/authentication/token/cache/cached_token_authenticator_test.go

    		c := make(chan struct{})
    		a := New(authenticator.TokenFunc(func(ctx context.Context, token string) (*authenticator.Response, bool, error) {
    			<-c
    			atomic.AddUint32(&lookups, 1)
    			audit.AddAuditAnnotation(ctx, "snorlax", "rocks")
    			audit.AddAuditAnnotation(ctx, "pandas", "are amazing")
    			return snorlax, true, nil
    		}), false, time.Minute, 0)
    
    		allAnnotations := make(chan map[string]string, 10)
    		defer close(allAnnotations)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 03 16:16:51 UTC 2023
    - 20.3K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/server/config_test.go

    	authn := authenticator.RequestFunc(func(req *http.Request) (*authenticator.Response, bool, error) {
    		// confirm that we can set an audit annotation in a handler before WithAudit
    		audit.AddAuditAnnotation(req.Context(), "pandas", "are awesome")
    
    		return &authenticator.Response{User: &user.DefaultInfo{}}, true, nil
    	})
    	backend := &testBackend{}
    	c := &Config{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 18:59:21 UTC 2024
    - 13.1K bytes
    - Viewed (0)
  3. pkg/serviceaccount/jwt.go

    	}
    
    	tokenAudiences := authenticator.Audiences(public.Audience)
    	if len(tokenAudiences) == 0 {
    		// only apiserver audiences are allowed for legacy tokens
    		audit.AddAuditAnnotation(ctx, "authentication.k8s.io/legacy-token", public.Subject)
    		legacyTokensTotal.WithContext(ctx).Inc()
    		tokenAudiences = j.implicitAuds
    	}
    
    	requestedAudiences, ok := authenticator.AudiencesFrom(ctx)
    	if !ok {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Feb 27 22:16:08 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  4. pkg/registry/core/serviceaccount/storage/token.go

    		ExpirationTimestamp: metav1.Time{Time: nowTime.Add(time.Duration(out.Spec.ExpirationSeconds) * time.Second)},
    	}
    	if utilfeature.DefaultFeatureGate.Enabled(features.ServiceAccountTokenJTI) && len(sc.ID) > 0 {
    		audit.AddAuditAnnotation(ctx, serviceaccount.IssuedCredentialIDAuditAnnotationKey, serviceaccount.CredentialIDForJTI(sc.ID))
    	}
    	return out, nil
    }
    
    func (r *TokenREST) GroupVersionKind(schema.GroupVersion) schema.GroupVersionKind {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 05 10:24:31 UTC 2024
    - 10K bytes
    - Viewed (0)
  5. pkg/serviceaccount/claims.go

    		if nowTime.After(warnafter.Time()) {
    			secondsAfterWarn := nowTime.Unix() - warnafter.Time().Unix()
    			auditInfo := fmt.Sprintf("subject: %s, seconds after warning threshold: %d", public.Subject, secondsAfterWarn)
    			audit.AddAuditAnnotation(ctx, "authentication.k8s.io/stale-token", auditInfo)
    			staleTokensTotal.WithContext(ctx).Inc()
    		} else {
    			validTokensTotal.WithContext(ctx).Inc()
    		}
    	}
    
    	var jti string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 30 21:15:10 UTC 2023
    - 11.3K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go

    	}
    	if deprecated {
    		deprecatedRequestGauge.WithContext(req.Context()).WithLabelValues(group, version, resource, subresource, removedRelease).Set(1)
    		audit.AddAuditAnnotation(req.Context(), deprecatedAnnotationKey, "true")
    		if len(removedRelease) > 0 {
    			audit.AddAuditAnnotation(req.Context(), removedReleaseAnnotationKey, removedRelease)
    		}
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 27 07:29:19 UTC 2023
    - 35K bytes
    - Viewed (0)
Back to top