1
0
mirror of https://github.com/bitwarden/server synced 2025-12-06 00:03:34 +00:00
Commit Graph

6480 Commits

Author SHA1 Message Date
enmande
77234c1741 fix(two-factor-controller) [PM-24211]: Rephrase a comment (accuracy). 2025-12-05 16:54:35 -05:00
enmande
427a0cfeeb fix(two-factor-controller) [PM-24211]: Update some comments (clarification/naming). 2025-12-05 15:12:29 -05:00
enmande
09de3e8333 chore(auth-request) [PM-24211]: Remove some old comments (solved-for). 2025-12-05 14:12:24 -05:00
enmande
ca1a8c7cd0 fix(two-factor-controller) [PM-24211]: Branching logic should return on successful send. 2025-12-05 11:43:37 -05:00
enmande
1f85df17b7 feat(auth-request) [PM-24211]: Add tests for AuthRequest.IsValidForAuthentication. 2025-12-04 12:10:04 -05:00
enmande
d32f5cf7c8 refactor(login-features) [PM-24211]: Remove Core.LoginFeatures as no longer used; AuthRequest.IsValidForAuthentication should be used for any applicable use cases. 2025-12-04 11:45:01 -05:00
enmande
d22b8c14b6 fix(two-factor-controller) [PM-24211]: Update send email validation to use auth request's IsValidForAuthentication. 2025-12-04 10:59:23 -05:00
Ike
b0f6b22b3d chore: update duende license (#6680) 2025-12-03 13:50:01 -05:00
Bernd Schoolmann
ed7a234eeb Add data recovery tool flag (#6659) 2025-12-03 19:19:46 +01:00
cd-bitwarden
98212a7f49 [SM-1592] API for Secret Versioning, adding controller, repository and tests (#6444)
* Adding SecretVersion table to server

* making the names singular not plural for new table

* removing migration

* fixing migration

* Adding indexes for serviceacct and orguserId

* indexes for sqllite

* fixing migrations

* adding indexes to secretVeriosn.sql

* tests

* removing tests

* adding GO

* api repository and controller additions for SecretVersion table, as well as tests

* test fix sqllite

* improvements

* removing comments

* making files nullable safe

* Justin Baurs suggested changes

* claude suggestions

* Claude fixes

* test fixes
2025-12-03 12:17:29 -05:00
Vincent Salucci
ded1c58c27 [PM-26426] [PM-26427] Remove feature flag - policy validators/requirements refactor (#6674)
* chore: remove ff from PoliciesController, refs PM-26426

* chore: remove ff from public PoliciesController, refs PM-26426

* chore: remove ff from VerifyOrganizationDomainCommands, refs PM-26426

* chore: remove ff from SsoConfigService, refs PM-26426

* chore: remove ff from public PoliciesControllerTests, refs PM-26426

* chore: remove ff from PoliciesControllerTests, refs PM-26426

* chore: remove ff from VerifyOrganizationDomainCommandTests, refs PM-26426

* chore: remove ff from SsoConfigServiceTests, refs PM-26426

* chore: remove ff definition, refs PM-26427

* chore: dotnet format

* chore: remove unused constructor parameters, refs PM-26426

* chore: fix failing tests for VerifyOrganizationDomainCommandTests and SsoConfigServiceTests, refs PM-26426
2025-12-03 10:42:54 -06:00
Kyle Spearrin
1566a6d587 [PM-28871] Default startIndex and count values on SCIM groups list API (#6648)
* default startindex and count values on SCIM groups list api

* convert params to a model, like users

* review feedback

* fix file name to be plural

* added integration test
2025-12-03 15:52:09 +00:00
Vincent Salucci
28e9c24f33 [PM-25584] [PM-25585] Remove feature flag - recover provider accounts (#6673)
* chore: remove ff from OrganizationUsersController, refs PM-25584

* chore: update tests with reference to ff, refs PM-25584

* chore: remove ff definition, refs PM-25585

* chore: dotnet format, refs PM-25584
2025-12-02 23:23:58 -06:00
Thomas Rittson
ee26a701e9 [BEEEP] [PM-28808] Fix invalid identity URL in Swagger (#6653)
- in generated JSON (used in help center), only show cloud options
  (with corrected identity URL)
- in self-host and dev, only show local option
2025-12-02 23:20:56 +00:00
Kyle Denney
89a2eab32a [PM-23717] premium renewal email (#6672)
* [PM-23717] premium renewal email

* pr feedback

* pr feedback
2025-12-02 16:38:28 -06:00
Bernd Schoolmann
de5a81bdc4 Move request models to core (#6667)
* Move request models to core

* Fix build

* Fix

* Undo changes
2025-12-02 19:54:40 +01:00
Nick Krantz
5b8b394982 allow for archived ciphers to be shared into an organization (#6626) 2025-12-02 11:43:22 -06:00
Alex Morask
71be3865ea [PM-24558] Remove FF: pm-21821-provider-portal-takeover (#6613)
* Remove FF: pm-21821-provider-portal-takeover

* Run dotnet format
2025-12-02 10:16:37 -06:00
Matt Bishop
b3573c15fd Validate any SQL migration scripts are the most recent (#6652)
* Validate any SQL migration scripts are the most recent

* Make string checks more robust

* Clarify script location

* Remove need given the additional validations that are immediately valuable

* Allow past incorrectly-named migrations but now enforce

* Centralize validation logic to PowerShell script
2025-12-02 08:15:47 -05:00
Kyle Spearrin
63855cbb5a Add BlockClaimedDomainAccountCreationPolicyValidator to AddPolicyValidators (#6665) 2025-12-01 17:49:52 -05:00
Alex
aa3172e24f [PM-6979] correct REST semantics (#6661)
* fix: Return 200 OK with empty array for HIBP breach endpoint when no breaches found

Changes the HIBP breach check endpoint to return HTTP 200 OK with an empty
JSON array `[]` instead of 404 Not Found when no breaches are found. This
follows proper REST API semantics where 404 should indicate the endpoint
doesn't exist, not that a query returned no results.

Changes:
- src/Api/Dirt/Controllers/HibpController.cs: Lines 67-71
- Changed: return new NotFoundResult(); → return Content("[]", "application/json");

Backward Compatible:
- Clients handle both 200 with [] (new) and 404 (old)
- No breaking changes
- Safe to deploy independently

API Response Changes:
- Before: GET /api/hibp/breach?username=safe@example.com → 404 Not Found
- After:  GET /api/hibp/breach?username=safe@example.com → 200 OK, Body: []

Impact:
- No user-facing changes
- Correct REST semantics
- Industry-standard API response pattern

* Address PR feedback: enhance comment and add comprehensive unit tests

Addresses feedback from PR #6661:

1. Enhanced comment per @prograhamming's feedback (lines 69-71):
   - Added date stamp (12/1/2025)
   - Explained HIBP API behavior: returns 404 when no breaches found
   - Clarified HIBP API specification about 404 meaning
   - Maintained REST semantics justification

2. Created comprehensive unit tests per Claude bot's Finding 1:
   - New file: test/Api.Test/Dirt/HibpControllerTests.cs
   - 9 test cases covering all critical scenarios:
     * Missing API key validation
     * No breaches found (404 → 200 with []) - KEY TEST FOR PR CHANGE
     * Breaches found (200 with data)
     * Rate limiting with retry logic
     * Server error handling (500, 400)
     * URL encoding of special characters
     * Required headers validation
     * Self-hosted vs cloud User-Agent differences

Test Coverage:
- Before: 0% coverage for HibpController
- After: ~90% coverage (all public methods and major paths)
- Uses xUnit, NSubstitute, BitAutoData patterns
- Matches existing Dirt controller test conventions

Changes:
- src/Api/Dirt/Controllers/HibpController.cs: Enhanced comment (+3 lines)
- test/Api.Test/Dirt/HibpControllerTests.cs: New test file (327 lines, 9 tests)

Addresses:
- @prograhamming's comment about enhancing the code comment
- Claude bot's Finding 1: Missing unit tests for HibpController

Related: PM-6979

* fix test/formating errors
2025-12-01 12:37:31 -08:00
Brandon Treston
20efb5eb5e add readme (#6664) 2025-12-01 15:31:30 -05:00
Kyle Denney
02568c8e7c [PM-28100] families 2019 email (#6645)
* [PM-28100] families 2019 email

* pr feedback
2025-12-01 14:01:26 -06:00
Vince Grassia
267759db45 Update token permissions to properly trigger workflows (#6662) 2025-12-01 14:19:40 -05:00
Vijay Oommen
599fbc0efd [PM-28616] Add flag UsePhishingBlocker to dbo.Organization (#6625)
* PM-28616 Add flag UsePhishingBlocker to dbo.Organization

* PM-28616 updated as per comments from claude

* PM-28616 updated ToLicense Method to copy the license file

* PM-28616 allow phishing blocker to be imported via license files for self-hosted

* PM-28616 updated PR comments - added more views to be refreshed

* PM-28616 removed proeprty from constructor as it is not used anymore. We have moved to claims based properties
2025-12-01 13:31:36 -05:00
Eli Grubb
c3301ce475 [PM-22275] Remove encryption-related feature flags (#6654) 2025-12-01 08:33:56 -07:00
Brandon Treston
a5ea603817 [PM-24011] Create new policy sync push notification (#6594)
* create new policy sync push notification

* CR feedback

* add tests, fix typo
2025-12-01 10:21:44 -05:00
Jared McCannon
62cbe36ce1 Forgot to add AutomaticUserConfirmationPolicyEventHandler to the IPolicyValidator implementation registration. (#6637) 2025-12-01 09:11:43 -06:00
Github Actions
5af060fbf5 Bumped version to 2025.12.0 2025-12-01 11:46:27 +00:00
Vince Grassia
3df68ea36f BRE-1355 - Fix lite naming and remove PAT (#6658) 2025-12-01 08:46:51 +01:00
Ike
8a67aafbe5 [PM-1632] Redirect on SsoRequired - return SsoOrganizationIdentifier (#6597)
feat: add SSO request validation and organization identifier lookup

- Implement SsoRequestValidator to validate SSO requirements
- Add UserSsoOrganizationIdentifierQuery to fetch organization identifiers
- Create SsoOrganizationIdentifier custom response for SSO redirects
- Add feature flag (RedirectOnSsoRequired) for gradual rollout
- Register validators and queries in dependency injection
- Create RequestValidationConstants to reduce magic strings
- Add comprehensive test coverage for validation logic
- Update BaseRequestValidator to consume SsoRequestValidator
2025-11-30 16:55:47 -05:00
sneakernuts
f151abee54 SRE-3494 cleanup (#6657) 2025-11-28 14:02:00 -07:00
Jim Hays
480c20a480 [PM-1968] Spellcheck bugs (#2877)
* Bug fix: 'captchResponse' -> 'captchaResponse'

* Bug fix: 'GoupUser' -> 'GroupUser'

* Bug fix: 'Cateogry' -> 'Category'

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2025-11-28 15:45:23 +00:00
Usman
7cbc50de98 Removed unused global settings and listenerlogger and passed cancelationtoken to Task.Delay methods (#1810)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2025-11-28 15:15:06 +00:00
renovate[bot]
a17f94e150 [deps] Billing: Update xunit.runner.visualstudio to v3 (#5742)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-28 16:10:39 +01:00
renovate[bot]
6a5430ff0a [deps] Platform: Update quartznet monorepo to 3.15.1 (#6211)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-28 15:46:08 +01:00
renovate[bot]
3133dc91ae [deps]: Update MartinCostello.Logging.XUnit to 0.7.0 (#6046)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-28 15:36:01 +01:00
renovate[bot]
3ad486068d [deps] Platform: Update azure azure-sdk-for-net monorepo (#5735)
* [deps] Platform: Update azure azure-sdk-for-net monorepo

* Remove bump of Azure.Extensions.AspNetCore.DataProtection.Blobs because it require Microsoft.AspNetCore.DataProtection >= 8.0.11

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2025-11-28 12:33:51 +01:00
Todd Martin
eed856cc04 Move Azure.Extensions.AspNetCore.DataProtection.Blobs to Platform (#5442) 2025-11-28 12:10:50 +01:00
renovate[bot]
d3e4ac76b4 [deps]: Update CommandDotNet to 7.0.5 (#5063)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-26 20:46:43 +01:00
renovate[bot]
1334ed89f0 [deps]: Update github/codeql-action action to v4.31.4 (#6618)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-26 18:34:24 +01:00
Alex Morask
219993cc2e [PM-26461] Send F2020 renewal email (#6638)
* Send F2020 renewal email

* Implement and use simple hero

* Cy's feedback
2025-11-26 08:37:48 -06:00
Nick Krantz
9fcedd5b91 remove nudge feature flag (#6643) 2025-11-25 16:32:46 -06:00
Matt Bishop
35a0b675a2 Add full-featured caching docs (#6639)
* Add full-featured caching docs

* Improve some things from a weak README port

* Implement Claude suggestions

* Address Brant's comments

* Revise recommendations toward ExtendedCache in more situations

* Provide forward-looking documentation on how the application cache will also work

* Address minor feedback points
2025-11-25 16:53:50 -05:00
Thomas Rittson
35b4b0754c [PM-25913] Fix owners unable to rename provider-managed organization (#6599)
And other refactors:
- move update organization method to a command
- separate authorization from business logic
- add tests
- move Billing Team logic into their service
2025-11-26 07:38:01 +10:00
Vicki League
3559759f4b [CL-923] Add feature flag for router focus mgmt (#6623) 2025-11-25 13:13:36 -05:00
Brant DeBow
1413dd7689 [PM-12642] Add new ExtendedCache to add caching to template parameters (#6608)
* Add new ExtendedCache to add caching to template parameters

* Added Cache constants for building consistent keys/name, clarified that we are using defaults including TTL, removed as much fusion cache references as possible
2025-11-25 10:58:39 -05:00
renovate[bot]
f0f10bcb95 [deps] Billing: Update xunit-dotnet monorepo (#5732)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Conner Turnbull <133619638+cturnbull-bitwarden@users.noreply.github.com>
2025-11-25 15:34:59 +01:00
Todd Martin
ebe5306fd2 chore(docs): Updated docs for IMailer and MJML
* Updated docs for IMailer.

* More changes.

* Added deprecation context.

* ViewModel corrections.

* Updated link.

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>

* Updated link.

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>

* Updated steps for clarity.

* Update src/Core/MailTemplates/Mjml/README.md

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>

* Grammar fix.

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>

---------

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
2025-11-24 23:48:53 -05:00
rr-bw
5fb69e42b0 feat(marketing-initiated-premium): (Auth) [PM-27541] Add optional marketing param to email verification link (#6604)
Adds an optional `&fromMarketing=premium` query parameter to the verification email link.

Feature flag: `"pm-26140-marketing-initiated-premium-flow"`
2025-11-24 15:06:16 -08:00