diff --git a/credentials/local/local.go b/credentials/local/local.go index 2fe0215d0cc9..662283387c9b 100644 --- a/credentials/local/local.go +++ b/credentials/local/local.go @@ -74,6 +74,9 @@ func getSecurityLevel(network, addr string) (credentials.SecurityLevel, error) { // Windows named pipe connection case network == "pipe" && strings.HasPrefix(addr, `\\.\pipe\`): return credentials.NoSecurity, nil + // Go net.Pipe connection + case network == "pipe" && addr == "pipe": + return credentials.NoSecurity, nil // UDS connection case network == "unix": return credentials.PrivacyAndIntegrity, nil diff --git a/credentials/local/local_test.go b/credentials/local/local_test.go index 47f8dbb4ec85..4e88208be544 100644 --- a/credentials/local/local_test.go +++ b/credentials/local/local_test.go @@ -57,6 +57,16 @@ func (s) TestGetSecurityLevel(t *testing.T) { testAddr: "[::1]:10000", want: credentials.NoSecurity, }, + { + testNetwork: "pipe", + testAddr: `\\.\pipe\foo`, + want: credentials.NoSecurity, + }, + { + testNetwork: "pipe", + testAddr: "pipe", + want: credentials.NoSecurity, + }, { testNetwork: "unix", testAddr: "/tmp/grpc_fullstack_test",