MCPcopy Create free account
hub / github.com/grpc/grpc-java / parseHeaderMatcher

Method parseHeaderMatcher

xds/src/main/java/io/grpc/xds/RbacFilter.java:320–331  ·  view source on GitHub ↗
(
          io.envoyproxy.envoy.config.route.v3.HeaderMatcher proto)

Source from the content-addressed store, hash-verified

318 }
319
320 private static AuthHeaderMatcher parseHeaderMatcher(
321 io.envoyproxy.envoy.config.route.v3.HeaderMatcher proto) {
322 if (proto.getName().startsWith("grpc-")) {
323 throw new IllegalArgumentException("Invalid header matcher config: [grpc-] prefixed "
324 + "header name is not allowed.");
325 }
326 if (":scheme".equals(proto.getName())) {
327 throw new IllegalArgumentException("Invalid header matcher config: header name [:scheme] "
328 + "is not allowed.");
329 }
330 return AuthHeaderMatcher.create(MatcherParser.parseHeaderMatcher(proto));
331 }
332
333 private static AuthenticatedMatcher parseAuthenticatedMatcher(
334 Principal.Authenticated proto) {

Callers 2

parsePermissionMethod · 0.95
parsePrincipalMethod · 0.95

Calls 4

createMethod · 0.95
parseHeaderMatcherMethod · 0.95
getNameMethod · 0.65
equalsMethod · 0.45

Tested by

no test coverage detected