Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 273 for auditID (0.26 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/endpoints/filters/audit_test.go

    				}
    
    				if test.auditID != "" && event.AuditID != types.UID(test.auditID) {
    					t.Errorf("Unexpected AuditID in audit event, AuditID should be the same with Audit-ID http header")
    				}
    				if expectedID == types.UID("") {
    					expectedID = event.AuditID
    				} else if expectedID != event.AuditID {
    					t.Errorf("Audits for one request should share the same AuditID, %s differs from %s", expectedID, event.AuditID)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 03 16:16:51 UTC 2023
    - 22.6K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. staging/src/k8s.io/apiserver/pkg/apis/audit/v1/zz_generated.conversion.go

    	out.AuditID = types.UID(in.AuditID)
    	out.Stage = audit.Stage(in.Stage)
    	out.RequestURI = in.RequestURI
    	out.Verb = in.Verb
    	out.User = in.User
    	out.ImpersonatedUser = (*authenticationv1.UserInfo)(unsafe.Pointer(in.ImpersonatedUser))
    	out.SourceIPs = *(*[]string)(unsafe.Pointer(&in.SourceIPs))
    	out.UserAgent = in.UserAgent
    	out.ObjectRef = (*audit.ObjectReference)(unsafe.Pointer(in.ObjectRef))
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 06 19:08:27 UTC 2021
    - 14.6K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top