AGENTS.md
src/core/lib/security/authorization/AGENTS.mdAGENTS.md
Quality
48/100
Scores the file, not the repository.Length
434 words
6 headings · 0 code blocksRepository
45k
— · pushed 0 days agoLast changed
3 days ago
First indexed 3 days ago.1# Authorization23This directory contains the implementation of the gRPC authorization framework.45## Overarching Purpose67The authorization framework provides a mechanism for authorizing incoming requests based on a set of rules defined in an authorization policy. This can be used to control access to gRPC services and methods based on the authenticated user's identity and other request metadata.89## Core Concepts1011The authorization framework is built around a few key abstractions:1213* **`AuthorizationEngine`**: The `AuthorizationEngine` is the main interface for making authorization decisions. It takes a set of evaluation arguments and returns an authorization decision.14* **`AuthorizationPolicyProvider`**: The `AuthorizationPolicyProvider` is responsible for providing the authorization policy to the `AuthorizationEngine`. This allows the authorization policy to be loaded from a variety of sources, such as a local file or a remote server.15* **`EvaluateArgs`**: The `EvaluateArgs` struct contains the information that is needed to make an authorization decision. This includes the request headers, the peer identity, and other information about the request.1617## Implementations1819The authorization framework includes two main implementations of the `AuthorizationEngine`:2021* **`GrpcAuthorizationEngine`**: This implementation is based on the [Envoy RBAC filter](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/rbac_filter). It uses a set of RBAC policies to make authorization decisions.22* **`CelAuthorizationEngine`**: This implementation is based on the [Common Expression Language (CEL)](https://cel-spec.dev/). It uses a set of CEL expressions to make authorization decisions. This implementation is still experimental.2324## Files2526* **`authorization_engine.h`**: Defines the `AuthorizationEngine` interface.27* **`grpc_authorization_engine.h`, `grpc_authorization_engine.cc`**: These files define the `GrpcAuthorizationEngine` class.28* **`cel_authorization_engine.h`, `cel_authorization_engine.cc`**: These files define the `CelAuthorizationEngine` class.29* **`grpc_server_authz_filter.h`, `grpc_server_authz_filter.cc`**: These files define the `GrpcServerAuthzFilter` class, which is a server-side filter that uses an `AuthorizationEngine` to authorize incoming requests.30* **`rbac_policy.h`, `rbac_policy.cc`**: These files define the `Rbac` struct, which represents an RBAC policy.31* **`authorization_policy_provider.h`**: Defines the `AuthorizationPolicyProvider` interface.32* **`grpc_authorization_policy_provider.h`, `grpc_authorization_policy_provider.cc`**: These files define a concrete implementation of the `AuthorizationPolicyProvider` interface that loads the authorization policy from a static string.33* **`audit_logging.h`, `audit_logging.cc`**: These files define the interfaces for audit logging. Audit logging can be used to record information about authorization decisions.3435## Notes3637* The authorization framework is a powerful tool for securing gRPC services. It can be used to implement a wide range of authorization policies, from simple access control lists to complex, attribute-based policies.38* The framework is designed to be used in conjunction with xDS, which can be used to dynamically update the authorization policy at runtime.39* The CEL-based authorization engine is still experimental and is not yet recommended for production use.40* Audit logging can be used to record information about authorization decisions. This can be useful for security auditing and for debugging authorization policies.41
Also in grpc/grpc
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| grpc/grpcsrc/core/ext/filters/census/AGENTS.md · 45k | AGENTS.md | no sections | 25/100 | 3 days ago | |
| grpc/grpcsrc/core/ext/filters/gcp_authentication/AGENTS.md · 45k | AGENTS.md | security | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/ext/filters/http/AGENTS.md · 45k | AGENTS.md | no sections | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/ext/filters/stateful_session/AGENTS.md · 45k | AGENTS.md | no sections | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/ext/transport/chaotic_good/AGENTS.md · 45k | AGENTS.md | no sections | 48/100 | 3 days ago | |
| grpc/grpcsrc/core/ext/transport/inproc/AGENTS.md · 45k | AGENTS.md | no sections | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/filter/AGENTS.md · 45k | AGENTS.md | no sections | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/handshaker/AGENTS.md · 45k | AGENTS.md | no sections | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/server/AGENTS.md · 45k | AGENTS.md | no sections | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/service_config/AGENTS.md · 45k | AGENTS.md | no sections | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/telemetry/AGENTS.md · 45k | AGENTS.md | no sections | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/transport/AGENTS.md · 45k | AGENTS.md | no sections | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/credentials/transport/AGENTS.md · 45k | AGENTS.md | security | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/ext/filters/backend_metrics/AGENTS.md · 45k | AGENTS.md | no sections | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/credentials/AGENTS.md · 45k | AGENTS.md | security | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/tsi/AGENTS.md · 45k | AGENTS.md | security | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/tsi/alts/AGENTS.md · 45k | AGENTS.md | no sections | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/credentials/call/AGENTS.md · 45k | AGENTS.md | security | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/ext/transport/chttp2/AGENTS.md · 45k | AGENTS.md | testarchdependencies | 48/100 | 3 days ago | |
| grpc/grpcAGENTS.md · 45k | AGENTS.md | styledependenciesdo-not | 54/100 | 3 days ago |
Diff against src/core/ext/filters/census/AGENTS.md Diff against src/core/ext/filters/gcp_authentication/AGENTS.md Diff against src/core/ext/filters/http/AGENTS.md Diff against src/core/ext/filters/stateful_session/AGENTS.md Diff against src/core/ext/transport/chaotic_good/AGENTS.md Diff against src/core/ext/transport/inproc/AGENTS.md Diff against src/core/filter/AGENTS.md Diff against src/core/handshaker/AGENTS.md Diff against src/core/server/AGENTS.md Diff against src/core/service_config/AGENTS.md Diff against src/core/telemetry/AGENTS.md Diff against src/core/transport/AGENTS.md Diff against src/core/credentials/transport/AGENTS.md Diff against src/core/ext/filters/backend_metrics/AGENTS.md Diff against src/core/credentials/AGENTS.md Diff against src/core/tsi/AGENTS.md Diff against src/core/tsi/alts/AGENTS.md Diff against src/core/credentials/call/AGENTS.md Diff against src/core/ext/transport/chttp2/AGENTS.md Diff against AGENTS.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| vllm-project/vllmAGENTS.md · 88k | AGENTS.md | setuptestlint-formatstyle+5 | 100/100 | 3 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| react/react-nativepackages/react-native-compatibility-check/AGENTS.md · 126k | AGENTS.md | testlint-formatstylearch+4 | 99/100 | 3 days ago | |
| netdata/netdatasrc/go/plugin/ibm.d/AGENTS.md · 80k | AGENTS.md | buildtestlint-formatarch+3 | 99/100 | 3 days ago | |
| dragonflydb/dragonflyAGENTS.md · 31k | AGENTS.md | setupbuildtestlint-format+10 | 96/100 | 2 days ago | |
| dotnet/aspnetcoresrc/Components/AGENTS.md · 38k | AGENTS.md | buildteststylearch+3 | 96/100 | 3 days ago | |
| duckdb/duckdbAGENTS.md · 40k | AGENTS.md | buildtestlint-formatstyle+8 | 96/100 | today | |
| steipete/CodexBarAGENTS.md · 20k | AGENTS.md | buildteststylearch+4 | 93/100 | 3 days ago |
