Skip to content

Commit

Permalink
Wire up bastion rate limit
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCutter committed Jun 25, 2024
1 parent fbf8151 commit 9e19917
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions trusted_applet/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ const (
// updateCheckInterval is the time between checking the FT Log for firmware
// updates.
updateCheckInterval = 5 * time.Minute

// bastionRateLimit is the maximum number of bastion requests per second to serve.
bastionRateLimit = float64(10)
)

var (
Expand Down Expand Up @@ -360,6 +363,8 @@ func runWithNetworking(ctx context.Context) error {
klog.Infof("Bastion host %q configured", BastionAddr)
opConfig.BastionAddr = BastionAddr
opConfig.BastionKey = bastionSigningKey
opConfig.BastionRateLimit = bastionRateLimit

}
mainListener, err := listenCfg.Listen(ctx, "tcp", ":80")
if err != nil {
Expand Down

0 comments on commit 9e19917

Please sign in to comment.