Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
feat: changed to permission check
=29e39b558bbb
diff --git a/cli/packages/gateway/gateway.go b/cli/packages/gateway/gateway.goindex 772da8c400..7a5403a12a 100644--- a/cli/packages/gateway/gateway.go+++ b/cli/packages/gateway/gateway.go@@ -189,7 +189,7 @@ func (g *Gateway) Listen(ctx context.Context) error {log.Printf("Listener started on %s", quicListener.Addr())- g.registerRelayIsActive(ctx, quicListener.Addr().String(), errCh)+ g.registerRelayIsActive(ctx, errCh)log.Info().Msg("Gateway started successfully")@@ -326,7 +326,7 @@ func (g *Gateway) createPermissionForStaticIps(staticIps string) error {return nil}-func (g *Gateway) registerRelayIsActive(ctx context.Context, addr string, errCh chan error) error {+func (g *Gateway) registerRelayIsActive(ctx context.Context, errCh chan error) error {ticker := time.NewTicker(15 * time.Second)maxFailures := 3failures := 0@@ -341,13 +341,7 @@ func (g *Gateway) registerRelayIsActive(ctx context.Context, addr string, errChreturncase <-ticker.C:log.Debug().Msg("Performing relay connection health check")- ctxTimeout, cancel := context.WithTimeout(ctx, 5*time.Second)- defer cancel()- // Try to establish a QUIC connection- conn, err := quic.DialAddr(ctxTimeout, addr, &tls.Config{- InsecureSkipVerify: false, // Skip certificate verification- NextProtos: []string{"infisical-gateway"},- }, nil)+ err := g.createPermissionForStaticIps(g.config.InfisicalStaticIp)if err != nil && !strings.Contains(err.Error(), "tls:") {failures++log.Warn().Err(err).Int("failures", failures).Msg("Failed to refresh TURN permissions")@@ -357,9 +351,6 @@ func (g *Gateway) registerRelayIsActive(ctx context.Context, addr string, errCh}continue}- if conn != nil {- defer conn.CloseWithError(0, "All good")- }}}}()