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

[WinAuth] Lack of Detail: [Authorize] attribute requires additional configuration in Startup.cs #12102

Closed
rbonomo opened this issue Apr 22, 2019 — with docs.microsoft.com · 5 comments · Fixed by #12554
Assignees
Labels
Pri2 Source - Docs.ms Docs Customer feedback via GitHub Issue

Comments

Copy link
Contributor

rbonomo commented Apr 22, 2019

In ASP.NET Core 2.x, the [Authorize] attribute requires additional configuration in Startup.cs to challenge anonymous requests for Windows Authentication. The recommended configuration varies slightly based on the web server being used.

Describe this


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@dotnet-bot dotnet-bot added the Source - Docs.ms Docs Customer feedback via GitHub Issue label Apr 22, 2019
@guardrex
Copy link
Collaborator

guardrex commented Apr 22, 2019

Hello @rbonomo ... AFAIK, that line refers directly to the following two sub-sections: IIS and HTTP.sys. AFAIK, it doesn't mean that there's more to say than what you see next.

@Tratcher is there anything else to say there? Here's the section under discussion ...

https://docs.microsoft.com/aspnet/core/security/authentication/windowsauth?view=aspnetcore-2.2&tabs=visual-studio#allow-anonymous-access

[EDIT] Yes ... even if my hunch is correct ... I see some opportunities here to improve the language. I'm going to schedule this for at least some minor updates.

@guardrex guardrex self-assigned this Apr 22, 2019
@guardrex guardrex added the P4 label Apr 22, 2019
@guardrex guardrex added this to the Backlog milestone Apr 22, 2019
@guardrex guardrex added Pri2 and removed P4 labels Apr 22, 2019
@Tratcher
Copy link
Member

The key addition people usually overlook is services.AddAuthentication(IISDefaults.AuthenticationScheme);

@guardrex
Copy link
Collaborator

The language is a little 😵 scatter brained 😵 leading into the server code examples that follow ... it sounds exactly like @rbonomo described it ... like there's something else ... something not explained. I'll address it. Thanks @rbonomo. 🚀

@Rick-Anderson Rick-Anderson changed the title Lack of Detail Lack of Detail: [Authorize] attribute requires additional configuration in Startup.cs May 9, 2019
@guardrex guardrex changed the title Lack of Detail: [Authorize] attribute requires additional configuration in Startup.cs [WinAuth] Lack of Detail: [Authorize] attribute requires additional configuration in Startup.cs May 24, 2019
@xr280xr
Copy link

xr280xr commented Jul 13, 2020

The key addition people usually overlook is services.AddAuthentication(IISDefaults.AuthenticationScheme);

It would be helpful if it also outlined what this line does/why it is necessary for Windows auth. If windows auth is enabled/disabled in IIS directly, what does this do? Also whether this line limits the app strictly to an IIS deployment. I couldn't find a description of this extension method.

@Tratcher
Copy link
Member

Comments on closed issues are not tracked, please open a new issue with the details for your scenario.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pri2 Source - Docs.ms Docs Customer feedback via GitHub Issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants