Skip to content

Commit e0747b5

Browse files
committed
litrpc+rpcserver: add firewall service comments and cli directives
1 parent 0164175 commit e0747b5

File tree

3 files changed

+57
-1
lines changed

3 files changed

+57
-1
lines changed

litrpc/firewall.proto

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,24 @@ package litrpc;
55
option go_package = "github.com/lightninglabs/lightning-terminal/litrpc";
66

77
service Firewall {
8+
/* litcli: `actions`
9+
ListActions will return a list of actions that have been performed on the
10+
node. The actions that will be persisted depends on the value of the
11+
`--firewall.request-logger.level` config option. The default value of the
12+
option is the "interceptor" mode which will persist only the actions (with
13+
all request parameters) made with macaroons with caveats that force them
14+
to be checked by an rpc middleware interceptor. If the "all" mode is used
15+
then all actions will be persisted but only full request parameters will
16+
only be stored if the actions are interceptor actions, otherwise only the
17+
URI and timestamp of the actions will be stored. The "full" mode will
18+
persist all request data for all actions.
19+
*/
820
rpc ListActions (ListActionsRequest) returns (ListActionsResponse);
21+
22+
/* litcli: `privacy`
23+
PrivacyMapConversion can be used map real values to their pseudo
24+
counterpart and vice versa.
25+
*/
926
rpc PrivacyMapConversion (PrivacyMapConversionRequest)
1027
returns (PrivacyMapConversionResponse);
1128
}

litrpc/firewall_grpc.pb.go

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

session_rpcserver.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,8 @@ func (s *sessionRpcServer) RevokeSession(ctx context.Context,
581581
return &litrpc.RevokeSessionResponse{}, nil
582582
}
583583

584+
// PrivacyMapConversion can be used map real values to their pseudo counterpart
585+
// and vice versa.
584586
func (s *sessionRpcServer) PrivacyMapConversion(_ context.Context,
585587
req *litrpc.PrivacyMapConversionRequest) (
586588
*litrpc.PrivacyMapConversionResponse, error) {
@@ -611,7 +613,16 @@ func (s *sessionRpcServer) PrivacyMapConversion(_ context.Context,
611613
}, nil
612614
}
613615

614-
// ListActions lists all actions attempted on the Litd server.
616+
// ListActions will return a list of actions that have been performed on the
617+
// node. The actions that will be persisted depends on the value of the
618+
// `--firewall.request-logger.level` config option. The default value of the
619+
// option is the "interceptor" mode which will persist only the actions (with
620+
// all request parameters) made with macaroons with caveats that force them to
621+
// be checked by an rpc middleware interceptor. If the "all" mode is used then
622+
// all actions will be persisted but only full request parameters will only be
623+
// stored if the actions are interceptor actions, otherwise only the URI and
624+
// timestamp of the actions will be stored. The "full" mode will persist all
625+
// request data for all actions.
615626
func (s *sessionRpcServer) ListActions(_ context.Context,
616627
req *litrpc.ListActionsRequest) (*litrpc.ListActionsResponse, error) {
617628

0 commit comments

Comments
 (0)