Skip to content

Commit fbf07ab

Browse files
authored
Merge branch 'main' into SM-1571-DisableSMAdsForUsers
2 parents 17fad60 + 28e9c24 commit fbf07ab

File tree

456 files changed

+48241
-3507
lines changed

Some content is hidden

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

456 files changed

+48241
-3507
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ util/Setup/** @bitwarden/dept-bre @bitwarden/team-platform-dev
3636

3737
# UIF
3838
src/Core/MailTemplates/Mjml @bitwarden/team-ui-foundation # Teams are expected to own sub-directories of this project
39+
src/Core/MailTemplates/Mjml/.mjmlconfig # This change allows teams to add components within their own subdirectories without requiring a code review from UIF.
3940

4041
# Auth team
4142
**/Auth @bitwarden/team-auth-dev

.github/ISSUE_TEMPLATE/bw-unified.yml renamed to .github/ISSUE_TEMPLATE/bw-lite.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
name: Bitwarden Unified Deployment Bug Report
1+
name: Bitwarden lite Deployment Bug Report
22
description: File a bug report
3-
labels: [bug, bw-unified-deploy]
3+
labels: [bug, bw-lite-deploy]
44
body:
55
- type: markdown
66
attributes:
@@ -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 Unified
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: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
dependencyDashboardApproval: false,
4343
},
4444
{
45-
matchSourceUrls: ["https://github.com/bitwarden/sdk-internal"],
45+
matchPackageNames: ["https://github.com/bitwarden/sdk-internal.git"],
4646
groupName: "sdk-internal",
4747
},
4848
{
@@ -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: 46 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ env:
2222
jobs:
2323
lint:
2424
name: Lint
25-
runs-on: ubuntu-24.04
25+
runs-on: ubuntu-22.04
2626
steps:
2727
- name: Check out repo
2828
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -38,14 +38,15 @@ jobs:
3838

3939
build-artifacts:
4040
name: Build Docker images
41-
runs-on: ubuntu-24.04
41+
runs-on: ubuntu-22.04
4242
needs:
4343
- lint
4444
outputs:
4545
has_secrets: ${{ steps.check-secrets.outputs.has_secrets }}
4646
permissions:
4747
security-events: write
4848
id-token: write
49+
timeout-minutes: 45
4950
strategy:
5051
fail-fast: false
5152
matrix:
@@ -122,7 +123,7 @@ jobs:
122123
uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0
123124

124125
- name: Set up Node
125-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
126+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
126127
with:
127128
cache: "npm"
128129
cache-dependency-path: "**/package-lock.json"
@@ -159,7 +160,7 @@ jobs:
159160
ls -atlh ../../../
160161
161162
- name: Upload project artifact
162-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
163+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
163164
if: ${{ matrix.dotnet }}
164165
with:
165166
name: ${{ matrix.project_name }}.zip
@@ -184,13 +185,6 @@ jobs:
184185
- name: Log in to ACR - production subscription
185186
run: az acr login -n bitwardenprod
186187

187-
- name: Retrieve GitHub PAT secrets
188-
id: retrieve-secret-pat
189-
uses: bitwarden/gh-actions/get-keyvault-secrets@main
190-
with:
191-
keyvault: "bitwarden-ci"
192-
secrets: "github-pat-bitwarden-devops-bot-repo-scope"
193-
194188
########## Generate image tag and build Docker image ##########
195189
- name: Generate Docker image tag
196190
id: tag
@@ -249,8 +243,6 @@ jobs:
249243
linux/arm64
250244
push: true
251245
tags: ${{ steps.image-tags.outputs.tags }}
252-
secrets: |
253-
"GH_PAT=${{ steps.retrieve-secret-pat.outputs.github-pat-bitwarden-devops-bot-repo-scope }}"
254246

255247
- name: Install Cosign
256248
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
@@ -279,7 +271,7 @@ jobs:
279271
output-format: sarif
280272

281273
- name: Upload Grype results to GitHub
282-
uses: github/codeql-action/upload-sarif@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
274+
uses: github/codeql-action/upload-sarif@e12f0178983d466f2f6028f5cc7a6d786fd97f4b # v4.31.4
283275
with:
284276
sarif_file: ${{ steps.container-scan.outputs.sarif }}
285277
sha: ${{ contains(github.event_name, 'pull_request') && github.event.pull_request.head.sha || github.sha }}
@@ -290,7 +282,7 @@ jobs:
290282

291283
upload:
292284
name: Upload
293-
runs-on: ubuntu-24.04
285+
runs-on: ubuntu-22.04
294286
needs: build-artifacts
295287
permissions:
296288
id-token: write
@@ -364,7 +356,7 @@ jobs:
364356
if: |
365357
github.event_name != 'pull_request'
366358
&& (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc')
367-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
359+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
368360
with:
369361
name: docker-stub-US.zip
370362
path: docker-stub-US.zip
@@ -374,7 +366,7 @@ jobs:
374366
if: |
375367
github.event_name != 'pull_request'
376368
&& (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc')
377-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
369+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
378370
with:
379371
name: docker-stub-EU.zip
380372
path: docker-stub-EU.zip
@@ -386,29 +378,29 @@ jobs:
386378
pwsh ./generate_openapi_files.ps1
387379
388380
- name: Upload Public API Swagger artifact
389-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
381+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
390382
with:
391383
name: swagger.json
392384
path: api.public.json
393385
if-no-files-found: error
394386

395387
- name: Upload Internal API Swagger artifact
396-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
388+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
397389
with:
398390
name: internal.json
399391
path: api.json
400392
if-no-files-found: error
401393

402394
- name: Upload Identity Swagger artifact
403-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
395+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
404396
with:
405397
name: identity.json
406398
path: identity.json
407399
if-no-files-found: error
408400

409401
build-mssqlmigratorutility:
410402
name: Build MSSQL migrator utility
411-
runs-on: ubuntu-24.04
403+
runs-on: ubuntu-22.04
412404
needs:
413405
- lint
414406
defaults:
@@ -446,15 +438,15 @@ jobs:
446438
447439
- name: Upload project artifact for Windows
448440
if: ${{ contains(matrix.target, 'win') == true }}
449-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
441+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
450442
with:
451443
name: MsSqlMigratorUtility-${{ matrix.target }}
452444
path: util/MsSqlMigratorUtility/obj/build-output/publish/MsSqlMigratorUtility.exe
453445
if-no-files-found: error
454446

455447
- name: Upload project artifact
456448
if: ${{ contains(matrix.target, 'win') == false }}
457-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
449+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
458450
with:
459451
name: MsSqlMigratorUtility-${{ matrix.target }}
460452
path: util/MsSqlMigratorUtility/obj/build-output/publish/MsSqlMigratorUtility
@@ -465,7 +457,7 @@ jobs:
465457
if: |
466458
github.event_name != 'pull_request'
467459
&& (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc')
468-
runs-on: ubuntu-24.04
460+
runs-on: ubuntu-22.04
469461
needs:
470462
- build-artifacts
471463
permissions:
@@ -478,25 +470,34 @@ jobs:
478470
tenant_id: ${{ secrets.AZURE_TENANT_ID }}
479471
client_id: ${{ secrets.AZURE_CLIENT_ID }}
480472

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

488480
- name: Log out from Azure
489481
uses: bitwarden/gh-actions/azure-logout@main
490482

491-
- name: Trigger self-host 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
492493
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
493494
with:
494-
github-token: ${{ steps.retrieve-secret-pat.outputs.github-pat-bitwarden-devops-bot-repo-scope }}
495+
github-token: ${{ steps.app-token.outputs.token }}
495496
script: |
496497
await github.rest.actions.createWorkflowDispatch({
497498
owner: 'bitwarden',
498499
repo: 'self-host',
499-
workflow_id: 'build-unified.yml',
500+
workflow_id: 'build-bitwarden-lite.yml',
500501
ref: 'main',
501502
inputs: {
502503
server_branch: process.env.GITHUB_REF
@@ -519,20 +520,29 @@ jobs:
519520
tenant_id: ${{ secrets.AZURE_TENANT_ID }}
520521
client_id: ${{ secrets.AZURE_CLIENT_ID }}
521522

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

529530
- name: Log out from Azure
530531
uses: bitwarden/gh-actions/azure-logout@main
531532

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+
532542
- name: Trigger k8s deploy
533543
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
534544
with:
535-
github-token: ${{ steps.retrieve-secret-pat.outputs.github-pat-bitwarden-devops-bot-repo-scope }}
545+
github-token: ${{ steps.app-token.outputs.token }}
536546
script: |
537547
await github.rest.actions.createWorkflowDispatch({
538548
owner: 'bitwarden',

.github/workflows/review-code.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
1616
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
1717
permissions:
18+
actions: read
1819
contents: read
1920
id-token: write
2021
pull-requests: write

.github/workflows/test-database.yml

Lines changed: 27 additions & 4 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 unified
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-
# Unified 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"
@@ -197,7 +197,7 @@ jobs:
197197
shell: pwsh
198198

199199
- name: Upload DACPAC
200-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
200+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
201201
with:
202202
name: sql.dacpac
203203
path: Sql.dacpac
@@ -223,7 +223,7 @@ jobs:
223223
shell: pwsh
224224

225225
- name: Report validation results
226-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
226+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
227227
with:
228228
name: report.xml
229229
path: |
@@ -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.0</Version>
6+
<Version>2025.12.0</Version>
77

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

bitwarden_license/src/Commercial.Core/AdminConsole/Services/ProviderService.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ public class ProviderService : IProviderService
3535
{
3636
private static readonly PlanType[] _resellerDisallowedOrganizationTypes = [
3737
PlanType.Free,
38-
PlanType.FamiliesAnnually,
39-
PlanType.FamiliesAnnually2019
38+
PlanType.FamiliesAnnually2025,
39+
PlanType.FamiliesAnnually2019,
40+
PlanType.FamiliesAnnually
4041
];
4142

4243
private readonly IDataProtector _dataProtector;

0 commit comments

Comments
 (0)