1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-05 01:52:49 -05:00
Commit Graph

43 Commits

Author SHA1 Message Date
7f5f010e1e Run formatting (#2230) 2022-08-29 16:06:55 -04:00
bae03feffe Revert filescoped (#2227)
* Revert "Add git blame entry (#2226)"

This reverts commit 239286737d.

* Revert "Turn on file scoped namespaces (#2225)"

This reverts commit 34fb4cca2a.
2022-08-29 15:53:48 -04:00
34fb4cca2a Turn on file scoped namespaces (#2225) 2022-08-29 14:53:16 -04:00
7dfb04298d [EC-92] Add organization vault export to event logs (#2128)
* Added nullable OrganizationId to EventModel

* Added EventType Organization_ClientExportedVault

* Updated CollectController to save the event Organization_ClientExportedVault

* Added OrganizationExportResponseModel to encapsulate Organization Export data

* Added OrganizationExportController to have a single endpoint for Organization vault export

* Added method GetOrganizationCollections to ICollectionService to get collections for an organization

* Added GetOrganizationCiphers to ICipherService to get ciphers for an organization

* Updated controllers to use new methods in ICollectionService and ICipherService
2022-07-25 09:56:23 +01:00
231eb84e69 Turn On ImplicitUsings (#2079)
* Turn on ImplicitUsings

* Fix formatting

* Run linter
2022-06-29 19:46:41 -04:00
e4a10aae27 Split out repositories to Infrastructure.Dapper / EntityFramework (#1759) 2022-01-11 10:40:51 +01:00
23b0a1f9df Run dotnet format (#1764) 2021-12-16 15:35:09 +01:00
63f6dd9a24 Move request/response models (#1754) 2021-12-14 16:05:07 +01:00
022e404cc5 Attachment blob upload (#1229)
* Add Cipher attachment upload endpoints

* Add validation bool to attachment storage data

This bool is used to determine whether or not to renew upload links

* Add model to request a new attachment to be made for later upload

* Add model to respond with created attachment.

The two cipher properties represent the two different
cipher model types that can be returned. Cipher Response from
personal items and mini response from organizations

* Create Azure SAS-authorized upload links for both one-shot and block uploads

* Add service methods to handle delayed upload and file size validation

* Add emergency access method for downloading attachments direct from Azure

* Add new attachment storage methods to other services

* Update service interfaces

* Log event grid exceptions

* Limit Send and Attachment Size to 500MB

* capitalize Key property

* Add key validation to Azure Event Grid endpoint

* Delete blob for unexpected blob creation events

* Set Event Grid key at API startup

* Change renew attachment upload url request path to match Send

* Shore up attachment cleanup method.

As long as we have the required information, we should always delete
attachments from each the Repository, the cipher in memory, and the
file storage service to ensure they're all synched.
2021-03-30 18:41:14 -05:00
5aba9f7549 Add cipher response to restore (#1072)
* Return revised ciphers on restore api call

* Return restored date from restore sproc

* Test Restore updates passed in ciphers

This is necessary for CipherController to appropriately return the
up-to-date ciphers without an extra db call to read them.

* Add missing SELECT
2021-01-08 08:52:42 -06:00
edf30974dc Validate cipher updates with revision date (#994)
* Add last updated validation to cipher replacements

* Add AutoFixture scaffolding.

AutoDataAttributes and ICustomizations are meant to automatically
produce valid test input. Examples are the Cipher customizations,
which enforce the model's mutual exclusivity of UserId and
OrganizationId.

FixtureExtensions create a fluent way to generate SUTs. We currently
use parameter injection to fascilitate service testing, which is nicely
handled by AutoNSubstitute. However, in order to gain access to the
substitutions, we need to Freeze them onto the Fixture. The For fluent
method allows specifying a Freeze to a specific type's constructor and
optionally to a parameter name in that constructor.

* Unit tests for single Cipher update version checks

* Fix test runner

Test runner requires Microsoft.NET.Test.Sdk

* Move to provider model for SUT generation

This model differs from previous in that you no longer need to specify
which dependencies you would like access to. Instead, all are
remembered and can be queried through the sutProvider.

* User cipher provided by Put method reads

Every put method already reads all relevant ciphers from database,
there's no need to re-read them.

JSON serialization of datetimes seems to leave truncate at second
precision. Verify last known date time is within one second rather than
exact.

* validate revision date for share many requests

* Update build script to use Github environment path

Co-authored-by: Matt Gibson <mdgibson@Matts-MBP.lan>
2020-11-23 08:48:05 -06:00
229478adae Feature.web.534.allow multi select in org vault (#830)
* Set up API methods for bulk admin delete
2020-07-22 11:38:53 -05:00
d014a597dd [Soft Delete] - API updates for soft delete + retrieval 2020-04-01 13:00:25 -04:00
7cda459127 support for attachments keys
load existing items and set attachments on key update
2018-11-14 17:19:04 -05:00
0b166a080e limit collection scope option when creating cipher 2018-10-22 14:09:55 -04:00
96b492fa07 apis for creating ciphers with org & collections 2018-10-19 12:07:31 -04:00
7164f378fc purge org vault 2018-09-25 09:12:50 -04:00
de552be25f apis for bulk sharing 2018-06-13 14:03:44 -04:00
95181aef89 organization cipher import with collections 2017-09-05 17:49:34 -04:00
f8c749bab5 share login with attachments 2017-07-10 14:30:12 -04:00
43262e577c delete attachments 2017-07-07 11:07:22 -04:00
284078e946 database adjustments and storage for attachments 2017-06-30 14:41:57 -04:00
6cea556ae1 post, upload, and save cipher attachment 2017-06-30 11:15:58 -04:00
f24bc96846 folder permission checks and null folder 2017-06-09 09:48:44 -04:00
d3073e675e bulk action apis for delete and move 2017-06-09 00:30:59 -04:00
8458022a58 admin login apis 2017-04-27 14:50:22 -04:00
c6ac82dadd renaming subvault => collection 2017-04-27 09:19:30 -04:00
a9b0748d07 cipher delete for admin 2017-04-19 16:00:47 -04:00
3459be8143 remove unnecessary update partial cipher service 2017-04-17 23:16:35 -04:00
f7aa6fadbf admin subvault updates for cipher 2017-04-17 23:12:48 -04:00
c6ef3dc283 update cipher subvaults 2017-04-12 12:42:00 -04:00
b144f8a686 validation checks on cipher move 2017-03-25 16:25:10 -04:00
5029af33c5 user can edit responses and cipher partial updates 2017-03-24 16:15:50 -04:00
10c72fafda permission checks for cipher crud operations 2017-03-24 09:27:15 -04:00
ed8d5d69a4 Move into and read ciphers from org subvaults 2017-03-21 21:13:39 -04:00
26b553c248 cipher details create/update 2017-03-18 23:41:46 -04:00
588f6c7c2c refactor for cipher details, folders, favorites 2017-03-18 11:58:02 -04:00
bd0c960e9f move domains to Models.Table 2017-03-08 21:45:08 -05:00
acb1fc0be5 remove old share solution code 2017-02-28 22:51:29 -05:00
48cf44f5b2 share service setup 2017-02-25 23:38:24 -05:00
ef0a808687 added push events and moved cipher writing to cipher service. 2016-06-29 01:15:37 -04:00
3fdb0fcf67 refactored data storage to use cipher table. added history table and insert triggers. 2016-05-21 17:16:22 -04:00
8d7178bc74 Added cipher service with bulk import to account controller 2015-12-26 23:09:53 -05:00