Skip to content

Commit ca59aac

Browse files
authored
Fix proxy usage during keycloak login (#166)
Signed-off-by: Rajeev Ranjan <[email protected]>
1 parent 6d54e92 commit ca59aac

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.12.14-dev
1+
0.12.14

pkg/auth/utils.go

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"net/http"
1212
"os"
1313
"strings"
14+
"time"
1415

1516
"github.com/atomix/dazl"
1617
"github.com/golang-jwt/jwt/v5"
@@ -40,13 +41,16 @@ var KeycloakFactory = newKeycloakClient
4041

4142
func TLS13ClientOption() openidconnect.ClientOption {
4243
return func(c *openidconnect.Client) error {
44+
// Create transport based on default transport to preserve proxy settings
45+
transport := http.DefaultTransport.(*http.Transport).Clone()
46+
transport.TLSClientConfig = &tls.Config{
47+
MinVersion: tls.VersionTLS13,
48+
MaxVersion: tls.VersionTLS13,
49+
}
50+
4351
c.Client = &http.Client{
44-
Transport: &http.Transport{
45-
TLSClientConfig: &tls.Config{
46-
MinVersion: tls.VersionTLS13,
47-
MaxVersion: tls.VersionTLS13,
48-
},
49-
},
52+
Transport: transport,
53+
Timeout: 30 * time.Second,
5054
}
5155
return nil
5256
}

0 commit comments

Comments
 (0)