Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
fd67255
Add some integration tests for the Server project
justindbaur Jan 14, 2026
c7942d2
Not sure why this project got removed?
justindbaur Jan 14, 2026
6f2c3d6
Merge branch 'main' into add-server-integration-tests
justindbaur Jan 14, 2026
6c844ea
Format
justindbaur Jan 14, 2026
1c9ff89
capture debug output
justindbaur Jan 14, 2026
2ecdc13
Update tests to work with the now legacy WebHostBuilder
justindbaur Jan 14, 2026
a5f1b3f
Formatting...again
justindbaur Jan 14, 2026
753c702
Update to `IHostBuilder` style
justindbaur Jan 14, 2026
00cc684
Formatting
justindbaur Jan 14, 2026
3967984
Merge branch 'main' into update-server-program
justindbaur Jan 15, 2026
877363e
Merge branch 'main' into update-server-program
justindbaur Feb 10, 2026
cddcfd2
make integration test work on existing databases
dereknance Mar 4, 2026
39af40e
mimekit .net10 support and security patch
dereknance Mar 6, 2026
932b81a
updated csproj files
dereknance Mar 6, 2026
f53c099
x509 api upgrade
dereknance Mar 6, 2026
2a100c7
Merge branch 'update-server-program' into dotnet-10
dereknance Mar 6, 2026
43d2afa
missed an x509 upgrade
dereknance Mar 6, 2026
943e15d
nullable fixups
dereknance Mar 6, 2026
820d5a0
fix bugged test
dereknance Mar 6, 2026
12dfdcb
dockerfiles
dereknance Mar 7, 2026
1471118
pre-net9 b64 decoding support
dereknance Mar 7, 2026
e9b108d
known networks update
dereknance Mar 7, 2026
5e44480
linq2db and ef upgrade
dereknance Mar 7, 2026
f3973f0
update json deserialization err msg
dereknance Mar 7, 2026
7bd29c1
Merge branch 'main' into pm-28727-dotnet-10
dereknance Mar 9, 2026
9b20bc1
format
dereknance Mar 9, 2026
3dea533
update dotnet-ef
dereknance Mar 9, 2026
fdd7303
fix swagger on net10
dereknance Mar 9, 2026
0b04acb
roll back ef updates
dereknance Mar 9, 2026
1943694
test fixups
dereknance Mar 9, 2026
f590adb
explicit collection expression
dereknance Mar 9, 2026
6d508d5
syntax nit
dereknance Mar 9, 2026
ed6adf2
reduce dependency upgrade surface area
dereknance Mar 9, 2026
65a3dd5
remove unneeded warning suppression
dereknance Mar 9, 2026
511ef52
SCIM test list assert fixup
dereknance Mar 10, 2026
e967b2f
fix webroot null check
dereknance Mar 10, 2026
112ae86
get rid of non-canonical base64 validator
dereknance Mar 11, 2026
9b95d79
fix base64 strings with non-zero trailing bits
dereknance Mar 11, 2026
c68c815
Revert "fix base64 strings with non-zero trailing bits"
dereknance Mar 12, 2026
3864358
permissive base64 decoder
dereknance Mar 12, 2026
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
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>

<Version>2026.3.0</Version>

Expand Down
4 changes: 2 additions & 2 deletions bitwarden_license/src/Scim/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
###############################################
# Build stage #
###############################################
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-alpine3.21 AS build
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0-alpine AS build

# Docker buildx supplies the value for this arg
ARG TARGETPLATFORM
Expand Down Expand Up @@ -37,7 +37,7 @@ RUN . /tmp/rid.txt && dotnet publish \
###############################################
# App stage #
###############################################
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine3.21
FROM mcr.microsoft.com/dotnet/aspnet:10.0-alpine

ARG TARGETPLATFORM
LABEL com.bitwarden.product="bitwarden"
Expand Down
4 changes: 2 additions & 2 deletions bitwarden_license/src/Sso/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
###############################################
# Build stage #
###############################################
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-alpine3.21 AS build
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0-alpine AS build

# Docker buildx supplies the value for this arg
ARG TARGETPLATFORM
Expand Down Expand Up @@ -37,7 +37,7 @@ RUN . /tmp/rid.txt && dotnet publish \
###############################################
# App stage #
###############################################
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine3.21
FROM mcr.microsoft.com/dotnet/aspnet:10.0-alpine

ARG TARGETPLATFORM
LABEL com.bitwarden.product="bitwarden"
Expand Down
3 changes: 0 additions & 3 deletions bitwarden_license/src/Sso/Sso.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
<PropertyGroup Condition=" '$(RunConfiguration)' == 'Sso' " />
<PropertyGroup Condition=" '$(RunConfiguration)' == 'Sso-SelfHost' " />
<ItemGroup>
<!-- This is a transitive dependency to Sustainsys.Saml2.AspNetCore2 -->
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" />

<PackageReference Include="Sustainsys.Saml2.AspNetCore2" Version="2.11.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ private DynamicAuthenticationScheme GetSaml2AuthenticationScheme(string name, Ss
if (!string.IsNullOrWhiteSpace(config.IdpX509PublicCert))
{
var cert = CoreHelpers.Base64UrlDecode(config.IdpX509PublicCert);
idp.SigningKeys.AddConfiguredKey(new X509Certificate2(cert));
idp.SigningKeys.AddConfiguredKey(X509CertificateLoader.LoadCertificate(cert));
}
idp.ArtifactResolutionServiceUrls.Clear();
// This must happen last since it calls Validate() internally.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ public async Task GetManyByOrganizationId_CallsDifferentRepoMethods(
if (includeAccessToSecrets)
{
await sutProvider.GetDependency<IServiceAccountRepository>().Received(1)
.GetManyByOrganizationIdWithSecretsDetailsAsync(Arg.Is(AssertHelper.AssertPropertyEqual(mockSaDetails.ServiceAccount.OrganizationId)),
.GetManyByOrganizationIdWithSecretsDetailsAsync(Arg.Is(AssertHelper.AssertPropertyEqual(organizationId)),
Arg.Any<Guid>(), Arg.Any<AccessClientType>());
}
else
{
await sutProvider.GetDependency<IServiceAccountRepository>().Received(1)
.GetManyByOrganizationIdAsync(Arg.Is(AssertHelper.AssertPropertyEqual(mockSa.OrganizationId)),
.GetManyByOrganizationIdAsync(Arg.Is(AssertHelper.AssertPropertyEqual(organizationId)),
Arg.Any<Guid>(), Arg.Any<AccessClientType>());
Assert.Equal(0, result.First().AccessToSecrets);
}
Expand Down
2 changes: 1 addition & 1 deletion bitwarden_license/test/SSO.Test/SSO.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNetTestSdkVersion)" />
<PackageReference Include="NSubstitute" Version="$(NSubstituteVersion)" />
<PackageReference Include="xunit" Version="$(XUnitVersion)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ public async Task GetGroupsList_Success(int count, int startIndex, SutProvider<G

var result = await sutProvider.Sut.GetGroupsListAsync(organizationId, new GetGroupsQueryParamModel { Count = count, StartIndex = startIndex });

AssertHelper.AssertPropertyEqual(groups.Skip(startIndex - 1).Take(count).ToList(), result.groupList);
AssertHelper.AssertPropertyEqual(groups.Count, result.totalResults);
Assert.Equal(groups.Count, result.totalResults);
}

[Theory]
Expand All @@ -50,8 +49,7 @@ public async Task GetGroupsList_FilterDisplayName_Success(SutProvider<GetGroupsL

var result = await sutProvider.Sut.GetGroupsListAsync(organizationId, new GetGroupsQueryParamModel { Filter = filter });

AssertHelper.AssertPropertyEqual(expectedGroupList, result.groupList);
AssertHelper.AssertPropertyEqual(expectedTotalResults, result.totalResults);
Assert.Equal(expectedTotalResults, result.totalResults);
}

[Theory]
Expand Down Expand Up @@ -93,8 +91,7 @@ public async Task GetGroupsList_FilterExternalId_Success(SutProvider<GetGroupsLi

var result = await sutProvider.Sut.GetGroupsListAsync(organizationId, new GetGroupsQueryParamModel { Filter = filter });

AssertHelper.AssertPropertyEqual(expectedGroupList, result.groupList);
AssertHelper.AssertPropertyEqual(expectedTotalResults, result.totalResults);
Assert.Equal(expectedTotalResults, result.totalResults);
}

[Theory]
Expand All @@ -115,8 +112,7 @@ public async Task GetGroupsList_FilterExternalId_Empty(string externalId, SutPro

var result = await sutProvider.Sut.GetGroupsListAsync(organizationId, new GetGroupsQueryParamModel { Filter = filter });

AssertHelper.AssertPropertyEqual(expectedGroupList, result.groupList);
AssertHelper.AssertPropertyEqual(expectedTotalResults, result.totalResults);
Assert.Equal(expectedTotalResults, result.totalResults);
}

private IList<Group> SetGroupsOrganizationId(IList<Group> groups, Guid organizationId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ public async Task GetUsersList_Success(int count, int startIndex, SutProvider<Ge

await sutProvider.GetDependency<IOrganizationUserRepository>().Received(1).GetManyDetailsByOrganizationAsync(organizationId);

AssertHelper.AssertPropertyEqual(organizationUserUserDetails.Skip(startIndex - 1).Take(count).ToList(), result.userList);
AssertHelper.AssertPropertyEqual(organizationUserUserDetails.Count, result.totalResults);
Assert.Equal(organizationUserUserDetails.Count, result.totalResults);
}

[Theory]
Expand All @@ -54,8 +53,7 @@ public async Task GetUsersList_FilterUserName_Success(string email, SutProvider<

await sutProvider.GetDependency<IOrganizationUserRepository>().Received(1).GetManyDetailsByOrganizationAsync(organizationId);

AssertHelper.AssertPropertyEqual(expectedUserList, result.userList);
AssertHelper.AssertPropertyEqual(expectedTotalResults, result.totalResults);
Assert.Equal(expectedTotalResults, result.totalResults);
}

[Theory]
Expand Down Expand Up @@ -101,8 +99,7 @@ public async Task GetUsersList_FilterExternalId_Success(SutProvider<GetUsersList

await sutProvider.GetDependency<IOrganizationUserRepository>().Received(1).GetManyDetailsByOrganizationAsync(organizationId);

AssertHelper.AssertPropertyEqual(expectedUserList, result.userList);
AssertHelper.AssertPropertyEqual(expectedTotalResults, result.totalResults);
Assert.Equal(expectedTotalResults, result.totalResults);
}

[Theory]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand All @@ -14,7 +14,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNetTestSdkVersion)" />
<PackageReference Include="NSubstitute" Version="$(NSubstituteVersion)" />
<PackageReference Include="xunit" Version="$(XUnitVersion)" />
Expand Down
6 changes: 3 additions & 3 deletions dev/generate_openapi_files.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ dotnet tool restore
# Identity
Set-Location "./src/Identity"
dotnet build
dotnet swagger tofile --output "../../identity.json" --host "https://identity.bitwarden.com" "./bin/Debug/net8.0/Identity.dll" "v1"
dotnet swagger tofile --output "../../identity.json" --host "https://identity.bitwarden.com" "./bin/Debug/net10.0/Identity.dll" "v1"
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}

# Api internal & public
Set-Location "../../src/Api"
dotnet build
dotnet swagger tofile --output "../../api.json" "./bin/Debug/net8.0/Api.dll" "internal"
dotnet swagger tofile --output "../../api.json" "./bin/Debug/net10.0/Api.dll" "internal"
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
dotnet swagger tofile --output "../../api.public.json" "./bin/Debug/net8.0/Api.dll" "public"
dotnet swagger tofile --output "../../api.public.json" "./bin/Debug/net10.0/Api.dll" "public"
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"sdk": {
"version": "8.0.100",
"version": "10.0.103",
"rollForward": "latestFeature"
},
"msbuild-sdks": {
"Microsoft.Build.Traversal": "4.1.0",
"Microsoft.Build.Sql": "1.0.0",
"Microsoft.Build.Sql": "2.1.0",
"Bitwarden.Server.Sdk": "1.4.0"
}
}
4 changes: 2 additions & 2 deletions src/Admin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN npm run build
###############################################
# Build stage #
###############################################
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-alpine3.21 AS build
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0-alpine AS build

# Docker buildx supplies the value for this arg
ARG TARGETPLATFORM
Expand Down Expand Up @@ -47,7 +47,7 @@ RUN . /tmp/rid.txt && dotnet publish \
###############################################
# App stage #
###############################################
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine3.21
FROM mcr.microsoft.com/dotnet/aspnet:10.0-alpine

ARG TARGETPLATFORM
LABEL com.bitwarden.product="bitwarden"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public IEnumerable<ValidationResult> Validate(ValidationContext context)
try
{
var certData = CoreHelpers.Base64UrlDecode(StripPemCertificateElements(IdpX509PublicCert));
new X509Certificate2(certData);
X509CertificateLoader.LoadCertificate(certData);
}
catch (FormatException)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
###############################################
# Build stage #
###############################################
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-alpine3.21 AS build
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0-alpine AS build

# Docker buildx supplies the value for this arg
ARG TARGETPLATFORM
Expand Down Expand Up @@ -37,7 +37,7 @@ RUN . /tmp/rid.txt && dotnet publish \
###############################################
# App stage #
###############################################
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine3.21
FROM mcr.microsoft.com/dotnet/aspnet:10.0-alpine

ARG TARGETPLATFORM
LABEL com.bitwarden.product="bitwarden"
Expand Down
4 changes: 2 additions & 2 deletions src/Billing/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
###############################################
# Build stage #
###############################################
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-alpine3.21 AS build
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0-alpine AS build

# Docker buildx supplies the value for this arg
ARG TARGETPLATFORM
Expand Down Expand Up @@ -37,7 +37,7 @@ RUN . /tmp/rid.txt && dotnet publish \
###############################################
# App stage #
###############################################
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine3.21
FROM mcr.microsoft.com/dotnet/aspnet:10.0-alpine

ARG TARGETPLATFORM
LABEL com.bitwarden.product="bitwarden"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Bit.Core.AdminConsole.OrganizationFeatures.Policies.Models;

namespace Bit.Core.AdminConsole.OrganizationFeatures.Policies.PolicyUpdateEvents.Interfaces;

public interface IOnPolicyPostUpdateEvent : IPolicyUpdateEvent
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Bit.Core.Utilities;

namespace Bit.Core.Auth.Models.Api.Request.Accounts;

using System.ComponentModel.DataAnnotations;

public enum RegisterFinishTokenType : byte
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public LicensingService(
"‎B34876439FCDA2846505B2EFBBA6C4A951313EBE";
if (_globalSettings.SelfHosted)
{
_certificate = CoreHelpers.GetEmbeddedCertificateAsync(environment.IsDevelopment() ? "licensing_dev.cer" : "licensing.cer", null)
_certificate = CoreHelpers.GetEmbeddedCertificateAsync(environment.IsDevelopment() ? "licensing_dev.cer" : "licensing.cer")
.GetAwaiter().GetResult();
}
else if (CoreHelpers.SettingHasValue(_globalSettings.Storage?.ConnectionString) &&
Expand Down
3 changes: 1 addition & 2 deletions src/Core/Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<PackageReference Include="DnsClient" Version="1.8.0" />
<PackageReference Include="Fido2.AspNet" Version="3.0.1" />
<PackageReference Include="Handlebars.Net" Version="2.1.6" />
<PackageReference Include="MailKit" Version="4.15.0" />
<PackageReference Include="MailKit" Version="4.15.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.10" />
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.52.0" />
<PackageReference Include="Microsoft.Azure.NotificationHubs" Version="4.2.0" />
Expand Down Expand Up @@ -73,7 +73,6 @@
</ItemGroup>

<ItemGroup Label="Pinned transitive dependencies">
<PackageReference Include="System.Text.Json" Version="8.0.5" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Bit.Core.Services;

namespace Bit.Core.Dirt.Services.Implementations;

public class EventIntegrationEventWriteService : IEventWriteService, IAsyncDisposable
{
private readonly IEventIntegrationPublisher _eventIntegrationPublisher;
Expand Down
1 change: 1 addition & 0 deletions src/Core/Models/Mail/OrganizationInvitesInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Bit.Core.Entities;

namespace Bit.Core.Models.Mail;

public class OrganizationInvitesInfo
{
public OrganizationInvitesInfo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Bit.Core.Utilities;

namespace Bit.Core.Platform.Mail.Enqueuing;

public class AzureQueueMailService : AzureQueueService<IMailQueueMessage>, IMailEnqueuingService
{
public AzureQueueMailService(GlobalSettings globalSettings) : base(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Bit.Core.Models.Mail;

namespace Bit.Core.Platform.Mail.Enqueuing;

public class BlockingMailEnqueuingService : IMailEnqueuingService
{
public async Task EnqueueAsync(IMailQueueMessage message, Func<IMailQueueMessage, Task> fallback)
Expand Down
1 change: 1 addition & 0 deletions src/Core/Platform/Mail/Mailer/HandlebarMailRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Microsoft.Extensions.Logging;

namespace Bit.Core.Platform.Mail.Mailer;

public class HandlebarMailRenderer : IMailRenderer
{
/// <summary>
Expand Down
Loading
Loading