Skip to content

Commit

Permalink
Upgrade to .NET 8
Browse files Browse the repository at this point in the history
  • Loading branch information
jelledruyts committed Aug 17, 2024
1 parent c41ba97 commit 483fc08
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
dotnet-version: '8.0.x'
- name: Build app
run: dotnet build "Authr.WebApp\Authr.WebApp.csproj" --configuration Release
- name: Publish app
Expand Down
14 changes: 7 additions & 7 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/Authr.WebApp/bin/Debug/net7.0/Authr.WebApp.dll",
"program": "${workspaceFolder}/Authr.WebApp/bin/Debug/net8.0/Authr.WebApp.dll",
"args": [],
"cwd": "${workspaceFolder}/Authr.WebApp",
"stopAtEntry": false,
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
"serverReadyAction": {
"action": "openExternally",
"pattern": "^\\s*Now listening on:\\s+(https?://\\S+)"
"pattern": "^\\s*Now listening on:\\s+(https?://\\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
Expand Down
4 changes: 2 additions & 2 deletions Authr.WebApp/.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Stage 1
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG app_version=1.0.0.0
ARG source_version=local
WORKDIR /build
COPY . .
RUN dotnet restore
RUN dotnet publish -c Release -o /app /p:Version=${app_version} /p:SourceRevisionId=${source_version}
# Stage 2
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS final
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final
ENV ASPNETCORE_URLS=http://+:80
EXPOSE 80
WORKDIR /app
Expand Down
14 changes: 7 additions & 7 deletions Authr.WebApp/Authr.WebApp.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<UserSecretsId>aspnet-Authr.WebApp-2C1E7C22-4583-45A9-8ACF-E54D99CFC5F1</UserSecretsId>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.Extensions.AspNetCore.DataProtection.Blobs" Version="1.2.3" />
<PackageReference Include="Azure.Storage.Blobs" Version="12.14.1" />
<PackageReference Include="IdentityModel" Version="6.0.0" />
<PackageReference Include="Azure.Extensions.AspNetCore.DataProtection.Blobs" Version="1.3.4" />
<PackageReference Include="Azure.Storage.Blobs" Version="12.21.2" />
<PackageReference Include="IdentityModel" Version="7.0.0" />
<PackageReference Include="ITfoxtec.Identity.Saml2" Version="4.8.2" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.21.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.22.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.AzureADB2C.UI" Version="7.0.0-preview.6.22330.3" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="7.0.0" />
<PackageReference Include="Microsoft.IdentityModel.Protocols.WsFederation" Version="6.25.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="8.0.8" />
<PackageReference Include="Microsoft.IdentityModel.Protocols.WsFederation" Version="8.0.1" />
</ItemGroup>

<ItemGroup>
Expand Down
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,32 +26,32 @@ You can also deploy Authr as a container to a web hosting service of your choice

The app can be configured with the configuration settings below (using environment variables, use a double underscore instead of `:` if needed, for example `App__AuthFlowCache__ConnectionString`). All connection strings for Azure storage mentioned below can refer to the same storage account; a different container is used for each configuration setting.

| Setting | Purpose |
| ------- | ------- |
| `App:AuthFlowCache:ConnectionString` | (Optional) Connection string to an Azure storage account to be used for caching temporary flow correlation data; if not configured, this will use an in-memory cache. |
| `App:DataProtection:ConnectionString` | (Optional) Connection string to an Azure storage account to be used for [ASP.NET Core data protection](https://learn.microsoft.com/aspnet/core/security/data-protection/introduction?view=aspnetcore-7.0). |
| `ApplicationInsights:InstrumentationKey` | (Optional) Instrumentation key to be used for sending usage telemetry to [Application Insights](https://learn.microsoft.com/azure/azure-monitor/app/app-insights-overview). |
| Setting | Purpose |
| ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `App:AuthFlowCache:ConnectionString` | (Optional) Connection string to an Azure storage account to be used for caching temporary flow correlation data; if not configured, this will use an in-memory cache. |
| `App:DataProtection:ConnectionString` | (Optional) Connection string to an Azure storage account to be used for [ASP.NET Core data protection](https://learn.microsoft.com/aspnet/core/security/data-protection/introduction). |
| `ApplicationInsights:InstrumentationKey` | (Optional) Instrumentation key to be used for sending usage telemetry to [Application Insights](https://learn.microsoft.com/azure/azure-monitor/app/app-insights-overview). |

If you want to support SAML 2.0, you must provide a signing and encryption certificate and configure the following additional settings:

| Setting | Purpose |
| ------- | ------- |
| `App:Certificates:ConnectionString` | Connection string to an Azure storage account where the SAML certificates are stored. |
| `App:Certificates:SigningCertificate:Path` | The path to the SAML signing certificate, stored in PFX format inside the `certificates` container in the storage account. |
| `App:Certificates:SigningCertificate:Password` | The password for the SAML signing certificate PFX file. |
| `App:Certificates:EncryptionCertificate:Path` | The path to the SAML encryption certificate, stored in PFX format inside the `certificates` container in the storage account. |
| `App:Certificates:EncryptionCertificate:Password` | The password for the SAML encryption certificate PFX file. |
| Setting | Purpose |
| ------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `App:Certificates:ConnectionString` | Connection string to an Azure storage account where the SAML certificates are stored. |
| `App:Certificates:SigningCertificate:Path` | The path to the SAML signing certificate, stored in PFX format inside the `certificates` container in the storage account. |
| `App:Certificates:SigningCertificate:Password` | The password for the SAML signing certificate PFX file. |
| `App:Certificates:EncryptionCertificate:Path` | The path to the SAML encryption certificate, stored in PFX format inside the `certificates` container in the storage account. |
| `App:Certificates:EncryptionCertificate:Password` | The password for the SAML encryption certificate PFX file. |

If you want to allow users to sign in and save their configuration, create an [Azure AD B2C tenant](https://learn.microsoft.com/azure/active-directory-b2c/tutorial-create-tenant) and configure the following additional settings:

| Setting | Purpose |
| ------- | ------- |
| `AzureAdB2C:Instance` | The tenant instance, for example `https://authr.b2clogin.com/tfp/`. |
| `AzureAdB2C:ClientId` | The client ID of the app registration. |
| `AzureAdB2C:Domain` | The tenant domain, for example `authr.onmicrosoft.com`. |
| `AzureAdB2C:SignUpSignInPolicyId` | The policy used for sign up and sign in, for example `B2C_1_SignUpOrIn`. |
| `AzureAdB2C:ResetPasswordPolicyId` | The policy used for password reset, for example `B2C_1_ResetPassword`. |
| `AzureAdB2C:EditProfilePolicyId` | The policy used for profile editing, for example `B2C_1_EditProfile`. |
| Setting | Purpose |
| ---------------------------------------- | ---------------------------------------------------------------------------------------- |
| `AzureAdB2C:Instance` | The tenant instance, for example `https://authr.b2clogin.com/tfp/`. |
| `AzureAdB2C:ClientId` | The client ID of the app registration. |
| `AzureAdB2C:Domain` | The tenant domain, for example `authr.onmicrosoft.com`. |
| `AzureAdB2C:SignUpSignInPolicyId` | The policy used for sign up and sign in, for example `B2C_1_SignUpOrIn`. |
| `AzureAdB2C:ResetPasswordPolicyId` | The policy used for password reset, for example `B2C_1_ResetPassword`. |
| `AzureAdB2C:EditProfilePolicyId` | The policy used for profile editing, for example `B2C_1_EditProfile`. |
| `App:UserConfiguration:ConnectionString` | Connection string to an Azure storage account to be used for storing user configuration. |

## License
Expand Down

0 comments on commit 483fc08

Please sign in to comment.