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

6157 Commits

Author SHA1 Message Date
Álison Fernandes
e60564253e Add mobile CXP feature flags (#6343)
(cherry picked from commit 6c512f1bc2)
v2025.9.0
2025-09-15 21:00:25 +01:00
Github Actions
2a01c804af Bumped version to 2025.9.0 2025-09-08 10:49:00 +00:00
Daniel García
b7200837c3 [PM-25182] Improve Swagger OperationIDs for Billing (#6238)
* Improve Swagger OperationIDs for Billing

* Fix typo
2025-09-05 19:54:49 +02:00
Nick Krantz
353b596a6d [PM-25390] CORS - Password Change URI (#6287)
* enable cors headers for icons program
- This is needed now that browsers can hit the change-password-uri path via API call

* Add absolute route for change-password-uri
2025-09-05 10:59:36 -05:00
Stephon Brown
87bc9299e6 [PM-23309] Admin Console Credit is not Displaying Decimals (#6280)
* fix: update calculation to be decimal

* fix: update record type property to decimal

* tests: add tests to service and update test names
2025-09-05 11:15:01 -04:00
Ike
6d4129c6b7 [PM-20595] Add Policy for Send access (#6282)
* feat: add policy to API startup and Policies class to hold the static strings
* test: add snapshot testing for constants to help with rust mappings
* doc: add docs for send access
2025-09-05 10:36:01 -04:00
Rui Tomé
2c0c113420 [PM-21752] Add granular events for collection management settings (#6269)
* Add new event types for collection management settings in EventType enum

* Refactor collection management settings update process in OrganizationsController and IOrganizationService.

Introduced UpdateCollectionManagementSettingsAsync method to streamline updates and logging for collection management settings.

* Add unit tests for collection management settings updates in OrganizationsController and OrganizationService.

Implemented tests to verify the successful update of collection management settings and the logging of specific events when settings are changed. Added error handling for cases where the organization is not found.

* Refactor collection management settings handling in OrganizationsController and IOrganizationService.

Updated the UpdateCollectionManagementSettingsAsync method to accept a single settings object, simplifying the parameter list and improving code readability. Introduced a new OrganizationCollectionManagementSettings model to encapsulate collection management settings. Adjusted related tests to reflect these changes.

* Add Obsolete attribute to Organization_CollectionManagement_Updated event in EventType enum
2025-09-05 12:01:14 +01:00
Rui Tomé
1b0be3e87f [PM-22839] Add SSO configuration fields to organization user details for hiding device approvals page (#6245)
* Add SsoEnabled field to OrganizationUserOrganizationDetailsView

- Updated OrganizationUserOrganizationDetailsViewQuery to include SsoEnabled property.
- Modified SQL view to select SsoEnabled from SsoConfig.
- Created migration script to alter the view and refresh dependent views.

* Enhance OrganizationUserRepositoryTests to include SSO configuration

- Added ISsoConfigRepository dependency to GetManyDetailsByUserAsync test.
- Created SsoConfigurationData instance and integrated SSO configuration checks in assertions.
- Updated tests to validate SSO-related properties in the response model.

* Add SSO properties to ProfileOrganizationResponseModel and OrganizationUserOrganizationDetails

- Introduced SsoEnabled and SsoMemberDecryptionType fields in ProfileOrganizationResponseModel.
- Added SsoEnabled property to OrganizationUserOrganizationDetails for enhanced SSO configuration support.
2025-09-05 11:22:50 +01:00
Vijay Oommen
8b30c33eae PM-25413 no badRequest result because of error from Onyx (#6285) 2025-09-04 12:54:24 -05:00
Brandon Treston
e456b4ce21 add feature flag (#6284) 2025-09-04 16:23:14 +00:00
Ike
96fe09af89 [PM-25415] move files into better place for code ownership (#6275)
* chore: move files into better place for code ownership

* fix: import correct namespace
2025-09-04 10:08:03 -04:00
MtnBurrit0
cdf1d7f074 Add stub for load test work (#6277)
* Add stub for load test work

* Satisfy linter

* Adding required permission for linting
2025-09-04 07:05:11 -07:00
renovate[bot]
4b79b98b31 [deps]: Update actions/create-github-app-token action to v2 (#6216)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-04 10:47:56 +02:00
Stephon Brown
0385347a3a refactor: remove feature-flag (#6252) 2025-09-03 15:27:01 -04:00
Alex Morask
93f4666df4 [PM-25419] Move ProviderPriceAdapter to Core project (#6278)
* Move ProviderPriceAdapter to Core

* Run dotnet format
2025-09-03 13:42:19 -05:00
Graham Walker
3731c7c40c PM-24436 Add logging to backend for Member Access Report (#6159)
* pm-24436 inital commit

* PM-24436 updating logsto bypass event filter
2025-09-03 10:39:12 -05:00
Kyle Denney
ef8c7f656d [PM-24350] fix tax calculation (#6251) 2025-09-03 10:03:49 -05:00
cyprain-okeke
fa8d65cc1f [PM 19727] Update InvoiceUpcoming email content (#6168)
* changes to implement the email

* Refactoring and fix the unit testing

* refactor the code and remove used method

* Fix the failing test

* Update the email templates

* remove the extra space here

* Refactor the descriptions

* Fix the wrong subject header

* Add the in the hyperlink rather than just Help center
2025-09-03 20:33:32 +05:30
Rui Tomé
1dade9d4b8 [PM-24233] Use BulkResourceCreationService in CipherRepository (#6201)
* Add constant for CipherRepositoryBulkResourceCreation in FeatureFlagKeys

* Add bulk creation methods for Ciphers, Folders, and CollectionCiphers in BulkResourceCreationService

- Implemented CreateCiphersAsync, CreateFoldersAsync, CreateCollectionCiphersAsync, and CreateTempCiphersAsync methods for bulk insertion.
- Added helper methods to build DataTables for Ciphers, Folders, and CollectionCiphers.
- Enhanced error handling for empty collections during bulk operations.

* Refactor CipherRepository to utilize BulkResourceCreationService

- Introduced IFeatureService to manage feature flag checks for bulk operations.
- Updated methods to conditionally use BulkResourceCreationService for creating Ciphers, Folders, and CollectionCiphers based on feature flag status.
- Enhanced existing bulk copy logic to maintain functionality while integrating feature flag checks.

* Add InlineFeatureService to DatabaseDataAttribute for feature flag management

- Introduced EnabledFeatureFlags property to DatabaseDataAttribute for configuring feature flags.
- Integrated InlineFeatureService to provide feature flag checks within the service collection.
- Enhanced GetData method to utilize feature flags for conditional service registration.

* Add tests for bulk creation of Ciphers in CipherRepositoryTests

- Implemented tests for bulk creation of Ciphers, Folders, and Collections with feature flag checks.
- Added test cases for updating multiple Ciphers to validate bulk update functionality.
- Enhanced existing test structure to ensure comprehensive coverage of bulk operations in the CipherRepository.

* Refactor BulkResourceCreationService to use dynamic types for DataColumns

- Updated DataColumn definitions in BulkResourceCreationService to utilize the actual types of properties from the cipher object instead of hardcoded types.
- Simplified the assignment of nullable properties to directly use their values, improving code readability and maintainability.

* Update BulkResourceCreationService to use specific types for DataColumns

- Changed DataColumn definitions to use specific types (short and string) instead of dynamic types based on cipher properties.
- Improved handling of nullable properties when assigning values to DataTable rows, ensuring proper handling of DBNull for null values.

* Refactor CipherRepositoryTests for improved clarity and consistency

- Renamed test methods to better reflect their purpose and improve readability.
- Updated test data to use more descriptive names for users, folders, and collections.
- Enhanced test structure with clear Arrange, Act, and Assert sections for better understanding of test flow.
- Ensured all tests validate the expected outcomes for bulk operations with feature flag checks.

* Update CipherRepositoryBulkResourceCreation feature flag key

* Refactor DatabaseDataAttribute usage in CipherRepositoryTests to use array syntax for EnabledFeatureFlags

* Update CipherRepositoryTests to use GenerateComb for generating unique IDs

* Refactor CipherRepository methods to accept a boolean parameter for enabling bulk resource creation based on feature flags. Update tests to verify functionality with and without the feature flag enabled.

* Refactor CipherRepository and related services to support new methods for bulk resource creation without boolean parameters.
2025-09-03 14:57:53 +01:00
Patrick-Pimentel-Bitwarden
99058891d0 Auth/pm 24434/enhance email (#6157)
* fix(emails): [PM-24434] Email Enhancement - Added seconds to new device logged in email
2025-09-03 09:12:26 -04:00
renovate[bot]
d627b0a064 [deps] Tools: Update aws-sdk-net monorepo (#6272)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-03 12:01:39 +02:00
Daniel García
0bfbfaa17c Improve Swagger OperationIDs for Tools (#6239) 2025-09-03 11:38:01 +02:00
Ike
d2d3e0f11b [PM-22678] Send email otp authentication method (#6255)
feat(auth): email OTP validation, and generalize authentication interface

- Generalized send authentication method interface
- Made validate method async
- Added email mail support for Handlebars
- Modified email templates to match future implementation

fix(auth): update constants, naming conventions, and error handling

- Renamed constants for clarity
- Updated claims naming convention
- Fixed error message generation
- Added customResponse for Rust consumption

test(auth): add and fix tests for validators and email

- Added tests for SendEmailOtpRequestValidator
- Updated tests for SendAccessGrantValidator

chore: apply dotnet formatting
2025-09-02 16:48:57 -04:00
Thomas Avery
a5bed5dcaa [PM-25384] Add feature flag (#6271) 2025-09-02 15:02:02 -05:00
Patrick-Pimentel-Bitwarden
53e5ddb1a7 fix(inactive-user-server-notification): [PM-25130] Inactive User Server Notify - Added feature flag. (#6270) 2025-09-02 12:44:28 -04:00
Daniel García
a180317509 [PM-25182] Improve swagger OperationIDs: Part 1 (#6229)
* Improve swagger OperationIDs: Part 1

* Fix tests and fmt

* Improve docs and add more tests

* Fmt

* Improve Swagger OperationIDs for Auth

* Fix review feedback

* Use generic getcustomattributes

* Format

* replace swaggerexclude by split+obsolete

* Format

* Some remaining excludes
2025-09-02 18:30:53 +02:00
Todd Martin
cb1db262ca chore(feature-flag): [PM-18179] Remove pm-17128-recovery-code-login feature flag
* Rmoved feature flag and obsolete endpoint

* Removed obsolete method.
2025-09-02 11:18:36 -04:00
Brandon Treston
101e29b354 [PM-15354] fix EF implementation to match dapper (missing null check) (#6261)
* fix EF implementation to match dapper (missing null check)

* cleanup
2025-09-02 10:52:23 -04:00
Todd Martin
697fa6fdbc chore(feature-flag): [PM-25336] Remove unauth-ui-refresh flag 2025-09-02 10:39:49 -04:00
Todd Martin
9a6cdcd5e2 chore(feature-flag): [PM-18516] Remove pm-9112-device-approval-persistence flag
* Remove persistence feature flags

* Added back 2FA value.
2025-09-02 10:14:45 -04:00
Todd Martin
1c60b805bf chore(feature-flag): [PM-19665] Remove web-push feature flag
* Remove storage-reseed feature flag

* Remove web-push feature flag.

* Removed check for web push enabled.

* Linting
2025-08-30 11:45:32 -04:00
Todd Martin
5a96f6dcce chore(feature-flags): Remove storage-reseed feature flag 2025-08-29 16:14:00 -04:00
Maksym Sorokin
5dfed7623b Fixed Nginx entrypoint to cp with preserve owner (#6249)
If user cleanly follow install instructions Setup app will create nginx
`default.conf` (and other files) with `644` permission owned by
`bitwarden:bitwarden`.

During Nginx entrypoint script it copies generated `default.conf` to
`/etc/nginx/conf.d/` but without `-p` flag new file permissions would be
`root:root 644`.

Then during startup Nginx will start as `bitwarden` user, which will not
cause any issues by itself as `default.conf` is still readable by the
world.

The issue is that for some reason some users have their Nginx config
file (or sometimes even entire `bwdata` recursively) have `600` or `700`
permissions. In this case Nginx will fail to start due to `default.conf`
not readable by `bitwarden` user.

I assume that root cause is that some users mistakenly run `sudo chmod
-R 700 /opt/bitwarden` from Linux installation guide after they have run
`./bitwarden.sh install`. Or maybe some older version of Setup app where
creating `default.conf` with `600` permissions and users are using very
legacy installations.

Whatever may be the case I do not see any harm with copying with `-p` it
even looks to me that this was the intended behavior. This will both fix
the issue for mentioned users and preserve permission structure aligned
with other files.
2025-08-28 09:36:02 -04:00
renovate[bot]
d24cbf25c7 [deps] Tools: Update aws-sdk-net monorepo (#6254)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com>
2025-08-28 13:12:23 +00:00
Jimmy Vo
8ceb6f5621 [PM-24278] Create Remove Individual Vault validator (#6139) 2025-08-27 11:01:22 -04:00
Vincent Salucci
0074860cad chore: remove account deprovisioning feature flag definition, refs PM-14614 (#6250) 2025-08-26 14:42:46 -04:00
Justin Baur
e5159a3ba2 [PM-19659] Clean up Notifications code (#6244)
* Move PushType to Platform Folder

- Move the PushType next to the rest of push notification code
- Specifically exclude it from needing Platform code review
- Add tests establishing rules Platform has for usage of this enum, making it safe to have no owner

* Move NotificationHub code into Platform/Push directory

* Update NotificationHub namespace imports

* Add attribute for storing push type metadata

* Rename Push Engines to have PushEngine suffix

* Move Push Registration items to their own directory

* Push code move

* Add expected usage comment

* Add Push feature registration method

- Make method able to be called multipes times with no ill effects

* Add Push Registration service entrypoint and tests

* Use new service entrypoints

* Test changes
2025-08-26 13:30:37 -04:00
Rui Tomé
7a63ae6315 [PM-22838] Add hyperlink to provider name in Admin Panel organization details (#6243) 2025-08-26 15:38:01 +01:00
Kyle Denney
b63e272490 [PM-24551] remove feature flag code for pm-199566-update-msp-to-charge-automatically (#6188)
* [PM-24551] remove feature flag code

* undoing constructor refactors

* reverting changes the refactor made
2025-08-26 09:28:03 -05:00
Nick Krantz
004e6285a1 PM-21024 ChangePasswordUri controller + service (#5845)
* add ChangePasswordUri controller and service to Icons

* add individual settings for change password uri

* add logging to change password uri controller

* use custom http client that follows redirects

* add ChangePasswordUriService tests

* remove unneeded null check

* fix copy pasta - changePasswordUriSettings

* add `HelpUsersUpdatePasswords` policy

* Remove policy for change password uri - this was removed from scope

* fix nullable warnings
2025-08-26 07:35:23 -05:00
Jordan Aasen
a4c4d0157b check for UserId in ReplaceAsync (#6176) 2025-08-25 14:00:41 -07:00
Jared McCannon
a7fc89a5bb Removing extra semi colon (#6246) 2025-08-25 14:34:06 -05:00
Github Actions
236027fc22 Bumped version to 2025.8.1 v2025.8.1 2025-08-25 11:01:27 +00:00
Justin Baur
5a712ebb6b Xunit v3 (#6241)
* Initial v3 Migration

* Migrate tests and debug duplicate ids

* Debug duplicate ids

* Support seeding

* remove seeder

* Upgrade to latest XUnit.v3 version

* Remove Theory changes for now

* Remove Theory change from DeviceRepositoryTests

* Remove cancellation token additions
2025-08-25 08:43:24 +02:00
Ike
3097e7f223 [PM- 22675] Send password auth method (#6228)
* feat: add Passwordvalidation
* fix: update strings to constants
* fix: add customResponse for rust consumption
* test: add tests for SendPasswordValidator. fix: update tests for SendAccessGrantValidator
* feat: update send access constants.
2025-08-22 18:02:37 -04:00
renovate[bot]
50b36bda2a [deps] Auth: Update Duende.IdentityServer to 7.2.4 (#5683)
* [deps] Auth: Update Duende.IdentityServer to 7.2.4

* fix: update namespaces

* chore: dotnet format
---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ike Kottlowski <ikottlowski@bitwarden.com>
Co-authored-by: Ike <137194738+ike-kottlowski@users.noreply.github.com>
2025-08-21 16:53:36 -04:00
Stephon Brown
91bb3c1e68 [PM-24555] Remove Code for PM-21092 (#6198) 2025-08-21 16:24:16 -04:00
Kyle Denney
c519fa43c6 [PM-21878] update gateway/stripe fields for business units (#6186)
* [PM-21878] also update gateway/stripe fields for business units

* pr feedback: replacing switch with extension method

* [PM-21878] prevent invalid stripe ids from crashing the edit provider page

* pr feedback: adding service methods to validate stripe ids

and added unit tests for the new methods

* pr feedback: move validation to SubscriberService and cleanup

* pr feedback: use subscriber service to remove dependency on stripe adapter
2025-08-21 13:54:20 -05:00
Kyle Spearrin
1c98e59003 [PM-25050] limit failed 2fa emails to once per hour (#6227)
* limit failed 2fa emails to once per hour

* Linting.

---------

Co-authored-by: Todd Martin <tmartin@bitwarden.com>
2025-08-21 13:44:08 -04:00
Kyle Denney
982aaf6f76 [PM-24554] Remove code for pm-20322-allow-trial-length-0 (#6220)
* [PM-24554] remove code for feature flag

* remove unused using
2025-08-21 09:36:51 -05:00