• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

grpc / grpc-java / #20337

26 Jun 2026 11:37AM UTC coverage: 89.06% (+0.2%) from 88.876%
#20337

push

github

web-flow
Ext_proc filter and client interceptor (#12792)

Implements ext_proc filter from [grfc A93](https://github.com/grpc/proposal/pull/484)  (internal [design doc](http://go/ext-proc-design-java)).

37585 of 42202 relevant lines covered (89.06%)

0.89 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/../xds/src/main/java/io/grpc/xds/InternalRbacFilter.java
1
/*
2
 * Copyright 2021 The gRPC Authors
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *     http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16

17
package io.grpc.xds;
18

19
import io.envoyproxy.envoy.extensions.filters.http.rbac.v3.RBAC;
20
import io.grpc.Internal;
21
import io.grpc.ServerInterceptor;
22
import io.grpc.xds.Filter.FilterContext;
23

24
/** This class exposes some functionality in RbacFilter to other packages. */
25
@Internal
26
public final class InternalRbacFilter {
27

28
  private InternalRbacFilter() {}
29

30
  /** Parses RBAC filter config and creates AuthorizationServerInterceptor. */
31
  public static ServerInterceptor createInterceptor(RBAC rbac) {
32
    ConfigOrError<RbacConfig> filterConfig = RbacFilter.Provider.parseRbacConfig(rbac);
×
33
    if (filterConfig.errorDetail != null) {
×
34
      throw new IllegalArgumentException(
×
35
        String.format("Failed to parse Rbac policy: %s", filterConfig.errorDetail));
×
36
    }
37
    return new RbacFilter.Provider().newInstance(
×
38
        FilterContext.create("internalRbacFilter", new io.grpc.MetricRecorder() {}))
×
39
        .buildServerInterceptor(filterConfig.config, null);
×
40
  }
41
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc