Phase 10: gRPC admin API with interceptor chain
Proto definitions for 4 services (RegistryService, PolicyService, AuditService, AdminService) with hand-written Go stubs using JSON codec until protobuf tooling is available. Interceptor chain: logging (method, peer IP, duration, never logs auth metadata) → auth (bearer token via MCIAS, Health bypasses) → admin (role check for GC, policy, delete, audit RPCs). All RPCs share business logic with REST handlers via internal/db and internal/gc packages. TLS 1.3 minimum on gRPC listener. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
19
gen/mcr/v1/admin.pb.go
Normal file
19
gen/mcr/v1/admin.pb.go
Normal file
@@ -0,0 +1,19 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: mcr/v1/admin.proto
|
||||
|
||||
package mcrv1
|
||||
|
||||
// HealthRequest is the request message for Health.
|
||||
type HealthRequest struct{}
|
||||
|
||||
// HealthResponse is the response message for Health.
|
||||
type HealthResponse struct {
|
||||
Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
|
||||
}
|
||||
|
||||
func (x *HealthResponse) GetStatus() string {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return ""
|
||||
}
|
||||
Reference in New Issue
Block a user