1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-02 00:22:50 -05:00
Commit Graph

32 Commits

Author SHA1 Message Date
f866b25e43 Key Connector feature toggle (#1716) 2021-11-17 11:46:35 +01:00
d39f45c81c Organization autoscaling (#1585)
* Add autoscale fields to Organization

* Add autoscale setting changes

* Autoscale organizations

updates InviteUsersAsync to support all invite sources.

sends an email to org owners when organization autoscaled

* All organizations autoscale

Disabling autoscaling can be done by setting max seats to current seats.

We only warn about autoscaling on the first autoscaling event.

* Fix tests

* Bug fixes

* Simplify subscription update logic

* Void invoices that fail to delete

Stripe no longer allows deletion of draft invoices that were created as part of subscription updates. It's necessary to void out these invoices without sending tem to the client.

* Notify org owners when their subscription runs out of seats

* Use datetime for notifications

Allows for later re-sending email if we want to periodically remind
owners

* Do not update subscription if it already matches new quatity

* Include all migrations

* Remove unnecessary inline styling

* SubscriptionUpdate handles update decisions

* Remove unnecessary html setter

* PR review

* Use minimum access for class methods
2021-09-23 05:36:08 -05:00
785e788cb6 Support large organization sync (#1311)
* Increase organization max seat size from 30k to 2b (#1274)

* Increase organization max seat size from 30k to 2b

* PR review. Do not modify unless state matches expected

* Organization sync simultaneous event reporting (#1275)

* Split up azure messages according to max size

* Allow simultaneous login of organization user events

* Early resolve small event lists

* Clarify logic

Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com>

* Improve readability

This comes at the cost of multiple serializations, but the
 improvement in wire-time should more than make up for this
 on message where serialization time matters

Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com>

* Queue emails (#1286)

* Extract common Azure queue methods

* Do not use internal entity framework namespace

* Prefer IEnumerable to IList unless needed

All of these implementations were just using `Count == 1`,
which is easily replicated. This will be used when abstracting Azure queues

* Add model for azure queue message

* Abstract Azure queue for reuse

* Creat service to enqueue mail messages for later processing

Azure queue mail service uses Azure queues.
Blocking just blocks until all the work is done -- This is
how emailing works today

* Provide mail queue service to DI

* Queue organization invite emails for later processing

All emails can later be added to this queue

* Create Admin hosted service to process enqueued mail messages

* Prefer constructors to static generators

* Mass delete organization users (#1287)

* Add delete many to Organization Users

* Correct formatting

* Remove erroneous migration

* Clarify parameter name

* Formatting fixes

* Simplify bump account revision sproc

* Formatting fixes

* Match file names to objects

* Indicate if large import is expected

* Early pull all existing users we were planning on inviting (#1290)

* Early pull all existing users we were planning on inviting

* Improve sproc name

* Batch upsert org users (#1289)

* Add UpsertMany sprocs to OrganizationUser

* Add method to create TVPs from any object.

Uses DbOrder attribute to generate.
Sproc will fail unless TVP column order matches that of the db type

* Combine migrations

* Correct formatting

* Include sql objects in sql project

* Keep consisten parameter names

* Batch deletes for performance

* Correct formatting

* consolidate migrations

* Use batch methods in OrganizationImport

* Declare @BatchSize

* Transaction names limited to 32 chars

Drop sproc before creating it if it exists

* Update import tests

* Allow for more users in org upgrades

* Fix formatting

* Improve class hierarchy structure

* Use name tuple types

* Fix formatting

* Front load all reflection

* Format constructor

* Simplify ToTvp as class-specific extension

Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com>
2021-05-17 09:43:02 -05:00
70ab5b25a1 [Reset Password] Organization Key Pair (#1292)
* [Reset Password] Organization Key Pair

* Fixed type in Organization_ReadAbilites sproc

* Fixed broken unit test by making sure premium addon was false

* Updated PublicKey decorator and removed unecessary validation
2021-05-06 14:53:12 -05:00
5537470703 Use sas token for attachment downloads (#1153)
* Get limited life attachment download URL

This change limits url download to a 1min lifetime.
This requires moving to a new container to allow for non-public blob
access.

Clients will have to call GetAttachmentData api function to receive the download
URL. For backwards compatibility, attachment URLs are still present, but will not
work for attachments stored in non-public access blobs.

* Make GlobalSettings interface for testing

* Test LocalAttachmentStorageService equivalence

* Remove comment

* Add missing globalSettings using

* Simplify default attachment container

* Default to attachments containe for existing methods

A new upload method will be made for uploading to attachments-v2.
For compatibility for clients which don't use these new methods, we need
to still use the old container. The new container will be used only for
new uploads

* Remove Default MetaData fixture.

* Keep attachments container blob-level security for all instances

* Close unclosed FileStream

* Favor default value for noop services
2021-02-22 15:35:16 -06:00
2872bda6fe tool to generate licenses (#874)
* tool to generate licenses

* code review feedback
2020-08-18 17:00:21 -04:00
c8220fdfa6 Plan And Price Updates (#859)
* Expanded the Plan model to make plan & product data a bit more dynamic 
* Created a Product enum to track versioned instances of the same plan
* Created and API call and Response model for getting plan & product data from the server
2020-08-11 14:19:56 -04:00
51fd87df0b Added UseSso bool to Organization (#834)
* Added UseSso bool to org

* Update fields in migration script

* bump version & check enabled flag on ssoConfig
2020-07-22 09:38:39 -04:00
9800b752c0 Changed all C# control flow block statements to include space between keyword and open paren 2020-03-27 14:36:37 -04:00
e8054df5b4 use policies property for orgs 2020-01-15 15:00:54 -05:00
8d09a7ad13 org license are version 5 2019-07-26 21:56:48 -04:00
15cb0ad4c3 implement useapi and apikey 2019-03-02 15:09:33 -05:00
b036657d78 apis for subscription vs billing 2019-02-18 15:40:47 -05:00
45db73c6e1 null check on license key 2018-07-20 13:58:24 -04:00
bcc224c02d stub out use2fa and twofactorproviders on orgs 2018-04-02 14:53:19 -04:00
172fd2425e added org flag for UseEvents 2017-12-14 15:48:44 -05:00
8c32765f4c custom plans with expiration are not trials 2017-12-04 20:58:23 -05:00
aa045f7775 fix == bug in licensing VerifyData 2017-11-12 22:57:25 -05:00
ed826f4b28 version > 1 on UsersGetPremium check 2017-11-07 21:51:50 -05:00
f7cb6e403d dont check UsersGetPremium for version 1 licenses 2017-11-07 21:12:50 -05:00
0fdb9b3d2f change personal plan to family. allow self host 2017-11-06 16:01:58 -05:00
4585af5a85 validate organization licenses 2017-08-17 00:12:11 -04:00
b14f6d080e verify and disable premium from license check 2017-08-16 17:08:20 -04:00
d9cd7880a6 license hash 2017-08-16 15:16:56 -04:00
912e875a33 licensing signature refactor 2017-08-16 13:55:01 -04:00
dd288a7071 installation validation and self host applied 2017-08-15 16:11:08 -04:00
ee9ec680a9 license dates 2017-08-15 15:31:42 -04:00
b1443b4f94 added refresh date to license files 2017-08-15 14:58:17 -04:00
abf68c1cea api get generating organization license 2017-08-14 22:16:30 -04:00
6b80ec6331 updates for license validation 2017-08-14 13:06:44 -04:00
9c254a7325 more premium licensing 2017-08-11 22:55:25 -04:00
a1d064ed9e license verification services for user/org 2017-08-09 17:01:37 -04:00