-
Notifications
You must be signed in to change notification settings - Fork 25.1k
gRPC:PipeSecurity for Named Pipes #35691
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
It's also possible to customize security using
|
Sorry to get back to this one so late. @JamesNK I added your content on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just one nit for you to consider.
Co-authored-by: Tom Dykstra <tdykstra@microsoft.com>
```csharp | ||
|
||
var builder = WebApplication.CreateBuilder(); | ||
|
||
builder.WebHost.ConfigureKestrel(options => | ||
{ | ||
options.ListenNamedPipe("pipe1"); | ||
options.ListenNamedPipe("pipe2"); | ||
}); | ||
|
||
builder.WebHost.UseNamedPipes(options => | ||
{ | ||
options.CreateNamedPipeServerStream = (context) => | ||
{ | ||
var pipeSecurity = CreatePipeSecurity(context.NamedPipeEndpoint.PipeName); | ||
|
||
return NamedPipeServerStreamAcl.Create(context.NamedPipeEndpoint.PipeName, PipeDirection.InOut, | ||
NamedPipeServerStream.MaxAllowedServerInstances, PipeTransmissionMode.Byte, | ||
context.PipeOptions, inBufferSize: 0, outBufferSize: 0, pipeSecurity); | ||
}; | ||
}); | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove empty lines at beginning and end of code block
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Co-authored-by: James Newton-King <james@newtonking.com>
Fixes #31489
Added section and code example on Configuring PipeSecurity for Named Pipes.
Internal previews