-
Notifications
You must be signed in to change notification settings - Fork 442
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
Removing SWT authentication handler #10654
base: dev
Are you sure you want to change the base?
Conversation
private AuthenticateResult HandleAuthenticate() | ||
{ | ||
string token = null; | ||
if (!_hostingConfigOptions.Value.SwtAuthenticationEnabled || !Context.Request.Headers.TryGetValue(ScriptConstants.SiteRestrictedTokenHeaderName, out StringValues values)) |
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.
As you can see, this handler was already deactivated anyways because the default for the SwtAuthenticationEnabled hosting config was False, and no stamps are currently configured to override this with True. So it's safe to remove all this code.
response = await _fixture.Host.HttpClient.SendAsync(request); | ||
Assert.Equal(HttpStatusCode.OK, response.StatusCode); | ||
} | ||
|
||
[Fact] | ||
public async Task HostAdminApis_IgnoresSwtTokenWhenDisabled() | ||
public async Task HostAdminApis_IgnoresSwtTokens() |
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.
Retaining this negative test for now. I'll remove it when I remove the remaining SWT support (outgoing).
Earlier in the year, I had already deactivated the SWT authentication handler (in this PR). Those changes have been fully released.
In this PR I'm just cleaning this dead code up now - removing the auth handler and supporting code. This handles incoming SWTs (no longer supported). I'll handle outbound SWTs in an upcoming PR. There are only 2 outbound calls SWTs are included on, and those can be controlled via hosting config. So for that, we'll do hosting config testing first, then follow up with code removal.
I will be backporting this to the in-proc branch, but no further.
Pull request checklist
IMPORTANT: Currently, changes must be backported to the
in-proc
branch to be included in Core Tools and non-Flex deployments.in-proc
branch is not requiredrelease_notes.md