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

12 Commits

Author SHA1 Message Date
Matt Gibson
edd4bc2623 Add disable send policy (#1130)
* Add Disable Send policy

* Test DisableSend policy

* PR Review

* Update tests for using CurrentContext

This required making an interface for CurrentContext and mocking out
the members used. The interface can be expanded as needed for tests.

I moved CurrentContext to a folder, which changes the namespace
and causes a lot of file touches, but most are just adding a reference

* Fix failing test

* Update exemption to include all exempt users

* Move all CurrentContext usages to ICurrentContext

* PR review. Match messaging with Web
2021-02-04 12:54:21 -06:00
Addison Beck
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
Kyle Spearrin
38728143d8 Added static client store (#899) 2020-08-28 13:32:15 -04:00
Kyle Spearrin
623cd36bd4 upgrade identity server 4 to v4 (#842)
* upgrade identity server 4 to v4

* remove script ref
2020-07-30 17:00:13 -04:00
Chad Scharf
9800b752c0 Changed all C# control flow block statements to include space between keyword and open paren 2020-03-27 14:36:37 -04:00
Kyle Spearrin
15cb0ad4c3 implement useapi and apikey 2019-03-02 15:09:33 -05:00
Kyle Spearrin
b6696df055 set secret for dev 2019-02-28 00:03:11 -05:00
Kyle Spearrin
5923b4c9bd org API clients 2019-02-26 17:01:33 -05:00
Kyle Spearrin
ff01ce5ca7 internal identity authorization 2018-08-15 18:43:26 -04:00
Kyle Spearrin
8b947cafaf added licensing apis, refactored some services 2017-08-30 11:23:55 -04:00
Kyle Spearrin
0ad76a5487 added installation id to current context. 2017-08-10 15:26:05 -04:00
Kyle Spearrin
e538817eb6 added installations, push scoped tokens, push api 2017-08-10 14:39:11 -04:00