Skip to content

Commit 1264b49

Browse files
committed
Remove TLS ServerName pinning in TLS config creation
Updates pkg/runtime dependency to v0.80.0 which removes the need for the insecure parameter in TLSConfigFromSecretRef. This change removes the forced ServerName pinning behavior that was causing TLS verification issues, allowing for more flexible certificate validation. The TLS config creation now relies on the standard Go TLS verification process without forcing specific ServerName values, improving compatibility with various certificate configurations. Signed-off-by: cappyzawa <[email protected]>
1 parent f62fa80 commit 1264b49

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ require (
2525
github.com/fluxcd/pkg/git v0.35.0
2626
github.com/fluxcd/pkg/git/gogit v0.38.0
2727
github.com/fluxcd/pkg/gittestserver v0.18.0
28-
github.com/fluxcd/pkg/runtime v0.79.0
28+
github.com/fluxcd/pkg/runtime v0.80.0
2929
github.com/fluxcd/pkg/ssh v0.20.0
3030
github.com/fluxcd/source-controller/api v1.6.1
3131
github.com/go-git/go-billy/v5 v5.6.2

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ github.com/fluxcd/pkg/git/gogit v0.38.0 h1:222KmjpKf9pxqi8rAtm1omDcpGTY4JkahLrAw
144144
github.com/fluxcd/pkg/git/gogit v0.38.0/go.mod h1:kHStdfd/AtkH5ED0UEWP2tmMGnfxg1GG92D29M+lRJ0=
145145
github.com/fluxcd/pkg/gittestserver v0.18.0 h1:jkuLmzWFfq+v1ziI0LspZrUzc5WzCO98BaWb8OVRPtk=
146146
github.com/fluxcd/pkg/gittestserver v0.18.0/go.mod h1:2wDLqUkPuixk/8pGQdef9ewaGJXf7Z+xHDVq8PIFG4E=
147-
github.com/fluxcd/pkg/runtime v0.79.0 h1:9tv79EiQDx/QJH9mYDd9kZ9WybCVWBUGoiBHij+eKkc=
148-
github.com/fluxcd/pkg/runtime v0.79.0/go.mod h1:iGhdaEq+lMJQTJNAFEPOU4gUJ7kt3yeDcJPZy7O9IUw=
147+
github.com/fluxcd/pkg/runtime v0.80.0 h1:vknT2vdQSGTFnAhz4xGk2ZXUWCrXh3whsISStgA57Go=
148+
github.com/fluxcd/pkg/runtime v0.80.0/go.mod h1:iGhdaEq+lMJQTJNAFEPOU4gUJ7kt3yeDcJPZy7O9IUw=
149149
github.com/fluxcd/pkg/ssh v0.20.0 h1:Ak0laIYIc/L8lEfqls/LDWRW8wYPESGaravQsCRGLb8=
150150
github.com/fluxcd/pkg/ssh v0.20.0/go.mod h1:sRfAAkxx1GwCGjYirKPnTKdNkNrJRo9kqzWLVFXKv7E=
151151
github.com/fluxcd/pkg/version v0.9.0 h1:pQBHMt9TbnnTUzj3EoMhRi5JUkNBqrTBSAaoLG1ovUA=

internal/source/git.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,7 @@ func getAuthOpts(ctx context.Context, c client.Client, repo *sourcev1.GitReposit
230230
if repo.Spec.SecretRef == nil {
231231
return nil, fmt.Errorf("secretRef with github app data must be specified when provider is set to github: %w", ErrInvalidSourceConfiguration)
232232
}
233-
targetURL := fmt.Sprintf("%s://%s", u.Scheme, u.Host)
234-
authMethods, err := secrets.AuthMethodsFromSecret(ctx, secret, secrets.WithTargetURL(targetURL), secrets.WithTLSSystemCertPool())
233+
authMethods, err := secrets.AuthMethodsFromSecret(ctx, secret, secrets.WithTLSSystemCertPool())
235234
if err != nil {
236235
return nil, err
237236
}

0 commit comments

Comments
 (0)