Skip to content

Commit f6e66db

Browse files
committed
litrpc: add macaroon_identifier to Action message
We add a new macaroon_identifier field to the Action proto message an populate it in the rpc server.
1 parent 3e963c0 commit f6e66db

File tree

7 files changed

+115
-24
lines changed

7 files changed

+115
-24
lines changed

app/src/types/generated/firewall_pb.d.ts

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

app/src/types/generated/firewall_pb.js

Lines changed: 55 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

litrpc/firewall.pb.go

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

litrpc/firewall.proto

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,12 @@ message Action {
209209
The ID of the session under which the action was performed.
210210
*/
211211
bytes session_id = 11;
212+
213+
/*
214+
The 4 byte identifier of the macaroon that was used to perform the action.
215+
This is derived from the last 4 bytes of the macaroon's root key ID.
216+
*/
217+
bytes macaroon_identifier = 12;
212218
}
213219

214220
enum ActionState {

litrpc/firewall.swagger.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@
132132
"type": "string",
133133
"format": "byte",
134134
"description": "The ID of the session under which the action was performed."
135+
},
136+
"macaroon_identifier": {
137+
"type": "string",
138+
"format": "byte",
139+
"description": "The 4 byte identifier of the macaroon that was used to perform the action.\nThis is derived from the last 4 bytes of the macaroon's root key ID."
135140
}
136141
}
137142
},

proto/firewall.proto

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,12 @@ message Action {
209209
The ID of the session under which the action was performed.
210210
*/
211211
bytes session_id = 11;
212+
213+
/*
214+
The 4 byte identifier of the macaroon that was used to perform the action.
215+
This is derived from the last 4 bytes of the macaroon's root key ID.
216+
*/
217+
bytes macaroon_identifier = 12;
212218
}
213219

214220
enum ActionState {

session_rpcserver.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,7 @@ func (s *sessionRpcServer) ListActions(ctx context.Context,
738738

739739
resp[i] = &litrpc.Action{
740740
SessionId: sessionID[:],
741+
MacaroonIdentifier: a.MacaroonIdentifier[:],
741742
ActorName: a.ActorName,
742743
FeatureName: a.FeatureName,
743744
Trigger: a.Trigger,

0 commit comments

Comments
 (0)