Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for StringMatcherWithPrefix (0.17 sec)

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

    		MatchPattern: &matcher.StringMatcher_Exact{
    			Exact: exact,
    		},
    	}
    }
    
    // StringMatcherWithPrefix creates a string matcher for v with the extra prefix inserted to the
    // created string matcher, note the prefix is ignored if v is wildcard ("*").
    // The wildcard "*" will be generated as ".+" instead of ".*".
    func StringMatcherWithPrefix(v, prefix string) *matcher.StringMatcher {
    	switch {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Mar 25 10:39:25 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  2. pilot/pkg/security/authz/matcher/string_test.go

    				MatchPattern: &matcher.StringMatcher_Exact{
    					Exact: "abc-exact",
    				},
    			},
    		},
    	}
    
    	for _, tc := range testCases {
    		t.Run(tc.name, func(t *testing.T) {
    			actual := StringMatcherWithPrefix(tc.v, tc.prefix)
    			if !cmp.Equal(actual, tc.want, protocmp.Transform()) {
    				t.Errorf("want %s but got %s", tc.want.String(), actual.String())
    			}
    		})
    	}
    }
    
    func TestStringMatcherRegex(t *testing.T) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Aug 17 22:42:11 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  3. pilot/pkg/security/authz/model/generator.go

    	return nil, fmt.Errorf("unimplemented")
    }
    
    func (srcPrincipalGenerator) principal(key, value string, _ bool, useAuthenticated bool) (*rbacpb.Principal, error) {
    	m := matcher.StringMatcherWithPrefix(value, spiffe.URIPrefix)
    	return principalAuthenticated(m, useAuthenticated), nil
    }
    
    type requestPrincipalGenerator struct{}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 03 18:02:42 UTC 2024
    - 14.1K bytes
    - Viewed (0)
Back to top