#Unix sockets or named pipes on Windows
1 messages · Page 1 of 1 (latest)
We have been considering whether we should switch to having engine-session communicate with SDKs over unix sockets instead of localhost. The main benefit is a somewhat improved security posture.
I saw somewhere that unix sockets are supported on Windows now, but I have no idea what the state of support actually is. I also believe there's something called "named pipes" on Windows that serve a similar purpose? My main question is whether switching to unix sockets or named pipes would make your work on the Powershell/C# based SDK a lot harder or if you think it'd be easy to deal with.
Unix sockets or named pipes on Windows
Where would the socket communication happen? You would use this in place of an http endpoint?
Well it would be http requests still, but sent over the unix sock / named pipe rather than over tcp+localhost
Named pipes is what docker uses on Windows
I don't know how far down the .Net networking stack one has to go to access named pipes.
It doesn't look crazy
Yeah that's my concern, I'm sure this is technically possible but I don't want to create a huge headache for every SDK developer going forward.
Do you have a link to the graphql client library you were using? Just so I could poke around and see if there's any pre-existing art or something
Basically works the same as an IO stream
I'm using this module which just wraps PowerShell's Invoke-RestMethod. So, that would break and we'd need a new client that implements named pipes. https://github.com/anthonyg-1/PSGraphQL
This PowerShell module contains functions that facilitate querying and create, update, and delete operations (mutations) for GraphQL, which is an an open-source data language for APIs. For more on ...
And if you want to really go down the rabbit hole, here's the src for Invoke-RestMethod. https://github.com/PowerShell/PowerShell/blob/master/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/InvokeRestMethodCommand.Common.cs
It doesn't seem overly burdensome.
Awesome, thank you Chris!
Still not sure which direction we'll go but these are super helpful data points
One of my coworkers tested it out and despite a lot of discussion in GH, the httpclient functionality might not have made it in.