- Add require_scope(resource, action) helper to grpc/auth.py
- Reads scopes from grpc_auth_context, aborts with PERMISSION_DENIED on mismatch
- Services can adopt incrementally: call require_scope() at top of each RPC
- Add keepalive options to grpc.server():
- keepalive_time_ms=30000, keepalive_timeout_ms=10000
- keepalive_permit_without_calls=True
- max_connection_age_ms=3600000 (1 hour), max_connection_age_grace_ms=30000
- Scope checks not yet added to individual service methods (incremental adoption)
Changes
Note
Scope checks not yet added to individual service methods (incremental adoption via require_scope() helper).