This document describes the architecture and technical decisions.
The project follows the standard Go project layout and keeps runtime behavior split across server, policy, exchange, and configuration packages:
.
βββ internal/
β βββ server/
β β βββ grpc_authz.go # Envoy ext-authz decisions and responses
β β βββ logging.go # gRPC request logging interceptor
β βββ policy/ # ConfigMap policy parsing and request matching
β βββ exchange/ # RFC 8693 token exchange client
β βββ config/ # Runtime configuration parsing and validation
βββ cmd/
β βββ ext-authz-token-exchange-service/
β βββ main.go # Application bootstrap
βββ charts/ # Helm charts for plugin and e2e/demo stack
βββ devspace.yaml
βββ Dockerfile
βββ go.mod
- Service API: Envoy external authorization gRPC service
- Transport:
google.golang.org/grpc - Generated API source: Envoy protobufs from
github.com/envoyproxy/go-control-plane - Policy source: Kubernetes ConfigMaps selected by label and namespace selectors
- Token exchange: OAuth 2.0 Token Exchange (
urn:ietf:params:oauth:grant-type:token-exchange)
- Idiomatic Go: Follow effectivego.dev guidelines
- Single Responsibility: Each handler handles one resource type
- Interface Segregation: Define focused interfaces
- Dependency Inversion: Depend on abstractions, not concretions
- Testability: All business logic must be unit testable