IAKerb support
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
Apologies if this turns out the be the wrong repo to file this in. I've ran off the end of a documentation ladder and I think .NET doesn't have the necessary yet.
In the client we have:
```
var username = config.ValueOrDefault("username", "");
var password = config.ValueOrDefault("password", "");
var handler = new HttpClientHandler();
handler.Credentials = new System.Net.NetworkCredential(username, password);
var httprequest = new HttpRequestMessage(HttpMethod.Get, AuthenticationServerURL + "?v=2&token=1");
using var h = new HttpClient(handler);
```
This is expected to authenticate against a Windows user on the target server. On the hosted server there is no domain; the authentication is against a local user created via the net user command. The user has privileges to log in over the network.
The corresponding server code:
```
builder.WebHost
.UseHttpSys(options =>
{
options.Authentication.Schemes = GetSecurityObjects.IsDomainJoined
? (AuthenticationSchemes.NTLM | AuthenticationSchemes.Kerberos | AuthenticationSchemes.Negotiate)
: (AuthenticationSchemes.NTLM | AuthenticationSchemes.Negotiate);
options.Authentication.AllowAnonymous = false;
```
(IsDomainJoined is our property that does exactly what it says it does...)
So, last time I actually tried this, setting AuthenticationSchemes.Kerberos did something bad when the machine wasn't domain joined, which is why the check exists. But IAKerb is coming to replace this specific use of NTLM. I'm expecting to have to make a change here; but I'm also expecting to need a change to .NET here.
It's almost like there should be an AuthenticationSchemes.IAKerberos; but as I said I've fallen off the end of a documentation ladder and I don't know what the actual change needs to be.
```
Contributor guide
Research direction
Start by tracing the HttpSys options.Authentication.Schemes configuration and the client HttpClientHandler credential flow shown in the issue. Research how IAKerb support is exposed in .NET and whether AuthenticationSchemes needs a corresponding option. Done means identifying the required .NET and ASP.NET Core changes and documenting the expected configuration for non-domain-joined hosts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- authentication, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100