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

374 Commits

Author SHA1 Message Date
a46d678d6e Fix Organization put drops cipher updates (#1044) 2020-12-17 11:19:14 -06:00
0f1af2333e Add support for Emergency Access (#1000)
* Add support for Emergency Access

* Add migration script

* Review comments

* Ensure grantor has premium when inviting new grantees.

* Resolve review comments

* Remove two factor references
2020-12-16 14:36:47 -05:00
25dff79527 enable send 2020-12-11 16:44:39 -05:00
01d4d97ef1 Ensure that users are confirmed status (#1033) 2020-12-09 12:04:14 -05:00
7eaf7ab770 [Bug] Fix cipher clone yielding incorrect RevisionDate (#1031)
* Fix cipher clone yielding incorrect RevisionDate

* PR fixes

Co-authored-by: Matt Gibson <mdgibson@Matts-MBP.lan>
2020-12-07 19:35:34 -06:00
b877c25234 Implemented tax collection for subscriptions (#1017)
* Implemented tax collection for subscriptions

* Cleanup for Sales Tax

* Cleanup for Sales Tax

* Changes a constraint to an index for checking purposes

* Added and implemented a ReadById method for TaxRate

* Code review fixes for Tax Rate implementation

* Code review fixes for Tax Rate implementation

* Made the SalesTax migration script rerunnable
2020-12-04 12:05:16 -05:00
36195eb0c9 disable send for release (#1019) 2020-12-02 17:15:08 -05:00
c0781db333 return ProfileOrganizationResponseModel for /organizations (#1016) 2020-12-01 16:43:07 -05: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
f311f40d93 Added OrgIdentifer to SetPasswordAsync // Added jit user two factor provider (#1009) 2020-11-22 08:46:44 -06:00
58eb0510ca add sends to sync response (#1002) 2020-11-18 13:55:50 -05:00
faf909479e re-enable send (#1004) 2020-11-18 12:43:58 -05:00
ac1defc97a bump versions and disabled send creation 2020-11-12 21:43:10 -05:00
25a9991908 Implement User-based API Keys (#981)
* added column ApiKey to dbo.User

* added dbo.User.ApiKey to User_Update

* added dbo.User.ApiKey to User_Create

* wrote migration script for implementing dbo.User.ApiKey

* Added ApiKey prop to the User table model

* Created AccountsController method for getting a user's API Key

* Created AccountsController method for rotating a user API key

* Added support to ApiClient for passed-through ClientSecrets when the request comes from the cli

* Added a new conditional to ClientStore to account for user API keys

* Wrote unit tests for new user API Key methods

* Added a refresh of dbo.UserView to new migration script for ApiKey

* Let client_credentials grants into the custom token logic

* Cleanup for ApiKey auth in the CLI feature

* Created user API key on registration

* Removed uneeded code for user API keys

* Changed a .Contains() to a .StartsWith() in ClientStore

* Changed index that an array is searched on

* Added more claims to the user apikey clients

* Moved some claim finding logic to a helper method
2020-11-10 15:15:29 -05:00
82dd364e65 Send APIs (#979)
* send work

* fix sql proj file

* update

* updates

* access id

* delete job

* fix delete job

* local send storage

* update sprocs for null checks
2020-11-02 15:55:49 -05:00
0eccfb8784 changed all OnlyOrg wording to be SingleOrg instead (#974)
* changed all OnlyOrg wording to be SingleOrg instead

* missed an OnlyOrg to change to SingleOrg
2020-10-27 10:28:41 -04:00
e872b4df9d Only org policy (#962)
* added OnlyOrg to PolicyType enum

* blocked accepting new org invitations if OnlyOrg is relevant to the userOrg

* blocked creating new orgs if already in an org with OnlyOrg enabled

* created email alert for OnlyOrg policy

* removed users & sent alerts when appropriate for the OnlyOrg policy

* added method to noop mail service

* cleanup for OnlyOrg policy server logic

* blocked confirming new org users if they have violated the OnlyOrg policy since accepting

* added localization strings needed for the OnlyOrg policy

* allowed OnlyOrg policy configuration from the portal

* used correct localization key for onlyorg

* formatting and messaging changes for OnlyOrg

* formatting

* messaging change

* code review changes for onlyorg

* slimmed down a conditional

* optimized getting many orgUser records from many userIds

* removed a test file

* sql formatting

* weirdness

* trying to resolve git diff formatting issues
2020-10-20 02:48:10 -04:00
d7e45fe0a3 added server validation for plan selection (#924) 2020-09-09 12:10:33 -04:00
4b3abe6fb0 stopped manually encoding the SSO user_identifier (#913) 2020-09-04 14:16:49 -04:00
303b9a7875 Allow org update api on self hosted for identifier only (#898) 2020-08-28 11:22:19 -04:00
59f8467f7c Create sso user api (#886)
* facilitate linking/unlinking existing users from an sso enabled org

* added user_identifier to identity methods for sso

* moved sso user delete method to account controller

* fixed a broken test

* Update AccountsController.cs

* facilitate linking/unlinking existing users from an sso enabled org

* added user_identifier to identity methods for sso

* moved sso user delete method to account controller

* fixed a broken test

* added a token to the existing user sso link flow

* added a token to the existing user sso link flow

* fixed a typo

* added an event log for unlink ssoUser records

* fixed a merge issue

* fixed a busted test

* fixed a busted test

* ran a formatter over everything & changed .vscode settings in .gitignore

* chagned a variable to use string interpolation

* removed a blank line

* Changed TokenPurpose enum to a static class of strings

* code review cleanups

* formatting fix

* Changed parameters & logging for delete sso user

* changed th method used to get organization user for deleting sso user records

Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com>
2020-08-26 14:12:04 -04:00
d190c4bd0f Update APIs to collect other set password info (#870) 2020-08-17 10:40:35 -04:00
783b4804ec SSO support (#862)
* [SSO] Added change password API (#836)

* Created API for updating password with no current comparison

* Changed name of method and request // Added user has password error flow

* Updated user service method name // Updated string null/empty check

* Replaced hardcoded sso domain hints with config loader (#850)

* Replaced hardcoded sso domain hints with config loader

* use async/await for sso config loader

* Update AccountsController.cs

Co-authored-by: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com>
Co-authored-by: Matt Portune <mportune@bitwarden.com>
Co-authored-by: Matt Portune <59324545+mportune-bw@users.noreply.github.com>
2020-08-12 17:03:09 -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
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
0d0c6c7167 sso integrations (#822)
* stub out hybrid sso

* support for PKCE authorization_code clients

* sso service urls

* sso client key

* abstract request validator

* support for verifying password

* custom AuthorizationCodeStore that does not remove codes

* cleanup

* comment

* created master password

* ResetMasterPassword

* rename Sso client to OidcIdentity

* update env builder

* bitwarden sso project in docker-compose

* sso path in nginx config
2020-07-16 08:01:39 -04:00
0f28ac45f9 Consistency on TaxInfo use in service params 2020-06-18 10:41:55 -04:00
1b027cab59 Remove erroneous whitespace 2020-06-17 20:02:38 -04:00
b7a500eb63 combined tax updates with other operations 2020-06-17 19:49:27 -04:00
b2cb9a2f69 Billing addr line1 fix, pr feedback 2020-06-15 09:12:03 -04:00
d88838f19e API updates for tax info collection 2020-06-08 17:40:18 -04:00
5c8c915f4e Increase limits set by importer to 2k (#729) 2020-05-13 09:23:59 -04:00
10a6e12d09 generate signin token for enterprise portal (#728) 2020-05-12 15:36:33 -04:00
d6ed8291e6 Only apply count restriction to non-deleted users (#685) 2020-04-02 20:31:02 -04:00
f6044f0d00 Missed one other PR comment fix 2020-04-01 15:47:10 -04:00
1d04803bd0 Resolved PR comments, spacing and controller code-line reversion 2020-04-01 14:55:14 -04:00
d014a597dd [Soft Delete] - API updates for soft delete + retrieval 2020-04-01 13:00:25 -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
0f9ec8d64f check user has 2fa enabled when confirming 2020-03-09 15:13:40 -04:00
4a0071f721 only show ip-related headers 2020-03-07 21:41:53 -05:00
4a67780b3e only return eneabled policies by token 2020-03-02 11:30:44 -05:00
57472c9f82 API to get org policies by invite token (#661)
* API to get org policies by invite token

* from query attr
2020-03-02 10:17:32 -05:00
71d9ffdd9d CheckPoliciesOnTwoFactorRemoval for 2fa recovery (#659) 2020-02-28 10:23:19 -05:00
81424a8526 Enforce 2fa policy (#654) 2020-02-19 14:56:16 -05:00
725522128c sync org policies to client devices 2020-01-28 15:33:32 -05:00
f3f1ac57d2 refactor policy apis 2020-01-20 08:53:15 -05:00
df4abea345 use policy service 2020-01-15 09:19:49 -05:00
85f32f450b policy controller 2020-01-15 08:35:53 -05:00
7fd6e4359d fix warnings 2020-01-10 08:47:58 -05:00
e2d65e5b08 switch to official bitpay light library 2019-12-19 10:27:06 -05:00