Skip to content

Commit ddea858

Browse files
committed
client: Add the passed host to the signer
Currently the request will only be signed if it's to one of the components' addresses (intra-component comms). We also need to allow external requests by clairctl to be signed using the key they pass implicitly from the config. Signed-off-by: crozzy <[email protected]>
1 parent adbaa56 commit ddea858

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

cmd/clairctl/delete.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ func deleteAction(c *cli.Context) error {
5858
if err != nil {
5959
return err
6060
}
61+
if err = s.Add(ctx, c.String("host")); err != nil {
62+
return err
63+
}
64+
6165
}
6266
cc, err := NewClient(hc, c.String("host"), s)
6367
if err != nil {

cmd/clairctl/report.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ func reportAction(c *cli.Context) error {
142142
if err != nil {
143143
return err
144144
}
145+
if err = s.Add(ctx, c.String("host")); err != nil {
146+
return err
147+
}
145148
}
146149
cc, err := NewClient(hc, c.String("host"), s)
147150
if err != nil {

0 commit comments

Comments
 (0)