-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Open
Labels
Needs: DesignThis issue requires design work before implementating.This issue requires design work before implementating.affected-mediumThis issue impacts approximately half of our customersThis issue impacts approximately half of our customersarea-authIncludes: Authn, Authz, OAuth, OIDC, BearerIncludes: Authn, Authz, OAuth, OIDC, BearerblockedThe work on this issue is blocked due to some dependencyThe work on this issue is blocked due to some dependencyenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing oneseverity-minorThis label is used by an internal toolThis label is used by an internal tool
Milestone
Description
This is a placeholder issue.
Similar to the support that we have for CORS in APIs, we should have support for Content Security Policy to make sites safer by default.
Support for CSP would be policy based, similar to the one we offer for CORS.
Usage from middleware
ConfigureServices(IServiceCollection services)
{
...
services.AddCsp();
...
}
Configure(IApplicationBuilder app)
{
...
app.UseCsp();
...
}
Usage from MVC
ConfigureServices(IServiceCollection services)
{
...
services.AddMvc(); // Add MVC will call AddCsp similar to what we do for CORS today.
...
}
[EnableCsp]
public IActionResult Index()
{
return View();
}
We will provide a default policy that limits content to your domain, defines best practices for HTTPS and will be set to report-only. This behavior can be switched per endpoint so that you can progressively enforce the policy one endpoint at a time.
References
https://en.wikipedia.org/wiki/Content_Security_Policy
xsoheilalizadeh, ulrichb, KLuuKer, jotatoledo, KockaAdmiralac and 31 morePonant and msschlPonant
Metadata
Metadata
Assignees
Labels
Needs: DesignThis issue requires design work before implementating.This issue requires design work before implementating.affected-mediumThis issue impacts approximately half of our customersThis issue impacts approximately half of our customersarea-authIncludes: Authn, Authz, OAuth, OIDC, BearerIncludes: Authn, Authz, OAuth, OIDC, BearerblockedThe work on this issue is blocked due to some dependencyThe work on this issue is blocked due to some dependencyenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing oneseverity-minorThis label is used by an internal toolThis label is used by an internal tool