AspNetCore.Docs/aspnetcore/security/index.md

105 lines
7.9 KiB
Markdown
Raw Normal View History

2016-10-29 01:35:15 +08:00
---
2018-01-29 23:21:31 +08:00
title: Overview of ASP.NET Core Security
author: rachelappel
2018-01-29 23:21:31 +08:00
description: Learn about authentication, authorization, and security basics in ASP.NET Core.
2016-10-29 01:35:15 +08:00
manager: wpickett
2018-01-29 23:21:31 +08:00
ms.author: rachelap
ms.date: 11/01/2017
ms.prod: asp.net-core
2018-01-29 23:21:31 +08:00
ms.technology: aspnet
ms.topic: article
2017-08-19 02:51:38 +08:00
uid: security/index
2016-10-29 01:35:15 +08:00
---
# ASP.NET Core Security Overview
ASP.NET Core enables developers to easily configure and manage security for their apps. ASP.NET Core contains features for managing authentication, authorization, data protection, SSL enforcement, app secrets, anti-request forgery protection, and CORS management. These security features allow you to build robust yet secure ASP.NET Core apps.
## ASP.NET Core security features
ASP.NET Core provides many tools and libraries to secure your apps including built-in Identity providers but you can use 3rd party identity services such as Facebook, Twitter, or LinkedIn. With ASP.NET Core, you can easily manage app secrets, which are a way to store and use confidential information without having to expose it in the code.
## Authentication vs. Authorization
Authentication is a process in which a user provides credentials that are then compared to those stored in an operating system, database, app or resource. If they match, users authenticate successfully, and can then perform actions that they're authorized for, during an authorization process. The authorization refers to the process that determines what a user is allowed to do.
Another way to think of authentication is to consider it as a way to enter a space, such as a server, database, app or resource, while authorization is which actions the user can perform to which objects inside that space (server, database, or app).
## Common Vulnerabilities in software
ASP.NET Core and EF contain features that help you secure your apps and prevent security breaches. The following list of links takes you to documentation detailing techniques to avoid the most common security vulnerabilities in web apps:
* [Cross-site scripting attacks](https://docs.microsoft.com/aspnet/core/security/cross-site-scripting)
* [SQL injection attacks](https://docs.microsoft.com/ef/core/querying/raw-sql)
* [Cross-Site Request Forgery (CSRF)](https://docs.microsoft.com/aspnet/core/security/anti-request-forgery)
* [Open redirect attacks](https://docs.microsoft.com/aspnet/core/security/preventing-open-redirects)
There are more vulnerabilities that you should be aware of. For more information, see the section in this document on *ASP.NET Security Documentation*.
## ASP.NET Security Documentation
2016-10-29 01:35:15 +08:00
* [Authentication](authentication/index.md)
* [Introduction to Identity](authentication/identity.md)
* [Enable authentication using Facebook, Google, and other external providers](authentication/social/index.md)
* [Enable authentication with WS-Federation](authentication/ws-federation.md)
* [Configure Windows Authentication](authentication/windowsauth.md)
* [Account confirmation and password recovery](authentication/accconfirm.md)
* [Two-factor authentication with SMS](authentication/2fa.md)
* [Use cookie authentication without Identity](authentication/cookie.md)
2016-10-29 01:35:15 +08:00
* [Azure Active Directory](authentication/azure-active-directory/index.md)
* [Integrate Azure AD into an ASP.NET Core web app](https://azure.microsoft.com/documentation/samples/active-directory-dotnet-webapp-openidconnect-aspnetcore/)
* [Call an ASP.NET Core Web API from a WPF app using Azure AD](https://azure.microsoft.com/documentation/samples/active-directory-dotnet-native-aspnetcore/)
* [Call a Web API in an ASP.NET Core web app using Azure AD](https://azure.microsoft.com/documentation/samples/active-directory-dotnet-webapp-webapi-openidconnect-aspnetcore/)
* [An ASP.NET Core web app with Azure AD B2C](https://azure.microsoft.com/resources/samples/active-directory-b2c-dotnetcore-webapp/)
* [Secure ASP.NET Core apps with IdentityServer4](https://identityserver4.readthedocs.io)
2016-10-29 01:35:15 +08:00
* [Authorization](authorization/index.md)
* [Introduction](authorization/introduction.md)
* [Create an app with user data protected by authorization](xref:security/authorization/secure-data)
* [Simple authorization](authorization/simple.md)
* [Role-based authorization](authorization/roles.md)
* [Claims-based authorization](authorization/claims.md)
* [Policy-based authorization](authorization/policies.md)
* [Dependency injection in requirement handlers](authorization/dependencyinjection.md)
* [Resource-based authorization](authorization/resourcebased.md)
* [View-based authorization](authorization/views.md)
* [Limit identity by scheme](authorization/limitingidentitybyscheme.md)
* [Data protection](data-protection/index.md)
* [Introduction to data protection](data-protection/introduction.md)
* [Get started with the Data Protection APIs](data-protection/using-data-protection.md)
2016-10-29 01:35:15 +08:00
* [Consumer APIs](data-protection/consumer-apis/index.md)
* [Consumer APIs Overview](data-protection/consumer-apis/overview.md)
* [Purpose strings](data-protection/consumer-apis/purpose-strings.md)
2016-10-29 01:35:15 +08:00
* [Purpose hierarchy and multi-tenancy](data-protection/consumer-apis/purpose-strings-multitenancy.md)
* [Password hashing](data-protection/consumer-apis/password-hashing.md)
* [Limit the lifetime of protected payloads](data-protection/consumer-apis/limited-lifetime-payloads.md)
* [Unprotect payloads whose keys have been revoked](data-protection/consumer-apis/dangerous-unprotect.md)
2016-10-29 01:35:15 +08:00
* [Configuration](data-protection/configuration/index.md)
* [Configure data protection](data-protection/configuration/overview.md)
* [Default settings](data-protection/configuration/default-settings.md)
* [Machine-wide policy](data-protection/configuration/machine-wide-policy.md)
* [Non DI-aware scenarios](data-protection/configuration/non-di-scenarios.md)
2016-10-29 01:35:15 +08:00
* [Extensibility APIs](data-protection/extensibility/index.md)
* [Core cryptography extensibility](data-protection/extensibility/core-crypto.md)
* [Key management extensibility](data-protection/extensibility/key-management.md)
* [Miscellaneous APIs](data-protection/extensibility/misc-apis.md)
* [Implementation](data-protection/implementation/index.md)
* [Authenticated encryption details](data-protection/implementation/authenticated-encryption-details.md)
* [Subkey derivation and authenticated encryption](data-protection/implementation/subkeyderivation.md)
2016-10-29 01:35:15 +08:00
* [Context headers](data-protection/implementation/context-headers.md)
* [Key management](data-protection/implementation/key-management.md)
* [Key storage providers](data-protection/implementation/key-storage-providers.md)
* [Key encryption at rest](data-protection/implementation/key-encryption-at-rest.md)
* [Key immutability and changing settings](data-protection/implementation/key-immutability.md)
* [Key storage format](data-protection/implementation/key-storage-format.md)
2016-10-29 01:35:15 +08:00
* [Ephemeral data protection providers](data-protection/implementation/key-storage-ephemeral.md)
* [Compatibility](data-protection/compatibility/index.md)
2018-01-23 04:14:05 +08:00
* [Share cookies among apps](data-protection/compatibility/cookie-sharing.md)
* [Replace <machineKey> in ASP.NET](data-protection/compatibility/replacing-machinekey.md)
* [Create an app with user data protected by authorization](xref:security/authorization/secure-data)
2016-10-29 01:35:15 +08:00
* [Safe storage of app secrets during development](app-secrets.md)
Key Vault Configuration Provider doc (#2531) * Update configuration.md * Create key-vault-configuration.md * Create appsettings.json * Add files via upload * Update README.md * Update KeyVaultConfigProviderSample.csproj * Create sample-output.png * Add files via upload * Update key-vault-configuration.md * Update Startup.cs * Add files via upload * Add files via upload * Add files via upload * Update Startup.cs * Update appsettings.json * Update Startup.cs * Update key-vault-configuration.md * Update key-vault-configuration.md * Update key-vault-configuration.md * Update key-vault-configuration.md * Update key-vault-configuration.md * Add files via upload * Add files via upload * Add files via upload * Update key-vault-configuration.md * Update key-vault-configuration.md * Update key-vault-configuration.md * Update key-vault-configuration.md * Update key-vault-configuration.md * Update key-vault-configuration.md * Update key-vault-configuration.md * Update key-vault-configuration.md * Update key-vault-configuration.md * Update configuration.md * Update key-vault-configuration.md * Update key-vault-configuration.md * Update key-vault-configuration.md * Update appsettings.json * React to feedback * React to feedback * Update index.md * Update toc.md * Update configuration.md * React to feedback - "When to use" section * Add a phrase to KeyVaultClient bit * Update key-vault-configuration.md * React to feedback * Minor update to ms.date * New implementation and local secret storage * Update KeyVaultConfigProviderSample.csproj * Update Program.cs * Minor phrasing adjustments * Update KeyVaultConfigProviderSample.csproj * Minor phrasing update * Add files via upload * Remove en-us from links * Update web.config * Delete License.txt * Update Markup.cs * Update Program.cs * Update Startup.cs * Update ms.date * Note .NET Core target 1.1.0+ * Update KeyVaultConfigProviderSample.csproj * Update KeyVaultConfigProviderSample.csproj * Remove compiler\resources line It isn't necessary, and it isn't in the templates. * Update KeyVaultConfigProviderSample.csproj * Create launchSettings.json * Update KeyVaultConfigProviderSample.csproj * Update Startup.cs * Update KeyVaultConfigProviderSample.csproj * Update KeyVaultConfigProviderSample.csproj * Update key-vault-configuration.md * Update key-vault-configuration.md * Update key-vault-configuration.md * Update key-vault-configuration.md * Update key-vault-configuration.md * Minor updates * Minor update * Update the doc ms.date * Minor update
2017-02-14 04:03:08 +08:00
* [Azure Key Vault configuration provider](key-vault-configuration.md)
* [Enforce SSL](enforcing-ssl.md)
2017-03-27 22:44:25 +08:00
* [Anti-Request Forgery](anti-request-forgery.md)
* [Prevent open redirect attacks](preventing-open-redirects.md)
* [Prevent Cross-Site Scripting](cross-site-scripting.md)
* [Enable Cross-Origin Requests (CORS)](cors.md)