Open
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
Metadata
Metadata
Assignees
Labels
This issue requires design work before implementating.This issue impacts approximately half of our customersIncludes: Authn, Authz, OAuth, OIDC, BearerThe work on this issue is blocked due to some dependencyThis issue represents an ask for new feature or an enhancement to an existing oneThis label is used by an internal tool