-
Notifications
You must be signed in to change notification settings - Fork 5.2k
use port in SPN calculation if not default #40860
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
|
Tagging subscribers to this area: @dotnet/ncl |
| hostName = result.HostName; | ||
| } | ||
|
|
||
| if (!isProxyAuth && !authUri.IsDefaultPort) |
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.
Why not for proxy auth?
If it's just to minimize change, then we should add a comment about this. Actually we should probably add a comment regardless.
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.
yes, it was minimize the change. I was not sure but since nobody complained about proxies, I left it as it was.
I'm also not sure if the the proxy default port would match web server port.
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.
Ok. Can we add a comment?
|
all tests passing now. |
It seems like we should use port in SPN if not default. At least that what framework did.
I added code to do that if
Hostheader is not present. If it is, we would still prefer it and that should allow some customization until we have API to set SPN explicitly (or have mapper like Framework did)Long term, we may add some code to probe if given SPN exist and possibly fallback to alternatives when it does not.
As far as the test, I added new instance of the same container. When I had simply to services on the same machine, test code worked even if we did not use the port.
As the configuration got more complicated, patching config via sed is more tricky. So instead, I submitted what is outcome of old code and I modified that directly. There could be more cleanup and I want to add NTLM as well but for now I keep it only with necessary changes.
fixes #36644
cc: @SteveSyfuhs