gbmc /
gPowerD /
ed1b85db3106aa9a9d6afcc27f4328522cc562c7 #s4v2 - Add simple authorization in highlanderd agent
This implementation allows mutating requests from only the "safepower" user. Ideally, we should use RpcSp to achieve this, but this is not easily supported with a non-framework grpc service without using command line args. We can't use command line args for this in highlanderd since it hosts multiple services and the args affect the entire process.
Tested:
go/hs4log/5bfeFEnNvs worked, but manual requests are rejected:
```
grpc_cli call dns:///$M-n1:20120 StartAction ""
connecting to dns:///yscwj17-n1:20120
Rpc failed with status code 7, error message: Peer is not authorized
```
PiperOrigin-RevId: 831461171
Change-Id: Ie324d8a1ac091d617844597c3bdbd313c0441c4f
2 files changed