Kyle Spearrin
44c559c723
Support for passkey registration ( #2885 )
...
* support for fido2 auth
* stub out registration implementations
* stub out assertion steps and token issuance
* verify token
* webauthn tokenable
* remove duplicate expiration set
* revert sqlproj changes
* update sqlproj target framework
* update new validator signature
* [PM-2014] Passkey registration (#2915 )
* [PM-2014] chore: rename `IWebAuthnRespository` to `IWebAuthnCredentialRepository`
* [PM-2014] fix: add missing service registration
* [PM-2014] feat: add user verification when fetching options
* [PM-2014] feat: create migration script for mssql
* [PM-2014] chore: append to todo comment
* [PM-2014] feat: add support for creation token
* [PM-2014] feat: implement credential saving
* [PM-2014] chore: add resident key TODO comment
* [PM-2014] feat: implement passkey listing
* [PM-2014] feat: implement deletion without user verification
* [PM-2014] feat: add user verification to delete
* [PM-2014] feat: implement passkey limit
* [PM-2014] chore: clean up todo comments
* [PM-2014] fix: add missing sql scripts
Missed staging them when commiting
* [PM-2014] feat: include options response model in swagger docs
* [PM-2014] chore: move properties after ctor
* [PM-2014] feat: use `Guid` directly as input paramter
* [PM-2014] feat: use nullable guid in token
* [PM-2014] chore: add new-line
* [PM-2014] feat: add support for feature flag
* [PM-2014] feat: start adding controller tests
* [PM-2014] feat: add user verification test
* [PM-2014] feat: add controller tests for token interaction
* [PM-2014] feat: add tokenable tests
* [PM-2014] chore: clean up commented premium check
* [PM-2014] feat: add user service test for credential limit
* [PM-2014] fix: run `dotnet format`
* [PM-2014] chore: remove trailing comma
* [PM-2014] chore: add `Async` suffix
* [PM-2014] chore: move delay to constant
* [PM-2014] chore: change `default` to `null`
* [PM-2014] chore: remove autogenerated weirdness
* [PM-2014] fix: lint
* Added check for PasswordlessLogin feature flag on new controller and methods. (#3284 )
* Added check for PasswordlessLogin feature flag on new controller and methods.
* fix: build error from missing constructor argument
---------
Co-authored-by: Andreas Coroiu <andreas.coroiu@gmail.com >
* [PM-4171] Update DB to support PRF (#3321 )
* [PM-4171] feat: update database to support PRF
* [PM-4171] feat: rename `DescriptorId` to `CredentialId`
* [PM-4171] feat: add PRF felds to domain object
* [PM-4171] feat: add `SupportsPrf` column
* [PM-4171] fix: add missing comma
* [PM-4171] fix: add comma
* [PM-3263] fix identity server tests for passkey registration (#3331 )
* Added WebAuthnRepo to EF DI
* updated config to match current grant types
* Remove ExtensionGrantValidator (#3363 )
* Linting
---------
Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com >
Co-authored-by: Andreas Coroiu <andreas.coroiu@gmail.com >
Co-authored-by: Todd Martin <106564991+trmartin4@users.noreply.github.com >
Co-authored-by: Ike <137194738+ike-kottlowski@users.noreply.github.com >
Co-authored-by: Todd Martin <tmartin@bitwarden.com >
2023-10-30 09:40:06 -04:00
Todd Martin
7a9315aec0
Added back alias that was accidentally introduced ( #3202 )
2023-08-15 19:56:12 -04:00
Ike
4ec01b0ef0
PM-2427-Defect-Cannot-delete-account-if-User-has-auth-request-on-table-FK-constraint ( #3118 )
...
* updated migrations and ef repo
* removed route alias
---------
Co-authored-by: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com >
2023-08-15 17:16:02 -04:00
Jake Fink
88dd745070
[PM-1188] Server owner auth migration ( #2825 )
...
* [PM-1188] add sso project to auth
* [PM-1188] move sso api models to auth
* [PM-1188] fix sso api model namespace & imports
* [PM-1188] move core files to auth
* [PM-1188] fix core sso namespace & models
* [PM-1188] move sso repository files to auth
* [PM-1188] fix sso repo files namespace & imports
* [PM-1188] move sso sql files to auth folder
* [PM-1188] move sso test files to auth folders
* [PM-1188] fix sso tests namespace & imports
* [PM-1188] move auth api files to auth folder
* [PM-1188] fix auth api files namespace & imports
* [PM-1188] move auth core files to auth folder
* [PM-1188] fix auth core files namespace & imports
* [PM-1188] move auth email templates to auth folder
* [PM-1188] move auth email folder back into shared directory
* [PM-1188] fix auth email names
* [PM-1188] move auth core models to auth folder
* [PM-1188] fix auth model namespace & imports
* [PM-1188] add entire Identity project to auth codeowners
* [PM-1188] fix auth orm files namespace & imports
* [PM-1188] move auth orm files to auth folder
* [PM-1188] move auth sql files to auth folder
* [PM-1188] move auth tests to auth folder
* [PM-1188] fix auth test files namespace & imports
* [PM-1188] move emergency access api files to auth folder
* [PM-1188] fix emergencyaccess api files namespace & imports
* [PM-1188] move emergency access core files to auth folder
* [PM-1188] fix emergency access core files namespace & imports
* [PM-1188] move emergency access orm files to auth folder
* [PM-1188] fix emergency access orm files namespace & imports
* [PM-1188] move emergency access sql files to auth folder
* [PM-1188] move emergencyaccess test files to auth folder
* [PM-1188] fix emergency access test files namespace & imports
* [PM-1188] move captcha files to auth folder
* [PM-1188] fix captcha files namespace & imports
* [PM-1188] move auth admin files into auth folder
* [PM-1188] fix admin auth files namespace & imports
- configure mvc to look in auth folders for views
* [PM-1188] remove extra imports and formatting
* [PM-1188] fix ef auth model imports
* [PM-1188] fix DatabaseContextModelSnapshot paths
* [PM-1188] fix grant import in ef
* [PM-1188] update sqlproj
* [PM-1188] move missed sqlproj files
* [PM-1188] move auth ef models out of auth folder
* [PM-1188] fix auth ef models namespace
* [PM-1188] remove auth ef models unused imports
* [PM-1188] fix imports for auth ef models
* [PM-1188] fix more ef model imports
* [PM-1188] fix file encodings
2023-04-14 13:25:56 -04:00
Addison Beck
d0c793c951
Update API endpoint to use RegisterResponseModel ( #2282 )
2022-09-19 09:35:57 -04:00
Addison Beck
287dc2e06b
[SG-656] Send a captcha bypass token back from the register endpoint ( #2278 )
...
* Send a captcha bypass token back from the register endpoint
* [review] Use existing user
* [review] Introduce ICaptcheProtectedResponseModel
2022-09-15 10:02:37 -04:00
Colton Hurst
ed1406acc2
[SM-90] Add Config Endpoint Phase 1 ( #2130 )
...
* Add config endpoint with version and gitHash in response
* Remove gitHash from version, formatting and other improvements
* change name of variable in ConfigController
* Update to properly get gitHash
* SM-94: Add global settings for api url
* SM-94: ConfigController cleanup
* SM-94: Make version and gitHash available for all projects, using AssemblyHelper
* Update ConfigResponseModel GetVersion() call
* Change AssemblyHelpers.cs to use the UTF-8 charset
* SM-94: Use AssemblyHelpers.GetVersion and deprecate CoreHelpers.GetVersion
* SM-90: Add other BaseServiceUriSettings urls
* SM-94: Fix dotnet format issue
* remove old GetVersion method
* Add back the linebreak
* Fix typo in Directory.Build.props
Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com >
Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com >
2022-09-05 11:19:04 -04:00
Justin Baur
7f5f010e1e
Run formatting ( #2230 )
2022-08-29 16:06:55 -04:00
Justin Baur
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
Justin Baur
34fb4cca2a
Turn on file scoped namespaces ( #2225 )
2022-08-29 14:53:16 -04:00
Justin Baur
231eb84e69
Turn On ImplicitUsings ( #2079 )
...
* Turn on ImplicitUsings
* Fix formatting
* Run linter
2022-06-29 19:46:41 -04:00
Carlos J. Muentes
14302efa2c
CSA-2 - Require user interaction for SSO redirect ( #1948 )
...
* CSA-2 - adding validation before redirecting for SSO login
* Updating server to use generated and signed JWT for SSO redirect
* Removing erroneous file
* Removing erroneous file
* Updating for PR feedback, adding domain_hint to Login and fixing invalid domain_hint name reference
* Some code styling changes from PR feedback
* Removing unnecessary JSON serialization
* Couple small changes from PR feedback
* Fixing linting errors
* Update formatting in AccountController.cs
* Remove unused dependency
* Add token lifetime to settings
* Use tokenable directly
* Return defined models
* Revert sso proj file changes
* Check expiration validity when validating org
* Show error message with expired token
* Formatting fixes
* Add SsoTokenLifetime to Sso settings
* Fix build errors
* Fix sql warnings
Co-authored-by: Carlos J. Muentes <cmuentes@bitwarden.com >
Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com >
Co-authored-by: Matt Gibson <mgibson@bitwarden.com >
2022-06-01 12:23:52 -05:00
Matt Gibson
9a9c9d4bf6
Add error handling to identity accounts controller ( #1909 )
2022-03-14 20:08:01 -05:00
Matt Gibson
5f2da6e4b7
Fix/identity service model validation ( #1837 )
...
* Fix indentation
* Fix comment
* Extract ModelStateValidationFilter add to Indentity MVC opts
* Remove unnecessary base constructor call
2022-02-02 13:26:15 -06:00
Oscar Hinton
0def1830af
Move identity endpoints to Identity service ( #1807 )
2022-01-17 13:21:51 +01:00
Oscar Hinton
e4a10aae27
Split out repositories to Infrastructure.Dapper / EntityFramework ( #1759 )
2022-01-11 10:40:51 +01:00
Oscar Hinton
23b0a1f9df
Run dotnet format ( #1764 )
2021-12-16 15:35:09 +01:00
Oscar Hinton
63f6dd9a24
Move request/response models ( #1754 )
2021-12-14 16:05:07 +01:00
Vince Grassia
2ec10cfd2a
Standardize '/version' endpoint on all services ( #1755 )
2021-12-09 15:45:45 -05:00
Oscar Hinton
c5d5601464
Add support for crypto agent ( #1623 )
2021-10-25 15:09:14 +02:00
Vince Grassia
179543d790
Add 'alive' endpoint to Admin and Identity services ( #1505 )
...
* Add 'alive' endpoint to Admin and Identity services
* Move 'alive' endpoint for Admin to Home Controller
2021-08-10 15:29:13 -04:00
Chad Scharf
99b95b5330
Fix safari sso header size ( #1065 )
...
* Safari SSO header size fix - in progress
* Cleanup of memoryCacheTicketStore
* Redis cache ticket store + registration
* Revert some unecessary changes
* temp - distributed cookie: idsrv.external
* Ticket data cached storage added
* OIDC working w/ substantially reduced cookie size
* Added distributed cache cookie manager
* Removed hybrid OIDC flow
* Enable self-hosted folks to use Redis for SSO
* Also allow self-hosted to use Redis cont...
2021-01-11 11:03:46 -05:00
Chad Scharf
db7d05b52f
Added PreValidate endpoint on Account controller ( #896 )
...
* Added PreValidate endpoint on Account controller
* Fixed IHttpClientFactory implementation
* Core localization and org sproc fix
* Pass culture, fixed sso middleware bug
2020-08-28 12:14:23 -04:00
Addison Beck
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
Kyle Spearrin
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
Kyle Spearrin
4df363aaa1
identityserver v4 cleanup ( #843 )
...
* v4 cleanup
* idToken
2020-07-31 09:45:36 -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
Kyle Spearrin
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