Package io.grpc.xds.internal.rbac.engine
Class GrpcAuthorizationEngine
java.lang.Object
io.grpc.xds.internal.rbac.engine.GrpcAuthorizationEngine
Implementation of gRPC server access control based on envoy RBAC protocol:
https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/rbac/v3/rbac.proto
One GrpcAuthorizationEngine is initialized with one action type and a list of policies. Policies are examined sequentially in order in an any match fashion, and the first matched policy will be returned. If not matched at all, the opposite action type is returned as a result.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic classAlways true matcher.static classstatic classRepresents authorization config policy that the engine will evaluate against.static classAn authorization decision provides information about the decision type and the policy name identifier based on the authorization engine evaluation.static classstatic classstatic classstatic classstatic classprivate static final classstatic classNegate matcher.static interfacestatic classstatic classstatic classImplements a top levelGrpcAuthorizationEngine.Matcherfor a single RBAC policy configuration per envoy protocol: https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/rbac/v3/rbac.proto#config-rbac-v3-policy.static classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final GrpcAuthorizationEngine.AuthConfigprivate static final Logger -
Constructor Summary
ConstructorsConstructorDescriptionInstantiated with envoy policyMatcher configuration. -
Method Summary
Modifier and TypeMethodDescriptionevaluate(io.grpc.Metadata metadata, io.grpc.ServerCall<?, ?> serverCall) Return the auth decision for the request argument against the policies.
-
Field Details
-
log
-
authConfig
-
-
Constructor Details
-
GrpcAuthorizationEngine
Instantiated with envoy policyMatcher configuration.
-
-
Method Details
-
evaluate
public GrpcAuthorizationEngine.AuthDecision evaluate(io.grpc.Metadata metadata, io.grpc.ServerCall<?, ?> serverCall) Return the auth decision for the request argument against the policies.
-