Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for OmitStages (0.14 sec)

  1. staging/src/k8s.io/apiserver/pkg/audit/policy/checker.go

    			return auditinternal.RequestAuditConfig{
    				Level:             rule.Level,
    				OmitStages:        rule.OmitStages,
    				OmitManagedFields: isOmitManagedFields(&rule, p.OmitManagedFields),
    			}
    		}
    	}
    
    	return auditinternal.RequestAuditConfig{
    		Level:             DefaultAuditLevel,
    		OmitStages:        p.OmitStages,
    		OmitManagedFields: p.OmitManagedFields,
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 02 22:24:14 UTC 2022
    - 6.1K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/apis/audit/validation/validation_test.go

    	}
    	successCases = append(successCases, audit.Policy{})                         // Empty policy is valid.
    	successCases = append(successCases, audit.Policy{OmitStages: []audit.Stage{ // Policy with omitStages
    		audit.Stage("RequestReceived")}})
    	successCases = append(successCases, audit.Policy{Rules: validRules}) // Multiple rules.
    
    	for i, policy := range successCases {
    		if errs := ValidatePolicy(&policy); len(errs) != 0 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 02 07:48:42 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/endpoints/filters/audit.go

    			return
    		}
    
    		if !ac.Enabled() {
    			handler.ServeHTTP(w, req)
    			return
    		}
    		ev := &ac.Event
    
    		ctx := req.Context()
    		omitStages := ac.RequestAuditConfig.OmitStages
    
    		ev.Stage = auditinternal.StageRequestReceived
    		if processed := processAuditEvent(ctx, sink, ev, omitStages); !processed {
    			audit.ApiserverAuditDroppedCounter.WithContext(ctx).Inc()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 03 16:16:51 UTC 2023
    - 8.6K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/apis/audit/zz_generated.deepcopy.go

    	if in.Rules != nil {
    		in, out := &in.Rules, &out.Rules
    		*out = make([]PolicyRule, len(*in))
    		for i := range *in {
    			(*in)[i].DeepCopyInto(&(*out)[i])
    		}
    	}
    	if in.OmitStages != nil {
    		in, out := &in.OmitStages, &out.OmitStages
    		*out = make([]Stage, len(*in))
    		copy(*out, *in)
    	}
    	return
    }
    
    // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Policy.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 06 19:08:27 UTC 2021
    - 7.9K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/apis/audit/validation/validation.go

    )
    
    // ValidatePolicy validates the audit policy
    func ValidatePolicy(policy *audit.Policy) field.ErrorList {
    	var allErrs field.ErrorList
    	allErrs = append(allErrs, validateOmitStages(policy.OmitStages, field.NewPath("omitStages"))...)
    	rulePath := field.NewPath("rules")
    	for i, rule := range policy.Rules {
    		allErrs = append(allErrs, validatePolicyRule(rule, rulePath.Index(i))...)
    	}
    	return allErrs
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Feb 15 14:13:07 UTC 2019
    - 4.6K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/apis/audit/v1/zz_generated.deepcopy.go

    	if in.Rules != nil {
    		in, out := &in.Rules, &out.Rules
    		*out = make([]PolicyRule, len(*in))
    		for i := range *in {
    			(*in)[i].DeepCopyInto(&(*out)[i])
    		}
    	}
    	if in.OmitStages != nil {
    		in, out := &in.OmitStages, &out.OmitStages
    		*out = make([]Stage, len(*in))
    		copy(*out, *in)
    	}
    	return
    }
    
    // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Policy.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 06 19:08:27 UTC 2021
    - 7.9K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/audit/evaluator.go

    type RequestAuditConfig struct {
    	// Level at which the request is being audited at
    	Level audit.Level
    
    	// OmitStages is the stages that need to be omitted from being audited.
    	OmitStages []audit.Stage
    
    	// OmitManagedFields indicates whether to omit the managed fields of the request
    	// and response bodies from being written to the API audit log.
    	OmitManagedFields bool
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 02 22:24:14 UTC 2022
    - 1.6K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/endpoints/filters/authn_audit.go

    		ev.ResponseStatus = &metav1.Status{}
    		ev.ResponseStatus.Message = getAuthMethods(req)
    		ev.Stage = auditinternal.StageResponseStarted
    
    		rw := decorateResponseWriter(req.Context(), w, ev, sink, ac.RequestAuditConfig.OmitStages)
    		failedHandler.ServeHTTP(rw, req)
    	})
    }
    
    func getAuthMethods(req *http.Request) string {
    	authMethods := []string{}
    
    	if _, _, ok := req.BasicAuth(); ok {
    		authMethods = append(authMethods, "basic")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 03 16:16:51 UTC 2023
    - 2.7K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/endpoints/filters/request_deadline.go

    		ev.Stage = auditinternal.StageResponseStarted
    		if statusErr != nil {
    			ev.ResponseStatus.Message = statusErr.Error()
    		}
    
    		rw := decorateResponseWriter(req.Context(), w, ev, sink, ac.RequestAuditConfig.OmitStages)
    		failedHandler.ServeHTTP(rw, req)
    	})
    }
    
    // failedErrorHandler returns an http.Handler that uses the specified StatusError object
    // to render an error response to the request.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 05 21:12:12 UTC 2024
    - 6.6K bytes
    - Viewed (0)
Back to top