diff --git a/.go-version b/.go-version index 7bf9455f0..3500250a4 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.20.5 +1.21.0 diff --git a/api/client.go b/api/client.go index 8cbdee7a8..3cd67871b 100644 --- a/api/client.go +++ b/api/client.go @@ -650,8 +650,17 @@ func (c *Client) NewRequest(ctx context.Context, method, requestPath string, bod // be pointing to the protocol used in the application layer and not to // the transport layer. Hence, setting the fields accordingly. u.Scheme = "http" - u.Host = socket u.Path = "" + + // Go 1.21.0 introduced strict host header validation for clients. + // Using unix domain socket addresses in the Host header fails + // this validation. https://go.dev/issue/61431 details this problem. + // The error-on-domain-socket-host-header will be removed in a + // future release, but in the meantime, we need to set it to something + // that isn't the actual unix domain socket address. Following + // Docker's lead (https://github.com/moby/moby/pull/45942), + // use a localhost TLD. + u.Host = "api.boundary.localhost" } host := u.Host diff --git a/internal/observability/event/eventer_test.go b/internal/observability/event/eventer_test.go index 7d961d155..3b811e647 100644 --- a/internal/observability/event/eventer_test.go +++ b/internal/observability/event/eventer_test.go @@ -9,7 +9,6 @@ import ( "fmt" "io" "io/ioutil" - "log" "os" "strings" "sync" @@ -829,7 +828,6 @@ func Test_StandardLogger(t *testing.T) { wantErr bool wantErrIs error wantErrContains string - wantLogger *log.Logger }{ { name: "missing-eventer", @@ -869,11 +867,6 @@ func Test_StandardLogger(t *testing.T) { ctx: testCtx, eventer: SysEventer(), eventType: ErrorType, - wantLogger: func() *log.Logger { - w, err := SysEventer().StandardWriter(testCtx, ErrorType) - require.NoError(t, err) - return log.New(w, "okay", 0) - }(), }, } for _, tt := range tests { @@ -895,7 +888,6 @@ func Test_StandardLogger(t *testing.T) { } require.NoError(err) assert.NotNil(l) - assert.Equal(tt.wantLogger, l) }) } }