Skip to content
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

make use of ports in SPN optional #57159

Merged
merged 5 commits into from
Aug 16, 2021
Merged

make use of ports in SPN optional #57159

merged 5 commits into from
Aug 16, 2021

Conversation

wfurt
Copy link
Member

@wfurt wfurt commented Aug 10, 2021

This is regression caused by #40860. There is some ambiguity if port should be used for contracting SPN when it is not default port. We did not do that up to 5.0 and we do since. However that change can have negative impact on existing services.
Since there is no API for developers to control the SPN (#25320), I added ENV & AppContext switch so control this and choose old or new behavior globally.

I did some more testing with IIS can 4.7/4.8 It seems like when configure server on custom ports, client connects to it without specifying port in SPN.
For that reason I'm leaving this off by default as we did prior to 5.0.

fixes #53193
fixes #51701

@wfurt wfurt requested a review from a team August 10, 2021 18:59
@wfurt wfurt self-assigned this Aug 10, 2021
@ghost
Copy link

ghost commented Aug 10, 2021

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

This is regression caused by #40860. There is some ambiguity of port should be use for contracting SPN when it is not default. We did not do that up to 5.0 and we do since. However that change can have negative impact on existing services.
Since there is no API for developers to control the SPN ( #25320) I added ENV & AppContext switch so control this and choose old or new behavior globally.

I did some more testing with IIS can 4.7/4.8 It seems like when configure server on custom ports, client connects to it without specifying port in SPN.
For that reason I'm leaving this off by default as we did prior to 5.0.

fixes #53193
fixes #51701

Author: wfurt
Assignees: wfurt
Labels:

area-System.Net.Http

Milestone: -

wfurt and others added 2 commits August 13, 2021 18:10
…andler/AuthenticationHelper.NtAuth.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
@karelz
Copy link
Member

karelz commented Aug 16, 2021

@stephentoub do the latest changes address all your feedback? Once we have CR, we should be able to merge.

@stephentoub stephentoub merged commit 86562e1 into dotnet:main Aug 16, 2021
thaystg added a commit to thaystg/runtime that referenced this pull request Aug 16, 2021
…information

# By dotnet-maestro[bot] (4) and others
# Via GitHub
* origin/main: (58 commits)
  Localized file check-in by OneLocBuild Task (dotnet#57384)
  [debugger][wasm] Support DebuggerProxyAttribute (dotnet#56872)
  Account for type mismatch of `FIELD_LIST` members in LSRA (dotnet#57450)
  Qualify `sorted_table` allocation with `nothrow` (dotnet#57467)
  Rename transport packages to follow convention (dotnet#57504)
  Generate proper DWARF reg num for ARM32 (dotnet#57443)
  Enable System.Linq.Queryable and disable dotnet#50712 (dotnet#57464)
  Mark individual tests for 51211 (dotnet#57463)
  Fix Length for ReadOnlySequence created out of sliced Memory owned by MemoryManager (dotnet#57479)
  Add JsonConverter.Write/ReadAsPropertyName APIs (dotnet#57302)
  Remove workaround for dotnet/sdk#19482 (dotnet#57453)
  Do not drain HttpContentReadStream if the connection is disposed (dotnet#57287)
  [mono] Fix a few corner case overflow operations (dotnet#57407)
  make use of ports in SPN optional (dotnet#57159)
  Fixed H/3 stress server after the last Kestrel change (dotnet#57356)
  disable a failing stress test. (dotnet#57473)
  Eliminate temporary byte array allocations in the static constructor of `IPAddress`. (dotnet#57397)
  Update dependencies from https://github.com/dotnet/emsdk build 20210815.1 (dotnet#57447)
  [main] Update dependencies from mono/linker (dotnet#57344)
  Improve serializer performance (dotnet#57327)
  ...

# Conflicts:
#	src/mono/wasm/debugger/BrowserDebugProxy/MemberReferenceResolver.cs
#	src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs
#	src/mono/wasm/debugger/BrowserDebugProxy/MonoSDBHelper.cs
@karelz karelz added this to the 6.0.0 milestone Aug 17, 2021
@karelz karelz added the breaking-change Issue or PR that represents a breaking API or functional change over a prerelease. label Aug 20, 2021
@ghost ghost added the needs-breaking-change-doc-created Breaking changes need an issue opened with https://github.com/dotnet/docs/issues/new?template=dotnet label Aug 20, 2021
@ghost
Copy link

ghost commented Aug 20, 2021

Added needs-breaking-change-doc-created label because this PR has the breaking-change label.

When you commit this breaking change:

  1. Create and link to this PR and the issue a matching issue in the dotnet/docs repo using the breaking change documentation template, then remove this needs-breaking-change-doc-created label.
  2. Ask a committer to mail the .NET Breaking Change Notification DL.

Tagging @dotnet/compat for awareness of the breaking change.

@karelz
Copy link
Member

karelz commented Aug 20, 2021

Marking as breaking change as it is technically breaking against 5.0 (bring back 3.1 and earlier behavior).

ezsilmar pushed a commit to criteo-forks/runtime that referenced this pull request Sep 16, 2021
* make port optional in SPN

* fix tests

* feedback from review

* Update src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/AuthenticationHelper.NtAuth.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>

* fix build

Co-authored-by: Stephen Toub <stoub@microsoft.com>
Conflicts:
	src/libraries/Common/tests/System/Net/EnterpriseTests/EnterpriseTestConfiguration.cs
	src/libraries/Common/tests/System/Net/EnterpriseTests/setup/apacheweb/apache2.conf
	src/libraries/Common/tests/System/Net/EnterpriseTests/setup/apacheweb/run.sh
	src/libraries/Common/tests/System/Net/EnterpriseTests/setup/docker-compose.yml
	src/libraries/System.Net.Http/tests/EnterpriseTests/HttpClientAuthenticationTest.cs
@ghost ghost locked as resolved and limited conversation to collaborators Sep 19, 2021
@wfurt wfurt removed the needs-breaking-change-doc-created Breaking changes need an issue opened with https://github.com/dotnet/docs/issues/new?template=dotnet label Oct 19, 2021
@wfurt
Copy link
Member Author

wfurt commented Oct 19, 2021

dotnet/docs#26571

Breaking change issue created: dotnet/docs#26603

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Net.Http breaking-change Issue or PR that represents a breaking API or functional change over a prerelease.
Projects
None yet
3 participants