Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions credentials/local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions credentials/local/local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down