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

88 Commits

Author SHA1 Message Date
216c96a02f Improve and refactor style, fix typo 2021-06-30 09:29:29 +10:00
fbf5633040 Rotate send.key with account encryption key 2021-06-28 16:34:22 +10: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
f311f40d93 Added OrgIdentifer to SetPasswordAsync // Added jit user two factor provider (#1009) 2020-11-22 08:46:44 -06: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
4b3abe6fb0 stopped manually encoding the SSO user_identifier (#913) 2020-09-04 14:16:49 -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
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
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
10a6e12d09 generate signin token for enterprise portal (#728) 2020-05-12 15:36:33 -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
43f26925d1 fixes for meta repo and iapcheck model 2019-09-19 09:23:48 -04:00
d73e2da7a4 iap pre-check 2019-09-19 08:53:33 -04:00
5d047d52c3 return default kdf info 2019-09-07 14:08:19 -04:00
74bbeae776 adjust storage with payment intent/method handling 2019-08-10 12:59:32 -04:00
00e808d731 payment intent/method support for incomplete status 2019-08-09 23:56:26 -04:00
506fe28ee7 make payment method type required 2019-02-26 12:45:34 -05:00
a9336a0e02 add support for passing payment method type 2019-02-19 17:13:21 -05:00
b036657d78 apis for subscription vs billing 2019-02-18 15:40:47 -05:00
d568b86e1e inject stripepaymentservice 2019-02-08 23:53:09 -05:00
6d173385b0 cancel sub completely if past exp date 2018-12-31 13:34:02 -05:00
ac7c7b5077 move some 2fa logic functions to userService 2018-12-19 10:47:53 -05:00
7cda459127 support for attachments keys
load existing items and set attachments on key update
2018-11-14 17:19:04 -05:00
cf73b168ee More CanAccessPremium checks 2018-08-28 17:40:08 -04:00
0932189ccb support for user defined kdf parameters 2018-08-14 15:30:04 -04:00
29d62be82c allow delete verb 2018-07-20 13:09:50 -04:00
c6c03697b1 api cleanup 2018-07-16 17:20:57 -04:00
72e95e2a98 allow org user reg. when reg. is disabled 2018-05-24 16:55:52 -04:00
e350ef650a dont cycle security token on re-hash 2018-04-17 08:10:17 -04:00
5c7ff94657 user BillingResponseModel without licensing 2017-11-07 11:58:15 -05:00
132d99404c additional rate limiting on email endpoints 2017-09-27 20:53:29 -04:00
9b790b7edc license when no billing info 2017-09-18 17:57:37 -04:00
8b947cafaf added licensing apis, refactored some services 2017-08-30 11:23:55 -04:00
5370c2303e update org license API 2017-08-14 21:25:06 -04:00
5259b07889 create org with license file 2017-08-14 20:57:45 -04:00
18cbc79dd2 update premium license and self host attr checks 2017-08-14 12:08:57 -04:00
a020a7268e billing info when self hosted with no gateway info 2017-08-11 23:23:50 -04:00
67edcd035c license adjustments for premium creation 2017-08-11 23:08:41 -04:00
9c254a7325 more premium licensing 2017-08-11 22:55:25 -04:00
73029f76d2 premium signup with license file 2017-08-11 17:06:31 -04:00
b2295f867b account recovery to delete via email 2017-08-09 10:53:42 -04:00
082b53e133 refactor for addtnl. payment service (braintree) 2017-07-28 12:09:12 -04:00
5a4bfe4e61 update libs and cleanup 2017-07-14 09:06:35 -04:00
b49c16f529 storage adjustment and billing fixes 2017-07-11 10:59:59 -04:00
a8ff190fb5 storage in billing and org signup 2017-07-11 10:25:00 -04:00