Skip to content

Commit eed0fdc

Browse files
Merge branch 'main' into billing/PM-24558/remove-ff_pm-21821-provider-portal-takeover
2 parents b3a5b03 + b3573c1 commit eed0fdc

File tree

206 files changed

+19205
-1648
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

206 files changed

+19205
-1648
lines changed

.github/ISSUE_TEMPLATE/bw-lite.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Bitwarden Lite Deployment Bug Report
1+
name: Bitwarden lite Deployment Bug Report
22
description: File a bug report
33
labels: [bug, bw-lite-deploy]
44
body:
@@ -74,7 +74,7 @@ body:
7474
id: epic-label
7575
attributes:
7676
label: Issue-Link
77-
description: Link to our pinned issue, tracking all Bitwarden Lite
77+
description: Link to our pinned issue, tracking all Bitwarden lite
7878
value: |
7979
https://github.com/bitwarden/server/issues/2480
8080
validations:

.github/renovate.json5

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
},
6464
{
6565
matchPackageNames: [
66-
"Azure.Extensions.AspNetCore.DataProtection.Blobs",
6766
"DuoUniversal",
6867
"Fido2.AspNet",
6968
"Duende.IdentityServer",
@@ -90,11 +89,7 @@
9089
"Microsoft.AspNetCore.Mvc.Testing",
9190
"Newtonsoft.Json",
9291
"NSubstitute",
93-
"Sentry.Serilog",
94-
"Serilog.AspNetCore",
95-
"Serilog.Extensions.Logging",
9692
"Serilog.Extensions.Logging.File",
97-
"Serilog.Sinks.SyslogMessages",
9893
"Stripe.net",
9994
"Swashbuckle.AspNetCore",
10095
"Swashbuckle.AspNetCore.SwaggerGen",
@@ -141,6 +136,7 @@
141136
"AspNetCoreRateLimit",
142137
"AspNetCoreRateLimit.Redis",
143138
"Azure.Data.Tables",
139+
"Azure.Extensions.AspNetCore.DataProtection.Blobs",
144140
"Azure.Messaging.EventGrid",
145141
"Azure.Messaging.ServiceBus",
146142
"Azure.Storage.Blobs",

.github/workflows/build.yml

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,6 @@ jobs:
185185
- name: Log in to ACR - production subscription
186186
run: az acr login -n bitwardenprod
187187

188-
- name: Retrieve GitHub PAT secrets
189-
id: retrieve-secret-pat
190-
uses: bitwarden/gh-actions/get-keyvault-secrets@main
191-
with:
192-
keyvault: "bitwarden-ci"
193-
secrets: "github-pat-bitwarden-devops-bot-repo-scope"
194-
195188
########## Generate image tag and build Docker image ##########
196189
- name: Generate Docker image tag
197190
id: tag
@@ -250,8 +243,6 @@ jobs:
250243
linux/arm64
251244
push: true
252245
tags: ${{ steps.image-tags.outputs.tags }}
253-
secrets: |
254-
"GH_PAT=${{ steps.retrieve-secret-pat.outputs.github-pat-bitwarden-devops-bot-repo-scope }}"
255246

256247
- name: Install Cosign
257248
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
@@ -280,7 +271,7 @@ jobs:
280271
output-format: sarif
281272

282273
- name: Upload Grype results to GitHub
283-
uses: github/codeql-action/upload-sarif@0499de31b99561a6d14a36a5f662c2a54f91beee # v4.31.2
274+
uses: github/codeql-action/upload-sarif@e12f0178983d466f2f6028f5cc7a6d786fd97f4b # v4.31.4
284275
with:
285276
sarif_file: ${{ steps.container-scan.outputs.sarif }}
286277
sha: ${{ contains(github.event_name, 'pull_request') && github.event.pull_request.head.sha || github.sha }}
@@ -479,20 +470,29 @@ jobs:
479470
tenant_id: ${{ secrets.AZURE_TENANT_ID }}
480471
client_id: ${{ secrets.AZURE_CLIENT_ID }}
481472

482-
- name: Retrieve GitHub PAT secrets
483-
id: retrieve-secret-pat
473+
- name: Get Azure Key Vault secrets
474+
id: get-kv-secrets
484475
uses: bitwarden/gh-actions/get-keyvault-secrets@main
485476
with:
486-
keyvault: "bitwarden-ci"
487-
secrets: "github-pat-bitwarden-devops-bot-repo-scope"
477+
keyvault: gh-org-bitwarden
478+
secrets: "BW-GHAPP-ID,BW-GHAPP-KEY"
488479

489480
- name: Log out from Azure
490481
uses: bitwarden/gh-actions/azure-logout@main
491482

492-
- name: Trigger Bitwarden Lite build
483+
- name: Generate GH App token
484+
uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
485+
id: app-token
486+
with:
487+
app-id: ${{ steps.get-kv-secrets.outputs.BW-GHAPP-ID }}
488+
private-key: ${{ steps.get-kv-secrets.outputs.BW-GHAPP-KEY }}
489+
owner: ${{ github.repository_owner }}
490+
repositories: self-host
491+
492+
- name: Trigger Bitwarden lite build
493493
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
494494
with:
495-
github-token: ${{ steps.retrieve-secret-pat.outputs.github-pat-bitwarden-devops-bot-repo-scope }}
495+
github-token: ${{ steps.app-token.outputs.token }}
496496
script: |
497497
await github.rest.actions.createWorkflowDispatch({
498498
owner: 'bitwarden',
@@ -520,20 +520,29 @@ jobs:
520520
tenant_id: ${{ secrets.AZURE_TENANT_ID }}
521521
client_id: ${{ secrets.AZURE_CLIENT_ID }}
522522

523-
- name: Retrieve GitHub PAT secrets
524-
id: retrieve-secret-pat
523+
- name: Get Azure Key Vault secrets
524+
id: get-kv-secrets
525525
uses: bitwarden/gh-actions/get-keyvault-secrets@main
526526
with:
527-
keyvault: "bitwarden-ci"
528-
secrets: "github-pat-bitwarden-devops-bot-repo-scope"
527+
keyvault: gh-org-bitwarden
528+
secrets: "BW-GHAPP-ID,BW-GHAPP-KEY"
529529

530530
- name: Log out from Azure
531531
uses: bitwarden/gh-actions/azure-logout@main
532532

533+
- name: Generate GH App token
534+
uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
535+
id: app-token
536+
with:
537+
app-id: ${{ steps.get-kv-secrets.outputs.BW-GHAPP-ID }}
538+
private-key: ${{ steps.get-kv-secrets.outputs.BW-GHAPP-KEY }}
539+
owner: ${{ github.repository_owner }}
540+
repositories: devops
541+
533542
- name: Trigger k8s deploy
534543
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
535544
with:
536-
github-token: ${{ steps.retrieve-secret-pat.outputs.github-pat-bitwarden-devops-bot-repo-scope }}
545+
github-token: ${{ steps.app-token.outputs.token }}
537546
script: |
538547
await github.rest.actions.createWorkflowDispatch({
539548
owner: 'bitwarden',

.github/workflows/test-database.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
docker compose --profile mssql --profile postgres --profile mysql up -d
6363
shell: pwsh
6464

65-
- name: Add MariaDB for Bitwarden Lite
65+
- name: Add MariaDB for Bitwarden lite
6666
# Use a different port than MySQL
6767
run: |
6868
docker run --detach --name mariadb --env MARIADB_ROOT_PASSWORD=mariadb-password -p 4306:3306 mariadb:10
@@ -133,7 +133,7 @@ jobs:
133133
# Default Sqlite
134134
BW_TEST_DATABASES__3__TYPE: "Sqlite"
135135
BW_TEST_DATABASES__3__CONNECTIONSTRING: "Data Source=${{ runner.temp }}/test.db"
136-
# Bitwarden Lite MariaDB
136+
# Bitwarden lite MariaDB
137137
BW_TEST_DATABASES__4__TYPE: "MySql"
138138
BW_TEST_DATABASES__4__CONNECTIONSTRING: "server=localhost;port=4306;uid=root;pwd=mariadb-password;database=vault_dev;Allow User Variables=true"
139139
run: dotnet test --logger "trx;LogFileName=infrastructure-test-results.trx" /p:CoverletOutputFormatter="cobertura" --collect:"XPlat Code Coverage"
@@ -262,3 +262,26 @@ jobs:
262262
working-directory: "dev"
263263
run: docker compose down
264264
shell: pwsh
265+
266+
validate-migration-naming:
267+
name: Validate new migration naming and order
268+
runs-on: ubuntu-22.04
269+
270+
steps:
271+
- name: Check out repo
272+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
273+
with:
274+
fetch-depth: 0
275+
persist-credentials: false
276+
277+
- name: Validate new migrations for pull request
278+
if: github.event_name == 'pull_request'
279+
run: |
280+
git fetch origin main:main
281+
pwsh dev/verify_migrations.ps1 -BaseRef main
282+
shell: pwsh
283+
284+
- name: Validate new migrations for push
285+
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
286+
run: pwsh dev/verify_migrations.ps1 -BaseRef HEAD~1
287+
shell: pwsh

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<TargetFramework>net8.0</TargetFramework>
55

6-
<Version>2025.11.1</Version>
6+
<Version>2025.12.0</Version>
77

88
<RootNamespace>Bit.$(MSBuildProjectName)</RootNamespace>
99
<ImplicitUsings>enable</ImplicitUsings>

bitwarden_license/src/Scim/Program.cs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,8 @@ public static void Main(string[] args)
1111
.ConfigureWebHostDefaults(webBuilder =>
1212
{
1313
webBuilder.UseStartup<Startup>();
14-
webBuilder.ConfigureLogging((hostingContext, logging) =>
15-
logging.AddSerilog(hostingContext, (e, globalSettings) =>
16-
{
17-
var context = e.Properties["SourceContext"].ToString();
18-
19-
if (e.Properties.TryGetValue("RequestPath", out var requestPath) &&
20-
!string.IsNullOrWhiteSpace(requestPath?.ToString()) &&
21-
(context.Contains(".Server.Kestrel") || context.Contains(".Core.IISHttpServer")))
22-
{
23-
return false;
24-
}
25-
26-
return e.Level >= globalSettings.MinLogLevel.ScimSettings.Default;
27-
}));
2814
})
15+
.AddSerilogFileLogging()
2916
.Build()
3017
.Run();
3118
}

bitwarden_license/src/Scim/Startup.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,8 @@ public void ConfigureServices(IServiceCollection services)
9494
public void Configure(
9595
IApplicationBuilder app,
9696
IWebHostEnvironment env,
97-
IHostApplicationLifetime appLifetime,
9897
GlobalSettings globalSettings)
9998
{
100-
app.UseSerilog(env, appLifetime, globalSettings);
101-
10299
// Add general security headers
103100
app.UseMiddleware<SecurityHeadersMiddleware>();
104101

bitwarden_license/src/Scim/appsettings.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@
3030
"connectionString": "SECRET",
3131
"applicationCacheTopicName": "SECRET"
3232
},
33-
"sentry": {
34-
"dsn": "SECRET"
35-
},
3633
"notificationHub": {
3734
"connectionString": "SECRET",
3835
"hubName": "SECRET"

bitwarden_license/src/Sso/Program.cs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using Bit.Core.Utilities;
2-
using Serilog;
32

43
namespace Bit.Sso;
54

@@ -13,19 +12,8 @@ public static void Main(string[] args)
1312
.ConfigureWebHostDefaults(webBuilder =>
1413
{
1514
webBuilder.UseStartup<Startup>();
16-
webBuilder.ConfigureLogging((hostingContext, logging) =>
17-
logging.AddSerilog(hostingContext, (e, globalSettings) =>
18-
{
19-
var context = e.Properties["SourceContext"].ToString();
20-
if (e.Properties.TryGetValue("RequestPath", out var requestPath) &&
21-
!string.IsNullOrWhiteSpace(requestPath?.ToString()) &&
22-
(context.Contains(".Server.Kestrel") || context.Contains(".Core.IISHttpServer")))
23-
{
24-
return false;
25-
}
26-
return e.Level >= globalSettings.MinLogLevel.SsoSettings.Default;
27-
}));
2815
})
16+
.AddSerilogFileLogging()
2917
.Build()
3018
.Run();
3119
}

bitwarden_license/src/Sso/Startup.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@ public void Configure(
100100
IdentityModelEventSource.ShowPII = true;
101101
}
102102

103-
app.UseSerilog(env, appLifetime, globalSettings);
104-
105103
// Add general security headers
106104
app.UseMiddleware<SecurityHeadersMiddleware>();
107105

0 commit comments

Comments
 (0)