Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/deploy-to-azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ concurrency:
group: deploy-to-azure
cancel-in-progress: false

permissions:
id-token: write
contents: read

env:
AZURE_WEBAPP_NAME: e2e-security-web-appsrv-dev # set this to the name of your Azure App Service
AZURE_WEBAPP_PACKAGE_PATH: "."
Expand All @@ -24,6 +20,10 @@ jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion Bff.AppHost/AppHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

if (builder.Environment.IsDevelopment())
{
var angularFrontend = builder.AddNpmApp("angular", "../ui", "start")
var angularFrontend = builder.AddJavaScriptApp("angular", "../ui", "start")
.WithHttpsEndpoint(port: 3000, 4201, env: "BASE_URL");

builder.AddProject<Projects.BffMicrosoftEntraID_Server>("bffmicrosoftentraid-server")
Expand Down
4 changes: 2 additions & 2 deletions Bff.AppHost/Bff.AppHost.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Aspire.AppHost.Sdk/13.0.0">
<Project Sdk="Aspire.AppHost.Sdk/13.1.2">

<PropertyGroup>
<OutputType>Exe</OutputType>
Expand All @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Aspire.Hosting.NodeJs" Version="9.5.2" />
<PackageReference Include="Aspire.Hosting.JavaScript" Version="13.1.2" />
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ ng update @angular/cli @angular/core

## History

- 2026-03-18 Updated .NET Aspire to 13.1.2, updated xunit to xunit.v3, moved permissions from workflow level to job level, updated npm packages
- 2026-03-14 Updated Nuget packages
- 2026-02-24 Updated Nuget packages, Angular 21
- 2025-12-07 Updated to .NET 10 and Angular 21
Expand Down
12 changes: 9 additions & 3 deletions server/Security/DefaultSecurityHeadersDefinitions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,20 @@ public static HeaderPolicyCollection GetHeaderPolicyCollection(bool isDev, strin

if (isDev)
{
builder.AddStyleSrc().Self().UnsafeInline();
builder.AddStyleSrc()
.Self()
.UnsafeInline();
}
else
{
builder.AddStyleSrc().WithNonce().UnsafeInline();
builder.AddStyleSrc()
.WithNonce()
.UnsafeInline();
}

builder.AddScriptSrc().WithNonce().UnsafeInline();
builder.AddScriptSrc()
.WithNonce()
.UnsafeInline(); // for browser backward compatibility
})
.RemoveServerHeader()
.AddPermissionsPolicyWithDefaultSecureDirectives();
Expand Down
4 changes: 2 additions & 2 deletions tests/BffMicrosoftEntraID.Server.IntegrationTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="8.0.0">
<PackageReference Include="coverlet.collector" Version="8.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.3.0" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.v3" Version="3.2.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
4 changes: 2 additions & 2 deletions tests/UserEndpointsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ public async Task Get_AsUnauthenticatedUser_ReturnsAnonymousUserInfo()
var client = _factory.CreateClient();

// Act
var response = await client.GetAsync("/api/user");
var response = await client.GetAsync("/api/user", TestContext.Current.CancellationToken);

// Assert
response.EnsureSuccessStatusCode();
var userInfo = await response.Content.ReadFromJsonAsync<Models.UserInfo>();
var userInfo = await response.Content.ReadFromJsonAsync<Models.UserInfo>(cancellationToken: TestContext.Current.CancellationToken);
Assert.NotNull(userInfo);
Assert.False(userInfo!.IsAuthenticated);
}
Expand Down
Loading
Loading