Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for HeaderMatcher (0.14 sec)

  1. pilot/pkg/security/authz/matcher/header.go

    )
    
    // HeaderMatcher converts a key, value string pair to a corresponding HeaderMatcher.
    func HeaderMatcher(k, v string) *routepb.HeaderMatcher {
    	// We must check "*" first to make sure we'll generate a non empty value in the prefix/suffix case.
    	// Empty prefix/suffix value is invalid in HeaderMatcher.
    	if v == "*" {
    		return &routepb.HeaderMatcher{
    			Name: k,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Aug 17 22:42:11 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  2. pilot/pkg/security/authz/matcher/header_test.go

    )
    
    func TestHeaderMatcher(t *testing.T) {
    	testCases := []struct {
    		Name   string
    		K      string
    		V      string
    		Expect *routepb.HeaderMatcher
    	}{
    		{
    			Name: "exact match",
    			K:    ":path",
    			V:    "/productpage",
    			Expect: &routepb.HeaderMatcher{
    				Name: ":path",
    				HeaderMatchSpecifier: &routepb.HeaderMatcher_StringMatch{
    					StringMatch: StringMatcherExact("/productpage", false),
    				},
    			},
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Aug 17 22:42:11 UTC 2023
    - 6.3K bytes
    - Viewed (0)
  3. tests/fuzz/pilot_security_fuzzer.go

    	_, _ = util.AddrStrToCidrRange(string(data))
    	return 1
    }
    
    func FuzzHeaderMatcher(data []byte) int {
    	k, v, err := getKandV(data)
    	if err != nil {
    		return 0
    	}
    	_ = matcher.HeaderMatcher(k, v)
    	return 1
    }
    
    func FuzzHostMatcherWithRegex(data []byte) int {
    	k, v, err := getKandV(data)
    	if err != nil {
    		return 0
    	}
    	_ = matcher.HostMatcherWithRegex(k, v)
    	return 1
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Nov 20 22:15:12 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  4. pilot/pkg/security/authz/model/permission.go

    	return &rbacpb.Permission{
    		Rule: &rbacpb.Permission_Metadata{
    			Metadata: metadata,
    		},
    	}
    }
    
    func permissionHeader(header *routepb.HeaderMatcher) *rbacpb.Permission {
    	return &rbacpb.Permission{
    		Rule: &rbacpb.Permission_Header{
    			Header: header,
    		},
    	}
    }
    
    func permissionPath(path *matcher.PathMatcher) *rbacpb.Permission {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Apr 20 01:58:53 UTC 2024
    - 3K bytes
    - Viewed (0)
Back to top