dotnet / AspNetCore.Docs

Documentation for ASP.NET Core
https://docs.microsoft.com/aspnet/core
Creative Commons Attribution 4.0 International
12.65k stars 25.28k forks source link

Add document explaining the authentication system #4055

Open davidfowl opened 7 years ago

davidfowl commented 7 years ago

Requests for new Topics

Write a short paragraph describing what the topic will cover.

Today our authentication documentation is scenario focused. This is fine but doesn't help explain the fundamentals of the system and the various component responsibilities. We should have an introduction to the authentication system that describes the services (IAuthentictation* interfaces), the verbs (challenge, authentication, forbid, signin, signout), what authentication schemes are, what authentication handlers are etc. There should also be diagrams of a typical authentication flow with all of the actors involved.

  1. Write an outline of the proposed topic contents.

Here's an example of what I think this topic could look like: https://digitalmccullough.com/posts/aspnetcore-auth-system-demystified.html

  1. Where would you put the topic in the Table of Contents.

https://docs.microsoft.com/en-us/aspnet/core/security/authentication/

  1. If you know who should review the issue, notify them by including @githubID in the issue description.

@HaoK @blowdart @Tratcher

HaoK commented 7 years ago

@Rick-Anderson is there someone on the doc side that I can work with for this new topic?

Rick-Anderson commented 7 years ago

@scottaddie can you work with Haok on this?

davidfowl commented 7 years ago

@HaoK I'd like these sorts of samples as part of the doc https://github.com/leastprivilege/AspNetCoreSecuritySamples/tree/aspnetcore2. Credit goes to @leastprivilege 😄

HaoK commented 7 years ago

@davidfowl how do you feel about Authentication.Cookies/JWT/etc in entropy as the official home for the samples that the documents will reference?

Tratcher commented 7 years ago

No, the docs have their own copy of the samples they reference.

HaoK commented 7 years ago

Ok, but I'll still put MVC + auth sample reference apps similar to Dominick's in entropy, since the security ones can't depend on MVC

Tratcher commented 7 years ago

We've also had asks for a demo on dynamically adding and removing auth schemes.

Tratcher commented 7 years ago

See https://github.com/aspnet/Security/blob/0959c941b40086b131b1e01d304fc23bb887fdc8/test/Microsoft.AspNetCore.Authentication.Test/DynamicSchemeTests.cs#L137-L143

HaoK commented 7 years ago

@scottaddie we went ahead and created an official home for the AuthSamples, they will be slowly coming online here: https://github.com/aspnet/AuthSamples

We can tailor the samples towards what this doc needs as well. We still need to figure out how to deal with the keys/cred issue for the auth providers that require external setup (OAuth/OIDC).

HaoK commented 6 years ago

@scottaddie a new sample showing how to dyamically add schemes and update their options has been added here: https://github.com/aspnet/AuthSamples/tree/dev/samples/DynamicSchemes

@Rick-Anderson edit: Samples moved to https://github.com/aspnet/AspNetCore/tree/master/src/Security/samples

Rick-Anderson commented 6 years ago

@scottaddie how about doing this is phases?

scottaddie commented 6 years ago

@Rick-Anderson I'm okay with that approach.

Rick-Anderson commented 5 years ago

@HaoK Is the start of https://digitalmccullough.com/posts/aspnetcore-auth-system-demystified.html good enough that I should reach out to the author and ask him make the first PR? We could use our samples.

Rick-Anderson commented 5 years ago

See Add some documentation for claims transformation (Auth) #2097

Rick-Anderson commented 5 years ago

Per @JamesNK in #13764

There is no article that gives an overview of authentication in ASP.NET Core.

The article should talk about:

What authentication is What authentication options there are An introduction to setting up authentication It should be located at: Security and Identity -> Authentication -> Overview

Equivalent page for authorization: https://docs.microsoft.com/en-us/aspnet/core/security/authorization/introduction