Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 118 for auditID (8.53 sec)

  1. staging/src/k8s.io/apiserver/pkg/audit/context.go

    	auditID, ok := AuditIDFrom(ctx)
    	if !ok {
    		return ""
    	}
    
    	// if the user has specified a very long audit ID then we will use the first N characters
    	// Note: assuming Audit-ID header is in ASCII
    	const maxAuditIDLength = 64
    	if len(auditID) > maxAuditIDLength {
    		auditID = auditID[:maxAuditIDLength]
    	}
    
    	return string(auditID)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 03 16:16:51 UTC 2023
    - 6.1K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/plugin/pkg/audit/log/backend_test.go

    	"k8s.io/apimachinery/pkg/runtime/schema"
    	"k8s.io/apimachinery/pkg/types"
    	auditinternal "k8s.io/apiserver/pkg/apis/audit"
    	"k8s.io/apiserver/pkg/apis/audit/install"
    	auditv1 "k8s.io/apiserver/pkg/apis/audit/v1"
    	"k8s.io/apiserver/pkg/audit"
    )
    
    func init() {
    	install.Install(audit.Scheme)
    }
    
    func TestLogEventsLegacy(t *testing.T) {
    	for _, test := range []struct {
    		event    *auditinternal.Event
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 08 06:37:26 UTC 2022
    - 5K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/endpoints/filters/audit_init.go

    		ctx := audit.WithAuditContext(r.Context())
    		r = r.WithContext(ctx)
    
    		auditID := r.Header.Get(auditinternal.HeaderAuditID)
    		if len(auditID) == 0 {
    			auditID = newAuditIDFunc()
    		}
    
    		// Note: we save the user specified value of the Audit-ID header as is, no truncation is performed.
    		audit.WithAuditID(ctx, types.UID(auditID))
    
    		// We echo the Audit-ID in to the response header.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 14 23:04:35 UTC 2022
    - 2.3K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/audit/request.go

    		}
    		if ok {
    			obj = copy
    		}
    	}
    
    	// TODO(audit): hook into the serializer to avoid double conversion
    	var err error
    	ae.RequestObject, err = encodeObject(obj, objGV, s)
    	if err != nil {
    		// TODO(audit): add error slice to audit event struct
    		klog.ErrorS(err, "Encoding failed of request object", "auditID", ae.AuditID, "gvr", gvr.String(), "obj", obj)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 03 16:16:51 UTC 2023
    - 9K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/audit/union_test.go

    			t.Errorf("backend %d wanted %d events, got %d", i, n, got)
    			continue
    		}
    		for j, event := range backend.events {
    			wantID := types.UID(strconv.Itoa(j))
    			if event.AuditID != wantID {
    				t.Errorf("backend %d event %d wanted id %s, got %s", i, j, wantID, event.AuditID)
    			}
    		}
    	}
    }
    
    type cannotMultipleRunBackend struct {
    	started chan struct{}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 20 09:51:25 UTC 2022
    - 2.6K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/server/filters/wrap.go

    			return
    		}
    		http.Error(w, "This request caused apiserver to panic. Look in the logs for details.", http.StatusInternalServerError)
    		klog.ErrorS(nil, "apiserver panic'd", "method", req.Method, "URI", req.RequestURI, "auditID", audit.GetAuditIDTruncated(req.Context()))
    	})
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 26 16:28:45 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/util/proxy/proxy.go

    	newReq.URL = location
    	newReq.Host = location.Host
    
    	// If the original request has an audit ID, let's make sure we propagate this
    	// to the aggregated server.
    	if auditID, found := audit.AuditIDFrom(req.Context()); found {
    		newReq.Header.Set(auditinternal.HeaderAuditID, string(auditID))
    	}
    
    	return newReq, cancelFn
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 19 00:36:22 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/audit/format.go

    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    package audit
    
    import (
    	"fmt"
    	"strconv"
    	"strings"
    	"time"
    
    	auditinternal "k8s.io/apiserver/pkg/apis/audit"
    )
    
    // EventString creates a 1-line text representation of an audit event, using a subset of the
    // information in the event struct.
    func EventString(ev *auditinternal.Event) string {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 25 12:23:51 UTC 2021
    - 2.1K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/server/httplog/httplog.go

    		rl.StacktraceWhen(pred)
    	}
    }
    
    // Log is intended to be called once at the end of your request handler, via defer
    func (rl *respLogger) Log() {
    	latency := time.Since(rl.startTime)
    	auditID := audit.GetAuditIDTruncated(rl.req.Context())
    	verb := metrics.NormalizedVerb(rl.req)
    
    	keysAndValues := []interface{}{
    		"verb", verb,
    		"URI", rl.req.RequestURI,
    		"latency", latency,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Aug 07 10:10:35 UTC 2023
    - 9.7K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/endpoints/filters/request_deadline.go

    // with the appropriate deadline.
    // auditWrapper provides an http.Handler that audits a failed request.
    // longRunning returns true if he given request is a long running request.
    // requestTimeoutMaximum specifies the default request timeout value.
    func WithRequestDeadline(handler http.Handler, sink audit.Sink, policy audit.PolicyRuleEvaluator, longRunning request.LongRunningRequestCheck,
    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