diff --git a/aspnetcore/blazor/hybrid/security/index.md b/aspnetcore/blazor/hybrid/security/index.md new file mode 100644 index 000000000000..7997da3b3a66 --- /dev/null +++ b/aspnetcore/blazor/hybrid/security/index.md @@ -0,0 +1,76 @@ +--- +title: ASP.NET Core Blazor Hybrid authentication and authorization +author: guardrex +description: Learn about Blazor Hybrid authentication and authorization scenarios. +monikerRange: '>= aspnetcore-6.0' +ms.author: riande +ms.custom: mvc +ms.date: 04/07/2022 +no-loc: [".NET MAUI", "Mac Catalyst", "Blazor Hybrid", Home, Privacy, Kestrel, appsettings.json, "ASP.NET Core Identity", cookie, Cookie, Blazor, "Blazor Server", "Blazor WebAssembly", "Identity", "Let's Encrypt", Razor, SignalR] +uid: blazor/hybrid/security/index +--- +# ASP.NET Core Blazor Hybrid authentication and authorization + +This article describes ASP.NET Core's support for the configuration and management of security in Blazor Hybrid apps. + +[!INCLUDE[](~/blazor/includes/blazor-hybrid-preview-notice.md)] + +## Untrusted and unencoded content + +Avoid allowing an app render untrusted and unencoded content from a database or other resource, such as user-provided comments, in its rendered UI. Permitting untrusted, unencoded content to render can cause malicious code to execute. + +## External content rendered in an `iframe` + +When using an [`iframe`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) to display external content within a Blazor Hybrid page, we recommend that users leverage sandboxing features to ensure that the content is isolated from the parent page containing the app. In the following example, the [`sandbox` attribute](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) is present for the `