Implement ITlsHandshakeFeature in IIS InProcess
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 281
Description
Hi,
We are Developing WEB API project using AspnetCore 3.0 and hosted on the Azure Cloud.
We are trying to validate the week ciphers using kestrel option. But Kestrel not validate the Cipher during API Calls. Below is our kestrel configuration in Program.cs file. Please guide us to achieve our requirements.
```
webBuilder.UseKestrel(serverOptions =>
{
Log.Debug("Current Process :" + Process.GetCurrentProcess().ProcessName);
serverOptions.ListenAnyIP(443, listenOptions =>
{
Log.Debug(listenOptions.IPEndPoint.Port.ToString());
Log.Debug(listenOptions.IPEndPoint.Address.ToString());
Log.Debug("Listen Options");
//listenOptions.UseHttps("testCert.pfx", "testPassword");
listenOptions.UseHttps("public_privatekey5.pfx", "BENCHMARK");
Log.Debug("I am here");
listenOptions.Use((context, next) =>
{
Log.Debug("I am here-1");
var tlsFeature = context.Features.Get();
//Log.Debug("tlsFeature :" + tlsFeature.ToString());
if (tlsFeature != null)
{
Log.Debug("tls alg:" + tlsFeature.CipherAlgorithm);
}
else
{
Log.Debug("tls is null");
}
if (tlsFeature.CipherAlgorithm == CipherAlgorithmType.Aes256 || tlsFeature.CipherAlgorithm == CipherAlgorithmType.Aes128)
{
throw new NotSupportedException(
$"Prohibited cipher: {tlsFeature.CipherAlgorithm}");
}
return next();
});
});
});
```
Contributor guide
Research direction
The issue names ITlsHandshakeFeature, IIS InProcess, and a Program.cs Kestrel configuration, but no repository files or tests. Start by tracing the existing feature implementation and IIS InProcess request pipeline; done means the feature is available there and cipher validation is covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100