Skip to content

Commit be179ca

Browse files
authored
Merge pull request #7 from secure-web-apps/feature/complete-update-to-angular-cli
Feature/complete update to angular cli
2 parents 20e8bf2 + 575f37a commit be179ca

5 files changed

Lines changed: 41 additions & 30 deletions

File tree

.github/workflows/deploy-to-azure.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
working-directory: ui
4444
run: npm install --force
4545

46-
- name: ui-nx-build
46+
- name: ui-angular-cli-build
4747
working-directory: ui
4848
run: npm run build
4949

.github/workflows/dotnet-and-npm-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
working-directory: ui
2626
run: npm install --force
2727

28-
- name: ui-nx-build
28+
- name: ui-angular-cli-build
2929
working-directory: ui
3030
run: npm run build
3131

README.md

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=secure-web-apps_EndToEndSecurityWeb&metric=sqale_rating&token=0d4ca287da2bcdd568de817048e1ff5ee611afe0)](https://sonarcloud.io/summary/overall?id=secure-web-apps_EndToEndSecurityWeb)
1919
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=secure-web-apps_EndToEndSecurityWeb&metric=vulnerabilities&token=0d4ca287da2bcdd568de817048e1ff5ee611afe0)](https://sonarcloud.io/summary/overall?id=secure-web-apps_EndToEndSecurityWeb)
2020

21+
Secure Web application using ASP.NET Core, Angular, SonarQube Cloud and Terraform. Furthermore .NET Aspire is used for local development.
22+
2123
This repository hosts the source code for our .NET User Group Switzerland tour.
2224

2325
## Introduction
@@ -30,6 +32,21 @@ This repository hosts the source code for our .NET User Group Switzerland tour.
3032

3133
[ASP.NET Core/Angular](https://github.com/damienbod/bff-aspnetcore-angular)
3234

35+
### Local development
36+
37+
For local development environment setup proceed as follows:
38+
39+
1. Check out the repository
40+
1. Install Angular CLI latest globally `npm install -g @angular/cli latest`
41+
1. Open `Bff.sln` in Visual Studio 2022 or later
42+
1. Set `Bff.AppHost` as startup project
43+
1. Run the project (F5)
44+
1. Open URL of `bffmicrosoftentraid-server` from the Aspire dashboard (usually `https://localhost:5001`)
45+
46+
![BFF development](https://github.com/secure-web-apps/EndToEndSecurityWeb/blob/main/images/images/bff-arch-development_01.drawio.png)
47+
48+
### Production
49+
3350
![BFF production](https://github.com/secure-web-apps/EndToEndSecurityWeb/blob/main/images/bff-arch-production_01.drawio.png)
3451

3552
## Agenda
@@ -41,22 +58,21 @@ This repository hosts the source code for our .NET User Group Switzerland tour.
4158
- Microsoft Entra ID
4259
- `Microsoft.Identity.Web`
4360
- Microsoft Graph 5 for profile data
44-
- Profile data in UI (UserController)
61+
- Profile data in UI (`UserController`)
4562
- Secure APIs
4663
- Session Security
4764
- DevSecOps
4865
- [build](.github/workflows/dotnet-and-npm-build.yml)
4966
- [deploy (IaC & app)](.github/workflows/deploy-to-azure.yml)
5067
- [quality (SonarQube Cloud)](.github/workflows/quality.yml)
51-
- Analysis for different technical stacks (.csproj)
52-
- sonar badges, build badges
68+
- Analysis for different technical stacks (`.NET`, `JavaScript/TypeScript`, `Hashicorp Terraform`)
69+
- Sonar badges, GitHub Actions workflows badges
5370

5471
## Other topics
5572

5673
- What's missing for a production setup?
57-
- infrastructure automation (terraform/bicep)
58-
- authorization
59-
- data requirements
74+
- Authorization
75+
- Data requirements
6076

6177
## Angular CLI Updates
6278

@@ -70,15 +86,15 @@ ng update @angular/cli @angular/core
7086

7187
## History
7288

73-
- 2025-10-31 Updated to Angular CLI and Angular 20.3.0, using vite in dev
74-
- 2025-10-31 Updated packages, added terraform, sonar SCA, SAST, improve pipelines
75-
- 2025-08-30 Updated packages, Angular 20
76-
- 2025-01-01 .NET 9, Angular 19
89+
- 2024-10-06 Angular 18.2.7, updated security headers
7790
- 2024-10-17 Updated security headers performance, updated packages
78-
- 2024-10-06 Updated Angular 18.2.7, updated security headers
91+
- 2025-01-01 .NET 9, Angular 19
92+
- 2025-08-30 Angular 20, updated packages
7993
- 2025-10-27 Updated NuGet packages
8094
- 2025-10-28 Updated frontend packages, added integration tests, added GitHub Actions workflows
8195
- 2025-10-30 Fixed deployment to Azure App Service, reverted Angular due to CSP nonce issues
96+
- 2025-10-31 Updated to Angular CLI and Angular 20.3.0, using vite in dev
97+
- 2025-10-31 Updated packages, added terraform, sonar SCA, SAST, improved GitHub Actions workflows
8298

8399
## Links
84100

tests/BffMicrosoftEntraID.Server.IntegrationTests.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
<PrivateAssets>all</PrivateAssets>
1313
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1414
</PackageReference>
15-
<PackageReference Include="FluentAssertions" Version="8.8.0" />
16-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.10" />
15+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.10" />
1716
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
1817
<PackageReference Include="xunit" Version="2.9.3" />
1918
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">

ui/certs/Readme.md

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
1-
This certificate is only an example. Please use your own.
1+
# Installing Development Certificates
22

3-
Double click the pfx on a windows mc and use the 1234 password to install.
3+
> [!IMPORTANT]
4+
> The certificate in this folder is for illustrative purposes only. Please use your own certificate.
45
5-
Add the certificates to the nx project for example in the **/certs** folder
6+
1. Double-click the `pfx` on a Windows machine and use the password `1234` to install.
7+
1. Add the certificates to the Angular CLI project, for example in the **/certs** folder.
8+
1. Update the `ui\angular.json` file to point to the certificate files:
69

7-
Update the nx project.json file:
8-
9-
```json
10-
"serve": {
11-
"executor": "@angular-devkit/build-angular:dev-server",
12-
"options": {
13-
"browserTarget": "ui:build",
14-
"sslKey": "certs/dev_localhost.key",
15-
"sslCert": "certs/dev_localhost.pem",
16-
"port": 4201
17-
},
18-
```
10+
```json
11+
"sslKey": "certs/dev_localhost.key",
12+
"sslCert": "certs/dev_localhost.pem",
13+
"port": 4201
14+
```

0 commit comments

Comments
 (0)