From 2229042c8ccc25f8021608219a07118d294c67db Mon Sep 17 00:00:00 2001 From: Priyanshubhartistm Date: Sat, 6 Jun 2026 15:06:00 +0530 Subject: [PATCH] fix: remove unused Insecure field incorrectly assigned KeycloackEnable value The Insecure field in microcksClient was being assigned from configCtx.Server.KeycloackEnable (a Keycloak auth flag) which is semantically unrelated to TLS insecurity. Since the Insecure field was never read anywhere in the codebase after assignment, it was effectively dead code. This commit removes both the unused Insecure field from the microcksClient struct and its incorrect assignment in NewClient. The InsecureTLS field already correctly handles TLS skip-verify behavior via configCtx.Server.InsecureTLS. Fixes microcks/microcks-cli#434 Signed-off-by: Priyanshubhartistm --- pkg/connectors/microcks_client.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/connectors/microcks_client.go b/pkg/connectors/microcks_client.go index 8ecd4205..93dab6ab 100644 --- a/pkg/connectors/microcks_client.go +++ b/pkg/connectors/microcks_client.go @@ -104,7 +104,6 @@ type microcksClient struct { CertFile *tls.Certificate InsecureTLS bool RefreshToken string - Insecure bool Verbose bool httpClient *http.Client @@ -135,7 +134,7 @@ func NewClient(opts ClientOptions) (MicrocksClient, error) { return nil, err } c.ServerAddr = configCtx.Server.Server - c.Insecure = configCtx.Server.KeycloakEnable + c.InsecureTLS = configCtx.Server.InsecureTLS c.AuthToken = configCtx.User.AuthToken c.RefreshToken = configCtx.User.RefreshToken