@@ -200,6 +200,14 @@ var (
200200 litConn := litrpc .NewProxyClient (c )
201201 return litConn .GetInfo (ctx , & litrpc.GetInfoRequest {})
202202 }
203+ statusRequestFn = func (ctx context.Context ,
204+ c grpc.ClientConnInterface ) (proto.Message , error ) {
205+
206+ litConn := litrpc .NewStatusClient (c )
207+ return litConn .SubServerStatus (
208+ ctx , & litrpc.SubServerStatusReq {},
209+ )
210+ }
203211 litMacaroonFn = func (cfg * LitNodeConfig ) string {
204212 return cfg .LitMacPath
205213 }
@@ -338,6 +346,16 @@ var (
338346 grpcWebURI : "/litrpc.Proxy/GetInfo" ,
339347 restWebURI : "/v1/proxy/info" ,
340348 litOnly : true ,
349+ }, {
350+ name : "litrpc-status" ,
351+ macaroonFn : emptyMacaroonFn ,
352+ requestFn : statusRequestFn ,
353+ successPattern : "\" sub_servers\" :" ,
354+ allowedThroughLNC : true ,
355+ grpcWebURI : "/litrpc.Status/SubServerStatus" ,
356+ restWebURI : "/v1/status" ,
357+ noAuth : true ,
358+ litOnly : true ,
341359 }}
342360
343361 // customURIs is a map of endpoint URIs that we want to allow via a
@@ -691,13 +709,20 @@ func integratedTestSuite(ctx context.Context, net *NetworkHarness, t *testing.T,
691709 endpointDisabled := subServersDisabled &&
692710 endpoint .canDisable
693711
712+ expectedErr := "permission denied"
713+ if endpoint .noAuth {
714+ expectedErr = "unknown service"
715+ }
716+
694717 tt .Run (endpoint .name + " lit port" , func (ttt * testing.T ) {
695718 allowed := customURIs [endpoint .grpcWebURI ]
719+
696720 runLNCAuthTest (
697721 ttt , rawLNCConn , endpoint .requestFn ,
698722 endpoint .successPattern ,
699- allowed , "permission denied" ,
700- endpointDisabled , endpoint .noAuth ,
723+ allowed , expectedErr ,
724+ endpointDisabled ,
725+ endpoint .noAuth ,
701726 )
702727 })
703728 }
@@ -817,6 +842,10 @@ func runGRPCAuthTest(t *testing.T, hostPort, tlsCertPath, macPath string,
817842 require .NoError (t , err )
818843 ctxm = macaroonContext (ctxt , macBytes )
819844 resp , err = makeRequest (ctxm , rawConn )
845+ if disabled {
846+ require .ErrorContains (t , err , disabledErr )
847+ return
848+ }
820849 require .NoError (t , err )
821850
822851 json , err := marshalOptions .Marshal (resp )
0 commit comments