Skip to content

Commit d799248

Browse files
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 #434
1 parent ee58a76 commit d799248

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

pkg/connectors/microcks_client.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ type microcksClient struct {
104104
CertFile *tls.Certificate
105105
InsecureTLS bool
106106
RefreshToken string
107-
Insecure bool
108107
Verbose bool
109108

110109
httpClient *http.Client
@@ -135,7 +134,7 @@ func NewClient(opts ClientOptions) (MicrocksClient, error) {
135134
return nil, err
136135
}
137136
c.ServerAddr = configCtx.Server.Server
138-
c.Insecure = configCtx.Server.KeycloakEnable
137+
139138
c.InsecureTLS = configCtx.Server.InsecureTLS
140139
c.AuthToken = configCtx.User.AuthToken
141140
c.RefreshToken = configCtx.User.RefreshToken

0 commit comments

Comments
 (0)