- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for withAudit (0.12 sec)
-
staging/src/k8s.io/apiserver/pkg/authentication/token/cache/cached_token_authenticator_test.go
return snorlax, true, nil }), false, time.Minute, 0) ctx1 := withAudit(context.Background()) _, _, _ = a.AuthenticateToken(ctx1, "token1") annotations1 := audit.AuditEventFrom(ctx1).Annotations // guarantee different now times time.Sleep(time.Second) ctx2 := withAudit(context.Background()) _, _, _ = a.AuthenticateToken(ctx2, "token2")
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/pkg/endpoints/filters/audit_test.go
true, }, } { t.Run(test.desc, func(t *testing.T) { sink := &fakeAuditSink{} fakeRuleEvaluator := policy.NewFakePolicyRuleEvaluator(auditinternal.LevelRequestResponse, test.omitStages) handler := WithAudit(http.HandlerFunc(test.handler), sink, fakeRuleEvaluator, func(r *http.Request, ri *request.RequestInfo) bool { // simplified long-running check return ri.Verb == "watch" }) handler = WithAuditInit(handler)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jul 03 16:16:51 UTC 2023 - 22.6K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/delete.go
ctx, cancel := context.WithTimeout(ctx, requestTimeoutUpperBound) defer cancel() ctx = request.WithNamespace(ctx, namespace) admit = admission.WithAudit(admit) outputMediaType, _, err := negotiation.NegotiateOutputMediaType(req, scope.Serializer, scope) if err != nil { scope.err(err, w, req) return } options := &metav1.DeleteOptions{}
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 01 10:00:32 UTC 2023 - 11.4K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/filters/request_deadline_test.go
withAudit := withFailedRequestAudit(errorHandler, test.statusErr, fakeSink, fakeRuleEvaluator) w := httptest.NewRecorder() testRequest := newRequest(t, "/apis/v1/namespaces/default/pods") info := request.RequestInfo{} testRequest = testRequest.WithContext(request.WithRequestInfo(testRequest.Context(), &info)) withAudit.ServeHTTP(w, testRequest)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Oct 14 23:04:34 UTC 2022 - 16.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/create.go
_, name, _ = scope.Namer.ObjectName(obj) } if len(namespace) == 0 && scope.Resource == namespaceGVR { namespace = name } ctx = request.WithNamespace(ctx, namespace) admit = admission.WithAudit(admit) audit.LogRequestObject(req.Context(), obj, objGV, scope.Resource, scope.Subresource, scope.Serializer) userInfo, _ := request.UserFrom(ctx) if objectMeta, err := meta.Accessor(obj); err == nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 01 20:19:46 UTC 2023 - 10.1K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/update.go
scope.err(err, w, req) return } span.AddEvent("Conversion done") audit.LogRequestObject(req.Context(), obj, objGV, scope.Resource, scope.Subresource, scope.Serializer) admit = admission.WithAudit(admit) // if this object supports namespace info if objectMeta, err := meta.Accessor(obj); err == nil { // ensure namespace on the object is correct, or error if a conflicting namespace was set in the object
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 01 20:19:46 UTC 2023 - 11.5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/server/config_test.go
func TestAuthenticationAuditAnnotationsDefaultChain(t *testing.T) { 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) -
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go
} namespace, name, err := scope.Namer.Name(req) if err != nil { scope.err(err, w, req) return } ctx := req.Context() ctx = request.WithNamespace(ctx, namespace) admit = admission.WithAudit(admit) opts, subpath, subpathKey := connecter.NewConnectOptions() if err := getRequestOptions(req, scope, opts, subpath, subpathKey, isSubresource); err != nil { err = errors.NewBadRequest(err.Error())
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 08 21:44:00 UTC 2023 - 17K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/patch.go
scope.err(err, w, req) return } options.TypeMeta.SetGroupVersionKind(metav1.SchemeGroupVersion.WithKind("PatchOptions")) admit = admission.WithAudit(admit) audit.LogRequestPatch(req.Context(), patchBytes) span.AddEvent("Recorded the audit event") baseContentType := runtime.ContentTypeJSON if patchType == types.ApplyPatchType {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 28 08:48:22 UTC 2024 - 28.5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/server/config.go
handler = filterlatency.TrackStarted(handler, c.TracerProvider, "impersonation") handler = filterlatency.TrackCompleted(handler) handler = genericapifilters.WithAudit(handler, c.AuditBackend, c.AuditPolicyRuleEvaluator, c.LongRunningFunc) handler = filterlatency.TrackStarted(handler, c.TracerProvider, "audit") failedHandler := genericapifilters.Unauthorized(c.Serializer)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 28 08:48:22 UTC 2024 - 47.7K bytes - Viewed (0)