-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[PM-21926] [PM-30350] [PM-32389] Read salt from database #7230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+161
β26
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
832c113
feat: update sql proj
ike-kottlowski 31464d7
feat: add dapper migration scripts
ike-kottlowski 9a14ce7
feat: use MasterPasswordSalt instead of Salt as return values for conβ¦
ike-kottlowski 1f542ac
chore: rename database migrations
ike-kottlowski dc275a6
feat: add MasterPasswordSalt to dtos
ike-kottlowski 3ef201c
feat: add Null Coalesce to user entity
ike-kottlowski 4175d1c
feat: add MasterPasswordSalt to EF response
ike-kottlowski bfcac62
test: add or modify tests for affected repositories
ike-kottlowski 01a8eac
chore: dotnet format
ike-kottlowski 3727b97
Merge branch 'main' into auth/pm-21926/read-salt-from-database
ike-kottlowski 6505d05
test: remove strict email check in EmergencyAccessTakeOverResponseModβ¦
ike-kottlowski 018145f
Merge branch 'auth/pm-21926/read-salt-from-database' of https://githuβ¦
ike-kottlowski 60fd40a
Merge branch 'main' into auth/pm-21926/read-salt-from-database
ike-kottlowski 4b1ab9c
Merge branch 'main' into auth/pm-21926/read-salt-from-database
ike-kottlowski bc2aa7c
chore: migration script formatting
ike-kottlowski 9e274ef
Merge branch 'main' into auth/pm-21926/read-salt-from-database
ike-kottlowski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ike-kottlowski marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
util/Migrator/DbScripts/2026-03-16_00_AlterReadKdfByEmail.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| CREATE OR ALTER PROCEDURE [dbo].[User_ReadKdfByEmail] | ||
| @Email NVARCHAR(256) | ||
| AS | ||
| BEGIN | ||
| SET NOCOUNT ON | ||
|
|
||
| SELECT | ||
| [Kdf], | ||
| [KdfIterations], | ||
| [KdfMemory], | ||
| [KdfParallelism], | ||
| [MasterPasswordSalt] | ||
| FROM | ||
| [dbo].[User] | ||
| WHERE | ||
| [Email] = @Email | ||
| END | ||
| GO |
28 changes: 28 additions & 0 deletions
28
...ator/DbScripts/2026-03-16_01_AlterReadManyAccountRecoveryDetailsByOrganizationUserIds.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| CREATE OR ALTER PROCEDURE [dbo].[OrganizationUser_ReadManyAccountRecoveryDetailsByOrganizationUserIds] | ||
| @OrganizationId UNIQUEIDENTIFIER, | ||
| @OrganizationUserIds AS [dbo].[GuidIdArray] READONLY | ||
| AS | ||
| BEGIN | ||
| SET NOCOUNT ON | ||
|
|
||
| SELECT | ||
| OU.[Id] AS OrganizationUserId, | ||
| U.[Kdf], | ||
| U.[KdfIterations], | ||
| U.[KdfMemory], | ||
| U.[KdfParallelism], | ||
| U.[MasterPasswordSalt], | ||
| OU.[ResetPasswordKey], | ||
ike-kottlowski marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| O.[PrivateKey] AS EncryptedPrivateKey | ||
| FROM | ||
| @OrganizationUserIds AS OUIDs | ||
| INNER JOIN | ||
| [dbo].[OrganizationUser] AS OU ON OUIDs.[Id] = OU.[Id] | ||
| INNER JOIN | ||
| [dbo].[Organization] AS O ON OU.[OrganizationId] = O.[Id] | ||
| INNER JOIN | ||
| [dbo].[User] U ON U.[Id] = OU.[UserId] | ||
| WHERE | ||
| OU.[OrganizationId] = @OrganizationId | ||
| END | ||
| GO | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.