diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
index 1c1d73938d..87e0fb56f0 100644
--- a/.config/dotnet-tools.json
+++ b/.config/dotnet-tools.json
@@ -21,7 +21,7 @@
]
},
"dotnet-ef": {
- "version": "7.0.8",
+ "version": "7.0.14",
"commands": [
"dotnet-ef"
]
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 50726279c3..3f7148c7cf 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -1,11 +1,9 @@
-# Please sort lines alphabetically, this will ensure we don't accidentally add duplicates.
+# Please sort into logical groups with comment headers. Sort groups in order of specificity.
+# For example, default owners should always be the first group.
+# Sort lines alphabetically within these groups to avoid accidentally adding duplicates.
#
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
-# The following owners will be the default owners for everything in the repo
-# unless a later match takes precedence
-* @bitwarden/tech-leads
-
# DevOps for Actions and other workflow changes
.github/workflows @bitwarden/dept-devops
@@ -45,8 +43,11 @@ bitwarden_license/src/test/Scim.ScimTest @bitwarden/team-admin-console-dev
**/*paypal* @bitwarden/team-billing-dev
**/*stripe* @bitwarden/team-billing-dev
**/*subscription* @bitwarden/team-billing-dev
+**/*payment* @bitwarden/team-billing-dev
+**/*invoice* @bitwarden/team-billing-dev
+**/*OrganizationLicense* @bitwarden/team-billing-dev
**/Billing @bitwarden/team-billing-dev
-# Multiple owners
+# Multiple owners - DO NOT REMOVE (DevOps)
**/packages.lock.json
Directory.Build.props
diff --git a/.github/renovate.json b/.github/renovate.json
index b8cafdfc01..3f93d8c65a 100644
--- a/.github/renovate.json
+++ b/.github/renovate.json
@@ -103,6 +103,11 @@
"commitMessagePrefix": "[deps] Billing:",
"reviewers": ["team:team-billing-dev"]
},
+ {
+ "matchPackagePatterns": ["^Microsoft.Extensions.Logging"],
+ "groupName": "Microsoft.Extensions.Logging",
+ "description": "Group Microsoft.Extensions.Logging to exclude them from the dotnet monorepo preset"
+ },
{
"matchPackageNames": ["CommandDotNet", "dbup-sqlserver", "YamlDotNet"],
"description": "DevOps owned dependencies",
@@ -122,6 +127,7 @@
{
"matchPackageNames": [
"Dapper",
+ "dotnet-ef",
"linq2db.EntityFrameworkCore",
"Microsoft.EntityFrameworkCore.Design",
"Microsoft.EntityFrameworkCore.InMemory",
@@ -135,6 +141,11 @@
"commitMessagePrefix": "[deps] SM:",
"reviewers": ["team:team-secrets-manager-dev"]
},
+ {
+ "matchPackagePatterns": ["EntityFrameworkCore", "^dotnet-ef"],
+ "groupName": "EntityFrameworkCore",
+ "description": "Group EntityFrameworkCore to exclude them from the dotnet monorepo preset"
+ },
{
"matchPackageNames": [
"AutoMapper.Extensions.Microsoft.DependencyInjection",
@@ -146,17 +157,32 @@
"Microsoft.AspNetCore.SignalR.Protocols.MessagePack",
"Microsoft.AspNetCore.SignalR.StackExchangeRedis",
"Microsoft.Azure.NotificationHubs",
- "Microsoft.Extensions.Configuration",
"Microsoft.Extensions.Configuration.EnvironmentVariables",
"Microsoft.Extensions.Configuration.UserSecrets",
- "Microsoft.Extensions.DependencyInjection",
+ "Microsoft.Extensions.Configuration",
"Microsoft.Extensions.DependencyInjection.Abstractions",
+ "Microsoft.Extensions.DependencyInjection",
"SendGrid"
],
"description": "Tools owned dependencies",
"commitMessagePrefix": "[deps] Tools:",
"reviewers": ["team:team-tools-dev"]
},
+ {
+ "matchPackagePatterns": ["^Microsoft.AspNetCore.SignalR"],
+ "groupName": "SignalR",
+ "description": "Group SignalR to exclude them from the dotnet monorepo preset"
+ },
+ {
+ "matchPackagePatterns": ["^Microsoft.Extensions.Configuration"],
+ "groupName": "Microsoft.Extensions.Configuration",
+ "description": "Group Microsoft.Extensions.Configuration to exclude them from the dotnet monorepo preset"
+ },
+ {
+ "matchPackagePatterns": ["^Microsoft.Extensions.DependencyInjection"],
+ "groupName": "Microsoft.Extensions.DependencyInjection",
+ "description": "Group Microsoft.Extensions.DependencyInjection to exclude them from the dotnet monorepo preset"
+ },
{
"matchPackageNames": [
"AngleSharp",
@@ -175,7 +201,8 @@
],
"force": {
"constraints": {
- "dotnet": "6.0.413"
+ "dotnet": "6.0.100"
}
- }
+ },
+ "ignoreDeps": ["dotnet-sdk"]
}
diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml
index 55f3692c5c..da6155ac8e 100644
--- a/.github/workflows/version-bump.yml
+++ b/.github/workflows/version-bump.yml
@@ -11,7 +11,7 @@ on:
jobs:
bump_props_version:
name: "Create version_bump_${{ github.event.inputs.version_number }} branch"
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-22.04
steps:
- name: Checkout Branch
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
@@ -37,7 +37,11 @@ jobs:
git_commit_gpgsign: true
- name: Create Version Branch
- run: git switch -c version_bump_${{ github.event.inputs.version_number }}
+ id: create-branch
+ run: |
+ NAME=version_bump_${{ github.ref_name }}_${{ github.event.inputs.version_number }}
+ git switch -c $NAME
+ echo "name=$NAME" >> $GITHUB_OUTPUT
- name: Bump Version - Props
uses: bitwarden/gh-actions/version-bump@main
@@ -69,18 +73,19 @@ jobs:
- name: Push changes
if: ${{ steps.version-changed.outputs.changes_to_commit == 'TRUE' }}
- run: git push -u origin version_bump_${{ github.event.inputs.version_number }}
+ env:
+ PR_BRANCH: ${{ steps.create-branch.outputs.name }}
+ run: git push -u origin $PR_BRANCH
- name: Create Version PR
if: ${{ steps.version-changed.outputs.changes_to_commit == 'TRUE' }}
env:
- PR_BRANCH: "version_bump_${{ github.event.inputs.version_number }}"
+ PR_BRANCH: ${{ steps.create-branch.outputs.name }}
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- BASE_BRANCH: master
TITLE: "Bump version to ${{ github.event.inputs.version_number }}"
run: |
gh pr create --title "$TITLE" \
- --base "$BASE" \
+ --base "$GITHUB_REF" \
--head "$PR_BRANCH" \
--label "version update" \
--label "automated pr" \
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 564c94e6f3..e260116a24 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -7,94 +7,251 @@
{
"name": "Min Server",
"configurations": [
- "Identity",
- "API"
+ "run-Identity",
+ "run-API"
],
"presentation": {
"hidden": false,
"group": "AA_compounds",
"order": 1
},
+ "preLaunchTask": "buildIdentityApi",
"stopAll": true
},
{
"name": "Admin, API, Identity",
"configurations": [
- "Admin",
- "API",
- "Identity"
+ "run-Admin",
+ "run-API",
+ "run-Identity"
],
"presentation": {
"hidden": false,
"group": "AA_compounds",
"order": 3
},
+ "preLaunchTask": "buildIdentityApiAdmin",
"stopAll": true
},
{
"name": "Full Server",
"configurations": [
- "Admin",
- "API",
- "EventsProcessor",
- "Identity",
- "Sso",
- "Icons",
- "Billing",
- "Notifications"
+ "run-Admin",
+ "run-API",
+ "run-EventsProcessor",
+ "run-Identity",
+ "run-Sso",
+ "run-Icons",
+ "run-Billing",
+ "run-Notifications"
],
"presentation": {
"hidden": false,
"group": "AA_compounds",
"order": 4
},
+ "preLaunchTask": "buildFullServer",
"stopAll": true
},
{
"name": "Self Host: Bit",
"configurations": [
- "Admin-SelfHost",
- "API-SelfHost",
- "EventsProcessor-SelfHost",
- "Identity-SelfHost",
- "Sso-SelfHost",
- "Notifications-SelfHost"
+ "run-Admin-SelfHost",
+ "run-API-SelfHost",
+ "run-EventsProcessor-SelfHost",
+ "run-Identity-SelfHost",
+ "run-Sso-SelfHost",
+ "run-Notifications-SelfHost"
],
"presentation": {
"hidden": false,
"group": "AA_compounds",
"order": 2
},
+ "preLaunchTask": "buildSelfHostBit",
"stopAll": true
},
{
"name": "Self Host: OSS",
"configurations": [
- "Admin-SelfHost",
- "API-SelfHost",
- "EventsProcessor-SelfHost",
- "Identity-SelfHost",
+ "run-Admin-SelfHost",
+ "run-API-SelfHost",
+ "run-EventsProcessor-SelfHost",
+ "run-Identity-SelfHost",
],
"presentation": {
"hidden": false,
"group": "AA_compounds",
"order": 99
},
+ "preLaunchTask": "buildSelfHostOss",
"stopAll": true
- }
- ],
- "configurations": [
+ },
{
- "name": "Identity",
+ "name": "Admin",
+ "configurations": [
+ "run-Admin"
+ ],
"presentation": {
"hidden": false,
"group": "cloud",
- "order": 10
+ },
+ "preLaunchTask": "buildAdmin",
+ },
+ {
+ "name": "API",
+ "configurations": [
+ "run-API"
+ ],
+ "presentation": {
+ "hidden": false,
+ "group": "cloud",
+ },
+ "preLaunchTask": "buildAPI",
+ },
+ {
+ "name": "Billing",
+ "configurations": [
+ "run-Billing"
+ ],
+ "presentation": {
+ "hidden": false,
+ "group": "cloud",
+ },
+ "preLaunchTask": "buildBilling",
+ },
+ {
+ "name": "Events Processor",
+ "configurations": [
+ "run-EventsProcessor"
+ ],
+ "presentation": {
+ "hidden": false,
+ "group": "cloud",
+ },
+ "preLaunchTask": "buildEventsProcessor",
+ },
+ {
+ "name": "Icons",
+ "configurations": [
+ "run-Icons"
+ ],
+ "presentation": {
+ "hidden": false,
+ "group": "cloud",
+ },
+ "preLaunchTask": "buildIcons",
+ },
+ {
+ "name": "Identity",
+ "configurations": [
+ "run-Identity"
+ ],
+ "presentation": {
+ "hidden": false,
+ "group": "cloud",
+ },
+ "preLaunchTask": "buildIdentity",
+ },
+ {
+ "name": "Notifications",
+ "configurations": [
+ "run-Notifications"
+ ],
+ "presentation": {
+ "hidden": false,
+ "group": "cloud",
+ },
+ "preLaunchTask": "buildNotifications",
+ },
+ {
+ "name": "SSO",
+ "configurations": [
+ "run-Sso"
+ ],
+ "presentation": {
+ "hidden": false,
+ "group": "cloud",
+ },
+ "preLaunchTask": "buildSso",
+ },
+ {
+ "name": "Admin Self Host",
+ "configurations": [
+ "run-Admin-SelfHost"
+ ],
+ "presentation": {
+ "hidden": false,
+ "group": "self-host",
+ },
+ "preLaunchTask": "buildAdmin",
+ },
+ {
+ "name": "API Self Host",
+ "configurations": [
+ "run-API-SelfHost"
+ ],
+ "presentation": {
+ "hidden": false,
+ "group": "self-host",
+ },
+ "preLaunchTask": "buildAPI",
+ },
+ {
+ "name": "Events Processor Self Host",
+ "configurations": [
+ "run-EventsProcessor-SelfHost"
+ ],
+ "presentation": {
+ "hidden": false,
+ "group": "self-host",
+ },
+ "preLaunchTask": "buildEventsProcessor",
+ },
+ {
+ "name": "Identity Self Host",
+ "configurations": [
+ "run-Identity-SelfHost"
+ ],
+ "presentation": {
+ "hidden": false,
+ "group": "self-host",
+ },
+ "preLaunchTask": "buildIdentity",
+ },
+ {
+ "name": "Notifications Self Host",
+ "configurations": [
+ "run-Notifications-SelfHost"
+ ],
+ "presentation": {
+ "hidden": false,
+ "group": "self-host",
+ },
+ "preLaunchTask": "buildNotifications",
+ },
+ {
+ "name": "SSO Self Host",
+ "configurations": [
+ "run-Sso-SelfHost"
+ ],
+ "presentation": {
+ "hidden": false,
+ "group": "self-host",
+ },
+ "preLaunchTask": "buildSso",
+ },
+ ],
+ "configurations": [
+ // Configurations represent run-only scenarios so that they can be used in multiple compounds
+ {
+ "name": "run-Identity",
+ "presentation": {
+ "hidden": true,
},
"requireExactSource": true,
"type": "coreclr",
"request": "launch",
- "preLaunchTask": "buildIdentity",
"program": "${workspaceFolder}/src/Identity/bin/Debug/net6.0/Identity.dll",
"args": [],
"cwd": "${workspaceFolder}/src/Identity",
@@ -107,16 +264,13 @@
}
},
{
- "name": "API",
+ "name": "run-API",
"presentation": {
- "hidden": false,
- "group": "cloud",
- "order": 10
+ "hidden": true,
},
"requireExactSource": true,
"type": "coreclr",
"request": "launch",
- "preLaunchTask": "buildAPI",
"program": "${workspaceFolder}/src/Api/bin/Debug/net6.0/Api.dll",
"args": [],
"cwd": "${workspaceFolder}/src/Api",
@@ -129,16 +283,13 @@
}
},
{
- "name": "Billing",
+ "name": "run-Billing",
"presentation": {
- "hidden": false,
- "group": "cloud",
- "order": 10
+ "hidden": true,
},
"requireExactSource": true,
"type": "coreclr",
"request": "launch",
- "preLaunchTask": "buildBilling",
"program": "${workspaceFolder}/src/Billing/bin/Debug/net6.0/Billing.dll",
"args": [],
"cwd": "${workspaceFolder}/src/Billing",
@@ -151,16 +302,13 @@
}
},
{
- "name": "Admin",
+ "name": "run-Admin",
"presentation": {
- "hidden": false,
- "group": "cloud",
- "order": 20
+ "hidden": true,
},
"requireExactSource": true,
"type": "coreclr",
"request": "launch",
- "preLaunchTask": "buildAdmin",
"OS-COMMENT4": "If you have changed target frameworks, make sure to update the program path.",
"program": "${workspaceFolder}/src/Admin/bin/Debug/net6.0/Admin.dll",
"args": [],
@@ -175,16 +323,13 @@
}
},
{
- "name": "Sso",
+ "name": "run-Sso",
"presentation": {
- "hidden": false,
- "group": "cloud",
- "order": 50
+ "hidden": true,
},
"requireExactSource": true,
"type": "coreclr",
"request": "launch",
- "preLaunchTask": "buildSso",
"program": "${workspaceFolder}/bitwarden_license/src/Sso/bin/Debug/net6.0/Sso.dll",
"args": [],
"cwd": "${workspaceFolder}/bitwarden_license/src/Sso",
@@ -197,16 +342,13 @@
}
},
{
- "name": "EventsProcessor",
+ "name": "run-EventsProcessor",
"presentation": {
- "hidden": false,
- "group": "cloud",
- "order": 90
+ "hidden": true,
},
"requireExactSource": true,
"type": "coreclr",
"request": "launch",
- "preLaunchTask": "buildEventsProcessor",
"program": "${workspaceFolder}/src/EventsProcessor/bin/Debug/net6.0/EventsProcessor.dll",
"args": [],
"cwd": "${workspaceFolder}/src/EventsProcessor",
@@ -219,16 +361,13 @@
}
},
{
- "name": "Icons",
+ "name": "run-Icons",
"presentation": {
- "hidden": false,
- "group": "cloud",
- "order": 90
+ "hidden": true,
},
"requireExactSource": true,
"type": "coreclr",
"request": "launch",
- "preLaunchTask": "buildIcons",
"program": "${workspaceFolder}/src/Icons/bin/Debug/net6.0/Icons.dll",
"args": [],
"cwd": "${workspaceFolder}/src/Icons",
@@ -241,16 +380,13 @@
}
},
{
- "name": "Notifications",
+ "name": "run-Notifications",
"presentation": {
"hidden": true,
- "group": "cloud",
- "order": 100
},
"requireExactSource": true,
"type": "coreclr",
"request": "launch",
- "preLaunchTask": "buildNotifications",
"program": "${workspaceFolder}/src/Notifications/bin/Debug/net6.0/Notifications.dll",
"args": [],
"cwd": "${workspaceFolder}/src/Notifications",
@@ -263,16 +399,13 @@
}
},
{
- "name": "Identity-SelfHost",
+ "name": "run-Identity-SelfHost",
"presentation": {
"hidden": true,
- "group": "self-host",
- "order": 999
},
"requireExactSource": true,
"type": "coreclr",
"request": "launch",
- "preLaunchTask": "buildIdentity",
"program": "${workspaceFolder}/src/Identity/bin/Debug/net6.0/Identity.dll",
"args": [],
"cwd": "${workspaceFolder}/src/Identity",
@@ -287,16 +420,13 @@
}
},
{
- "name": "API-SelfHost",
+ "name": "run-API-SelfHost",
"presentation": {
"hidden": true,
- "group": "self-host",
- "order": 999
},
"requireExactSource": true,
"type": "coreclr",
"request": "launch",
- "preLaunchTask": "buildAPI",
"program": "${workspaceFolder}/src/Api/bin/Debug/net6.0/Api.dll",
"args": [],
"cwd": "${workspaceFolder}/src/Api",
@@ -311,16 +441,13 @@
}
},
{
- "name": "Admin-SelfHost",
+ "name": "run-Admin-SelfHost",
"presentation": {
"hidden": true,
- "group": "self-host",
- "order": 999
},
"requireExactSource": true,
"type": "coreclr",
"request": "launch",
- "preLaunchTask": "buildAdmin",
"OS-COMMENT4": "If you have changed target frameworks, make sure to update the program path.",
"program": "${workspaceFolder}/src/Admin/bin/Debug/net6.0/Admin.dll",
"args": [],
@@ -337,16 +464,13 @@
}
},
{
- "name": "Sso-SelfHost",
+ "name": "run-Sso-SelfHost",
"presentation": {
"hidden": true,
- "group": "self-host",
- "order": 999
},
"requireExactSource": true,
"type": "coreclr",
"request": "launch",
- "preLaunchTask": "buildSso",
"program": "${workspaceFolder}/bitwarden_license/src/Sso/bin/Debug/net6.0/Sso.dll",
"args": [],
"cwd": "${workspaceFolder}/bitwarden_license/src/Sso",
@@ -361,16 +485,13 @@
}
},
{
- "name": "Notifications-SelfHost",
+ "name": "run-Notifications-SelfHost",
"presentation": {
"hidden": true,
- "group": "self-host",
- "order": 999
},
"requireExactSource": true,
"type": "coreclr",
"request": "launch",
- "preLaunchTask": "buildNotifications",
"program": "${workspaceFolder}/src/Notifications/bin/Debug/net6.0/Notifications.dll",
"args": [],
"cwd": "${workspaceFolder}/src/Notifications",
@@ -385,16 +506,13 @@
}
},
{
- "name": "EventsProcessor-SelfHost",
+ "name": "run-EventsProcessor-SelfHost",
"presentation": {
"hidden": true,
- "group": "self-host",
- "order": 999
},
"requireExactSource": true,
"type": "coreclr",
"request": "launch",
- "preLaunchTask": "buildEventsProcessor",
"program": "${workspaceFolder}/src/EventsProcessor/bin/Debug/net6.0/EventsProcessor.dll",
"args": [],
"cwd": "${workspaceFolder}/src/EventsProcessor",
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index 61d1f92404..69077ec5d1 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -1,6 +1,65 @@
{
"version": "2.0.0",
"tasks": [
+ {
+ "label": "buildIdentityApi",
+ "dependsOrder": "sequence",
+ "dependsOn": [
+ "buildIdentity",
+ "buildAPI"
+ ],
+ "problemMatcher": [
+ "$msCompile"
+ ]
+ },
+ {
+ "label": "buildIdentityApiAdmin",
+ "dependsOrder": "sequence",
+ "dependsOn": [
+ "buildIdentity",
+ "buildAPI",
+ "buildAdmin"
+ ],
+ "problemMatcher": [
+ "$msCompile"
+ ]
+ },
+ {
+ "label": "buildFullServer",
+ "dependsOrder": "sequence",
+ "dependsOn": [
+ "buildAdmin",
+ "buildAPI",
+ "buildEventsProcessor",
+ "buildIdentity",
+ "buildSso",
+ "buildIcons",
+ "buildBilling",
+ "buildNotifications",
+ ],
+ },
+ {
+ "label": "buildSelfHostBit",
+ "dependsOrder": "sequence",
+ "dependsOn": [
+ "buildAdmin",
+ "buildAPI",
+ "buildEventsProcessor",
+ "buildIdentity",
+ "buildSso",
+ "buildNotifications",
+ ],
+ },
+ {
+ "label": "buildSelfHostOss",
+ "dependsOrder": "sequence",
+ "dependsOn": [
+ "buildAdmin",
+ "buildAPI",
+ "buildEventsProcessor",
+ "buildIdentity",
+ ],
+ },
{
"label": "buildIcons",
"command": "dotnet",
diff --git a/Directory.Build.props b/Directory.Build.props
index e6be6fa772..292c4bc7d3 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -2,7 +2,7 @@
net6.0
- 2023.10.2
+ 2023.12.0
Bit.$(MSBuildProjectName)
true
enable
diff --git a/bitwarden_license/src/Commercial.Core/packages.lock.json b/bitwarden_license/src/Commercial.Core/packages.lock.json
index 35e1836275..544a9716e3 100644
--- a/bitwarden_license/src/Commercial.Core/packages.lock.json
+++ b/bitwarden_license/src/Commercial.Core/packages.lock.json
@@ -162,6 +162,24 @@
"Microsoft.Win32.Registry": "5.0.0"
}
},
+ "Duende.IdentityServer": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "4HVjzx1F8v5J+U7oa8RGAQGj2QzmzNSu87r18Sh+dlh10uyZZL8teAaT/FaVLDObnfItGdPFvN8mwpF/HkI3Xw==",
+ "dependencies": {
+ "Duende.IdentityServer.Storage": "6.0.4",
+ "Microsoft.AspNetCore.Authentication.OpenIdConnect": "6.0.0"
+ }
+ },
+ "Duende.IdentityServer.Storage": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "s5gAjfbpr2IMgI+fU2Nx+2AZdzstmbt9gpo13iX7GwvqSeSaBVqj9ZskAN0R2KF1OemPdZuGnfaTcevdXMUrrw==",
+ "dependencies": {
+ "IdentityModel": "6.0.0",
+ "Microsoft.AspNetCore.DataProtection.Abstractions": "6.0.0"
+ }
+ },
"Fido2": {
"type": "Transitive",
"resolved": "3.0.1",
@@ -190,57 +208,16 @@
},
"Handlebars.Net": {
"type": "Transitive",
- "resolved": "2.1.2",
- "contentHash": "p60QyeBYpZmcZdIXRMqs9XySIBaxJ0lj3+QD0EJVr4ybTigOTCumXMMin5dPwjo9At1UwkDZ3gGwa1lmGjG6DA==",
+ "resolved": "2.1.4",
+ "contentHash": "Od7MWDfGxYKRtxETFMlcvCrY8hAqyuXZDX4EsOfiI/jzh+PVBuVxazHBC1HmVqTKX1JnRtoxIMcH95K9UFlYog==",
"dependencies": {
"Microsoft.CSharp": "4.7.0"
}
},
"IdentityModel": {
"type": "Transitive",
- "resolved": "4.4.0",
- "contentHash": "b18wrIx5wnZlMxAX7oVsE+nDtAJ4hajYlH0xPlaRvo4r/fz08K6pPeZvbiqS9nfNbzfIgLFmNX+FL9qR9ZR5PA==",
- "dependencies": {
- "Newtonsoft.Json": "11.0.2",
- "System.Text.Encodings.Web": "4.7.0"
- }
- },
- "IdentityModel.AspNetCore.OAuth2Introspection": {
- "type": "Transitive",
- "resolved": "4.0.1",
- "contentHash": "ZNdMZMaj9fqR3j50vYsu+1U3QGd6n8+fqwf+a8mCTcmXGor+HgFDfdq0mM34bsmD6uEgAQup7sv2ZW5kR36dbA==",
- "dependencies": {
- "IdentityModel": "4.0.0"
- }
- },
- "IdentityServer4": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "blaxxGuOA7v/w1q+fxn97wZ+x2ecG1ZD4mc/N/ZOXMNeFZZhqv+4LF26Gecyik3nWrJPmbMEtQbLmRsKG8k61w==",
- "dependencies": {
- "IdentityModel": "4.4.0",
- "IdentityServer4.Storage": "4.1.2",
- "Microsoft.AspNetCore.Authentication.OpenIdConnect": "3.1.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.6.0",
- "Newtonsoft.Json": "12.0.2"
- }
- },
- "IdentityServer4.AccessTokenValidation": {
- "type": "Transitive",
- "resolved": "3.0.1",
- "contentHash": "qu/M6UyN4o9NVep7q545Ms7hYAnsQqSdLbN1Fjjrn4m35lyBfeQPSSNzDryAKHbodyWOQfHaOqKEyMEJQ5Rpgw==",
- "dependencies": {
- "IdentityModel.AspNetCore.OAuth2Introspection": "4.0.1",
- "Microsoft.AspNetCore.Authentication.JwtBearer": "3.0.0"
- }
- },
- "IdentityServer4.Storage": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "KoSffyZyyeCNTIyJiZnCuPakJ1QbCHlpty6gbWUj/7yl+w0PXIchgmmJnJSvddzBb8iZ2xew/vGlxWUIP17P2g==",
- "dependencies": {
- "IdentityModel": "4.4.0"
- }
+ "resolved": "6.0.0",
+ "contentHash": "eVHCR7a6m/dm5RFcBzE3qs/Jg5j9R5Rjpu8aTOv9e4AFvaQtBXb5ah7kmwU+YwA0ufRwz4wf1hnIvsD2hSnI4g=="
},
"LaunchDarkly.Cache": {
"type": "Transitive",
@@ -249,26 +226,27 @@
},
"LaunchDarkly.CommonSdk": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "YYYq+41gZRMQ8dIoMC6HOq/dI+4RY3HsexLLAaE9T1+1tVMeQkbCqak7sVeKX4QcE7xlXx23lWgipYUkRoRUyw==",
+ "resolved": "6.2.0",
+ "contentHash": "eLeb+tTNLwOxlUIsZWzJlcPmG9Wyf20NYyucP6MW6aqKW6doKFeSO+aJe0z+WyijbvfX1Dp1U1HQatOu6fa1Gg==",
"dependencies": {
+ "LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
},
"LaunchDarkly.EventSource": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "DN44Ry5M4lyrjiF7LEu0Ijco7Wm8R7mJopN+giYsYjkQlszsXdFvm3POoehIDAOtL1HHl5bZvF9k9xK034u3IA==",
+ "resolved": "5.1.0",
+ "contentHash": "PztDWiMvPWODx+kfBnCroZ8Lpya4nPc7ZO4TZysOogODbVXDDPDYrdcgVivCMgf4davhGrp61ekvZc+Uy1NYMA==",
"dependencies": {
- "LaunchDarkly.Logging": "[1.0.1, 3.0.0)"
+ "LaunchDarkly.Logging": "[2.0.0, 3.0.0)"
}
},
"LaunchDarkly.InternalSdk": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "jW8VEfFciuCcJUEuvSzmrbMVYYXwGL/ZWHUZLiA4aDOQ1LcEXp32uK405NQW/izEypUfWB+9TaSjPpFIC+5Wzw==",
+ "resolved": "3.3.0",
+ "contentHash": "TBvs/B6iyXp9MqRKjIoBZ/T0+/xgp5xg+MuHqr5U+N5+7DghtI2FnsmgeBedTIeQdA3Tk8Z4Bj4hlqU9FBiEnw==",
"dependencies": {
- "LaunchDarkly.CommonSdk": "6.0.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
"LaunchDarkly.Logging": "[2.0.0, 3.0.0)",
"System.Collections.Immutable": "1.7.1"
}
@@ -283,13 +261,13 @@
},
"LaunchDarkly.ServerSdk": {
"type": "Transitive",
- "resolved": "7.0.0",
- "contentHash": "gkTWb+f5QlsXIqFAciBef3qKZU2y0Hy3Fpt4pvZoxNcnBKg2PNTDSnbpbYEKPeQ1yk1avNaI/tKprnahfrmJFg==",
+ "resolved": "8.0.0",
+ "contentHash": "vosFEXYJABuIDIA0+6sncalTmrKXEkBKeqzuP9/vvcCVlFSXUl/ZnrkrAVg3ViDWDi7kjpJSk2W3h5D0TUfCGA==",
"dependencies": {
"LaunchDarkly.Cache": "1.0.2",
- "LaunchDarkly.CommonSdk": "6.0.0",
- "LaunchDarkly.EventSource": "5.0.1",
- "LaunchDarkly.InternalSdk": "3.1.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
+ "LaunchDarkly.EventSource": "5.1.0",
+ "LaunchDarkly.InternalSdk": "3.3.0",
"LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
@@ -317,10 +295,10 @@
},
"Microsoft.AspNetCore.Authentication.OpenIdConnect": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "O1cAQYUTU8EfRqwc5/rfTns4E4hKlFlg59fuKRrST+PzsxI6H07KqRN/JjdYhAuVYxF8jPnIGbj+zuc5paOWUw==",
+ "resolved": "6.0.0",
+ "contentHash": "cJxdro36spFzk/K2OFCddM6vZ+yoj6ug8mTFRH3Gdv1Pul/buSuCtfb/FSCp31UmS5S4C1315dU7wX3ErLFuDg==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.5.0"
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.10.0"
}
},
"Microsoft.AspNetCore.Cryptography.Internal": {
@@ -353,8 +331,8 @@
},
"Microsoft.AspNetCore.DataProtection.Abstractions": {
"type": "Transitive",
- "resolved": "3.1.32",
- "contentHash": "MPL4iVyiaRxnOUY5VATHjvhDWaAEFb77KFiUxVRklv3Z3v+STofUr1UG/aCt1O9cgN7FVTDaC5A7U+zsLub8Xg=="
+ "resolved": "6.0.0",
+ "contentHash": "Z/UU4NEBm5UgNufJmw+j5baW26ytCOIZ0G7sZocPaOzsUeBon1bkM3lSMNZQG2GmDjAIVP2XMSODf2jzSGbibw=="
},
"Microsoft.Azure.Amqp": {
"type": "Transitive",
@@ -885,8 +863,8 @@
},
"Newtonsoft.Json": {
"type": "Transitive",
- "resolved": "13.0.1",
- "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
+ "resolved": "13.0.3",
+ "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ=="
},
"NSec.Cryptography": {
"type": "Transitive",
@@ -1199,8 +1177,8 @@
},
"Serilog.Sinks.SyslogMessages": {
"type": "Transitive",
- "resolved": "2.0.6",
- "contentHash": "V2Yq2GEbk7taEPbpBLFzLXhrHrUzKf4sQu/zLrANU8XIoUn/Mr08M2E8PrcrWVXCj0R4xLMWYe0Z1sxOrMF3IA==",
+ "resolved": "2.0.9",
+ "contentHash": "y7J+/h/Nf5EAtbpa6lC1nDhK/F9kC5oxuVYmQivv242Oh4hAVMeoAk5Gv6bgb/KbmqufGPXUFkX/AlcrvZ8Ywg==",
"dependencies": {
"Serilog": "2.5.0",
"Serilog.Sinks.PeriodicBatching": "2.3.0"
@@ -2449,11 +2427,10 @@
"BitPay.Light": "[1.0.1907, )",
"Braintree": "[5.19.0, )",
"DnsClient": "[1.7.0, )",
+ "Duende.IdentityServer": "[6.0.4, )",
"Fido2.AspNet": "[3.0.1, )",
- "Handlebars.Net": "[2.1.2, )",
- "IdentityServer4": "[4.1.2, )",
- "IdentityServer4.AccessTokenValidation": "[3.0.1, )",
- "LaunchDarkly.ServerSdk": "[7.0.0, )",
+ "Handlebars.Net": "[2.1.4, )",
+ "LaunchDarkly.ServerSdk": "[8.0.0, )",
"MailKit": "[4.2.0, )",
"Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )",
"Microsoft.Azure.Cosmos.Table": "[1.0.8, )",
@@ -2463,7 +2440,7 @@
"Microsoft.Extensions.Configuration.EnvironmentVariables": "[6.0.1, )",
"Microsoft.Extensions.Configuration.UserSecrets": "[6.0.1, )",
"Microsoft.Extensions.Identity.Stores": "[6.0.4, )",
- "Newtonsoft.Json": "[13.0.1, )",
+ "Newtonsoft.Json": "[13.0.3, )",
"Otp.NET": "[1.2.2, )",
"Quartz": "[3.4.0, )",
"SendGrid": "[9.27.0, )",
@@ -2472,7 +2449,7 @@
"Serilog.Extensions.Logging": "[3.1.0, )",
"Serilog.Extensions.Logging.File": "[2.0.0, )",
"Serilog.Sinks.AzureCosmosDB": "[2.0.0, )",
- "Serilog.Sinks.SyslogMessages": "[2.0.6, )",
+ "Serilog.Sinks.SyslogMessages": "[2.0.9, )",
"Stripe.net": "[40.0.0, )",
"YubicoDotNetClient": "[1.2.0, )"
}
diff --git a/bitwarden_license/src/Commercial.Infrastructure.EntityFramework/packages.lock.json b/bitwarden_license/src/Commercial.Infrastructure.EntityFramework/packages.lock.json
index 6704146436..c5687bbbb9 100644
--- a/bitwarden_license/src/Commercial.Infrastructure.EntityFramework/packages.lock.json
+++ b/bitwarden_license/src/Commercial.Infrastructure.EntityFramework/packages.lock.json
@@ -180,6 +180,24 @@
"Microsoft.Win32.Registry": "5.0.0"
}
},
+ "Duende.IdentityServer": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "4HVjzx1F8v5J+U7oa8RGAQGj2QzmzNSu87r18Sh+dlh10uyZZL8teAaT/FaVLDObnfItGdPFvN8mwpF/HkI3Xw==",
+ "dependencies": {
+ "Duende.IdentityServer.Storage": "6.0.4",
+ "Microsoft.AspNetCore.Authentication.OpenIdConnect": "6.0.0"
+ }
+ },
+ "Duende.IdentityServer.Storage": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "s5gAjfbpr2IMgI+fU2Nx+2AZdzstmbt9gpo13iX7GwvqSeSaBVqj9ZskAN0R2KF1OemPdZuGnfaTcevdXMUrrw==",
+ "dependencies": {
+ "IdentityModel": "6.0.0",
+ "Microsoft.AspNetCore.DataProtection.Abstractions": "6.0.0"
+ }
+ },
"Fido2": {
"type": "Transitive",
"resolved": "3.0.1",
@@ -208,57 +226,16 @@
},
"Handlebars.Net": {
"type": "Transitive",
- "resolved": "2.1.2",
- "contentHash": "p60QyeBYpZmcZdIXRMqs9XySIBaxJ0lj3+QD0EJVr4ybTigOTCumXMMin5dPwjo9At1UwkDZ3gGwa1lmGjG6DA==",
+ "resolved": "2.1.4",
+ "contentHash": "Od7MWDfGxYKRtxETFMlcvCrY8hAqyuXZDX4EsOfiI/jzh+PVBuVxazHBC1HmVqTKX1JnRtoxIMcH95K9UFlYog==",
"dependencies": {
"Microsoft.CSharp": "4.7.0"
}
},
"IdentityModel": {
"type": "Transitive",
- "resolved": "4.4.0",
- "contentHash": "b18wrIx5wnZlMxAX7oVsE+nDtAJ4hajYlH0xPlaRvo4r/fz08K6pPeZvbiqS9nfNbzfIgLFmNX+FL9qR9ZR5PA==",
- "dependencies": {
- "Newtonsoft.Json": "11.0.2",
- "System.Text.Encodings.Web": "4.7.0"
- }
- },
- "IdentityModel.AspNetCore.OAuth2Introspection": {
- "type": "Transitive",
- "resolved": "4.0.1",
- "contentHash": "ZNdMZMaj9fqR3j50vYsu+1U3QGd6n8+fqwf+a8mCTcmXGor+HgFDfdq0mM34bsmD6uEgAQup7sv2ZW5kR36dbA==",
- "dependencies": {
- "IdentityModel": "4.0.0"
- }
- },
- "IdentityServer4": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "blaxxGuOA7v/w1q+fxn97wZ+x2ecG1ZD4mc/N/ZOXMNeFZZhqv+4LF26Gecyik3nWrJPmbMEtQbLmRsKG8k61w==",
- "dependencies": {
- "IdentityModel": "4.4.0",
- "IdentityServer4.Storage": "4.1.2",
- "Microsoft.AspNetCore.Authentication.OpenIdConnect": "3.1.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.6.0",
- "Newtonsoft.Json": "12.0.2"
- }
- },
- "IdentityServer4.AccessTokenValidation": {
- "type": "Transitive",
- "resolved": "3.0.1",
- "contentHash": "qu/M6UyN4o9NVep7q545Ms7hYAnsQqSdLbN1Fjjrn4m35lyBfeQPSSNzDryAKHbodyWOQfHaOqKEyMEJQ5Rpgw==",
- "dependencies": {
- "IdentityModel.AspNetCore.OAuth2Introspection": "4.0.1",
- "Microsoft.AspNetCore.Authentication.JwtBearer": "3.0.0"
- }
- },
- "IdentityServer4.Storage": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "KoSffyZyyeCNTIyJiZnCuPakJ1QbCHlpty6gbWUj/7yl+w0PXIchgmmJnJSvddzBb8iZ2xew/vGlxWUIP17P2g==",
- "dependencies": {
- "IdentityModel": "4.4.0"
- }
+ "resolved": "6.0.0",
+ "contentHash": "eVHCR7a6m/dm5RFcBzE3qs/Jg5j9R5Rjpu8aTOv9e4AFvaQtBXb5ah7kmwU+YwA0ufRwz4wf1hnIvsD2hSnI4g=="
},
"LaunchDarkly.Cache": {
"type": "Transitive",
@@ -267,26 +244,27 @@
},
"LaunchDarkly.CommonSdk": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "YYYq+41gZRMQ8dIoMC6HOq/dI+4RY3HsexLLAaE9T1+1tVMeQkbCqak7sVeKX4QcE7xlXx23lWgipYUkRoRUyw==",
+ "resolved": "6.2.0",
+ "contentHash": "eLeb+tTNLwOxlUIsZWzJlcPmG9Wyf20NYyucP6MW6aqKW6doKFeSO+aJe0z+WyijbvfX1Dp1U1HQatOu6fa1Gg==",
"dependencies": {
+ "LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
},
"LaunchDarkly.EventSource": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "DN44Ry5M4lyrjiF7LEu0Ijco7Wm8R7mJopN+giYsYjkQlszsXdFvm3POoehIDAOtL1HHl5bZvF9k9xK034u3IA==",
+ "resolved": "5.1.0",
+ "contentHash": "PztDWiMvPWODx+kfBnCroZ8Lpya4nPc7ZO4TZysOogODbVXDDPDYrdcgVivCMgf4davhGrp61ekvZc+Uy1NYMA==",
"dependencies": {
- "LaunchDarkly.Logging": "[1.0.1, 3.0.0)"
+ "LaunchDarkly.Logging": "[2.0.0, 3.0.0)"
}
},
"LaunchDarkly.InternalSdk": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "jW8VEfFciuCcJUEuvSzmrbMVYYXwGL/ZWHUZLiA4aDOQ1LcEXp32uK405NQW/izEypUfWB+9TaSjPpFIC+5Wzw==",
+ "resolved": "3.3.0",
+ "contentHash": "TBvs/B6iyXp9MqRKjIoBZ/T0+/xgp5xg+MuHqr5U+N5+7DghtI2FnsmgeBedTIeQdA3Tk8Z4Bj4hlqU9FBiEnw==",
"dependencies": {
- "LaunchDarkly.CommonSdk": "6.0.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
"LaunchDarkly.Logging": "[2.0.0, 3.0.0)",
"System.Collections.Immutable": "1.7.1"
}
@@ -301,13 +279,13 @@
},
"LaunchDarkly.ServerSdk": {
"type": "Transitive",
- "resolved": "7.0.0",
- "contentHash": "gkTWb+f5QlsXIqFAciBef3qKZU2y0Hy3Fpt4pvZoxNcnBKg2PNTDSnbpbYEKPeQ1yk1avNaI/tKprnahfrmJFg==",
+ "resolved": "8.0.0",
+ "contentHash": "vosFEXYJABuIDIA0+6sncalTmrKXEkBKeqzuP9/vvcCVlFSXUl/ZnrkrAVg3ViDWDi7kjpJSk2W3h5D0TUfCGA==",
"dependencies": {
"LaunchDarkly.Cache": "1.0.2",
- "LaunchDarkly.CommonSdk": "6.0.0",
- "LaunchDarkly.EventSource": "5.0.1",
- "LaunchDarkly.InternalSdk": "3.1.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
+ "LaunchDarkly.EventSource": "5.1.0",
+ "LaunchDarkly.InternalSdk": "3.3.0",
"LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
@@ -319,16 +297,16 @@
},
"linq2db": {
"type": "Transitive",
- "resolved": "5.2.1",
- "contentHash": "OOBM8s39zhbZAgqFnl2KGxT5RqBDw21X69U528qV2PgQispaA3f+or0ILrLEgnNIJuB4EBgaw8gC6ttSHn4X0Q=="
+ "resolved": "5.3.1",
+ "contentHash": "707mIbEmtptvKeUW940UwoNwq05I7OUu0VWtclLtyYaASp+ugX4I/Er1UVpeldsDawqlVMXB5EQ5/Oar6AkUGQ=="
},
"linq2db.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.5.0",
- "contentHash": "ePHzO99xbObgMLlAFh08of1SnVhg6j4Su9327DrIB7RZWCgtQIX6k+nbl+HRVOooAndZSs7b+DduSgdnJjaJGw==",
+ "resolved": "7.6.0",
+ "contentHash": "T1W9o8wVzApsUwu7SRg/L7487kaiLQYt2AqRVnXVGfobD+ZKy2oRsUMws0PICtciaz4qbfLp/r/+NksfuYsFlw==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Relational": "7.0.0",
- "linq2db": "5.2.1"
+ "linq2db": "5.3.1"
}
},
"MailKit": {
@@ -349,10 +327,10 @@
},
"Microsoft.AspNetCore.Authentication.OpenIdConnect": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "O1cAQYUTU8EfRqwc5/rfTns4E4hKlFlg59fuKRrST+PzsxI6H07KqRN/JjdYhAuVYxF8jPnIGbj+zuc5paOWUw==",
+ "resolved": "6.0.0",
+ "contentHash": "cJxdro36spFzk/K2OFCddM6vZ+yoj6ug8mTFRH3Gdv1Pul/buSuCtfb/FSCp31UmS5S4C1315dU7wX3ErLFuDg==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.5.0"
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.10.0"
}
},
"Microsoft.AspNetCore.Cryptography.Internal": {
@@ -385,8 +363,8 @@
},
"Microsoft.AspNetCore.DataProtection.Abstractions": {
"type": "Transitive",
- "resolved": "3.1.32",
- "contentHash": "MPL4iVyiaRxnOUY5VATHjvhDWaAEFb77KFiUxVRklv3Z3v+STofUr1UG/aCt1O9cgN7FVTDaC5A7U+zsLub8Xg=="
+ "resolved": "6.0.0",
+ "contentHash": "Z/UU4NEBm5UgNufJmw+j5baW26ytCOIZ0G7sZocPaOzsUeBon1bkM3lSMNZQG2GmDjAIVP2XMSODf2jzSGbibw=="
},
"Microsoft.Azure.Amqp": {
"type": "Transitive",
@@ -471,48 +449,44 @@
},
"Microsoft.Data.SqlClient": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "uu8dfrsx081cSbEevWuZAvqdmANDGJkbLBL2G3j0LAZxX1Oy8RCVAaC4Lcuak6jNicWP6CWvHqBTIEmQNSxQlw==",
+ "resolved": "5.1.1",
+ "contentHash": "MW5E9HFvCaV069o8b6YpuRDPBux8s96qDnOJ+4N9QNUCs7c5W3KxwQ+ftpAjbMUlImL+c9WR+l+f5hzjkqhu2g==",
"dependencies": {
- "Azure.Identity": "1.6.0",
- "Microsoft.Data.SqlClient.SNI.runtime": "5.0.1",
- "Microsoft.Identity.Client": "4.45.0",
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.21.0",
+ "Azure.Identity": "1.7.0",
+ "Microsoft.Data.SqlClient.SNI.runtime": "5.1.0",
+ "Microsoft.Identity.Client": "4.47.2",
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.24.0",
"Microsoft.SqlServer.Server": "1.0.0",
- "Microsoft.Win32.Registry": "5.0.0",
- "System.Buffers": "4.5.1",
- "System.Configuration.ConfigurationManager": "5.0.0",
- "System.Diagnostics.DiagnosticSource": "5.0.0",
- "System.IO": "4.3.0",
- "System.Resources.ResourceManager": "4.3.0",
- "System.Runtime.Caching": "5.0.0",
+ "System.Configuration.ConfigurationManager": "6.0.1",
+ "System.Diagnostics.DiagnosticSource": "6.0.0",
+ "System.Runtime.Caching": "6.0.0",
"System.Security.Cryptography.Cng": "5.0.0",
"System.Security.Principal.Windows": "5.0.0",
- "System.Text.Encoding.CodePages": "5.0.0",
- "System.Text.Encodings.Web": "4.7.2"
+ "System.Text.Encoding.CodePages": "6.0.0",
+ "System.Text.Encodings.Web": "6.0.0"
}
},
"Microsoft.Data.SqlClient.SNI.runtime": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "y0X5MxiNdbITJYoafJ2ruaX6hqO0twpCGR/ipiDOe85JKLU8WL4TuAQfDe5qtt3bND5Je26HnrarLSAMMnVTNg=="
+ "resolved": "5.1.0",
+ "contentHash": "jVsElisM5sfBzaaV9kdq2NXZLwIbytetnsOIlJ0cQGgQP4zFNBmkfHBnpwtmKrtBJBEV9+9PVQPVrcCVhDgcIg=="
},
"Microsoft.Data.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "FTerRmQPqHrCrnoUzhBu+E+1DNGwyrAMLqHkAqOOOu5pGfyMOj8qQUBxI/gDtWtG11p49UxSfWmBzRNlwZqfUg==",
+ "resolved": "7.0.14",
+ "contentHash": "qvYae3/v9Fvqsjp/7OKQBuJK+Uc3m/WctfpIUMmGMDot2Bd8UWBKiMSlh26UtfQa9x4N+k7NxCT+AbZVoNrCdg==",
"dependencies": {
"SQLitePCLRaw.core": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "RXbRLHHWP2Z3pq8qcL5nQ6LPeoOyp8hasM5bd0Te8PiQi3RjWQR4tcbdY5XMqQ+oTO9wA8/RLhZRn/hnxlTDnQ==",
+ "resolved": "7.0.14",
+ "contentHash": "0KYkAemPygW6yzifciFlmMzkO4sI4Dw69xLgwg3ui5rXJS5XvzuAWVvfdrKJciqeCbCnVS/ZbOWpcwWgqce5bQ==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Abstractions": "7.0.5",
- "Microsoft.EntityFrameworkCore.Analyzers": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Abstractions": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Analyzers": "7.0.14",
"Microsoft.Extensions.Caching.Memory": "7.0.0",
"Microsoft.Extensions.DependencyInjection": "7.0.0",
"Microsoft.Extensions.Logging": "7.0.0"
@@ -520,49 +494,49 @@
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "iwQso+hFRsEWjhH2WsEQj1D2QE5BlEXiXEt6A3SlYTPRPdZsyTNDeDDEdtxL+H/UJPQgQYY+9SMMRcEiXBmCAA=="
+ "resolved": "7.0.14",
+ "contentHash": "aEcXDSYpDdD5wdIRKTqcS44f3W4capqQ1BWVRPJgacATfHkO62RX9Nnh0hUFg+rei9OLuJp0Y4zsy1fNeOXv5g=="
},
"Microsoft.EntityFrameworkCore.Analyzers": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "yMLM/aK1MikVqpjxd7PJ1Pjgztd3VAd26ZHxyjxG3RPeM9cHjvS5tCg9kAAayR6eHmBg0ffZsHdT28WfA5tTlA=="
+ "resolved": "7.0.14",
+ "contentHash": "esI4RF6mix4DDFBhWB9k1vJxAL8GouSf5ZV8oFJoVsIQ9d2J3MPgC1VL2qM9Vw5cH7Vg7TzRyKNpCRXFVkWs9w=="
},
"Microsoft.EntityFrameworkCore.Relational": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "u/33DC4S6g2hpMPgBc5Kdnlz//nqHR5c/ovgjtiP/wQ7sOd0EOdygVzUJAAOxCwbtAHDsJXS9Vc3jLFYq0yu8Q==",
+ "resolved": "7.0.14",
+ "contentHash": "MrVBnWOFYwfLMGQfrcIuqEM9Xvokv1vJeYxqNH3K3xOtAdHwHQTrKnpDP97tU+LBlvcnyXAtAtryYcpLXWtRNA==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "7.0.5",
+ "Microsoft.EntityFrameworkCore": "7.0.14",
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.Sqlite": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "2XPZB9OLF5/m13HgZp7/Dv0u8FWEJzcaBsMYR9Kp3R6aygkb3RnOijofPDTsmdhAqG9YTysCmh2bFaGs0TCc7A==",
+ "resolved": "7.0.14",
+ "contentHash": "8c8Hw2tmfy5YEsi9RL2/u2Qi9IwVbmj/yDlJy4iJPadeE3/AssLrgtobOBz4ftg2y5PVjFL59Gq7YzGLQH5q1A==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.14",
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "4C+9ct6A/Bq61Ta9Uh2td4/XwNpRCiPI03SWTa3hPJjA/g8wCw2hetbh3DDe5HcydzgDq/lRRjU/eRy3UODklQ==",
+ "resolved": "7.0.14",
+ "contentHash": "JNUkZVff1V/A/P3JiBbgt+Y2oCQSuzORxE3jOqFDbFjSFu7jHDEetJ/afSF/taa0lbyN9OpvaKjsbKk3Iis29Q==",
"dependencies": {
- "Microsoft.Data.Sqlite.Core": "7.0.5",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5",
+ "Microsoft.Data.Sqlite.Core": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14",
"Microsoft.Extensions.DependencyModel": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.SqlServer": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "cUJqCiamT0EvpKNgZEV5fqNv2MyVfKNgOPQfFINqHiIKHOYrS0nTCUJP97+UuG0JIIrP792/PwnuNjbekImtBg==",
+ "resolved": "7.0.14",
+ "contentHash": "d9hqEw4W/TdQ1WDm03uyFuDoehL6GNq/NMChFaC4dcV60I42vKdUC0fYTuE2QPunVUpf5XUTCkJ6fYGjMos2AA==",
"dependencies": {
- "Microsoft.Data.SqlClient": "5.0.1",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5"
+ "Microsoft.Data.SqlClient": "5.1.1",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14"
}
},
"Microsoft.Extensions.Caching.Abstractions": {
@@ -815,50 +789,52 @@
},
"Microsoft.IdentityModel.Abstractions": {
"type": "Transitive",
- "resolved": "6.22.0",
- "contentHash": "iI+9V+2ciCrbheeLjpmjcqCnhy+r6yCoEcid3nkoFWerHgjVuT6CPM4HODUTtUPe1uwks4wcnAujJ8u+IKogHQ=="
+ "resolved": "6.24.0",
+ "contentHash": "X6aBK56Ot15qKyG7X37KsPnrwah+Ka55NJWPppWVTDi8xWq7CJgeNw2XyaeHgE1o/mW4THwoabZkBbeG2TPBiw=="
},
"Microsoft.IdentityModel.JsonWebTokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "d3h1/BaMeylKTkdP6XwRCxuOoDJZ44V9xaXr6gl5QxmpnZGdoK3bySo3OQN8ehRLJHShb94ElLUvoXyglQtgAw==",
+ "resolved": "6.24.0",
+ "contentHash": "XDWrkThcxfuWp79AvAtg5f+uRS1BxkIbJnsG/e8VPzOWkYYuDg33emLjp5EWcwXYYIDsHnVZD/00kM/PYFQc/g==",
"dependencies": {
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Tokens": "6.24.0",
+ "System.Text.Encoding": "4.3.0",
+ "System.Text.Json": "4.7.2"
}
},
"Microsoft.IdentityModel.Logging": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "tuEhHIQwvBEhMf8I50hy8FHmRSUkffDFP5EdLsSDV4qRcl2wvOPkQxYqEzWkh+ytW6sbdJGEXElGhmhDfAxAKg==",
+ "resolved": "6.24.0",
+ "contentHash": "qLYWDOowM/zghmYKXw1yfYKlHOdS41i8t4hVXr9bSI90zHqhyhQh9GwVy8pENzs5wHeytU23DymluC9NtgYv7w==",
"dependencies": {
- "Microsoft.IdentityModel.Abstractions": "6.21.0"
+ "Microsoft.IdentityModel.Abstractions": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "0FqY5cTLQKtHrClzHEI+QxJl8OBT2vUiEQQB7UKk832JDiJJmetzYZ3AdSrPjN/3l3nkhByeWzXnhrX0JbifKg==",
+ "resolved": "6.24.0",
+ "contentHash": "+NzKCkvsQ8X1r/Ff74V7CFr9OsdMRaB6DsV+qpH7NNLdYJ8O4qHbmTnNEsjFcDmk/gVNDwhoL2gN5pkPVq0lwQ==",
"dependencies": {
- "Microsoft.IdentityModel.Logging": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Logging": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols.OpenIdConnect": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "vtSKL7n6EnAsLyxmiviusm6LKrblT2ndnNqN6rvVq6iIHAnPCK9E2DkDx6h1Jrpy1cvbp40r0cnTg23nhEAGTA==",
+ "resolved": "6.24.0",
+ "contentHash": "a/2RRrc8C9qaw8qdD9hv1ES9YKFgxaqr/SnwMSLbwQZJSUQDd4qx1K4EYgWaQWs73R+VXLyKSxN0f/uE9CsBiQ==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols": "6.21.0",
- "System.IdentityModel.Tokens.Jwt": "6.21.0"
+ "Microsoft.IdentityModel.Protocols": "6.24.0",
+ "System.IdentityModel.Tokens.Jwt": "6.24.0"
}
},
"Microsoft.IdentityModel.Tokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "AAEHZvZyb597a+QJSmtxH3n2P1nIJGpZ4Q89GTenknRx6T6zyfzf592yW/jA5e8EHN4tNMjjXHQaYWEq5+L05w==",
+ "resolved": "6.24.0",
+ "contentHash": "ZPqHi86UYuqJXJ7bLnlEctHKkPKT4lGUFbotoCNiXNCSL02emYlcxzGYsRGWWmbFEcYDMi2dcTLLYNzHqWOTsw==",
"dependencies": {
"Microsoft.CSharp": "4.5.0",
- "Microsoft.IdentityModel.Logging": "6.21.0",
+ "Microsoft.IdentityModel.Logging": "6.24.0",
"System.Security.Cryptography.Cng": "4.5.0"
}
},
@@ -989,13 +965,13 @@
},
"Newtonsoft.Json": {
"type": "Transitive",
- "resolved": "13.0.1",
- "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
+ "resolved": "13.0.3",
+ "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ=="
},
"Npgsql": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "7UVPYy2RP0ci04PED1tc9ZCaTw/DfSdSkLiGEFCAvwMwsgA/bAluj1liNzP1IpN0MFofnOF0cm1zJfmbEuCehg==",
+ "resolved": "7.0.6",
+ "contentHash": "TAqvwRnm3NJ0QvN7cvu6geJkbI0XPzGVRElVY5hF4gsgA+BnE12x6GM1TLhdeq+7ZKvvo3BD8jXKnXmr3tvdEw==",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "6.0.0",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
@@ -1003,13 +979,13 @@
},
"Npgsql.EntityFrameworkCore.PostgreSQL": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "ZYMtyG6pmLtUsFAx0/XaIlVkJM+1gArWEKD55cLLxiVlGScAphjiGj+G7Gk16yg5lhhdWx+bgXWpIUISXuS33g==",
+ "resolved": "7.0.11",
+ "contentHash": "cHEgEz0ldXc9wVANs8sJqC+3eilqefrkasCBgaVT0tyj8tb1p3/pwy2ngjboNkDG3M0z+xJsJ4jC5p8wySAM3w==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, 8.0.0)",
- "Npgsql": "7.0.4"
+ "Microsoft.EntityFrameworkCore": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.11, 8.0.0)",
+ "Npgsql": "7.0.6"
}
},
"NSec.Cryptography": {
@@ -1332,8 +1308,8 @@
},
"Serilog.Sinks.SyslogMessages": {
"type": "Transitive",
- "resolved": "2.0.6",
- "contentHash": "V2Yq2GEbk7taEPbpBLFzLXhrHrUzKf4sQu/zLrANU8XIoUn/Mr08M2E8PrcrWVXCj0R4xLMWYe0Z1sxOrMF3IA==",
+ "resolved": "2.0.9",
+ "contentHash": "y7J+/h/Nf5EAtbpa6lC1nDhK/F9kC5oxuVYmQivv242Oh4hAVMeoAk5Gv6bgb/KbmqufGPXUFkX/AlcrvZ8Ywg==",
"dependencies": {
"Serilog": "2.5.0",
"Serilog.Sinks.PeriodicBatching": "2.3.0"
@@ -1466,8 +1442,8 @@
},
"System.Configuration.ConfigurationManager": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "7T+m0kDSlIPTHIkPMIu6m6tV6qsMqJpvQWW2jIc2qi7sn40qxFo0q+7mEQAhMPXZHMKnWrnv47ntGlM/ejvw3g==",
+ "resolved": "6.0.1",
+ "contentHash": "jXw9MlUu/kRfEU0WyTptAVueupqIeE3/rl0EZDMlf8pcvJnitQ8HeVEp69rZdaStXwTV72boi/Bhw8lOeO+U2w==",
"dependencies": {
"System.Security.Cryptography.ProtectedData": "6.0.0",
"System.Security.Permissions": "6.0.0"
@@ -1626,11 +1602,11 @@
},
"System.IdentityModel.Tokens.Jwt": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "JRD8AuypBE+2zYxT3dMJomQVsPYsCqlyZhWel3J1d5nzQokSRyTueF+Q4ID3Jcu6zSZKuzOdJ1MLTkbQsDqcvQ==",
+ "resolved": "6.24.0",
+ "contentHash": "Qibsj9MPWq8S/C0FgvmsLfIlHLE7ay0MJIaAmK94ivN3VyDdglqReed5qMvdQhSL0BzK6v0Z1wB/sD88zVu6Jw==",
"dependencies": {
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"System.IO": {
@@ -2079,10 +2055,10 @@
},
"System.Runtime.Caching": {
"type": "Transitive",
- "resolved": "5.0.0",
- "contentHash": "30D6MkO8WF9jVGWZIP0hmCN8l9BTY4LCsAzLIe4xFSXzs+AjDotR7DpSmj27pFskDURzUvqYYY0ikModgBTxWw==",
+ "resolved": "6.0.0",
+ "contentHash": "E0e03kUp5X2k+UAoVl6efmI7uU7JRBWi5EIdlQ7cr0NpBGjHG4fWII35PgsBY9T4fJQ8E4QPsL0rKksU9gcL5A==",
"dependencies": {
- "System.Configuration.ConfigurationManager": "5.0.0"
+ "System.Configuration.ConfigurationManager": "6.0.0"
}
},
"System.Runtime.CompilerServices.Unsafe": {
@@ -2612,11 +2588,10 @@
"BitPay.Light": "[1.0.1907, )",
"Braintree": "[5.19.0, )",
"DnsClient": "[1.7.0, )",
+ "Duende.IdentityServer": "[6.0.4, )",
"Fido2.AspNet": "[3.0.1, )",
- "Handlebars.Net": "[2.1.2, )",
- "IdentityServer4": "[4.1.2, )",
- "IdentityServer4.AccessTokenValidation": "[3.0.1, )",
- "LaunchDarkly.ServerSdk": "[7.0.0, )",
+ "Handlebars.Net": "[2.1.4, )",
+ "LaunchDarkly.ServerSdk": "[8.0.0, )",
"MailKit": "[4.2.0, )",
"Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )",
"Microsoft.Azure.Cosmos.Table": "[1.0.8, )",
@@ -2626,7 +2601,7 @@
"Microsoft.Extensions.Configuration.EnvironmentVariables": "[6.0.1, )",
"Microsoft.Extensions.Configuration.UserSecrets": "[6.0.1, )",
"Microsoft.Extensions.Identity.Stores": "[6.0.4, )",
- "Newtonsoft.Json": "[13.0.1, )",
+ "Newtonsoft.Json": "[13.0.3, )",
"Otp.NET": "[1.2.2, )",
"Quartz": "[3.4.0, )",
"SendGrid": "[9.27.0, )",
@@ -2635,7 +2610,7 @@
"Serilog.Extensions.Logging": "[3.1.0, )",
"Serilog.Extensions.Logging.File": "[2.0.0, )",
"Serilog.Sinks.AzureCosmosDB": "[2.0.0, )",
- "Serilog.Sinks.SyslogMessages": "[2.0.6, )",
+ "Serilog.Sinks.SyslogMessages": "[2.0.9, )",
"Stripe.net": "[40.0.0, )",
"YubicoDotNetClient": "[1.2.0, )"
}
@@ -2644,13 +2619,13 @@
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )",
- "Core": "[2023.10.2, )",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )",
- "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )",
- "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )",
- "Npgsql.EntityFrameworkCore.PostgreSQL": "[7.0.4, )",
+ "Core": "[2023.12.0, )",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.14, )",
+ "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.14, )",
+ "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.14, )",
+ "Npgsql.EntityFrameworkCore.PostgreSQL": "[7.0.11, )",
"Pomelo.EntityFrameworkCore.MySql": "[7.0.0, )",
- "linq2db.EntityFrameworkCore": "[7.5.0, )"
+ "linq2db.EntityFrameworkCore": "[7.6.0, )"
}
}
}
diff --git a/bitwarden_license/src/Scim/Context/IScimContext.cs b/bitwarden_license/src/Scim/Context/IScimContext.cs
index 79bc387b47..b3a6444eb3 100644
--- a/bitwarden_license/src/Scim/Context/IScimContext.cs
+++ b/bitwarden_license/src/Scim/Context/IScimContext.cs
@@ -1,6 +1,6 @@
-using Bit.Core.AdminConsole.Enums;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.AdminConsole.Enums;
using Bit.Core.AdminConsole.Models.OrganizationConnectionConfigs;
-using Bit.Core.Entities;
using Bit.Core.Repositories;
using Bit.Core.Settings;
diff --git a/bitwarden_license/src/Scim/Context/ScimContext.cs b/bitwarden_license/src/Scim/Context/ScimContext.cs
index e22d461f89..71ea27df4c 100644
--- a/bitwarden_license/src/Scim/Context/ScimContext.cs
+++ b/bitwarden_license/src/Scim/Context/ScimContext.cs
@@ -1,6 +1,6 @@
-using Bit.Core.AdminConsole.Enums;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.AdminConsole.Enums;
using Bit.Core.AdminConsole.Models.OrganizationConnectionConfigs;
-using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Repositories;
using Bit.Core.Settings;
diff --git a/bitwarden_license/src/Scim/Groups/Interfaces/IPatchGroupCommand.cs b/bitwarden_license/src/Scim/Groups/Interfaces/IPatchGroupCommand.cs
index 181f0c70ae..b9516cf706 100644
--- a/bitwarden_license/src/Scim/Groups/Interfaces/IPatchGroupCommand.cs
+++ b/bitwarden_license/src/Scim/Groups/Interfaces/IPatchGroupCommand.cs
@@ -1,4 +1,4 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
using Bit.Scim.Models;
namespace Bit.Scim.Groups.Interfaces;
diff --git a/bitwarden_license/src/Scim/Groups/Interfaces/IPostGroupCommand.cs b/bitwarden_license/src/Scim/Groups/Interfaces/IPostGroupCommand.cs
index 011199f033..8aa975f710 100644
--- a/bitwarden_license/src/Scim/Groups/Interfaces/IPostGroupCommand.cs
+++ b/bitwarden_license/src/Scim/Groups/Interfaces/IPostGroupCommand.cs
@@ -1,5 +1,4 @@
using Bit.Core.AdminConsole.Entities;
-using Bit.Core.Entities;
using Bit.Scim.Models;
namespace Bit.Scim.Groups.Interfaces;
diff --git a/bitwarden_license/src/Scim/Groups/Interfaces/IPutGroupCommand.cs b/bitwarden_license/src/Scim/Groups/Interfaces/IPutGroupCommand.cs
index 8c0b9108c0..3c54f5ead4 100644
--- a/bitwarden_license/src/Scim/Groups/Interfaces/IPutGroupCommand.cs
+++ b/bitwarden_license/src/Scim/Groups/Interfaces/IPutGroupCommand.cs
@@ -1,5 +1,4 @@
using Bit.Core.AdminConsole.Entities;
-using Bit.Core.Entities;
using Bit.Scim.Models;
namespace Bit.Scim.Groups.Interfaces;
diff --git a/bitwarden_license/src/Scim/Groups/PatchGroupCommand.cs b/bitwarden_license/src/Scim/Groups/PatchGroupCommand.cs
index f31225754f..94d9b7a4c2 100644
--- a/bitwarden_license/src/Scim/Groups/PatchGroupCommand.cs
+++ b/bitwarden_license/src/Scim/Groups/PatchGroupCommand.cs
@@ -1,8 +1,8 @@
using System.Text.Json;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.AdminConsole.Services;
-using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Exceptions;
using Bit.Scim.Groups.Interfaces;
diff --git a/bitwarden_license/src/Scim/Groups/PostGroupCommand.cs b/bitwarden_license/src/Scim/Groups/PostGroupCommand.cs
index 80ec5c5e3e..9cc8c8d13c 100644
--- a/bitwarden_license/src/Scim/Groups/PostGroupCommand.cs
+++ b/bitwarden_license/src/Scim/Groups/PostGroupCommand.cs
@@ -2,7 +2,6 @@
using Bit.Core.AdminConsole.Enums;
using Bit.Core.AdminConsole.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.AdminConsole.Repositories;
-using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Exceptions;
using Bit.Core.Repositories;
diff --git a/bitwarden_license/src/Scim/Groups/PutGroupCommand.cs b/bitwarden_license/src/Scim/Groups/PutGroupCommand.cs
index 96c67be918..d9cfc0d86f 100644
--- a/bitwarden_license/src/Scim/Groups/PutGroupCommand.cs
+++ b/bitwarden_license/src/Scim/Groups/PutGroupCommand.cs
@@ -2,7 +2,6 @@
using Bit.Core.AdminConsole.Enums;
using Bit.Core.AdminConsole.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.AdminConsole.Repositories;
-using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Exceptions;
using Bit.Scim.Context;
diff --git a/bitwarden_license/src/Scim/packages.lock.json b/bitwarden_license/src/Scim/packages.lock.json
index 9b76d1089e..7d0df69c5b 100644
--- a/bitwarden_license/src/Scim/packages.lock.json
+++ b/bitwarden_license/src/Scim/packages.lock.json
@@ -173,8 +173,8 @@
},
"Dapper": {
"type": "Transitive",
- "resolved": "2.0.123",
- "contentHash": "RDFF4rBLLmbpi6pwkY7q/M6UXHRJEOerplDGE5jwEkP/JGJnBauAClYavNKJPW1yOTWRPIyfj4is3EaJxQXILQ=="
+ "resolved": "2.1.24",
+ "contentHash": "/2t2vsdJyZRsk13AsWigZpsuFvEwK+o3v862cEULXoww905gyKhJFSuwmZI/4Ui9COX9ZCFCI09UHyH4wVYl3A=="
},
"DnsClient": {
"type": "Transitive",
@@ -184,6 +184,24 @@
"Microsoft.Win32.Registry": "5.0.0"
}
},
+ "Duende.IdentityServer": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "4HVjzx1F8v5J+U7oa8RGAQGj2QzmzNSu87r18Sh+dlh10uyZZL8teAaT/FaVLDObnfItGdPFvN8mwpF/HkI3Xw==",
+ "dependencies": {
+ "Duende.IdentityServer.Storage": "6.0.4",
+ "Microsoft.AspNetCore.Authentication.OpenIdConnect": "6.0.0"
+ }
+ },
+ "Duende.IdentityServer.Storage": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "s5gAjfbpr2IMgI+fU2Nx+2AZdzstmbt9gpo13iX7GwvqSeSaBVqj9ZskAN0R2KF1OemPdZuGnfaTcevdXMUrrw==",
+ "dependencies": {
+ "IdentityModel": "6.0.0",
+ "Microsoft.AspNetCore.DataProtection.Abstractions": "6.0.0"
+ }
+ },
"Fido2": {
"type": "Transitive",
"resolved": "3.0.1",
@@ -212,57 +230,16 @@
},
"Handlebars.Net": {
"type": "Transitive",
- "resolved": "2.1.2",
- "contentHash": "p60QyeBYpZmcZdIXRMqs9XySIBaxJ0lj3+QD0EJVr4ybTigOTCumXMMin5dPwjo9At1UwkDZ3gGwa1lmGjG6DA==",
+ "resolved": "2.1.4",
+ "contentHash": "Od7MWDfGxYKRtxETFMlcvCrY8hAqyuXZDX4EsOfiI/jzh+PVBuVxazHBC1HmVqTKX1JnRtoxIMcH95K9UFlYog==",
"dependencies": {
"Microsoft.CSharp": "4.7.0"
}
},
"IdentityModel": {
"type": "Transitive",
- "resolved": "4.4.0",
- "contentHash": "b18wrIx5wnZlMxAX7oVsE+nDtAJ4hajYlH0xPlaRvo4r/fz08K6pPeZvbiqS9nfNbzfIgLFmNX+FL9qR9ZR5PA==",
- "dependencies": {
- "Newtonsoft.Json": "11.0.2",
- "System.Text.Encodings.Web": "4.7.0"
- }
- },
- "IdentityModel.AspNetCore.OAuth2Introspection": {
- "type": "Transitive",
- "resolved": "4.0.1",
- "contentHash": "ZNdMZMaj9fqR3j50vYsu+1U3QGd6n8+fqwf+a8mCTcmXGor+HgFDfdq0mM34bsmD6uEgAQup7sv2ZW5kR36dbA==",
- "dependencies": {
- "IdentityModel": "4.0.0"
- }
- },
- "IdentityServer4": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "blaxxGuOA7v/w1q+fxn97wZ+x2ecG1ZD4mc/N/ZOXMNeFZZhqv+4LF26Gecyik3nWrJPmbMEtQbLmRsKG8k61w==",
- "dependencies": {
- "IdentityModel": "4.4.0",
- "IdentityServer4.Storage": "4.1.2",
- "Microsoft.AspNetCore.Authentication.OpenIdConnect": "3.1.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.6.0",
- "Newtonsoft.Json": "12.0.2"
- }
- },
- "IdentityServer4.AccessTokenValidation": {
- "type": "Transitive",
- "resolved": "3.0.1",
- "contentHash": "qu/M6UyN4o9NVep7q545Ms7hYAnsQqSdLbN1Fjjrn4m35lyBfeQPSSNzDryAKHbodyWOQfHaOqKEyMEJQ5Rpgw==",
- "dependencies": {
- "IdentityModel.AspNetCore.OAuth2Introspection": "4.0.1",
- "Microsoft.AspNetCore.Authentication.JwtBearer": "3.0.0"
- }
- },
- "IdentityServer4.Storage": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "KoSffyZyyeCNTIyJiZnCuPakJ1QbCHlpty6gbWUj/7yl+w0PXIchgmmJnJSvddzBb8iZ2xew/vGlxWUIP17P2g==",
- "dependencies": {
- "IdentityModel": "4.4.0"
- }
+ "resolved": "6.0.0",
+ "contentHash": "eVHCR7a6m/dm5RFcBzE3qs/Jg5j9R5Rjpu8aTOv9e4AFvaQtBXb5ah7kmwU+YwA0ufRwz4wf1hnIvsD2hSnI4g=="
},
"LaunchDarkly.Cache": {
"type": "Transitive",
@@ -271,26 +248,27 @@
},
"LaunchDarkly.CommonSdk": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "YYYq+41gZRMQ8dIoMC6HOq/dI+4RY3HsexLLAaE9T1+1tVMeQkbCqak7sVeKX4QcE7xlXx23lWgipYUkRoRUyw==",
+ "resolved": "6.2.0",
+ "contentHash": "eLeb+tTNLwOxlUIsZWzJlcPmG9Wyf20NYyucP6MW6aqKW6doKFeSO+aJe0z+WyijbvfX1Dp1U1HQatOu6fa1Gg==",
"dependencies": {
+ "LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
},
"LaunchDarkly.EventSource": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "DN44Ry5M4lyrjiF7LEu0Ijco7Wm8R7mJopN+giYsYjkQlszsXdFvm3POoehIDAOtL1HHl5bZvF9k9xK034u3IA==",
+ "resolved": "5.1.0",
+ "contentHash": "PztDWiMvPWODx+kfBnCroZ8Lpya4nPc7ZO4TZysOogODbVXDDPDYrdcgVivCMgf4davhGrp61ekvZc+Uy1NYMA==",
"dependencies": {
- "LaunchDarkly.Logging": "[1.0.1, 3.0.0)"
+ "LaunchDarkly.Logging": "[2.0.0, 3.0.0)"
}
},
"LaunchDarkly.InternalSdk": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "jW8VEfFciuCcJUEuvSzmrbMVYYXwGL/ZWHUZLiA4aDOQ1LcEXp32uK405NQW/izEypUfWB+9TaSjPpFIC+5Wzw==",
+ "resolved": "3.3.0",
+ "contentHash": "TBvs/B6iyXp9MqRKjIoBZ/T0+/xgp5xg+MuHqr5U+N5+7DghtI2FnsmgeBedTIeQdA3Tk8Z4Bj4hlqU9FBiEnw==",
"dependencies": {
- "LaunchDarkly.CommonSdk": "6.0.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
"LaunchDarkly.Logging": "[2.0.0, 3.0.0)",
"System.Collections.Immutable": "1.7.1"
}
@@ -305,13 +283,13 @@
},
"LaunchDarkly.ServerSdk": {
"type": "Transitive",
- "resolved": "7.0.0",
- "contentHash": "gkTWb+f5QlsXIqFAciBef3qKZU2y0Hy3Fpt4pvZoxNcnBKg2PNTDSnbpbYEKPeQ1yk1avNaI/tKprnahfrmJFg==",
+ "resolved": "8.0.0",
+ "contentHash": "vosFEXYJABuIDIA0+6sncalTmrKXEkBKeqzuP9/vvcCVlFSXUl/ZnrkrAVg3ViDWDi7kjpJSk2W3h5D0TUfCGA==",
"dependencies": {
"LaunchDarkly.Cache": "1.0.2",
- "LaunchDarkly.CommonSdk": "6.0.0",
- "LaunchDarkly.EventSource": "5.0.1",
- "LaunchDarkly.InternalSdk": "3.1.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
+ "LaunchDarkly.EventSource": "5.1.0",
+ "LaunchDarkly.InternalSdk": "3.3.0",
"LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
@@ -323,16 +301,16 @@
},
"linq2db": {
"type": "Transitive",
- "resolved": "5.2.1",
- "contentHash": "OOBM8s39zhbZAgqFnl2KGxT5RqBDw21X69U528qV2PgQispaA3f+or0ILrLEgnNIJuB4EBgaw8gC6ttSHn4X0Q=="
+ "resolved": "5.3.1",
+ "contentHash": "707mIbEmtptvKeUW940UwoNwq05I7OUu0VWtclLtyYaASp+ugX4I/Er1UVpeldsDawqlVMXB5EQ5/Oar6AkUGQ=="
},
"linq2db.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.5.0",
- "contentHash": "ePHzO99xbObgMLlAFh08of1SnVhg6j4Su9327DrIB7RZWCgtQIX6k+nbl+HRVOooAndZSs7b+DduSgdnJjaJGw==",
+ "resolved": "7.6.0",
+ "contentHash": "T1W9o8wVzApsUwu7SRg/L7487kaiLQYt2AqRVnXVGfobD+ZKy2oRsUMws0PICtciaz4qbfLp/r/+NksfuYsFlw==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Relational": "7.0.0",
- "linq2db": "5.2.1"
+ "linq2db": "5.3.1"
}
},
"MailKit": {
@@ -353,10 +331,10 @@
},
"Microsoft.AspNetCore.Authentication.OpenIdConnect": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "O1cAQYUTU8EfRqwc5/rfTns4E4hKlFlg59fuKRrST+PzsxI6H07KqRN/JjdYhAuVYxF8jPnIGbj+zuc5paOWUw==",
+ "resolved": "6.0.0",
+ "contentHash": "cJxdro36spFzk/K2OFCddM6vZ+yoj6ug8mTFRH3Gdv1Pul/buSuCtfb/FSCp31UmS5S4C1315dU7wX3ErLFuDg==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.5.0"
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.10.0"
}
},
"Microsoft.AspNetCore.Cryptography.Internal": {
@@ -389,8 +367,8 @@
},
"Microsoft.AspNetCore.DataProtection.Abstractions": {
"type": "Transitive",
- "resolved": "3.1.32",
- "contentHash": "MPL4iVyiaRxnOUY5VATHjvhDWaAEFb77KFiUxVRklv3Z3v+STofUr1UG/aCt1O9cgN7FVTDaC5A7U+zsLub8Xg=="
+ "resolved": "6.0.0",
+ "contentHash": "Z/UU4NEBm5UgNufJmw+j5baW26ytCOIZ0G7sZocPaOzsUeBon1bkM3lSMNZQG2GmDjAIVP2XMSODf2jzSGbibw=="
},
"Microsoft.Azure.Amqp": {
"type": "Transitive",
@@ -475,48 +453,44 @@
},
"Microsoft.Data.SqlClient": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "uu8dfrsx081cSbEevWuZAvqdmANDGJkbLBL2G3j0LAZxX1Oy8RCVAaC4Lcuak6jNicWP6CWvHqBTIEmQNSxQlw==",
+ "resolved": "5.1.1",
+ "contentHash": "MW5E9HFvCaV069o8b6YpuRDPBux8s96qDnOJ+4N9QNUCs7c5W3KxwQ+ftpAjbMUlImL+c9WR+l+f5hzjkqhu2g==",
"dependencies": {
- "Azure.Identity": "1.6.0",
- "Microsoft.Data.SqlClient.SNI.runtime": "5.0.1",
- "Microsoft.Identity.Client": "4.45.0",
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.21.0",
+ "Azure.Identity": "1.7.0",
+ "Microsoft.Data.SqlClient.SNI.runtime": "5.1.0",
+ "Microsoft.Identity.Client": "4.47.2",
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.24.0",
"Microsoft.SqlServer.Server": "1.0.0",
- "Microsoft.Win32.Registry": "5.0.0",
- "System.Buffers": "4.5.1",
- "System.Configuration.ConfigurationManager": "5.0.0",
- "System.Diagnostics.DiagnosticSource": "5.0.0",
- "System.IO": "4.3.0",
- "System.Resources.ResourceManager": "4.3.0",
- "System.Runtime.Caching": "5.0.0",
+ "System.Configuration.ConfigurationManager": "6.0.1",
+ "System.Diagnostics.DiagnosticSource": "6.0.0",
+ "System.Runtime.Caching": "6.0.0",
"System.Security.Cryptography.Cng": "5.0.0",
"System.Security.Principal.Windows": "5.0.0",
- "System.Text.Encoding.CodePages": "5.0.0",
- "System.Text.Encodings.Web": "4.7.2"
+ "System.Text.Encoding.CodePages": "6.0.0",
+ "System.Text.Encodings.Web": "6.0.0"
}
},
"Microsoft.Data.SqlClient.SNI.runtime": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "y0X5MxiNdbITJYoafJ2ruaX6hqO0twpCGR/ipiDOe85JKLU8WL4TuAQfDe5qtt3bND5Je26HnrarLSAMMnVTNg=="
+ "resolved": "5.1.0",
+ "contentHash": "jVsElisM5sfBzaaV9kdq2NXZLwIbytetnsOIlJ0cQGgQP4zFNBmkfHBnpwtmKrtBJBEV9+9PVQPVrcCVhDgcIg=="
},
"Microsoft.Data.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "FTerRmQPqHrCrnoUzhBu+E+1DNGwyrAMLqHkAqOOOu5pGfyMOj8qQUBxI/gDtWtG11p49UxSfWmBzRNlwZqfUg==",
+ "resolved": "7.0.14",
+ "contentHash": "qvYae3/v9Fvqsjp/7OKQBuJK+Uc3m/WctfpIUMmGMDot2Bd8UWBKiMSlh26UtfQa9x4N+k7NxCT+AbZVoNrCdg==",
"dependencies": {
"SQLitePCLRaw.core": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "RXbRLHHWP2Z3pq8qcL5nQ6LPeoOyp8hasM5bd0Te8PiQi3RjWQR4tcbdY5XMqQ+oTO9wA8/RLhZRn/hnxlTDnQ==",
+ "resolved": "7.0.14",
+ "contentHash": "0KYkAemPygW6yzifciFlmMzkO4sI4Dw69xLgwg3ui5rXJS5XvzuAWVvfdrKJciqeCbCnVS/ZbOWpcwWgqce5bQ==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Abstractions": "7.0.5",
- "Microsoft.EntityFrameworkCore.Analyzers": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Abstractions": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Analyzers": "7.0.14",
"Microsoft.Extensions.Caching.Memory": "7.0.0",
"Microsoft.Extensions.DependencyInjection": "7.0.0",
"Microsoft.Extensions.Logging": "7.0.0"
@@ -524,49 +498,49 @@
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "iwQso+hFRsEWjhH2WsEQj1D2QE5BlEXiXEt6A3SlYTPRPdZsyTNDeDDEdtxL+H/UJPQgQYY+9SMMRcEiXBmCAA=="
+ "resolved": "7.0.14",
+ "contentHash": "aEcXDSYpDdD5wdIRKTqcS44f3W4capqQ1BWVRPJgacATfHkO62RX9Nnh0hUFg+rei9OLuJp0Y4zsy1fNeOXv5g=="
},
"Microsoft.EntityFrameworkCore.Analyzers": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "yMLM/aK1MikVqpjxd7PJ1Pjgztd3VAd26ZHxyjxG3RPeM9cHjvS5tCg9kAAayR6eHmBg0ffZsHdT28WfA5tTlA=="
+ "resolved": "7.0.14",
+ "contentHash": "esI4RF6mix4DDFBhWB9k1vJxAL8GouSf5ZV8oFJoVsIQ9d2J3MPgC1VL2qM9Vw5cH7Vg7TzRyKNpCRXFVkWs9w=="
},
"Microsoft.EntityFrameworkCore.Relational": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "u/33DC4S6g2hpMPgBc5Kdnlz//nqHR5c/ovgjtiP/wQ7sOd0EOdygVzUJAAOxCwbtAHDsJXS9Vc3jLFYq0yu8Q==",
+ "resolved": "7.0.14",
+ "contentHash": "MrVBnWOFYwfLMGQfrcIuqEM9Xvokv1vJeYxqNH3K3xOtAdHwHQTrKnpDP97tU+LBlvcnyXAtAtryYcpLXWtRNA==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "7.0.5",
+ "Microsoft.EntityFrameworkCore": "7.0.14",
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.Sqlite": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "2XPZB9OLF5/m13HgZp7/Dv0u8FWEJzcaBsMYR9Kp3R6aygkb3RnOijofPDTsmdhAqG9YTysCmh2bFaGs0TCc7A==",
+ "resolved": "7.0.14",
+ "contentHash": "8c8Hw2tmfy5YEsi9RL2/u2Qi9IwVbmj/yDlJy4iJPadeE3/AssLrgtobOBz4ftg2y5PVjFL59Gq7YzGLQH5q1A==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.14",
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "4C+9ct6A/Bq61Ta9Uh2td4/XwNpRCiPI03SWTa3hPJjA/g8wCw2hetbh3DDe5HcydzgDq/lRRjU/eRy3UODklQ==",
+ "resolved": "7.0.14",
+ "contentHash": "JNUkZVff1V/A/P3JiBbgt+Y2oCQSuzORxE3jOqFDbFjSFu7jHDEetJ/afSF/taa0lbyN9OpvaKjsbKk3Iis29Q==",
"dependencies": {
- "Microsoft.Data.Sqlite.Core": "7.0.5",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5",
+ "Microsoft.Data.Sqlite.Core": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14",
"Microsoft.Extensions.DependencyModel": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.SqlServer": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "cUJqCiamT0EvpKNgZEV5fqNv2MyVfKNgOPQfFINqHiIKHOYrS0nTCUJP97+UuG0JIIrP792/PwnuNjbekImtBg==",
+ "resolved": "7.0.14",
+ "contentHash": "d9hqEw4W/TdQ1WDm03uyFuDoehL6GNq/NMChFaC4dcV60I42vKdUC0fYTuE2QPunVUpf5XUTCkJ6fYGjMos2AA==",
"dependencies": {
- "Microsoft.Data.SqlClient": "5.0.1",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5"
+ "Microsoft.Data.SqlClient": "5.1.1",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14"
}
},
"Microsoft.Extensions.Caching.Abstractions": {
@@ -819,50 +793,52 @@
},
"Microsoft.IdentityModel.Abstractions": {
"type": "Transitive",
- "resolved": "6.22.0",
- "contentHash": "iI+9V+2ciCrbheeLjpmjcqCnhy+r6yCoEcid3nkoFWerHgjVuT6CPM4HODUTtUPe1uwks4wcnAujJ8u+IKogHQ=="
+ "resolved": "6.24.0",
+ "contentHash": "X6aBK56Ot15qKyG7X37KsPnrwah+Ka55NJWPppWVTDi8xWq7CJgeNw2XyaeHgE1o/mW4THwoabZkBbeG2TPBiw=="
},
"Microsoft.IdentityModel.JsonWebTokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "d3h1/BaMeylKTkdP6XwRCxuOoDJZ44V9xaXr6gl5QxmpnZGdoK3bySo3OQN8ehRLJHShb94ElLUvoXyglQtgAw==",
+ "resolved": "6.24.0",
+ "contentHash": "XDWrkThcxfuWp79AvAtg5f+uRS1BxkIbJnsG/e8VPzOWkYYuDg33emLjp5EWcwXYYIDsHnVZD/00kM/PYFQc/g==",
"dependencies": {
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Tokens": "6.24.0",
+ "System.Text.Encoding": "4.3.0",
+ "System.Text.Json": "4.7.2"
}
},
"Microsoft.IdentityModel.Logging": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "tuEhHIQwvBEhMf8I50hy8FHmRSUkffDFP5EdLsSDV4qRcl2wvOPkQxYqEzWkh+ytW6sbdJGEXElGhmhDfAxAKg==",
+ "resolved": "6.24.0",
+ "contentHash": "qLYWDOowM/zghmYKXw1yfYKlHOdS41i8t4hVXr9bSI90zHqhyhQh9GwVy8pENzs5wHeytU23DymluC9NtgYv7w==",
"dependencies": {
- "Microsoft.IdentityModel.Abstractions": "6.21.0"
+ "Microsoft.IdentityModel.Abstractions": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "0FqY5cTLQKtHrClzHEI+QxJl8OBT2vUiEQQB7UKk832JDiJJmetzYZ3AdSrPjN/3l3nkhByeWzXnhrX0JbifKg==",
+ "resolved": "6.24.0",
+ "contentHash": "+NzKCkvsQ8X1r/Ff74V7CFr9OsdMRaB6DsV+qpH7NNLdYJ8O4qHbmTnNEsjFcDmk/gVNDwhoL2gN5pkPVq0lwQ==",
"dependencies": {
- "Microsoft.IdentityModel.Logging": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Logging": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols.OpenIdConnect": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "vtSKL7n6EnAsLyxmiviusm6LKrblT2ndnNqN6rvVq6iIHAnPCK9E2DkDx6h1Jrpy1cvbp40r0cnTg23nhEAGTA==",
+ "resolved": "6.24.0",
+ "contentHash": "a/2RRrc8C9qaw8qdD9hv1ES9YKFgxaqr/SnwMSLbwQZJSUQDd4qx1K4EYgWaQWs73R+VXLyKSxN0f/uE9CsBiQ==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols": "6.21.0",
- "System.IdentityModel.Tokens.Jwt": "6.21.0"
+ "Microsoft.IdentityModel.Protocols": "6.24.0",
+ "System.IdentityModel.Tokens.Jwt": "6.24.0"
}
},
"Microsoft.IdentityModel.Tokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "AAEHZvZyb597a+QJSmtxH3n2P1nIJGpZ4Q89GTenknRx6T6zyfzf592yW/jA5e8EHN4tNMjjXHQaYWEq5+L05w==",
+ "resolved": "6.24.0",
+ "contentHash": "ZPqHi86UYuqJXJ7bLnlEctHKkPKT4lGUFbotoCNiXNCSL02emYlcxzGYsRGWWmbFEcYDMi2dcTLLYNzHqWOTsw==",
"dependencies": {
"Microsoft.CSharp": "4.5.0",
- "Microsoft.IdentityModel.Logging": "6.21.0",
+ "Microsoft.IdentityModel.Logging": "6.24.0",
"System.Security.Cryptography.Cng": "4.5.0"
}
},
@@ -993,13 +969,13 @@
},
"Newtonsoft.Json": {
"type": "Transitive",
- "resolved": "13.0.1",
- "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
+ "resolved": "13.0.3",
+ "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ=="
},
"Npgsql": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "7UVPYy2RP0ci04PED1tc9ZCaTw/DfSdSkLiGEFCAvwMwsgA/bAluj1liNzP1IpN0MFofnOF0cm1zJfmbEuCehg==",
+ "resolved": "7.0.6",
+ "contentHash": "TAqvwRnm3NJ0QvN7cvu6geJkbI0XPzGVRElVY5hF4gsgA+BnE12x6GM1TLhdeq+7ZKvvo3BD8jXKnXmr3tvdEw==",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "6.0.0",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
@@ -1007,13 +983,13 @@
},
"Npgsql.EntityFrameworkCore.PostgreSQL": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "ZYMtyG6pmLtUsFAx0/XaIlVkJM+1gArWEKD55cLLxiVlGScAphjiGj+G7Gk16yg5lhhdWx+bgXWpIUISXuS33g==",
+ "resolved": "7.0.11",
+ "contentHash": "cHEgEz0ldXc9wVANs8sJqC+3eilqefrkasCBgaVT0tyj8tb1p3/pwy2ngjboNkDG3M0z+xJsJ4jC5p8wySAM3w==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, 8.0.0)",
- "Npgsql": "7.0.4"
+ "Microsoft.EntityFrameworkCore": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.11, 8.0.0)",
+ "Npgsql": "7.0.6"
}
},
"NSec.Cryptography": {
@@ -1336,8 +1312,8 @@
},
"Serilog.Sinks.SyslogMessages": {
"type": "Transitive",
- "resolved": "2.0.6",
- "contentHash": "V2Yq2GEbk7taEPbpBLFzLXhrHrUzKf4sQu/zLrANU8XIoUn/Mr08M2E8PrcrWVXCj0R4xLMWYe0Z1sxOrMF3IA==",
+ "resolved": "2.0.9",
+ "contentHash": "y7J+/h/Nf5EAtbpa6lC1nDhK/F9kC5oxuVYmQivv242Oh4hAVMeoAk5Gv6bgb/KbmqufGPXUFkX/AlcrvZ8Ywg==",
"dependencies": {
"Serilog": "2.5.0",
"Serilog.Sinks.PeriodicBatching": "2.3.0"
@@ -1470,8 +1446,8 @@
},
"System.Configuration.ConfigurationManager": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "7T+m0kDSlIPTHIkPMIu6m6tV6qsMqJpvQWW2jIc2qi7sn40qxFo0q+7mEQAhMPXZHMKnWrnv47ntGlM/ejvw3g==",
+ "resolved": "6.0.1",
+ "contentHash": "jXw9MlUu/kRfEU0WyTptAVueupqIeE3/rl0EZDMlf8pcvJnitQ8HeVEp69rZdaStXwTV72boi/Bhw8lOeO+U2w==",
"dependencies": {
"System.Security.Cryptography.ProtectedData": "6.0.0",
"System.Security.Permissions": "6.0.0"
@@ -1630,11 +1606,11 @@
},
"System.IdentityModel.Tokens.Jwt": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "JRD8AuypBE+2zYxT3dMJomQVsPYsCqlyZhWel3J1d5nzQokSRyTueF+Q4ID3Jcu6zSZKuzOdJ1MLTkbQsDqcvQ==",
+ "resolved": "6.24.0",
+ "contentHash": "Qibsj9MPWq8S/C0FgvmsLfIlHLE7ay0MJIaAmK94ivN3VyDdglqReed5qMvdQhSL0BzK6v0Z1wB/sD88zVu6Jw==",
"dependencies": {
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"System.IO": {
@@ -2083,10 +2059,10 @@
},
"System.Runtime.Caching": {
"type": "Transitive",
- "resolved": "5.0.0",
- "contentHash": "30D6MkO8WF9jVGWZIP0hmCN8l9BTY4LCsAzLIe4xFSXzs+AjDotR7DpSmj27pFskDURzUvqYYY0ikModgBTxWw==",
+ "resolved": "6.0.0",
+ "contentHash": "E0e03kUp5X2k+UAoVl6efmI7uU7JRBWi5EIdlQ7cr0NpBGjHG4fWII35PgsBY9T4fJQ8E4QPsL0rKksU9gcL5A==",
"dependencies": {
- "System.Configuration.ConfigurationManager": "5.0.0"
+ "System.Configuration.ConfigurationManager": "6.0.0"
}
},
"System.Runtime.CompilerServices.Unsafe": {
@@ -2616,11 +2592,10 @@
"BitPay.Light": "[1.0.1907, )",
"Braintree": "[5.19.0, )",
"DnsClient": "[1.7.0, )",
+ "Duende.IdentityServer": "[6.0.4, )",
"Fido2.AspNet": "[3.0.1, )",
- "Handlebars.Net": "[2.1.2, )",
- "IdentityServer4": "[4.1.2, )",
- "IdentityServer4.AccessTokenValidation": "[3.0.1, )",
- "LaunchDarkly.ServerSdk": "[7.0.0, )",
+ "Handlebars.Net": "[2.1.4, )",
+ "LaunchDarkly.ServerSdk": "[8.0.0, )",
"MailKit": "[4.2.0, )",
"Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )",
"Microsoft.Azure.Cosmos.Table": "[1.0.8, )",
@@ -2630,7 +2605,7 @@
"Microsoft.Extensions.Configuration.EnvironmentVariables": "[6.0.1, )",
"Microsoft.Extensions.Configuration.UserSecrets": "[6.0.1, )",
"Microsoft.Extensions.Identity.Stores": "[6.0.4, )",
- "Newtonsoft.Json": "[13.0.1, )",
+ "Newtonsoft.Json": "[13.0.3, )",
"Otp.NET": "[1.2.2, )",
"Quartz": "[3.4.0, )",
"SendGrid": "[9.27.0, )",
@@ -2639,7 +2614,7 @@
"Serilog.Extensions.Logging": "[3.1.0, )",
"Serilog.Extensions.Logging.File": "[2.0.0, )",
"Serilog.Sinks.AzureCosmosDB": "[2.0.0, )",
- "Serilog.Sinks.SyslogMessages": "[2.0.6, )",
+ "Serilog.Sinks.SyslogMessages": "[2.0.9, )",
"Stripe.net": "[40.0.0, )",
"YubicoDotNetClient": "[1.2.0, )"
}
@@ -2647,29 +2622,29 @@
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "Dapper": "[2.0.123, )"
+ "Core": "[2023.12.0, )",
+ "Dapper": "[2.1.24, )"
}
},
"infrastructure.entityframework": {
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )",
- "Core": "[2023.10.2, )",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )",
- "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )",
- "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )",
- "Npgsql.EntityFrameworkCore.PostgreSQL": "[7.0.4, )",
+ "Core": "[2023.12.0, )",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.14, )",
+ "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.14, )",
+ "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.14, )",
+ "Npgsql.EntityFrameworkCore.PostgreSQL": "[7.0.11, )",
"Pomelo.EntityFrameworkCore.MySql": "[7.0.0, )",
- "linq2db.EntityFrameworkCore": "[7.5.0, )"
+ "linq2db.EntityFrameworkCore": "[7.6.0, )"
}
},
"sharedweb": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "Infrastructure.Dapper": "[2023.10.2, )",
- "Infrastructure.EntityFramework": "[2023.10.2, )"
+ "Core": "[2023.12.0, )",
+ "Infrastructure.Dapper": "[2023.12.0, )",
+ "Infrastructure.EntityFramework": "[2023.12.0, )"
}
}
}
diff --git a/bitwarden_license/src/Sso/Controllers/AccountController.cs b/bitwarden_license/src/Sso/Controllers/AccountController.cs
index 40d4d1f42a..11a42e3cb1 100644
--- a/bitwarden_license/src/Sso/Controllers/AccountController.cs
+++ b/bitwarden_license/src/Sso/Controllers/AccountController.cs
@@ -1,5 +1,7 @@
using System.Security.Claims;
using Bit.Core;
+using Bit.Core.AdminConsole.Enums;
+using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Auth.Entities;
using Bit.Core.Auth.Enums;
using Bit.Core.Auth.Models;
@@ -16,14 +18,15 @@ using Bit.Core.Tokens;
using Bit.Core.Utilities;
using Bit.Sso.Models;
using Bit.Sso.Utilities;
+using Duende.IdentityServer;
+using Duende.IdentityServer.Extensions;
+using Duende.IdentityServer.Services;
+using Duende.IdentityServer.Stores;
using IdentityModel;
-using IdentityServer4;
-using IdentityServer4.Extensions;
-using IdentityServer4.Services;
-using IdentityServer4.Stores;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
+using DIM = Duende.IdentityServer.Models;
namespace Bit.Sso.Controllers;
@@ -717,7 +720,7 @@ public class AccountController : Controller
return (logoutId, logout?.PostLogoutRedirectUri, externalAuthenticationScheme);
}
- public bool IsNativeClient(IdentityServer4.Models.AuthorizationRequest context)
+ public bool IsNativeClient(DIM.AuthorizationRequest context)
{
return !context.RedirectUri.StartsWith("https", StringComparison.Ordinal)
&& !context.RedirectUri.StartsWith("http", StringComparison.Ordinal);
diff --git a/bitwarden_license/src/Sso/Controllers/HomeController.cs b/bitwarden_license/src/Sso/Controllers/HomeController.cs
index ee15fefc90..7be9d86215 100644
--- a/bitwarden_license/src/Sso/Controllers/HomeController.cs
+++ b/bitwarden_license/src/Sso/Controllers/HomeController.cs
@@ -1,6 +1,6 @@
using System.Diagnostics;
using Bit.Sso.Models;
-using IdentityServer4.Services;
+using Duende.IdentityServer.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Diagnostics;
using Microsoft.AspNetCore.Mvc;
diff --git a/bitwarden_license/src/Sso/IdentityServer/OidcIdentityClient.cs b/bitwarden_license/src/Sso/IdentityServer/OidcIdentityClient.cs
index 8629da07e7..ce835e378b 100644
--- a/bitwarden_license/src/Sso/IdentityServer/OidcIdentityClient.cs
+++ b/bitwarden_license/src/Sso/IdentityServer/OidcIdentityClient.cs
@@ -1,6 +1,6 @@
using Bit.Core.Settings;
-using IdentityServer4;
-using IdentityServer4.Models;
+using Duende.IdentityServer;
+using Duende.IdentityServer.Models;
namespace Bit.Sso.IdentityServer;
diff --git a/bitwarden_license/src/Sso/Models/ErrorViewModel.cs b/bitwarden_license/src/Sso/Models/ErrorViewModel.cs
index 46ae8edd90..1f6e9735e7 100644
--- a/bitwarden_license/src/Sso/Models/ErrorViewModel.cs
+++ b/bitwarden_license/src/Sso/Models/ErrorViewModel.cs
@@ -1,4 +1,4 @@
-using IdentityServer4.Models;
+using Duende.IdentityServer.Models;
namespace Bit.Sso.Models;
diff --git a/bitwarden_license/src/Sso/Startup.cs b/bitwarden_license/src/Sso/Startup.cs
index 635c91f441..f6be418bd8 100644
--- a/bitwarden_license/src/Sso/Startup.cs
+++ b/bitwarden_license/src/Sso/Startup.cs
@@ -6,7 +6,7 @@ using Bit.Core.Settings;
using Bit.Core.Utilities;
using Bit.SharedWeb.Utilities;
using Bit.Sso.Utilities;
-using IdentityServer4.Extensions;
+using Duende.IdentityServer.Extensions;
using Microsoft.IdentityModel.Logging;
using Stripe;
diff --git a/bitwarden_license/src/Sso/Utilities/DiscoveryResponseGenerator.cs b/bitwarden_license/src/Sso/Utilities/DiscoveryResponseGenerator.cs
index 7a7f569638..73ac789ea7 100644
--- a/bitwarden_license/src/Sso/Utilities/DiscoveryResponseGenerator.cs
+++ b/bitwarden_license/src/Sso/Utilities/DiscoveryResponseGenerator.cs
@@ -1,13 +1,14 @@
using Bit.Core.Settings;
using Bit.Core.Utilities;
-using IdentityServer4.Configuration;
-using IdentityServer4.Services;
-using IdentityServer4.Stores;
-using IdentityServer4.Validation;
+using Duende.IdentityServer.Configuration;
+using Duende.IdentityServer.Services;
+using Duende.IdentityServer.Stores;
+using Duende.IdentityServer.Validation;
+using DIR = Duende.IdentityServer.ResponseHandling;
namespace Bit.Sso.Utilities;
-public class DiscoveryResponseGenerator : IdentityServer4.ResponseHandling.DiscoveryResponseGenerator
+public class DiscoveryResponseGenerator : DIR.DiscoveryResponseGenerator
{
private readonly GlobalSettings _globalSettings;
diff --git a/bitwarden_license/src/Sso/Utilities/DynamicAuthenticationSchemeProvider.cs b/bitwarden_license/src/Sso/Utilities/DynamicAuthenticationSchemeProvider.cs
index 1487697279..17a7b9e8c7 100644
--- a/bitwarden_license/src/Sso/Utilities/DynamicAuthenticationSchemeProvider.cs
+++ b/bitwarden_license/src/Sso/Utilities/DynamicAuthenticationSchemeProvider.cs
@@ -7,9 +7,9 @@ using Bit.Core.Settings;
using Bit.Core.Utilities;
using Bit.Sso.Models;
using Bit.Sso.Utilities;
+using Duende.IdentityServer;
+using Duende.IdentityServer.Infrastructure;
using IdentityModel;
-using IdentityServer4;
-using IdentityServer4.Infrastructure;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
using Microsoft.Extensions.Options;
@@ -34,7 +34,7 @@ public class DynamicAuthenticationSchemeProvider : AuthenticationSchemeProvider
private readonly Dictionary _cachedSchemes;
private readonly Dictionary _cachedHandlerSchemes;
private readonly SemaphoreSlim _semaphore;
- private readonly IHttpContextAccessor _httpContextAccessor;
+ private readonly IServiceProvider _serviceProvider;
private DateTime? _lastSchemeLoad;
private IEnumerable _schemesCopy = Array.Empty();
@@ -50,7 +50,7 @@ public class DynamicAuthenticationSchemeProvider : AuthenticationSchemeProvider
ILogger logger,
GlobalSettings globalSettings,
SamlEnvironment samlEnvironment,
- IHttpContextAccessor httpContextAccessor)
+ IServiceProvider serviceProvider)
: base(options)
{
_oidcPostConfigureOptions = oidcPostConfigureOptions;
@@ -77,7 +77,7 @@ public class DynamicAuthenticationSchemeProvider : AuthenticationSchemeProvider
_cachedSchemes = new Dictionary();
_cachedHandlerSchemes = new Dictionary();
_semaphore = new SemaphoreSlim(1);
- _httpContextAccessor = httpContextAccessor ?? throw new ArgumentNullException(nameof(httpContextAccessor));
+ _serviceProvider = serviceProvider ?? throw new ArgumentNullException(nameof(serviceProvider));
}
private bool CacheIsValid
@@ -324,7 +324,7 @@ public class DynamicAuthenticationSchemeProvider : AuthenticationSchemeProvider
oidcOptions.Scope.AddIfNotExists(OpenIdConnectScopes.Acr);
}
- oidcOptions.StateDataFormat = new DistributedCacheStateDataFormatter(_httpContextAccessor, name);
+ oidcOptions.StateDataFormat = new DistributedCacheStateDataFormatter(_serviceProvider, name);
// see: https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest (acr_values)
if (!string.IsNullOrWhiteSpace(config.AcrValues))
diff --git a/bitwarden_license/src/Sso/Utilities/ServiceCollectionExtensions.cs b/bitwarden_license/src/Sso/Utilities/ServiceCollectionExtensions.cs
index cd4aa707d6..a64374b652 100644
--- a/bitwarden_license/src/Sso/Utilities/ServiceCollectionExtensions.cs
+++ b/bitwarden_license/src/Sso/Utilities/ServiceCollectionExtensions.cs
@@ -4,8 +4,8 @@ using Bit.Core.Utilities;
using Bit.SharedWeb.Utilities;
using Bit.Sso.IdentityServer;
using Bit.Sso.Models;
-using IdentityServer4.Models;
-using IdentityServer4.ResponseHandling;
+using Duende.IdentityServer.Models;
+using Duende.IdentityServer.ResponseHandling;
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
using Sustainsys.Saml2.AspNetCore2;
@@ -59,6 +59,7 @@ public static class ServiceCollectionExtensions
options.UserInteraction.ErrorIdParameter = "errorId";
}
options.InputLengthRestrictions.UserName = 256;
+ options.KeyManagement.Enabled = false;
})
.AddInMemoryCaching()
.AddInMemoryClients(new List
diff --git a/bitwarden_license/src/Sso/packages.lock.json b/bitwarden_license/src/Sso/packages.lock.json
index 5646aba9ba..d705722a60 100644
--- a/bitwarden_license/src/Sso/packages.lock.json
+++ b/bitwarden_license/src/Sso/packages.lock.json
@@ -198,8 +198,8 @@
},
"Dapper": {
"type": "Transitive",
- "resolved": "2.0.123",
- "contentHash": "RDFF4rBLLmbpi6pwkY7q/M6UXHRJEOerplDGE5jwEkP/JGJnBauAClYavNKJPW1yOTWRPIyfj4is3EaJxQXILQ=="
+ "resolved": "2.1.24",
+ "contentHash": "/2t2vsdJyZRsk13AsWigZpsuFvEwK+o3v862cEULXoww905gyKhJFSuwmZI/4Ui9COX9ZCFCI09UHyH4wVYl3A=="
},
"DnsClient": {
"type": "Transitive",
@@ -209,6 +209,24 @@
"Microsoft.Win32.Registry": "5.0.0"
}
},
+ "Duende.IdentityServer": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "4HVjzx1F8v5J+U7oa8RGAQGj2QzmzNSu87r18Sh+dlh10uyZZL8teAaT/FaVLDObnfItGdPFvN8mwpF/HkI3Xw==",
+ "dependencies": {
+ "Duende.IdentityServer.Storage": "6.0.4",
+ "Microsoft.AspNetCore.Authentication.OpenIdConnect": "6.0.0"
+ }
+ },
+ "Duende.IdentityServer.Storage": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "s5gAjfbpr2IMgI+fU2Nx+2AZdzstmbt9gpo13iX7GwvqSeSaBVqj9ZskAN0R2KF1OemPdZuGnfaTcevdXMUrrw==",
+ "dependencies": {
+ "IdentityModel": "6.0.0",
+ "Microsoft.AspNetCore.DataProtection.Abstractions": "6.0.0"
+ }
+ },
"Fido2": {
"type": "Transitive",
"resolved": "3.0.1",
@@ -237,57 +255,16 @@
},
"Handlebars.Net": {
"type": "Transitive",
- "resolved": "2.1.2",
- "contentHash": "p60QyeBYpZmcZdIXRMqs9XySIBaxJ0lj3+QD0EJVr4ybTigOTCumXMMin5dPwjo9At1UwkDZ3gGwa1lmGjG6DA==",
+ "resolved": "2.1.4",
+ "contentHash": "Od7MWDfGxYKRtxETFMlcvCrY8hAqyuXZDX4EsOfiI/jzh+PVBuVxazHBC1HmVqTKX1JnRtoxIMcH95K9UFlYog==",
"dependencies": {
"Microsoft.CSharp": "4.7.0"
}
},
"IdentityModel": {
"type": "Transitive",
- "resolved": "4.4.0",
- "contentHash": "b18wrIx5wnZlMxAX7oVsE+nDtAJ4hajYlH0xPlaRvo4r/fz08K6pPeZvbiqS9nfNbzfIgLFmNX+FL9qR9ZR5PA==",
- "dependencies": {
- "Newtonsoft.Json": "11.0.2",
- "System.Text.Encodings.Web": "4.7.0"
- }
- },
- "IdentityModel.AspNetCore.OAuth2Introspection": {
- "type": "Transitive",
- "resolved": "4.0.1",
- "contentHash": "ZNdMZMaj9fqR3j50vYsu+1U3QGd6n8+fqwf+a8mCTcmXGor+HgFDfdq0mM34bsmD6uEgAQup7sv2ZW5kR36dbA==",
- "dependencies": {
- "IdentityModel": "4.0.0"
- }
- },
- "IdentityServer4": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "blaxxGuOA7v/w1q+fxn97wZ+x2ecG1ZD4mc/N/ZOXMNeFZZhqv+4LF26Gecyik3nWrJPmbMEtQbLmRsKG8k61w==",
- "dependencies": {
- "IdentityModel": "4.4.0",
- "IdentityServer4.Storage": "4.1.2",
- "Microsoft.AspNetCore.Authentication.OpenIdConnect": "3.1.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.6.0",
- "Newtonsoft.Json": "12.0.2"
- }
- },
- "IdentityServer4.AccessTokenValidation": {
- "type": "Transitive",
- "resolved": "3.0.1",
- "contentHash": "qu/M6UyN4o9NVep7q545Ms7hYAnsQqSdLbN1Fjjrn4m35lyBfeQPSSNzDryAKHbodyWOQfHaOqKEyMEJQ5Rpgw==",
- "dependencies": {
- "IdentityModel.AspNetCore.OAuth2Introspection": "4.0.1",
- "Microsoft.AspNetCore.Authentication.JwtBearer": "3.0.0"
- }
- },
- "IdentityServer4.Storage": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "KoSffyZyyeCNTIyJiZnCuPakJ1QbCHlpty6gbWUj/7yl+w0PXIchgmmJnJSvddzBb8iZ2xew/vGlxWUIP17P2g==",
- "dependencies": {
- "IdentityModel": "4.4.0"
- }
+ "resolved": "6.0.0",
+ "contentHash": "eVHCR7a6m/dm5RFcBzE3qs/Jg5j9R5Rjpu8aTOv9e4AFvaQtBXb5ah7kmwU+YwA0ufRwz4wf1hnIvsD2hSnI4g=="
},
"LaunchDarkly.Cache": {
"type": "Transitive",
@@ -296,26 +273,27 @@
},
"LaunchDarkly.CommonSdk": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "YYYq+41gZRMQ8dIoMC6HOq/dI+4RY3HsexLLAaE9T1+1tVMeQkbCqak7sVeKX4QcE7xlXx23lWgipYUkRoRUyw==",
+ "resolved": "6.2.0",
+ "contentHash": "eLeb+tTNLwOxlUIsZWzJlcPmG9Wyf20NYyucP6MW6aqKW6doKFeSO+aJe0z+WyijbvfX1Dp1U1HQatOu6fa1Gg==",
"dependencies": {
+ "LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
},
"LaunchDarkly.EventSource": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "DN44Ry5M4lyrjiF7LEu0Ijco7Wm8R7mJopN+giYsYjkQlszsXdFvm3POoehIDAOtL1HHl5bZvF9k9xK034u3IA==",
+ "resolved": "5.1.0",
+ "contentHash": "PztDWiMvPWODx+kfBnCroZ8Lpya4nPc7ZO4TZysOogODbVXDDPDYrdcgVivCMgf4davhGrp61ekvZc+Uy1NYMA==",
"dependencies": {
- "LaunchDarkly.Logging": "[1.0.1, 3.0.0)"
+ "LaunchDarkly.Logging": "[2.0.0, 3.0.0)"
}
},
"LaunchDarkly.InternalSdk": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "jW8VEfFciuCcJUEuvSzmrbMVYYXwGL/ZWHUZLiA4aDOQ1LcEXp32uK405NQW/izEypUfWB+9TaSjPpFIC+5Wzw==",
+ "resolved": "3.3.0",
+ "contentHash": "TBvs/B6iyXp9MqRKjIoBZ/T0+/xgp5xg+MuHqr5U+N5+7DghtI2FnsmgeBedTIeQdA3Tk8Z4Bj4hlqU9FBiEnw==",
"dependencies": {
- "LaunchDarkly.CommonSdk": "6.0.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
"LaunchDarkly.Logging": "[2.0.0, 3.0.0)",
"System.Collections.Immutable": "1.7.1"
}
@@ -330,13 +308,13 @@
},
"LaunchDarkly.ServerSdk": {
"type": "Transitive",
- "resolved": "7.0.0",
- "contentHash": "gkTWb+f5QlsXIqFAciBef3qKZU2y0Hy3Fpt4pvZoxNcnBKg2PNTDSnbpbYEKPeQ1yk1avNaI/tKprnahfrmJFg==",
+ "resolved": "8.0.0",
+ "contentHash": "vosFEXYJABuIDIA0+6sncalTmrKXEkBKeqzuP9/vvcCVlFSXUl/ZnrkrAVg3ViDWDi7kjpJSk2W3h5D0TUfCGA==",
"dependencies": {
"LaunchDarkly.Cache": "1.0.2",
- "LaunchDarkly.CommonSdk": "6.0.0",
- "LaunchDarkly.EventSource": "5.0.1",
- "LaunchDarkly.InternalSdk": "3.1.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
+ "LaunchDarkly.EventSource": "5.1.0",
+ "LaunchDarkly.InternalSdk": "3.3.0",
"LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
@@ -348,16 +326,16 @@
},
"linq2db": {
"type": "Transitive",
- "resolved": "5.2.1",
- "contentHash": "OOBM8s39zhbZAgqFnl2KGxT5RqBDw21X69U528qV2PgQispaA3f+or0ILrLEgnNIJuB4EBgaw8gC6ttSHn4X0Q=="
+ "resolved": "5.3.1",
+ "contentHash": "707mIbEmtptvKeUW940UwoNwq05I7OUu0VWtclLtyYaASp+ugX4I/Er1UVpeldsDawqlVMXB5EQ5/Oar6AkUGQ=="
},
"linq2db.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.5.0",
- "contentHash": "ePHzO99xbObgMLlAFh08of1SnVhg6j4Su9327DrIB7RZWCgtQIX6k+nbl+HRVOooAndZSs7b+DduSgdnJjaJGw==",
+ "resolved": "7.6.0",
+ "contentHash": "T1W9o8wVzApsUwu7SRg/L7487kaiLQYt2AqRVnXVGfobD+ZKy2oRsUMws0PICtciaz4qbfLp/r/+NksfuYsFlw==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Relational": "7.0.0",
- "linq2db": "5.2.1"
+ "linq2db": "5.3.1"
}
},
"MailKit": {
@@ -420,10 +398,10 @@
},
"Microsoft.AspNetCore.Authentication.OpenIdConnect": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "O1cAQYUTU8EfRqwc5/rfTns4E4hKlFlg59fuKRrST+PzsxI6H07KqRN/JjdYhAuVYxF8jPnIGbj+zuc5paOWUw==",
+ "resolved": "6.0.0",
+ "contentHash": "cJxdro36spFzk/K2OFCddM6vZ+yoj6ug8mTFRH3Gdv1Pul/buSuCtfb/FSCp31UmS5S4C1315dU7wX3ErLFuDg==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.5.0"
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.10.0"
}
},
"Microsoft.AspNetCore.Cryptography.Internal": {
@@ -456,8 +434,8 @@
},
"Microsoft.AspNetCore.DataProtection.Abstractions": {
"type": "Transitive",
- "resolved": "3.1.32",
- "contentHash": "MPL4iVyiaRxnOUY5VATHjvhDWaAEFb77KFiUxVRklv3Z3v+STofUr1UG/aCt1O9cgN7FVTDaC5A7U+zsLub8Xg=="
+ "resolved": "6.0.0",
+ "contentHash": "Z/UU4NEBm5UgNufJmw+j5baW26ytCOIZ0G7sZocPaOzsUeBon1bkM3lSMNZQG2GmDjAIVP2XMSODf2jzSGbibw=="
},
"Microsoft.AspNetCore.Http.Abstractions": {
"type": "Transitive",
@@ -579,48 +557,44 @@
},
"Microsoft.Data.SqlClient": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "uu8dfrsx081cSbEevWuZAvqdmANDGJkbLBL2G3j0LAZxX1Oy8RCVAaC4Lcuak6jNicWP6CWvHqBTIEmQNSxQlw==",
+ "resolved": "5.1.1",
+ "contentHash": "MW5E9HFvCaV069o8b6YpuRDPBux8s96qDnOJ+4N9QNUCs7c5W3KxwQ+ftpAjbMUlImL+c9WR+l+f5hzjkqhu2g==",
"dependencies": {
- "Azure.Identity": "1.6.0",
- "Microsoft.Data.SqlClient.SNI.runtime": "5.0.1",
- "Microsoft.Identity.Client": "4.45.0",
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.21.0",
+ "Azure.Identity": "1.7.0",
+ "Microsoft.Data.SqlClient.SNI.runtime": "5.1.0",
+ "Microsoft.Identity.Client": "4.47.2",
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.24.0",
"Microsoft.SqlServer.Server": "1.0.0",
- "Microsoft.Win32.Registry": "5.0.0",
- "System.Buffers": "4.5.1",
- "System.Configuration.ConfigurationManager": "5.0.0",
- "System.Diagnostics.DiagnosticSource": "5.0.0",
- "System.IO": "4.3.0",
- "System.Resources.ResourceManager": "4.3.0",
- "System.Runtime.Caching": "5.0.0",
+ "System.Configuration.ConfigurationManager": "6.0.1",
+ "System.Diagnostics.DiagnosticSource": "6.0.0",
+ "System.Runtime.Caching": "6.0.0",
"System.Security.Cryptography.Cng": "5.0.0",
"System.Security.Principal.Windows": "5.0.0",
- "System.Text.Encoding.CodePages": "5.0.0",
- "System.Text.Encodings.Web": "4.7.2"
+ "System.Text.Encoding.CodePages": "6.0.0",
+ "System.Text.Encodings.Web": "6.0.0"
}
},
"Microsoft.Data.SqlClient.SNI.runtime": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "y0X5MxiNdbITJYoafJ2ruaX6hqO0twpCGR/ipiDOe85JKLU8WL4TuAQfDe5qtt3bND5Je26HnrarLSAMMnVTNg=="
+ "resolved": "5.1.0",
+ "contentHash": "jVsElisM5sfBzaaV9kdq2NXZLwIbytetnsOIlJ0cQGgQP4zFNBmkfHBnpwtmKrtBJBEV9+9PVQPVrcCVhDgcIg=="
},
"Microsoft.Data.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "FTerRmQPqHrCrnoUzhBu+E+1DNGwyrAMLqHkAqOOOu5pGfyMOj8qQUBxI/gDtWtG11p49UxSfWmBzRNlwZqfUg==",
+ "resolved": "7.0.14",
+ "contentHash": "qvYae3/v9Fvqsjp/7OKQBuJK+Uc3m/WctfpIUMmGMDot2Bd8UWBKiMSlh26UtfQa9x4N+k7NxCT+AbZVoNrCdg==",
"dependencies": {
"SQLitePCLRaw.core": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "RXbRLHHWP2Z3pq8qcL5nQ6LPeoOyp8hasM5bd0Te8PiQi3RjWQR4tcbdY5XMqQ+oTO9wA8/RLhZRn/hnxlTDnQ==",
+ "resolved": "7.0.14",
+ "contentHash": "0KYkAemPygW6yzifciFlmMzkO4sI4Dw69xLgwg3ui5rXJS5XvzuAWVvfdrKJciqeCbCnVS/ZbOWpcwWgqce5bQ==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Abstractions": "7.0.5",
- "Microsoft.EntityFrameworkCore.Analyzers": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Abstractions": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Analyzers": "7.0.14",
"Microsoft.Extensions.Caching.Memory": "7.0.0",
"Microsoft.Extensions.DependencyInjection": "7.0.0",
"Microsoft.Extensions.Logging": "7.0.0"
@@ -628,49 +602,49 @@
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "iwQso+hFRsEWjhH2WsEQj1D2QE5BlEXiXEt6A3SlYTPRPdZsyTNDeDDEdtxL+H/UJPQgQYY+9SMMRcEiXBmCAA=="
+ "resolved": "7.0.14",
+ "contentHash": "aEcXDSYpDdD5wdIRKTqcS44f3W4capqQ1BWVRPJgacATfHkO62RX9Nnh0hUFg+rei9OLuJp0Y4zsy1fNeOXv5g=="
},
"Microsoft.EntityFrameworkCore.Analyzers": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "yMLM/aK1MikVqpjxd7PJ1Pjgztd3VAd26ZHxyjxG3RPeM9cHjvS5tCg9kAAayR6eHmBg0ffZsHdT28WfA5tTlA=="
+ "resolved": "7.0.14",
+ "contentHash": "esI4RF6mix4DDFBhWB9k1vJxAL8GouSf5ZV8oFJoVsIQ9d2J3MPgC1VL2qM9Vw5cH7Vg7TzRyKNpCRXFVkWs9w=="
},
"Microsoft.EntityFrameworkCore.Relational": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "u/33DC4S6g2hpMPgBc5Kdnlz//nqHR5c/ovgjtiP/wQ7sOd0EOdygVzUJAAOxCwbtAHDsJXS9Vc3jLFYq0yu8Q==",
+ "resolved": "7.0.14",
+ "contentHash": "MrVBnWOFYwfLMGQfrcIuqEM9Xvokv1vJeYxqNH3K3xOtAdHwHQTrKnpDP97tU+LBlvcnyXAtAtryYcpLXWtRNA==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "7.0.5",
+ "Microsoft.EntityFrameworkCore": "7.0.14",
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.Sqlite": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "2XPZB9OLF5/m13HgZp7/Dv0u8FWEJzcaBsMYR9Kp3R6aygkb3RnOijofPDTsmdhAqG9YTysCmh2bFaGs0TCc7A==",
+ "resolved": "7.0.14",
+ "contentHash": "8c8Hw2tmfy5YEsi9RL2/u2Qi9IwVbmj/yDlJy4iJPadeE3/AssLrgtobOBz4ftg2y5PVjFL59Gq7YzGLQH5q1A==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.14",
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "4C+9ct6A/Bq61Ta9Uh2td4/XwNpRCiPI03SWTa3hPJjA/g8wCw2hetbh3DDe5HcydzgDq/lRRjU/eRy3UODklQ==",
+ "resolved": "7.0.14",
+ "contentHash": "JNUkZVff1V/A/P3JiBbgt+Y2oCQSuzORxE3jOqFDbFjSFu7jHDEetJ/afSF/taa0lbyN9OpvaKjsbKk3Iis29Q==",
"dependencies": {
- "Microsoft.Data.Sqlite.Core": "7.0.5",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5",
+ "Microsoft.Data.Sqlite.Core": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14",
"Microsoft.Extensions.DependencyModel": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.SqlServer": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "cUJqCiamT0EvpKNgZEV5fqNv2MyVfKNgOPQfFINqHiIKHOYrS0nTCUJP97+UuG0JIIrP792/PwnuNjbekImtBg==",
+ "resolved": "7.0.14",
+ "contentHash": "d9hqEw4W/TdQ1WDm03uyFuDoehL6GNq/NMChFaC4dcV60I42vKdUC0fYTuE2QPunVUpf5XUTCkJ6fYGjMos2AA==",
"dependencies": {
- "Microsoft.Data.SqlClient": "5.0.1",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5"
+ "Microsoft.Data.SqlClient": "5.1.1",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14"
}
},
"Microsoft.Extensions.Caching.Abstractions": {
@@ -938,50 +912,52 @@
},
"Microsoft.IdentityModel.Abstractions": {
"type": "Transitive",
- "resolved": "6.22.0",
- "contentHash": "iI+9V+2ciCrbheeLjpmjcqCnhy+r6yCoEcid3nkoFWerHgjVuT6CPM4HODUTtUPe1uwks4wcnAujJ8u+IKogHQ=="
+ "resolved": "6.24.0",
+ "contentHash": "X6aBK56Ot15qKyG7X37KsPnrwah+Ka55NJWPppWVTDi8xWq7CJgeNw2XyaeHgE1o/mW4THwoabZkBbeG2TPBiw=="
},
"Microsoft.IdentityModel.JsonWebTokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "d3h1/BaMeylKTkdP6XwRCxuOoDJZ44V9xaXr6gl5QxmpnZGdoK3bySo3OQN8ehRLJHShb94ElLUvoXyglQtgAw==",
+ "resolved": "6.24.0",
+ "contentHash": "XDWrkThcxfuWp79AvAtg5f+uRS1BxkIbJnsG/e8VPzOWkYYuDg33emLjp5EWcwXYYIDsHnVZD/00kM/PYFQc/g==",
"dependencies": {
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Tokens": "6.24.0",
+ "System.Text.Encoding": "4.3.0",
+ "System.Text.Json": "4.7.2"
}
},
"Microsoft.IdentityModel.Logging": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "tuEhHIQwvBEhMf8I50hy8FHmRSUkffDFP5EdLsSDV4qRcl2wvOPkQxYqEzWkh+ytW6sbdJGEXElGhmhDfAxAKg==",
+ "resolved": "6.24.0",
+ "contentHash": "qLYWDOowM/zghmYKXw1yfYKlHOdS41i8t4hVXr9bSI90zHqhyhQh9GwVy8pENzs5wHeytU23DymluC9NtgYv7w==",
"dependencies": {
- "Microsoft.IdentityModel.Abstractions": "6.21.0"
+ "Microsoft.IdentityModel.Abstractions": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "0FqY5cTLQKtHrClzHEI+QxJl8OBT2vUiEQQB7UKk832JDiJJmetzYZ3AdSrPjN/3l3nkhByeWzXnhrX0JbifKg==",
+ "resolved": "6.24.0",
+ "contentHash": "+NzKCkvsQ8X1r/Ff74V7CFr9OsdMRaB6DsV+qpH7NNLdYJ8O4qHbmTnNEsjFcDmk/gVNDwhoL2gN5pkPVq0lwQ==",
"dependencies": {
- "Microsoft.IdentityModel.Logging": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Logging": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols.OpenIdConnect": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "vtSKL7n6EnAsLyxmiviusm6LKrblT2ndnNqN6rvVq6iIHAnPCK9E2DkDx6h1Jrpy1cvbp40r0cnTg23nhEAGTA==",
+ "resolved": "6.24.0",
+ "contentHash": "a/2RRrc8C9qaw8qdD9hv1ES9YKFgxaqr/SnwMSLbwQZJSUQDd4qx1K4EYgWaQWs73R+VXLyKSxN0f/uE9CsBiQ==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols": "6.21.0",
- "System.IdentityModel.Tokens.Jwt": "6.21.0"
+ "Microsoft.IdentityModel.Protocols": "6.24.0",
+ "System.IdentityModel.Tokens.Jwt": "6.24.0"
}
},
"Microsoft.IdentityModel.Tokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "AAEHZvZyb597a+QJSmtxH3n2P1nIJGpZ4Q89GTenknRx6T6zyfzf592yW/jA5e8EHN4tNMjjXHQaYWEq5+L05w==",
+ "resolved": "6.24.0",
+ "contentHash": "ZPqHi86UYuqJXJ7bLnlEctHKkPKT4lGUFbotoCNiXNCSL02emYlcxzGYsRGWWmbFEcYDMi2dcTLLYNzHqWOTsw==",
"dependencies": {
"Microsoft.CSharp": "4.5.0",
- "Microsoft.IdentityModel.Logging": "6.21.0",
+ "Microsoft.IdentityModel.Logging": "6.24.0",
"System.Security.Cryptography.Cng": "4.5.0"
}
},
@@ -1140,13 +1116,13 @@
},
"Newtonsoft.Json": {
"type": "Transitive",
- "resolved": "13.0.1",
- "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
+ "resolved": "13.0.3",
+ "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ=="
},
"Npgsql": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "7UVPYy2RP0ci04PED1tc9ZCaTw/DfSdSkLiGEFCAvwMwsgA/bAluj1liNzP1IpN0MFofnOF0cm1zJfmbEuCehg==",
+ "resolved": "7.0.6",
+ "contentHash": "TAqvwRnm3NJ0QvN7cvu6geJkbI0XPzGVRElVY5hF4gsgA+BnE12x6GM1TLhdeq+7ZKvvo3BD8jXKnXmr3tvdEw==",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "6.0.0",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
@@ -1154,13 +1130,13 @@
},
"Npgsql.EntityFrameworkCore.PostgreSQL": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "ZYMtyG6pmLtUsFAx0/XaIlVkJM+1gArWEKD55cLLxiVlGScAphjiGj+G7Gk16yg5lhhdWx+bgXWpIUISXuS33g==",
+ "resolved": "7.0.11",
+ "contentHash": "cHEgEz0ldXc9wVANs8sJqC+3eilqefrkasCBgaVT0tyj8tb1p3/pwy2ngjboNkDG3M0z+xJsJ4jC5p8wySAM3w==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, 8.0.0)",
- "Npgsql": "7.0.4"
+ "Microsoft.EntityFrameworkCore": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.11, 8.0.0)",
+ "Npgsql": "7.0.6"
}
},
"NSec.Cryptography": {
@@ -1483,8 +1459,8 @@
},
"Serilog.Sinks.SyslogMessages": {
"type": "Transitive",
- "resolved": "2.0.6",
- "contentHash": "V2Yq2GEbk7taEPbpBLFzLXhrHrUzKf4sQu/zLrANU8XIoUn/Mr08M2E8PrcrWVXCj0R4xLMWYe0Z1sxOrMF3IA==",
+ "resolved": "2.0.9",
+ "contentHash": "y7J+/h/Nf5EAtbpa6lC1nDhK/F9kC5oxuVYmQivv242Oh4hAVMeoAk5Gv6bgb/KbmqufGPXUFkX/AlcrvZ8Ywg==",
"dependencies": {
"Serilog": "2.5.0",
"Serilog.Sinks.PeriodicBatching": "2.3.0"
@@ -1630,8 +1606,8 @@
},
"System.Configuration.ConfigurationManager": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "7T+m0kDSlIPTHIkPMIu6m6tV6qsMqJpvQWW2jIc2qi7sn40qxFo0q+7mEQAhMPXZHMKnWrnv47ntGlM/ejvw3g==",
+ "resolved": "6.0.1",
+ "contentHash": "jXw9MlUu/kRfEU0WyTptAVueupqIeE3/rl0EZDMlf8pcvJnitQ8HeVEp69rZdaStXwTV72boi/Bhw8lOeO+U2w==",
"dependencies": {
"System.Security.Cryptography.ProtectedData": "6.0.0",
"System.Security.Permissions": "6.0.0"
@@ -1790,11 +1766,11 @@
},
"System.IdentityModel.Tokens.Jwt": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "JRD8AuypBE+2zYxT3dMJomQVsPYsCqlyZhWel3J1d5nzQokSRyTueF+Q4ID3Jcu6zSZKuzOdJ1MLTkbQsDqcvQ==",
+ "resolved": "6.24.0",
+ "contentHash": "Qibsj9MPWq8S/C0FgvmsLfIlHLE7ay0MJIaAmK94ivN3VyDdglqReed5qMvdQhSL0BzK6v0Z1wB/sD88zVu6Jw==",
"dependencies": {
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"System.IO": {
@@ -2243,10 +2219,10 @@
},
"System.Runtime.Caching": {
"type": "Transitive",
- "resolved": "5.0.0",
- "contentHash": "30D6MkO8WF9jVGWZIP0hmCN8l9BTY4LCsAzLIe4xFSXzs+AjDotR7DpSmj27pFskDURzUvqYYY0ikModgBTxWw==",
+ "resolved": "6.0.0",
+ "contentHash": "E0e03kUp5X2k+UAoVl6efmI7uU7JRBWi5EIdlQ7cr0NpBGjHG4fWII35PgsBY9T4fJQ8E4QPsL0rKksU9gcL5A==",
"dependencies": {
- "System.Configuration.ConfigurationManager": "5.0.0"
+ "System.Configuration.ConfigurationManager": "6.0.0"
}
},
"System.Runtime.CompilerServices.Unsafe": {
@@ -2776,11 +2752,10 @@
"BitPay.Light": "[1.0.1907, )",
"Braintree": "[5.19.0, )",
"DnsClient": "[1.7.0, )",
+ "Duende.IdentityServer": "[6.0.4, )",
"Fido2.AspNet": "[3.0.1, )",
- "Handlebars.Net": "[2.1.2, )",
- "IdentityServer4": "[4.1.2, )",
- "IdentityServer4.AccessTokenValidation": "[3.0.1, )",
- "LaunchDarkly.ServerSdk": "[7.0.0, )",
+ "Handlebars.Net": "[2.1.4, )",
+ "LaunchDarkly.ServerSdk": "[8.0.0, )",
"MailKit": "[4.2.0, )",
"Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )",
"Microsoft.Azure.Cosmos.Table": "[1.0.8, )",
@@ -2790,7 +2765,7 @@
"Microsoft.Extensions.Configuration.EnvironmentVariables": "[6.0.1, )",
"Microsoft.Extensions.Configuration.UserSecrets": "[6.0.1, )",
"Microsoft.Extensions.Identity.Stores": "[6.0.4, )",
- "Newtonsoft.Json": "[13.0.1, )",
+ "Newtonsoft.Json": "[13.0.3, )",
"Otp.NET": "[1.2.2, )",
"Quartz": "[3.4.0, )",
"SendGrid": "[9.27.0, )",
@@ -2799,7 +2774,7 @@
"Serilog.Extensions.Logging": "[3.1.0, )",
"Serilog.Extensions.Logging.File": "[2.0.0, )",
"Serilog.Sinks.AzureCosmosDB": "[2.0.0, )",
- "Serilog.Sinks.SyslogMessages": "[2.0.6, )",
+ "Serilog.Sinks.SyslogMessages": "[2.0.9, )",
"Stripe.net": "[40.0.0, )",
"YubicoDotNetClient": "[1.2.0, )"
}
@@ -2807,29 +2782,29 @@
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "Dapper": "[2.0.123, )"
+ "Core": "[2023.12.0, )",
+ "Dapper": "[2.1.24, )"
}
},
"infrastructure.entityframework": {
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )",
- "Core": "[2023.10.2, )",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )",
- "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )",
- "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )",
- "Npgsql.EntityFrameworkCore.PostgreSQL": "[7.0.4, )",
+ "Core": "[2023.12.0, )",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.14, )",
+ "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.14, )",
+ "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.14, )",
+ "Npgsql.EntityFrameworkCore.PostgreSQL": "[7.0.11, )",
"Pomelo.EntityFrameworkCore.MySql": "[7.0.0, )",
- "linq2db.EntityFrameworkCore": "[7.5.0, )"
+ "linq2db.EntityFrameworkCore": "[7.6.0, )"
}
},
"sharedweb": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "Infrastructure.Dapper": "[2023.10.2, )",
- "Infrastructure.EntityFramework": "[2023.10.2, )"
+ "Core": "[2023.12.0, )",
+ "Infrastructure.Dapper": "[2023.12.0, )",
+ "Infrastructure.EntityFramework": "[2023.12.0, )"
}
}
}
diff --git a/bitwarden_license/test/Commercial.Core.Test/AdminConsole/Services/ProviderServiceTests.cs b/bitwarden_license/test/Commercial.Core.Test/AdminConsole/Services/ProviderServiceTests.cs
index 01538003c6..b7ee76da1a 100644
--- a/bitwarden_license/test/Commercial.Core.Test/AdminConsole/Services/ProviderServiceTests.cs
+++ b/bitwarden_license/test/Commercial.Core.Test/AdminConsole/Services/ProviderServiceTests.cs
@@ -1,5 +1,6 @@
using Bit.Commercial.Core.AdminConsole.Services;
using Bit.Commercial.Core.Test.AdminConsole.AutoFixture;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.AdminConsole.Models.Business.Provider;
diff --git a/bitwarden_license/test/Commercial.Core.Test/SecretsManager/Queries/Projects/MaxProjectsQueryTests.cs b/bitwarden_license/test/Commercial.Core.Test/SecretsManager/Queries/Projects/MaxProjectsQueryTests.cs
index 030e31d249..e1fa7bf9fc 100644
--- a/bitwarden_license/test/Commercial.Core.Test/SecretsManager/Queries/Projects/MaxProjectsQueryTests.cs
+++ b/bitwarden_license/test/Commercial.Core.Test/SecretsManager/Queries/Projects/MaxProjectsQueryTests.cs
@@ -1,5 +1,5 @@
using Bit.Commercial.Core.SecretsManager.Queries.Projects;
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.Enums;
using Bit.Core.Exceptions;
using Bit.Core.Repositories;
diff --git a/bitwarden_license/test/Commercial.Core.Test/SecretsManager/Queries/ServiceAccounts/CountNewServiceAccountSlotsRequiredQueryTests.cs b/bitwarden_license/test/Commercial.Core.Test/SecretsManager/Queries/ServiceAccounts/CountNewServiceAccountSlotsRequiredQueryTests.cs
index 21c91920a9..659e72729a 100644
--- a/bitwarden_license/test/Commercial.Core.Test/SecretsManager/Queries/ServiceAccounts/CountNewServiceAccountSlotsRequiredQueryTests.cs
+++ b/bitwarden_license/test/Commercial.Core.Test/SecretsManager/Queries/ServiceAccounts/CountNewServiceAccountSlotsRequiredQueryTests.cs
@@ -1,5 +1,5 @@
using Bit.Commercial.Core.SecretsManager.Queries.ServiceAccounts;
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.Exceptions;
using Bit.Core.Repositories;
using Bit.Core.SecretsManager.Repositories;
diff --git a/bitwarden_license/test/Commercial.Core.Test/packages.lock.json b/bitwarden_license/test/Commercial.Core.Test/packages.lock.json
index edb3bb4458..6b57371b51 100644
--- a/bitwarden_license/test/Commercial.Core.Test/packages.lock.json
+++ b/bitwarden_license/test/Commercial.Core.Test/packages.lock.json
@@ -239,6 +239,24 @@
"Microsoft.Win32.Registry": "5.0.0"
}
},
+ "Duende.IdentityServer": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "4HVjzx1F8v5J+U7oa8RGAQGj2QzmzNSu87r18Sh+dlh10uyZZL8teAaT/FaVLDObnfItGdPFvN8mwpF/HkI3Xw==",
+ "dependencies": {
+ "Duende.IdentityServer.Storage": "6.0.4",
+ "Microsoft.AspNetCore.Authentication.OpenIdConnect": "6.0.0"
+ }
+ },
+ "Duende.IdentityServer.Storage": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "s5gAjfbpr2IMgI+fU2Nx+2AZdzstmbt9gpo13iX7GwvqSeSaBVqj9ZskAN0R2KF1OemPdZuGnfaTcevdXMUrrw==",
+ "dependencies": {
+ "IdentityModel": "6.0.0",
+ "Microsoft.AspNetCore.DataProtection.Abstractions": "6.0.0"
+ }
+ },
"Fare": {
"type": "Transitive",
"resolved": "2.1.1",
@@ -275,57 +293,16 @@
},
"Handlebars.Net": {
"type": "Transitive",
- "resolved": "2.1.2",
- "contentHash": "p60QyeBYpZmcZdIXRMqs9XySIBaxJ0lj3+QD0EJVr4ybTigOTCumXMMin5dPwjo9At1UwkDZ3gGwa1lmGjG6DA==",
+ "resolved": "2.1.4",
+ "contentHash": "Od7MWDfGxYKRtxETFMlcvCrY8hAqyuXZDX4EsOfiI/jzh+PVBuVxazHBC1HmVqTKX1JnRtoxIMcH95K9UFlYog==",
"dependencies": {
"Microsoft.CSharp": "4.7.0"
}
},
"IdentityModel": {
"type": "Transitive",
- "resolved": "4.4.0",
- "contentHash": "b18wrIx5wnZlMxAX7oVsE+nDtAJ4hajYlH0xPlaRvo4r/fz08K6pPeZvbiqS9nfNbzfIgLFmNX+FL9qR9ZR5PA==",
- "dependencies": {
- "Newtonsoft.Json": "11.0.2",
- "System.Text.Encodings.Web": "4.7.0"
- }
- },
- "IdentityModel.AspNetCore.OAuth2Introspection": {
- "type": "Transitive",
- "resolved": "4.0.1",
- "contentHash": "ZNdMZMaj9fqR3j50vYsu+1U3QGd6n8+fqwf+a8mCTcmXGor+HgFDfdq0mM34bsmD6uEgAQup7sv2ZW5kR36dbA==",
- "dependencies": {
- "IdentityModel": "4.0.0"
- }
- },
- "IdentityServer4": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "blaxxGuOA7v/w1q+fxn97wZ+x2ecG1ZD4mc/N/ZOXMNeFZZhqv+4LF26Gecyik3nWrJPmbMEtQbLmRsKG8k61w==",
- "dependencies": {
- "IdentityModel": "4.4.0",
- "IdentityServer4.Storage": "4.1.2",
- "Microsoft.AspNetCore.Authentication.OpenIdConnect": "3.1.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.6.0",
- "Newtonsoft.Json": "12.0.2"
- }
- },
- "IdentityServer4.AccessTokenValidation": {
- "type": "Transitive",
- "resolved": "3.0.1",
- "contentHash": "qu/M6UyN4o9NVep7q545Ms7hYAnsQqSdLbN1Fjjrn4m35lyBfeQPSSNzDryAKHbodyWOQfHaOqKEyMEJQ5Rpgw==",
- "dependencies": {
- "IdentityModel.AspNetCore.OAuth2Introspection": "4.0.1",
- "Microsoft.AspNetCore.Authentication.JwtBearer": "3.0.0"
- }
- },
- "IdentityServer4.Storage": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "KoSffyZyyeCNTIyJiZnCuPakJ1QbCHlpty6gbWUj/7yl+w0PXIchgmmJnJSvddzBb8iZ2xew/vGlxWUIP17P2g==",
- "dependencies": {
- "IdentityModel": "4.4.0"
- }
+ "resolved": "6.0.0",
+ "contentHash": "eVHCR7a6m/dm5RFcBzE3qs/Jg5j9R5Rjpu8aTOv9e4AFvaQtBXb5ah7kmwU+YwA0ufRwz4wf1hnIvsD2hSnI4g=="
},
"Kralizek.AutoFixture.Extensions.MockHttp": {
"type": "Transitive",
@@ -343,26 +320,27 @@
},
"LaunchDarkly.CommonSdk": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "YYYq+41gZRMQ8dIoMC6HOq/dI+4RY3HsexLLAaE9T1+1tVMeQkbCqak7sVeKX4QcE7xlXx23lWgipYUkRoRUyw==",
+ "resolved": "6.2.0",
+ "contentHash": "eLeb+tTNLwOxlUIsZWzJlcPmG9Wyf20NYyucP6MW6aqKW6doKFeSO+aJe0z+WyijbvfX1Dp1U1HQatOu6fa1Gg==",
"dependencies": {
+ "LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
},
"LaunchDarkly.EventSource": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "DN44Ry5M4lyrjiF7LEu0Ijco7Wm8R7mJopN+giYsYjkQlszsXdFvm3POoehIDAOtL1HHl5bZvF9k9xK034u3IA==",
+ "resolved": "5.1.0",
+ "contentHash": "PztDWiMvPWODx+kfBnCroZ8Lpya4nPc7ZO4TZysOogODbVXDDPDYrdcgVivCMgf4davhGrp61ekvZc+Uy1NYMA==",
"dependencies": {
- "LaunchDarkly.Logging": "[1.0.1, 3.0.0)"
+ "LaunchDarkly.Logging": "[2.0.0, 3.0.0)"
}
},
"LaunchDarkly.InternalSdk": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "jW8VEfFciuCcJUEuvSzmrbMVYYXwGL/ZWHUZLiA4aDOQ1LcEXp32uK405NQW/izEypUfWB+9TaSjPpFIC+5Wzw==",
+ "resolved": "3.3.0",
+ "contentHash": "TBvs/B6iyXp9MqRKjIoBZ/T0+/xgp5xg+MuHqr5U+N5+7DghtI2FnsmgeBedTIeQdA3Tk8Z4Bj4hlqU9FBiEnw==",
"dependencies": {
- "LaunchDarkly.CommonSdk": "6.0.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
"LaunchDarkly.Logging": "[2.0.0, 3.0.0)",
"System.Collections.Immutable": "1.7.1"
}
@@ -377,13 +355,13 @@
},
"LaunchDarkly.ServerSdk": {
"type": "Transitive",
- "resolved": "7.0.0",
- "contentHash": "gkTWb+f5QlsXIqFAciBef3qKZU2y0Hy3Fpt4pvZoxNcnBKg2PNTDSnbpbYEKPeQ1yk1avNaI/tKprnahfrmJFg==",
+ "resolved": "8.0.0",
+ "contentHash": "vosFEXYJABuIDIA0+6sncalTmrKXEkBKeqzuP9/vvcCVlFSXUl/ZnrkrAVg3ViDWDi7kjpJSk2W3h5D0TUfCGA==",
"dependencies": {
"LaunchDarkly.Cache": "1.0.2",
- "LaunchDarkly.CommonSdk": "6.0.0",
- "LaunchDarkly.EventSource": "5.0.1",
- "LaunchDarkly.InternalSdk": "3.1.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
+ "LaunchDarkly.EventSource": "5.1.0",
+ "LaunchDarkly.InternalSdk": "3.3.0",
"LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
@@ -411,10 +389,10 @@
},
"Microsoft.AspNetCore.Authentication.OpenIdConnect": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "O1cAQYUTU8EfRqwc5/rfTns4E4hKlFlg59fuKRrST+PzsxI6H07KqRN/JjdYhAuVYxF8jPnIGbj+zuc5paOWUw==",
+ "resolved": "6.0.0",
+ "contentHash": "cJxdro36spFzk/K2OFCddM6vZ+yoj6ug8mTFRH3Gdv1Pul/buSuCtfb/FSCp31UmS5S4C1315dU7wX3ErLFuDg==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.5.0"
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.10.0"
}
},
"Microsoft.AspNetCore.Cryptography.Internal": {
@@ -447,8 +425,8 @@
},
"Microsoft.AspNetCore.DataProtection.Abstractions": {
"type": "Transitive",
- "resolved": "3.1.32",
- "contentHash": "MPL4iVyiaRxnOUY5VATHjvhDWaAEFb77KFiUxVRklv3Z3v+STofUr1UG/aCt1O9cgN7FVTDaC5A7U+zsLub8Xg=="
+ "resolved": "6.0.0",
+ "contentHash": "Z/UU4NEBm5UgNufJmw+j5baW26ytCOIZ0G7sZocPaOzsUeBon1bkM3lSMNZQG2GmDjAIVP2XMSODf2jzSGbibw=="
},
"Microsoft.Azure.Amqp": {
"type": "Transitive",
@@ -1002,8 +980,8 @@
},
"Newtonsoft.Json": {
"type": "Transitive",
- "resolved": "13.0.1",
- "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
+ "resolved": "13.0.3",
+ "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ=="
},
"NSec.Cryptography": {
"type": "Transitive",
@@ -1334,8 +1312,8 @@
},
"Serilog.Sinks.SyslogMessages": {
"type": "Transitive",
- "resolved": "2.0.6",
- "contentHash": "V2Yq2GEbk7taEPbpBLFzLXhrHrUzKf4sQu/zLrANU8XIoUn/Mr08M2E8PrcrWVXCj0R4xLMWYe0Z1sxOrMF3IA==",
+ "resolved": "2.0.9",
+ "contentHash": "y7J+/h/Nf5EAtbpa6lC1nDhK/F9kC5oxuVYmQivv242Oh4hAVMeoAk5Gv6bgb/KbmqufGPXUFkX/AlcrvZ8Ywg==",
"dependencies": {
"Serilog": "2.5.0",
"Serilog.Sinks.PeriodicBatching": "2.3.0"
@@ -2679,7 +2657,7 @@
"commercial.core": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )"
+ "Core": "[2023.12.0, )"
}
},
"common": {
@@ -2687,7 +2665,7 @@
"dependencies": {
"AutoFixture.AutoNSubstitute": "[4.17.0, )",
"AutoFixture.Xunit2": "[4.17.0, )",
- "Core": "[2023.10.2, )",
+ "Core": "[2023.12.0, )",
"Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )",
"Microsoft.NET.Test.Sdk": "[17.1.0, )",
"NSubstitute": "[4.3.0, )",
@@ -2709,11 +2687,10 @@
"BitPay.Light": "[1.0.1907, )",
"Braintree": "[5.19.0, )",
"DnsClient": "[1.7.0, )",
+ "Duende.IdentityServer": "[6.0.4, )",
"Fido2.AspNet": "[3.0.1, )",
- "Handlebars.Net": "[2.1.2, )",
- "IdentityServer4": "[4.1.2, )",
- "IdentityServer4.AccessTokenValidation": "[3.0.1, )",
- "LaunchDarkly.ServerSdk": "[7.0.0, )",
+ "Handlebars.Net": "[2.1.4, )",
+ "LaunchDarkly.ServerSdk": "[8.0.0, )",
"MailKit": "[4.2.0, )",
"Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )",
"Microsoft.Azure.Cosmos.Table": "[1.0.8, )",
@@ -2723,7 +2700,7 @@
"Microsoft.Extensions.Configuration.EnvironmentVariables": "[6.0.1, )",
"Microsoft.Extensions.Configuration.UserSecrets": "[6.0.1, )",
"Microsoft.Extensions.Identity.Stores": "[6.0.4, )",
- "Newtonsoft.Json": "[13.0.1, )",
+ "Newtonsoft.Json": "[13.0.3, )",
"Otp.NET": "[1.2.2, )",
"Quartz": "[3.4.0, )",
"SendGrid": "[9.27.0, )",
@@ -2732,7 +2709,7 @@
"Serilog.Extensions.Logging": "[3.1.0, )",
"Serilog.Extensions.Logging.File": "[2.0.0, )",
"Serilog.Sinks.AzureCosmosDB": "[2.0.0, )",
- "Serilog.Sinks.SyslogMessages": "[2.0.6, )",
+ "Serilog.Sinks.SyslogMessages": "[2.0.9, )",
"Stripe.net": "[40.0.0, )",
"YubicoDotNetClient": "[1.2.0, )"
}
@@ -2742,8 +2719,8 @@
"dependencies": {
"AutoFixture.AutoNSubstitute": "[4.17.0, )",
"AutoFixture.Xunit2": "[4.17.0, )",
- "Common": "[2023.10.2, )",
- "Core": "[2023.10.2, )",
+ "Common": "[2023.12.0, )",
+ "Core": "[2023.12.0, )",
"Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )",
"Microsoft.NET.Test.Sdk": "[17.1.0, )",
"NSubstitute": "[4.3.0, )",
diff --git a/bitwarden_license/test/Scim.IntegrationTest/Factories/ScimApplicationFactory.cs b/bitwarden_license/test/Scim.IntegrationTest/Factories/ScimApplicationFactory.cs
index d88dc728d5..6ebd59283d 100644
--- a/bitwarden_license/test/Scim.IntegrationTest/Factories/ScimApplicationFactory.cs
+++ b/bitwarden_license/test/Scim.IntegrationTest/Factories/ScimApplicationFactory.cs
@@ -4,6 +4,7 @@ using System.Text;
using System.Text.Encodings.Web;
using System.Text.Json;
using Bit.Core.Services;
+using Bit.Infrastructure.EntityFramework.AdminConsole.Models;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.IntegrationTestCommon.Factories;
using Bit.Scim.Models;
@@ -196,11 +197,11 @@ public class ScimApplicationFactory : WebApplicationFactoryBase
};
}
- private List GetSeedingOrganizations()
+ private List GetSeedingOrganizations()
{
- return new List()
+ return new List()
{
- new Infrastructure.EntityFramework.Models.Organization { Id = TestOrganizationId1, Name = "Test Organization 1", UseGroups = true }
+ new Organization { Id = TestOrganizationId1, Name = "Test Organization 1", UseGroups = true }
};
}
diff --git a/bitwarden_license/test/Scim.IntegrationTest/packages.lock.json b/bitwarden_license/test/Scim.IntegrationTest/packages.lock.json
index b4a22213eb..db75e19f85 100644
--- a/bitwarden_license/test/Scim.IntegrationTest/packages.lock.json
+++ b/bitwarden_license/test/Scim.IntegrationTest/packages.lock.json
@@ -271,8 +271,8 @@
},
"Dapper": {
"type": "Transitive",
- "resolved": "2.0.123",
- "contentHash": "RDFF4rBLLmbpi6pwkY7q/M6UXHRJEOerplDGE5jwEkP/JGJnBauAClYavNKJPW1yOTWRPIyfj4is3EaJxQXILQ=="
+ "resolved": "2.1.24",
+ "contentHash": "/2t2vsdJyZRsk13AsWigZpsuFvEwK+o3v862cEULXoww905gyKhJFSuwmZI/4Ui9COX9ZCFCI09UHyH4wVYl3A=="
},
"DnsClient": {
"type": "Transitive",
@@ -282,6 +282,24 @@
"Microsoft.Win32.Registry": "5.0.0"
}
},
+ "Duende.IdentityServer": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "4HVjzx1F8v5J+U7oa8RGAQGj2QzmzNSu87r18Sh+dlh10uyZZL8teAaT/FaVLDObnfItGdPFvN8mwpF/HkI3Xw==",
+ "dependencies": {
+ "Duende.IdentityServer.Storage": "6.0.4",
+ "Microsoft.AspNetCore.Authentication.OpenIdConnect": "6.0.0"
+ }
+ },
+ "Duende.IdentityServer.Storage": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "s5gAjfbpr2IMgI+fU2Nx+2AZdzstmbt9gpo13iX7GwvqSeSaBVqj9ZskAN0R2KF1OemPdZuGnfaTcevdXMUrrw==",
+ "dependencies": {
+ "IdentityModel": "6.0.0",
+ "Microsoft.AspNetCore.DataProtection.Abstractions": "6.0.0"
+ }
+ },
"Fare": {
"type": "Transitive",
"resolved": "2.1.1",
@@ -318,57 +336,16 @@
},
"Handlebars.Net": {
"type": "Transitive",
- "resolved": "2.1.2",
- "contentHash": "p60QyeBYpZmcZdIXRMqs9XySIBaxJ0lj3+QD0EJVr4ybTigOTCumXMMin5dPwjo9At1UwkDZ3gGwa1lmGjG6DA==",
+ "resolved": "2.1.4",
+ "contentHash": "Od7MWDfGxYKRtxETFMlcvCrY8hAqyuXZDX4EsOfiI/jzh+PVBuVxazHBC1HmVqTKX1JnRtoxIMcH95K9UFlYog==",
"dependencies": {
"Microsoft.CSharp": "4.7.0"
}
},
"IdentityModel": {
"type": "Transitive",
- "resolved": "4.4.0",
- "contentHash": "b18wrIx5wnZlMxAX7oVsE+nDtAJ4hajYlH0xPlaRvo4r/fz08K6pPeZvbiqS9nfNbzfIgLFmNX+FL9qR9ZR5PA==",
- "dependencies": {
- "Newtonsoft.Json": "11.0.2",
- "System.Text.Encodings.Web": "4.7.0"
- }
- },
- "IdentityModel.AspNetCore.OAuth2Introspection": {
- "type": "Transitive",
- "resolved": "4.0.1",
- "contentHash": "ZNdMZMaj9fqR3j50vYsu+1U3QGd6n8+fqwf+a8mCTcmXGor+HgFDfdq0mM34bsmD6uEgAQup7sv2ZW5kR36dbA==",
- "dependencies": {
- "IdentityModel": "4.0.0"
- }
- },
- "IdentityServer4": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "blaxxGuOA7v/w1q+fxn97wZ+x2ecG1ZD4mc/N/ZOXMNeFZZhqv+4LF26Gecyik3nWrJPmbMEtQbLmRsKG8k61w==",
- "dependencies": {
- "IdentityModel": "4.4.0",
- "IdentityServer4.Storage": "4.1.2",
- "Microsoft.AspNetCore.Authentication.OpenIdConnect": "3.1.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.6.0",
- "Newtonsoft.Json": "12.0.2"
- }
- },
- "IdentityServer4.AccessTokenValidation": {
- "type": "Transitive",
- "resolved": "3.0.1",
- "contentHash": "qu/M6UyN4o9NVep7q545Ms7hYAnsQqSdLbN1Fjjrn4m35lyBfeQPSSNzDryAKHbodyWOQfHaOqKEyMEJQ5Rpgw==",
- "dependencies": {
- "IdentityModel.AspNetCore.OAuth2Introspection": "4.0.1",
- "Microsoft.AspNetCore.Authentication.JwtBearer": "3.0.0"
- }
- },
- "IdentityServer4.Storage": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "KoSffyZyyeCNTIyJiZnCuPakJ1QbCHlpty6gbWUj/7yl+w0PXIchgmmJnJSvddzBb8iZ2xew/vGlxWUIP17P2g==",
- "dependencies": {
- "IdentityModel": "4.4.0"
- }
+ "resolved": "6.0.0",
+ "contentHash": "eVHCR7a6m/dm5RFcBzE3qs/Jg5j9R5Rjpu8aTOv9e4AFvaQtBXb5ah7kmwU+YwA0ufRwz4wf1hnIvsD2hSnI4g=="
},
"Kralizek.AutoFixture.Extensions.MockHttp": {
"type": "Transitive",
@@ -386,26 +363,27 @@
},
"LaunchDarkly.CommonSdk": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "YYYq+41gZRMQ8dIoMC6HOq/dI+4RY3HsexLLAaE9T1+1tVMeQkbCqak7sVeKX4QcE7xlXx23lWgipYUkRoRUyw==",
+ "resolved": "6.2.0",
+ "contentHash": "eLeb+tTNLwOxlUIsZWzJlcPmG9Wyf20NYyucP6MW6aqKW6doKFeSO+aJe0z+WyijbvfX1Dp1U1HQatOu6fa1Gg==",
"dependencies": {
+ "LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
},
"LaunchDarkly.EventSource": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "DN44Ry5M4lyrjiF7LEu0Ijco7Wm8R7mJopN+giYsYjkQlszsXdFvm3POoehIDAOtL1HHl5bZvF9k9xK034u3IA==",
+ "resolved": "5.1.0",
+ "contentHash": "PztDWiMvPWODx+kfBnCroZ8Lpya4nPc7ZO4TZysOogODbVXDDPDYrdcgVivCMgf4davhGrp61ekvZc+Uy1NYMA==",
"dependencies": {
- "LaunchDarkly.Logging": "[1.0.1, 3.0.0)"
+ "LaunchDarkly.Logging": "[2.0.0, 3.0.0)"
}
},
"LaunchDarkly.InternalSdk": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "jW8VEfFciuCcJUEuvSzmrbMVYYXwGL/ZWHUZLiA4aDOQ1LcEXp32uK405NQW/izEypUfWB+9TaSjPpFIC+5Wzw==",
+ "resolved": "3.3.0",
+ "contentHash": "TBvs/B6iyXp9MqRKjIoBZ/T0+/xgp5xg+MuHqr5U+N5+7DghtI2FnsmgeBedTIeQdA3Tk8Z4Bj4hlqU9FBiEnw==",
"dependencies": {
- "LaunchDarkly.CommonSdk": "6.0.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
"LaunchDarkly.Logging": "[2.0.0, 3.0.0)",
"System.Collections.Immutable": "1.7.1"
}
@@ -420,13 +398,13 @@
},
"LaunchDarkly.ServerSdk": {
"type": "Transitive",
- "resolved": "7.0.0",
- "contentHash": "gkTWb+f5QlsXIqFAciBef3qKZU2y0Hy3Fpt4pvZoxNcnBKg2PNTDSnbpbYEKPeQ1yk1avNaI/tKprnahfrmJFg==",
+ "resolved": "8.0.0",
+ "contentHash": "vosFEXYJABuIDIA0+6sncalTmrKXEkBKeqzuP9/vvcCVlFSXUl/ZnrkrAVg3ViDWDi7kjpJSk2W3h5D0TUfCGA==",
"dependencies": {
"LaunchDarkly.Cache": "1.0.2",
- "LaunchDarkly.CommonSdk": "6.0.0",
- "LaunchDarkly.EventSource": "5.0.1",
- "LaunchDarkly.InternalSdk": "3.1.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
+ "LaunchDarkly.EventSource": "5.1.0",
+ "LaunchDarkly.InternalSdk": "3.3.0",
"LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
@@ -438,16 +416,16 @@
},
"linq2db": {
"type": "Transitive",
- "resolved": "5.2.1",
- "contentHash": "OOBM8s39zhbZAgqFnl2KGxT5RqBDw21X69U528qV2PgQispaA3f+or0ILrLEgnNIJuB4EBgaw8gC6ttSHn4X0Q=="
+ "resolved": "5.3.1",
+ "contentHash": "707mIbEmtptvKeUW940UwoNwq05I7OUu0VWtclLtyYaASp+ugX4I/Er1UVpeldsDawqlVMXB5EQ5/Oar6AkUGQ=="
},
"linq2db.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.5.0",
- "contentHash": "ePHzO99xbObgMLlAFh08of1SnVhg6j4Su9327DrIB7RZWCgtQIX6k+nbl+HRVOooAndZSs7b+DduSgdnJjaJGw==",
+ "resolved": "7.6.0",
+ "contentHash": "T1W9o8wVzApsUwu7SRg/L7487kaiLQYt2AqRVnXVGfobD+ZKy2oRsUMws0PICtciaz4qbfLp/r/+NksfuYsFlw==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Relational": "7.0.0",
- "linq2db": "5.2.1"
+ "linq2db": "5.3.1"
}
},
"MailKit": {
@@ -468,10 +446,10 @@
},
"Microsoft.AspNetCore.Authentication.OpenIdConnect": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "O1cAQYUTU8EfRqwc5/rfTns4E4hKlFlg59fuKRrST+PzsxI6H07KqRN/JjdYhAuVYxF8jPnIGbj+zuc5paOWUw==",
+ "resolved": "6.0.0",
+ "contentHash": "cJxdro36spFzk/K2OFCddM6vZ+yoj6ug8mTFRH3Gdv1Pul/buSuCtfb/FSCp31UmS5S4C1315dU7wX3ErLFuDg==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.5.0"
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.10.0"
}
},
"Microsoft.AspNetCore.Cryptography.Internal": {
@@ -504,8 +482,8 @@
},
"Microsoft.AspNetCore.DataProtection.Abstractions": {
"type": "Transitive",
- "resolved": "3.1.32",
- "contentHash": "MPL4iVyiaRxnOUY5VATHjvhDWaAEFb77KFiUxVRklv3Z3v+STofUr1UG/aCt1O9cgN7FVTDaC5A7U+zsLub8Xg=="
+ "resolved": "6.0.0",
+ "contentHash": "Z/UU4NEBm5UgNufJmw+j5baW26ytCOIZ0G7sZocPaOzsUeBon1bkM3lSMNZQG2GmDjAIVP2XMSODf2jzSGbibw=="
},
"Microsoft.AspNetCore.TestHost": {
"type": "Transitive",
@@ -603,48 +581,44 @@
},
"Microsoft.Data.SqlClient": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "uu8dfrsx081cSbEevWuZAvqdmANDGJkbLBL2G3j0LAZxX1Oy8RCVAaC4Lcuak6jNicWP6CWvHqBTIEmQNSxQlw==",
+ "resolved": "5.1.1",
+ "contentHash": "MW5E9HFvCaV069o8b6YpuRDPBux8s96qDnOJ+4N9QNUCs7c5W3KxwQ+ftpAjbMUlImL+c9WR+l+f5hzjkqhu2g==",
"dependencies": {
- "Azure.Identity": "1.6.0",
- "Microsoft.Data.SqlClient.SNI.runtime": "5.0.1",
- "Microsoft.Identity.Client": "4.45.0",
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.21.0",
+ "Azure.Identity": "1.7.0",
+ "Microsoft.Data.SqlClient.SNI.runtime": "5.1.0",
+ "Microsoft.Identity.Client": "4.47.2",
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.24.0",
"Microsoft.SqlServer.Server": "1.0.0",
- "Microsoft.Win32.Registry": "5.0.0",
- "System.Buffers": "4.5.1",
- "System.Configuration.ConfigurationManager": "5.0.0",
- "System.Diagnostics.DiagnosticSource": "5.0.0",
- "System.IO": "4.3.0",
- "System.Resources.ResourceManager": "4.3.0",
- "System.Runtime.Caching": "5.0.0",
+ "System.Configuration.ConfigurationManager": "6.0.1",
+ "System.Diagnostics.DiagnosticSource": "6.0.0",
+ "System.Runtime.Caching": "6.0.0",
"System.Security.Cryptography.Cng": "5.0.0",
"System.Security.Principal.Windows": "5.0.0",
- "System.Text.Encoding.CodePages": "5.0.0",
- "System.Text.Encodings.Web": "4.7.2"
+ "System.Text.Encoding.CodePages": "6.0.0",
+ "System.Text.Encodings.Web": "6.0.0"
}
},
"Microsoft.Data.SqlClient.SNI.runtime": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "y0X5MxiNdbITJYoafJ2ruaX6hqO0twpCGR/ipiDOe85JKLU8WL4TuAQfDe5qtt3bND5Je26HnrarLSAMMnVTNg=="
+ "resolved": "5.1.0",
+ "contentHash": "jVsElisM5sfBzaaV9kdq2NXZLwIbytetnsOIlJ0cQGgQP4zFNBmkfHBnpwtmKrtBJBEV9+9PVQPVrcCVhDgcIg=="
},
"Microsoft.Data.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "FTerRmQPqHrCrnoUzhBu+E+1DNGwyrAMLqHkAqOOOu5pGfyMOj8qQUBxI/gDtWtG11p49UxSfWmBzRNlwZqfUg==",
+ "resolved": "7.0.14",
+ "contentHash": "qvYae3/v9Fvqsjp/7OKQBuJK+Uc3m/WctfpIUMmGMDot2Bd8UWBKiMSlh26UtfQa9x4N+k7NxCT+AbZVoNrCdg==",
"dependencies": {
"SQLitePCLRaw.core": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "RXbRLHHWP2Z3pq8qcL5nQ6LPeoOyp8hasM5bd0Te8PiQi3RjWQR4tcbdY5XMqQ+oTO9wA8/RLhZRn/hnxlTDnQ==",
+ "resolved": "7.0.14",
+ "contentHash": "0KYkAemPygW6yzifciFlmMzkO4sI4Dw69xLgwg3ui5rXJS5XvzuAWVvfdrKJciqeCbCnVS/ZbOWpcwWgqce5bQ==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Abstractions": "7.0.5",
- "Microsoft.EntityFrameworkCore.Analyzers": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Abstractions": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Analyzers": "7.0.14",
"Microsoft.Extensions.Caching.Memory": "7.0.0",
"Microsoft.Extensions.DependencyInjection": "7.0.0",
"Microsoft.Extensions.Logging": "7.0.0"
@@ -652,49 +626,49 @@
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "iwQso+hFRsEWjhH2WsEQj1D2QE5BlEXiXEt6A3SlYTPRPdZsyTNDeDDEdtxL+H/UJPQgQYY+9SMMRcEiXBmCAA=="
+ "resolved": "7.0.14",
+ "contentHash": "aEcXDSYpDdD5wdIRKTqcS44f3W4capqQ1BWVRPJgacATfHkO62RX9Nnh0hUFg+rei9OLuJp0Y4zsy1fNeOXv5g=="
},
"Microsoft.EntityFrameworkCore.Analyzers": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "yMLM/aK1MikVqpjxd7PJ1Pjgztd3VAd26ZHxyjxG3RPeM9cHjvS5tCg9kAAayR6eHmBg0ffZsHdT28WfA5tTlA=="
+ "resolved": "7.0.14",
+ "contentHash": "esI4RF6mix4DDFBhWB9k1vJxAL8GouSf5ZV8oFJoVsIQ9d2J3MPgC1VL2qM9Vw5cH7Vg7TzRyKNpCRXFVkWs9w=="
},
"Microsoft.EntityFrameworkCore.Relational": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "u/33DC4S6g2hpMPgBc5Kdnlz//nqHR5c/ovgjtiP/wQ7sOd0EOdygVzUJAAOxCwbtAHDsJXS9Vc3jLFYq0yu8Q==",
+ "resolved": "7.0.14",
+ "contentHash": "MrVBnWOFYwfLMGQfrcIuqEM9Xvokv1vJeYxqNH3K3xOtAdHwHQTrKnpDP97tU+LBlvcnyXAtAtryYcpLXWtRNA==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "7.0.5",
+ "Microsoft.EntityFrameworkCore": "7.0.14",
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.Sqlite": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "2XPZB9OLF5/m13HgZp7/Dv0u8FWEJzcaBsMYR9Kp3R6aygkb3RnOijofPDTsmdhAqG9YTysCmh2bFaGs0TCc7A==",
+ "resolved": "7.0.14",
+ "contentHash": "8c8Hw2tmfy5YEsi9RL2/u2Qi9IwVbmj/yDlJy4iJPadeE3/AssLrgtobOBz4ftg2y5PVjFL59Gq7YzGLQH5q1A==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.14",
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "4C+9ct6A/Bq61Ta9Uh2td4/XwNpRCiPI03SWTa3hPJjA/g8wCw2hetbh3DDe5HcydzgDq/lRRjU/eRy3UODklQ==",
+ "resolved": "7.0.14",
+ "contentHash": "JNUkZVff1V/A/P3JiBbgt+Y2oCQSuzORxE3jOqFDbFjSFu7jHDEetJ/afSF/taa0lbyN9OpvaKjsbKk3Iis29Q==",
"dependencies": {
- "Microsoft.Data.Sqlite.Core": "7.0.5",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5",
+ "Microsoft.Data.Sqlite.Core": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14",
"Microsoft.Extensions.DependencyModel": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.SqlServer": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "cUJqCiamT0EvpKNgZEV5fqNv2MyVfKNgOPQfFINqHiIKHOYrS0nTCUJP97+UuG0JIIrP792/PwnuNjbekImtBg==",
+ "resolved": "7.0.14",
+ "contentHash": "d9hqEw4W/TdQ1WDm03uyFuDoehL6GNq/NMChFaC4dcV60I42vKdUC0fYTuE2QPunVUpf5XUTCkJ6fYGjMos2AA==",
"dependencies": {
- "Microsoft.Data.SqlClient": "5.0.1",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5"
+ "Microsoft.Data.SqlClient": "5.1.1",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14"
}
},
"Microsoft.Extensions.Caching.Abstractions": {
@@ -1048,50 +1022,52 @@
},
"Microsoft.IdentityModel.Abstractions": {
"type": "Transitive",
- "resolved": "6.22.0",
- "contentHash": "iI+9V+2ciCrbheeLjpmjcqCnhy+r6yCoEcid3nkoFWerHgjVuT6CPM4HODUTtUPe1uwks4wcnAujJ8u+IKogHQ=="
+ "resolved": "6.24.0",
+ "contentHash": "X6aBK56Ot15qKyG7X37KsPnrwah+Ka55NJWPppWVTDi8xWq7CJgeNw2XyaeHgE1o/mW4THwoabZkBbeG2TPBiw=="
},
"Microsoft.IdentityModel.JsonWebTokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "d3h1/BaMeylKTkdP6XwRCxuOoDJZ44V9xaXr6gl5QxmpnZGdoK3bySo3OQN8ehRLJHShb94ElLUvoXyglQtgAw==",
+ "resolved": "6.24.0",
+ "contentHash": "XDWrkThcxfuWp79AvAtg5f+uRS1BxkIbJnsG/e8VPzOWkYYuDg33emLjp5EWcwXYYIDsHnVZD/00kM/PYFQc/g==",
"dependencies": {
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Tokens": "6.24.0",
+ "System.Text.Encoding": "4.3.0",
+ "System.Text.Json": "4.7.2"
}
},
"Microsoft.IdentityModel.Logging": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "tuEhHIQwvBEhMf8I50hy8FHmRSUkffDFP5EdLsSDV4qRcl2wvOPkQxYqEzWkh+ytW6sbdJGEXElGhmhDfAxAKg==",
+ "resolved": "6.24.0",
+ "contentHash": "qLYWDOowM/zghmYKXw1yfYKlHOdS41i8t4hVXr9bSI90zHqhyhQh9GwVy8pENzs5wHeytU23DymluC9NtgYv7w==",
"dependencies": {
- "Microsoft.IdentityModel.Abstractions": "6.21.0"
+ "Microsoft.IdentityModel.Abstractions": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "0FqY5cTLQKtHrClzHEI+QxJl8OBT2vUiEQQB7UKk832JDiJJmetzYZ3AdSrPjN/3l3nkhByeWzXnhrX0JbifKg==",
+ "resolved": "6.24.0",
+ "contentHash": "+NzKCkvsQ8X1r/Ff74V7CFr9OsdMRaB6DsV+qpH7NNLdYJ8O4qHbmTnNEsjFcDmk/gVNDwhoL2gN5pkPVq0lwQ==",
"dependencies": {
- "Microsoft.IdentityModel.Logging": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Logging": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols.OpenIdConnect": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "vtSKL7n6EnAsLyxmiviusm6LKrblT2ndnNqN6rvVq6iIHAnPCK9E2DkDx6h1Jrpy1cvbp40r0cnTg23nhEAGTA==",
+ "resolved": "6.24.0",
+ "contentHash": "a/2RRrc8C9qaw8qdD9hv1ES9YKFgxaqr/SnwMSLbwQZJSUQDd4qx1K4EYgWaQWs73R+VXLyKSxN0f/uE9CsBiQ==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols": "6.21.0",
- "System.IdentityModel.Tokens.Jwt": "6.21.0"
+ "Microsoft.IdentityModel.Protocols": "6.24.0",
+ "System.IdentityModel.Tokens.Jwt": "6.24.0"
}
},
"Microsoft.IdentityModel.Tokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "AAEHZvZyb597a+QJSmtxH3n2P1nIJGpZ4Q89GTenknRx6T6zyfzf592yW/jA5e8EHN4tNMjjXHQaYWEq5+L05w==",
+ "resolved": "6.24.0",
+ "contentHash": "ZPqHi86UYuqJXJ7bLnlEctHKkPKT4lGUFbotoCNiXNCSL02emYlcxzGYsRGWWmbFEcYDMi2dcTLLYNzHqWOTsw==",
"dependencies": {
"Microsoft.CSharp": "4.5.0",
- "Microsoft.IdentityModel.Logging": "6.21.0",
+ "Microsoft.IdentityModel.Logging": "6.24.0",
"System.Security.Cryptography.Cng": "4.5.0"
}
},
@@ -1245,13 +1221,13 @@
},
"Newtonsoft.Json": {
"type": "Transitive",
- "resolved": "13.0.1",
- "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
+ "resolved": "13.0.3",
+ "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ=="
},
"Npgsql": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "7UVPYy2RP0ci04PED1tc9ZCaTw/DfSdSkLiGEFCAvwMwsgA/bAluj1liNzP1IpN0MFofnOF0cm1zJfmbEuCehg==",
+ "resolved": "7.0.6",
+ "contentHash": "TAqvwRnm3NJ0QvN7cvu6geJkbI0XPzGVRElVY5hF4gsgA+BnE12x6GM1TLhdeq+7ZKvvo3BD8jXKnXmr3tvdEw==",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "6.0.0",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
@@ -1259,13 +1235,13 @@
},
"Npgsql.EntityFrameworkCore.PostgreSQL": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "ZYMtyG6pmLtUsFAx0/XaIlVkJM+1gArWEKD55cLLxiVlGScAphjiGj+G7Gk16yg5lhhdWx+bgXWpIUISXuS33g==",
+ "resolved": "7.0.11",
+ "contentHash": "cHEgEz0ldXc9wVANs8sJqC+3eilqefrkasCBgaVT0tyj8tb1p3/pwy2ngjboNkDG3M0z+xJsJ4jC5p8wySAM3w==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, 8.0.0)",
- "Npgsql": "7.0.4"
+ "Microsoft.EntityFrameworkCore": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.11, 8.0.0)",
+ "Npgsql": "7.0.6"
}
},
"NSec.Cryptography": {
@@ -1598,8 +1574,8 @@
},
"Serilog.Sinks.SyslogMessages": {
"type": "Transitive",
- "resolved": "2.0.6",
- "contentHash": "V2Yq2GEbk7taEPbpBLFzLXhrHrUzKf4sQu/zLrANU8XIoUn/Mr08M2E8PrcrWVXCj0R4xLMWYe0Z1sxOrMF3IA==",
+ "resolved": "2.0.9",
+ "contentHash": "y7J+/h/Nf5EAtbpa6lC1nDhK/F9kC5oxuVYmQivv242Oh4hAVMeoAk5Gv6bgb/KbmqufGPXUFkX/AlcrvZ8Ywg==",
"dependencies": {
"Serilog": "2.5.0",
"Serilog.Sinks.PeriodicBatching": "2.3.0"
@@ -1806,8 +1782,8 @@
},
"System.Configuration.ConfigurationManager": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "7T+m0kDSlIPTHIkPMIu6m6tV6qsMqJpvQWW2jIc2qi7sn40qxFo0q+7mEQAhMPXZHMKnWrnv47ntGlM/ejvw3g==",
+ "resolved": "6.0.1",
+ "contentHash": "jXw9MlUu/kRfEU0WyTptAVueupqIeE3/rl0EZDMlf8pcvJnitQ8HeVEp69rZdaStXwTV72boi/Bhw8lOeO+U2w==",
"dependencies": {
"System.Security.Cryptography.ProtectedData": "6.0.0",
"System.Security.Permissions": "6.0.0"
@@ -1970,11 +1946,11 @@
},
"System.IdentityModel.Tokens.Jwt": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "JRD8AuypBE+2zYxT3dMJomQVsPYsCqlyZhWel3J1d5nzQokSRyTueF+Q4ID3Jcu6zSZKuzOdJ1MLTkbQsDqcvQ==",
+ "resolved": "6.24.0",
+ "contentHash": "Qibsj9MPWq8S/C0FgvmsLfIlHLE7ay0MJIaAmK94ivN3VyDdglqReed5qMvdQhSL0BzK6v0Z1wB/sD88zVu6Jw==",
"dependencies": {
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"System.IO": {
@@ -2428,10 +2404,10 @@
},
"System.Runtime.Caching": {
"type": "Transitive",
- "resolved": "5.0.0",
- "contentHash": "30D6MkO8WF9jVGWZIP0hmCN8l9BTY4LCsAzLIe4xFSXzs+AjDotR7DpSmj27pFskDURzUvqYYY0ikModgBTxWw==",
+ "resolved": "6.0.0",
+ "contentHash": "E0e03kUp5X2k+UAoVl6efmI7uU7JRBWi5EIdlQ7cr0NpBGjHG4fWII35PgsBY9T4fJQ8E4QPsL0rKksU9gcL5A==",
"dependencies": {
- "System.Configuration.ConfigurationManager": "5.0.0"
+ "System.Configuration.ConfigurationManager": "6.0.0"
}
},
"System.Runtime.CompilerServices.Unsafe": {
@@ -2996,7 +2972,7 @@
"dependencies": {
"AutoFixture.AutoNSubstitute": "[4.17.0, )",
"AutoFixture.Xunit2": "[4.17.0, )",
- "Core": "[2023.10.2, )",
+ "Core": "[2023.12.0, )",
"Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )",
"Microsoft.NET.Test.Sdk": "[17.1.0, )",
"NSubstitute": "[4.3.0, )",
@@ -3018,11 +2994,10 @@
"BitPay.Light": "[1.0.1907, )",
"Braintree": "[5.19.0, )",
"DnsClient": "[1.7.0, )",
+ "Duende.IdentityServer": "[6.0.4, )",
"Fido2.AspNet": "[3.0.1, )",
- "Handlebars.Net": "[2.1.2, )",
- "IdentityServer4": "[4.1.2, )",
- "IdentityServer4.AccessTokenValidation": "[3.0.1, )",
- "LaunchDarkly.ServerSdk": "[7.0.0, )",
+ "Handlebars.Net": "[2.1.4, )",
+ "LaunchDarkly.ServerSdk": "[8.0.0, )",
"MailKit": "[4.2.0, )",
"Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )",
"Microsoft.Azure.Cosmos.Table": "[1.0.8, )",
@@ -3032,7 +3007,7 @@
"Microsoft.Extensions.Configuration.EnvironmentVariables": "[6.0.1, )",
"Microsoft.Extensions.Configuration.UserSecrets": "[6.0.1, )",
"Microsoft.Extensions.Identity.Stores": "[6.0.4, )",
- "Newtonsoft.Json": "[13.0.1, )",
+ "Newtonsoft.Json": "[13.0.3, )",
"Otp.NET": "[1.2.2, )",
"Quartz": "[3.4.0, )",
"SendGrid": "[9.27.0, )",
@@ -3041,7 +3016,7 @@
"Serilog.Extensions.Logging": "[3.1.0, )",
"Serilog.Extensions.Logging.File": "[2.0.0, )",
"Serilog.Sinks.AzureCosmosDB": "[2.0.0, )",
- "Serilog.Sinks.SyslogMessages": "[2.0.6, )",
+ "Serilog.Sinks.SyslogMessages": "[2.0.9, )",
"Stripe.net": "[40.0.0, )",
"YubicoDotNetClient": "[1.2.0, )"
}
@@ -3049,36 +3024,36 @@
"identity": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "SharedWeb": "[2023.10.2, )",
+ "Core": "[2023.12.0, )",
+ "SharedWeb": "[2023.12.0, )",
"Swashbuckle.AspNetCore.SwaggerGen": "[6.5.0, )"
}
},
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "Dapper": "[2.0.123, )"
+ "Core": "[2023.12.0, )",
+ "Dapper": "[2.1.24, )"
}
},
"infrastructure.entityframework": {
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )",
- "Core": "[2023.10.2, )",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )",
- "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )",
- "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )",
- "Npgsql.EntityFrameworkCore.PostgreSQL": "[7.0.4, )",
+ "Core": "[2023.12.0, )",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.14, )",
+ "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.14, )",
+ "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.14, )",
+ "Npgsql.EntityFrameworkCore.PostgreSQL": "[7.0.11, )",
"Pomelo.EntityFrameworkCore.MySql": "[7.0.0, )",
- "linq2db.EntityFrameworkCore": "[7.5.0, )"
+ "linq2db.EntityFrameworkCore": "[7.6.0, )"
}
},
"integrationtestcommon": {
"type": "Project",
"dependencies": {
- "Common": "[2023.10.2, )",
- "Identity": "[2023.10.2, )",
+ "Common": "[2023.12.0, )",
+ "Identity": "[2023.12.0, )",
"Microsoft.AspNetCore.Mvc.Testing": "[6.0.5, )",
"Microsoft.Extensions.Configuration": "[6.0.1, )"
}
@@ -3086,16 +3061,16 @@
"scim": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "SharedWeb": "[2023.10.2, )"
+ "Core": "[2023.12.0, )",
+ "SharedWeb": "[2023.12.0, )"
}
},
"sharedweb": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "Infrastructure.Dapper": "[2023.10.2, )",
- "Infrastructure.EntityFramework": "[2023.10.2, )"
+ "Core": "[2023.12.0, )",
+ "Infrastructure.Dapper": "[2023.12.0, )",
+ "Infrastructure.EntityFramework": "[2023.12.0, )"
}
}
}
diff --git a/bitwarden_license/test/Scim.Test/Groups/PatchGroupCommandTests.cs b/bitwarden_license/test/Scim.Test/Groups/PatchGroupCommandTests.cs
index 066887fe7a..ff8cb3b546 100644
--- a/bitwarden_license/test/Scim.Test/Groups/PatchGroupCommandTests.cs
+++ b/bitwarden_license/test/Scim.Test/Groups/PatchGroupCommandTests.cs
@@ -3,7 +3,6 @@ using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.AdminConsole.Services;
-using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Exceptions;
using Bit.Scim.Groups;
diff --git a/bitwarden_license/test/Scim.Test/Groups/PostGroupCommandTests.cs b/bitwarden_license/test/Scim.Test/Groups/PostGroupCommandTests.cs
index 2d06f23a29..acf1c6c782 100644
--- a/bitwarden_license/test/Scim.Test/Groups/PostGroupCommandTests.cs
+++ b/bitwarden_license/test/Scim.Test/Groups/PostGroupCommandTests.cs
@@ -2,7 +2,6 @@
using Bit.Core.AdminConsole.Enums;
using Bit.Core.AdminConsole.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.AdminConsole.Repositories;
-using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Exceptions;
using Bit.Scim.Context;
diff --git a/bitwarden_license/test/Scim.Test/Groups/PutGroupCommandTests.cs b/bitwarden_license/test/Scim.Test/Groups/PutGroupCommandTests.cs
index 05f6672779..1a906d58a9 100644
--- a/bitwarden_license/test/Scim.Test/Groups/PutGroupCommandTests.cs
+++ b/bitwarden_license/test/Scim.Test/Groups/PutGroupCommandTests.cs
@@ -2,7 +2,6 @@
using Bit.Core.AdminConsole.Enums;
using Bit.Core.AdminConsole.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.AdminConsole.Repositories;
-using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Exceptions;
using Bit.Scim.Context;
diff --git a/bitwarden_license/test/Scim.Test/packages.lock.json b/bitwarden_license/test/Scim.Test/packages.lock.json
index 6e0f0e5aab..4e1d3b5016 100644
--- a/bitwarden_license/test/Scim.Test/packages.lock.json
+++ b/bitwarden_license/test/Scim.Test/packages.lock.json
@@ -259,8 +259,8 @@
},
"Dapper": {
"type": "Transitive",
- "resolved": "2.0.123",
- "contentHash": "RDFF4rBLLmbpi6pwkY7q/M6UXHRJEOerplDGE5jwEkP/JGJnBauAClYavNKJPW1yOTWRPIyfj4is3EaJxQXILQ=="
+ "resolved": "2.1.24",
+ "contentHash": "/2t2vsdJyZRsk13AsWigZpsuFvEwK+o3v862cEULXoww905gyKhJFSuwmZI/4Ui9COX9ZCFCI09UHyH4wVYl3A=="
},
"DnsClient": {
"type": "Transitive",
@@ -270,6 +270,24 @@
"Microsoft.Win32.Registry": "5.0.0"
}
},
+ "Duende.IdentityServer": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "4HVjzx1F8v5J+U7oa8RGAQGj2QzmzNSu87r18Sh+dlh10uyZZL8teAaT/FaVLDObnfItGdPFvN8mwpF/HkI3Xw==",
+ "dependencies": {
+ "Duende.IdentityServer.Storage": "6.0.4",
+ "Microsoft.AspNetCore.Authentication.OpenIdConnect": "6.0.0"
+ }
+ },
+ "Duende.IdentityServer.Storage": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "s5gAjfbpr2IMgI+fU2Nx+2AZdzstmbt9gpo13iX7GwvqSeSaBVqj9ZskAN0R2KF1OemPdZuGnfaTcevdXMUrrw==",
+ "dependencies": {
+ "IdentityModel": "6.0.0",
+ "Microsoft.AspNetCore.DataProtection.Abstractions": "6.0.0"
+ }
+ },
"Fare": {
"type": "Transitive",
"resolved": "2.1.1",
@@ -306,57 +324,16 @@
},
"Handlebars.Net": {
"type": "Transitive",
- "resolved": "2.1.2",
- "contentHash": "p60QyeBYpZmcZdIXRMqs9XySIBaxJ0lj3+QD0EJVr4ybTigOTCumXMMin5dPwjo9At1UwkDZ3gGwa1lmGjG6DA==",
+ "resolved": "2.1.4",
+ "contentHash": "Od7MWDfGxYKRtxETFMlcvCrY8hAqyuXZDX4EsOfiI/jzh+PVBuVxazHBC1HmVqTKX1JnRtoxIMcH95K9UFlYog==",
"dependencies": {
"Microsoft.CSharp": "4.7.0"
}
},
"IdentityModel": {
"type": "Transitive",
- "resolved": "4.4.0",
- "contentHash": "b18wrIx5wnZlMxAX7oVsE+nDtAJ4hajYlH0xPlaRvo4r/fz08K6pPeZvbiqS9nfNbzfIgLFmNX+FL9qR9ZR5PA==",
- "dependencies": {
- "Newtonsoft.Json": "11.0.2",
- "System.Text.Encodings.Web": "4.7.0"
- }
- },
- "IdentityModel.AspNetCore.OAuth2Introspection": {
- "type": "Transitive",
- "resolved": "4.0.1",
- "contentHash": "ZNdMZMaj9fqR3j50vYsu+1U3QGd6n8+fqwf+a8mCTcmXGor+HgFDfdq0mM34bsmD6uEgAQup7sv2ZW5kR36dbA==",
- "dependencies": {
- "IdentityModel": "4.0.0"
- }
- },
- "IdentityServer4": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "blaxxGuOA7v/w1q+fxn97wZ+x2ecG1ZD4mc/N/ZOXMNeFZZhqv+4LF26Gecyik3nWrJPmbMEtQbLmRsKG8k61w==",
- "dependencies": {
- "IdentityModel": "4.4.0",
- "IdentityServer4.Storage": "4.1.2",
- "Microsoft.AspNetCore.Authentication.OpenIdConnect": "3.1.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.6.0",
- "Newtonsoft.Json": "12.0.2"
- }
- },
- "IdentityServer4.AccessTokenValidation": {
- "type": "Transitive",
- "resolved": "3.0.1",
- "contentHash": "qu/M6UyN4o9NVep7q545Ms7hYAnsQqSdLbN1Fjjrn4m35lyBfeQPSSNzDryAKHbodyWOQfHaOqKEyMEJQ5Rpgw==",
- "dependencies": {
- "IdentityModel.AspNetCore.OAuth2Introspection": "4.0.1",
- "Microsoft.AspNetCore.Authentication.JwtBearer": "3.0.0"
- }
- },
- "IdentityServer4.Storage": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "KoSffyZyyeCNTIyJiZnCuPakJ1QbCHlpty6gbWUj/7yl+w0PXIchgmmJnJSvddzBb8iZ2xew/vGlxWUIP17P2g==",
- "dependencies": {
- "IdentityModel": "4.4.0"
- }
+ "resolved": "6.0.0",
+ "contentHash": "eVHCR7a6m/dm5RFcBzE3qs/Jg5j9R5Rjpu8aTOv9e4AFvaQtBXb5ah7kmwU+YwA0ufRwz4wf1hnIvsD2hSnI4g=="
},
"Kralizek.AutoFixture.Extensions.MockHttp": {
"type": "Transitive",
@@ -374,26 +351,27 @@
},
"LaunchDarkly.CommonSdk": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "YYYq+41gZRMQ8dIoMC6HOq/dI+4RY3HsexLLAaE9T1+1tVMeQkbCqak7sVeKX4QcE7xlXx23lWgipYUkRoRUyw==",
+ "resolved": "6.2.0",
+ "contentHash": "eLeb+tTNLwOxlUIsZWzJlcPmG9Wyf20NYyucP6MW6aqKW6doKFeSO+aJe0z+WyijbvfX1Dp1U1HQatOu6fa1Gg==",
"dependencies": {
+ "LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
},
"LaunchDarkly.EventSource": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "DN44Ry5M4lyrjiF7LEu0Ijco7Wm8R7mJopN+giYsYjkQlszsXdFvm3POoehIDAOtL1HHl5bZvF9k9xK034u3IA==",
+ "resolved": "5.1.0",
+ "contentHash": "PztDWiMvPWODx+kfBnCroZ8Lpya4nPc7ZO4TZysOogODbVXDDPDYrdcgVivCMgf4davhGrp61ekvZc+Uy1NYMA==",
"dependencies": {
- "LaunchDarkly.Logging": "[1.0.1, 3.0.0)"
+ "LaunchDarkly.Logging": "[2.0.0, 3.0.0)"
}
},
"LaunchDarkly.InternalSdk": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "jW8VEfFciuCcJUEuvSzmrbMVYYXwGL/ZWHUZLiA4aDOQ1LcEXp32uK405NQW/izEypUfWB+9TaSjPpFIC+5Wzw==",
+ "resolved": "3.3.0",
+ "contentHash": "TBvs/B6iyXp9MqRKjIoBZ/T0+/xgp5xg+MuHqr5U+N5+7DghtI2FnsmgeBedTIeQdA3Tk8Z4Bj4hlqU9FBiEnw==",
"dependencies": {
- "LaunchDarkly.CommonSdk": "6.0.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
"LaunchDarkly.Logging": "[2.0.0, 3.0.0)",
"System.Collections.Immutable": "1.7.1"
}
@@ -408,13 +386,13 @@
},
"LaunchDarkly.ServerSdk": {
"type": "Transitive",
- "resolved": "7.0.0",
- "contentHash": "gkTWb+f5QlsXIqFAciBef3qKZU2y0Hy3Fpt4pvZoxNcnBKg2PNTDSnbpbYEKPeQ1yk1avNaI/tKprnahfrmJFg==",
+ "resolved": "8.0.0",
+ "contentHash": "vosFEXYJABuIDIA0+6sncalTmrKXEkBKeqzuP9/vvcCVlFSXUl/ZnrkrAVg3ViDWDi7kjpJSk2W3h5D0TUfCGA==",
"dependencies": {
"LaunchDarkly.Cache": "1.0.2",
- "LaunchDarkly.CommonSdk": "6.0.0",
- "LaunchDarkly.EventSource": "5.0.1",
- "LaunchDarkly.InternalSdk": "3.1.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
+ "LaunchDarkly.EventSource": "5.1.0",
+ "LaunchDarkly.InternalSdk": "3.3.0",
"LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
@@ -426,16 +404,16 @@
},
"linq2db": {
"type": "Transitive",
- "resolved": "5.2.1",
- "contentHash": "OOBM8s39zhbZAgqFnl2KGxT5RqBDw21X69U528qV2PgQispaA3f+or0ILrLEgnNIJuB4EBgaw8gC6ttSHn4X0Q=="
+ "resolved": "5.3.1",
+ "contentHash": "707mIbEmtptvKeUW940UwoNwq05I7OUu0VWtclLtyYaASp+ugX4I/Er1UVpeldsDawqlVMXB5EQ5/Oar6AkUGQ=="
},
"linq2db.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.5.0",
- "contentHash": "ePHzO99xbObgMLlAFh08of1SnVhg6j4Su9327DrIB7RZWCgtQIX6k+nbl+HRVOooAndZSs7b+DduSgdnJjaJGw==",
+ "resolved": "7.6.0",
+ "contentHash": "T1W9o8wVzApsUwu7SRg/L7487kaiLQYt2AqRVnXVGfobD+ZKy2oRsUMws0PICtciaz4qbfLp/r/+NksfuYsFlw==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Relational": "7.0.0",
- "linq2db": "5.2.1"
+ "linq2db": "5.3.1"
}
},
"MailKit": {
@@ -456,10 +434,10 @@
},
"Microsoft.AspNetCore.Authentication.OpenIdConnect": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "O1cAQYUTU8EfRqwc5/rfTns4E4hKlFlg59fuKRrST+PzsxI6H07KqRN/JjdYhAuVYxF8jPnIGbj+zuc5paOWUw==",
+ "resolved": "6.0.0",
+ "contentHash": "cJxdro36spFzk/K2OFCddM6vZ+yoj6ug8mTFRH3Gdv1Pul/buSuCtfb/FSCp31UmS5S4C1315dU7wX3ErLFuDg==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.5.0"
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.10.0"
}
},
"Microsoft.AspNetCore.Cryptography.Internal": {
@@ -492,8 +470,8 @@
},
"Microsoft.AspNetCore.DataProtection.Abstractions": {
"type": "Transitive",
- "resolved": "3.1.32",
- "contentHash": "MPL4iVyiaRxnOUY5VATHjvhDWaAEFb77KFiUxVRklv3Z3v+STofUr1UG/aCt1O9cgN7FVTDaC5A7U+zsLub8Xg=="
+ "resolved": "6.0.0",
+ "contentHash": "Z/UU4NEBm5UgNufJmw+j5baW26ytCOIZ0G7sZocPaOzsUeBon1bkM3lSMNZQG2GmDjAIVP2XMSODf2jzSGbibw=="
},
"Microsoft.Azure.Amqp": {
"type": "Transitive",
@@ -583,48 +561,44 @@
},
"Microsoft.Data.SqlClient": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "uu8dfrsx081cSbEevWuZAvqdmANDGJkbLBL2G3j0LAZxX1Oy8RCVAaC4Lcuak6jNicWP6CWvHqBTIEmQNSxQlw==",
+ "resolved": "5.1.1",
+ "contentHash": "MW5E9HFvCaV069o8b6YpuRDPBux8s96qDnOJ+4N9QNUCs7c5W3KxwQ+ftpAjbMUlImL+c9WR+l+f5hzjkqhu2g==",
"dependencies": {
- "Azure.Identity": "1.6.0",
- "Microsoft.Data.SqlClient.SNI.runtime": "5.0.1",
- "Microsoft.Identity.Client": "4.45.0",
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.21.0",
+ "Azure.Identity": "1.7.0",
+ "Microsoft.Data.SqlClient.SNI.runtime": "5.1.0",
+ "Microsoft.Identity.Client": "4.47.2",
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.24.0",
"Microsoft.SqlServer.Server": "1.0.0",
- "Microsoft.Win32.Registry": "5.0.0",
- "System.Buffers": "4.5.1",
- "System.Configuration.ConfigurationManager": "5.0.0",
- "System.Diagnostics.DiagnosticSource": "5.0.0",
- "System.IO": "4.3.0",
- "System.Resources.ResourceManager": "4.3.0",
- "System.Runtime.Caching": "5.0.0",
+ "System.Configuration.ConfigurationManager": "6.0.1",
+ "System.Diagnostics.DiagnosticSource": "6.0.0",
+ "System.Runtime.Caching": "6.0.0",
"System.Security.Cryptography.Cng": "5.0.0",
"System.Security.Principal.Windows": "5.0.0",
- "System.Text.Encoding.CodePages": "5.0.0",
- "System.Text.Encodings.Web": "4.7.2"
+ "System.Text.Encoding.CodePages": "6.0.0",
+ "System.Text.Encodings.Web": "6.0.0"
}
},
"Microsoft.Data.SqlClient.SNI.runtime": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "y0X5MxiNdbITJYoafJ2ruaX6hqO0twpCGR/ipiDOe85JKLU8WL4TuAQfDe5qtt3bND5Je26HnrarLSAMMnVTNg=="
+ "resolved": "5.1.0",
+ "contentHash": "jVsElisM5sfBzaaV9kdq2NXZLwIbytetnsOIlJ0cQGgQP4zFNBmkfHBnpwtmKrtBJBEV9+9PVQPVrcCVhDgcIg=="
},
"Microsoft.Data.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "FTerRmQPqHrCrnoUzhBu+E+1DNGwyrAMLqHkAqOOOu5pGfyMOj8qQUBxI/gDtWtG11p49UxSfWmBzRNlwZqfUg==",
+ "resolved": "7.0.14",
+ "contentHash": "qvYae3/v9Fvqsjp/7OKQBuJK+Uc3m/WctfpIUMmGMDot2Bd8UWBKiMSlh26UtfQa9x4N+k7NxCT+AbZVoNrCdg==",
"dependencies": {
"SQLitePCLRaw.core": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "RXbRLHHWP2Z3pq8qcL5nQ6LPeoOyp8hasM5bd0Te8PiQi3RjWQR4tcbdY5XMqQ+oTO9wA8/RLhZRn/hnxlTDnQ==",
+ "resolved": "7.0.14",
+ "contentHash": "0KYkAemPygW6yzifciFlmMzkO4sI4Dw69xLgwg3ui5rXJS5XvzuAWVvfdrKJciqeCbCnVS/ZbOWpcwWgqce5bQ==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Abstractions": "7.0.5",
- "Microsoft.EntityFrameworkCore.Analyzers": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Abstractions": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Analyzers": "7.0.14",
"Microsoft.Extensions.Caching.Memory": "7.0.0",
"Microsoft.Extensions.DependencyInjection": "7.0.0",
"Microsoft.Extensions.Logging": "7.0.0"
@@ -632,49 +606,49 @@
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "iwQso+hFRsEWjhH2WsEQj1D2QE5BlEXiXEt6A3SlYTPRPdZsyTNDeDDEdtxL+H/UJPQgQYY+9SMMRcEiXBmCAA=="
+ "resolved": "7.0.14",
+ "contentHash": "aEcXDSYpDdD5wdIRKTqcS44f3W4capqQ1BWVRPJgacATfHkO62RX9Nnh0hUFg+rei9OLuJp0Y4zsy1fNeOXv5g=="
},
"Microsoft.EntityFrameworkCore.Analyzers": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "yMLM/aK1MikVqpjxd7PJ1Pjgztd3VAd26ZHxyjxG3RPeM9cHjvS5tCg9kAAayR6eHmBg0ffZsHdT28WfA5tTlA=="
+ "resolved": "7.0.14",
+ "contentHash": "esI4RF6mix4DDFBhWB9k1vJxAL8GouSf5ZV8oFJoVsIQ9d2J3MPgC1VL2qM9Vw5cH7Vg7TzRyKNpCRXFVkWs9w=="
},
"Microsoft.EntityFrameworkCore.Relational": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "u/33DC4S6g2hpMPgBc5Kdnlz//nqHR5c/ovgjtiP/wQ7sOd0EOdygVzUJAAOxCwbtAHDsJXS9Vc3jLFYq0yu8Q==",
+ "resolved": "7.0.14",
+ "contentHash": "MrVBnWOFYwfLMGQfrcIuqEM9Xvokv1vJeYxqNH3K3xOtAdHwHQTrKnpDP97tU+LBlvcnyXAtAtryYcpLXWtRNA==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "7.0.5",
+ "Microsoft.EntityFrameworkCore": "7.0.14",
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.Sqlite": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "2XPZB9OLF5/m13HgZp7/Dv0u8FWEJzcaBsMYR9Kp3R6aygkb3RnOijofPDTsmdhAqG9YTysCmh2bFaGs0TCc7A==",
+ "resolved": "7.0.14",
+ "contentHash": "8c8Hw2tmfy5YEsi9RL2/u2Qi9IwVbmj/yDlJy4iJPadeE3/AssLrgtobOBz4ftg2y5PVjFL59Gq7YzGLQH5q1A==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.14",
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "4C+9ct6A/Bq61Ta9Uh2td4/XwNpRCiPI03SWTa3hPJjA/g8wCw2hetbh3DDe5HcydzgDq/lRRjU/eRy3UODklQ==",
+ "resolved": "7.0.14",
+ "contentHash": "JNUkZVff1V/A/P3JiBbgt+Y2oCQSuzORxE3jOqFDbFjSFu7jHDEetJ/afSF/taa0lbyN9OpvaKjsbKk3Iis29Q==",
"dependencies": {
- "Microsoft.Data.Sqlite.Core": "7.0.5",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5",
+ "Microsoft.Data.Sqlite.Core": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14",
"Microsoft.Extensions.DependencyModel": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.SqlServer": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "cUJqCiamT0EvpKNgZEV5fqNv2MyVfKNgOPQfFINqHiIKHOYrS0nTCUJP97+UuG0JIIrP792/PwnuNjbekImtBg==",
+ "resolved": "7.0.14",
+ "contentHash": "d9hqEw4W/TdQ1WDm03uyFuDoehL6GNq/NMChFaC4dcV60I42vKdUC0fYTuE2QPunVUpf5XUTCkJ6fYGjMos2AA==",
"dependencies": {
- "Microsoft.Data.SqlClient": "5.0.1",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5"
+ "Microsoft.Data.SqlClient": "5.1.1",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14"
}
},
"Microsoft.Extensions.Caching.Abstractions": {
@@ -927,50 +901,52 @@
},
"Microsoft.IdentityModel.Abstractions": {
"type": "Transitive",
- "resolved": "6.22.0",
- "contentHash": "iI+9V+2ciCrbheeLjpmjcqCnhy+r6yCoEcid3nkoFWerHgjVuT6CPM4HODUTtUPe1uwks4wcnAujJ8u+IKogHQ=="
+ "resolved": "6.24.0",
+ "contentHash": "X6aBK56Ot15qKyG7X37KsPnrwah+Ka55NJWPppWVTDi8xWq7CJgeNw2XyaeHgE1o/mW4THwoabZkBbeG2TPBiw=="
},
"Microsoft.IdentityModel.JsonWebTokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "d3h1/BaMeylKTkdP6XwRCxuOoDJZ44V9xaXr6gl5QxmpnZGdoK3bySo3OQN8ehRLJHShb94ElLUvoXyglQtgAw==",
+ "resolved": "6.24.0",
+ "contentHash": "XDWrkThcxfuWp79AvAtg5f+uRS1BxkIbJnsG/e8VPzOWkYYuDg33emLjp5EWcwXYYIDsHnVZD/00kM/PYFQc/g==",
"dependencies": {
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Tokens": "6.24.0",
+ "System.Text.Encoding": "4.3.0",
+ "System.Text.Json": "4.7.2"
}
},
"Microsoft.IdentityModel.Logging": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "tuEhHIQwvBEhMf8I50hy8FHmRSUkffDFP5EdLsSDV4qRcl2wvOPkQxYqEzWkh+ytW6sbdJGEXElGhmhDfAxAKg==",
+ "resolved": "6.24.0",
+ "contentHash": "qLYWDOowM/zghmYKXw1yfYKlHOdS41i8t4hVXr9bSI90zHqhyhQh9GwVy8pENzs5wHeytU23DymluC9NtgYv7w==",
"dependencies": {
- "Microsoft.IdentityModel.Abstractions": "6.21.0"
+ "Microsoft.IdentityModel.Abstractions": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "0FqY5cTLQKtHrClzHEI+QxJl8OBT2vUiEQQB7UKk832JDiJJmetzYZ3AdSrPjN/3l3nkhByeWzXnhrX0JbifKg==",
+ "resolved": "6.24.0",
+ "contentHash": "+NzKCkvsQ8X1r/Ff74V7CFr9OsdMRaB6DsV+qpH7NNLdYJ8O4qHbmTnNEsjFcDmk/gVNDwhoL2gN5pkPVq0lwQ==",
"dependencies": {
- "Microsoft.IdentityModel.Logging": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Logging": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols.OpenIdConnect": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "vtSKL7n6EnAsLyxmiviusm6LKrblT2ndnNqN6rvVq6iIHAnPCK9E2DkDx6h1Jrpy1cvbp40r0cnTg23nhEAGTA==",
+ "resolved": "6.24.0",
+ "contentHash": "a/2RRrc8C9qaw8qdD9hv1ES9YKFgxaqr/SnwMSLbwQZJSUQDd4qx1K4EYgWaQWs73R+VXLyKSxN0f/uE9CsBiQ==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols": "6.21.0",
- "System.IdentityModel.Tokens.Jwt": "6.21.0"
+ "Microsoft.IdentityModel.Protocols": "6.24.0",
+ "System.IdentityModel.Tokens.Jwt": "6.24.0"
}
},
"Microsoft.IdentityModel.Tokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "AAEHZvZyb597a+QJSmtxH3n2P1nIJGpZ4Q89GTenknRx6T6zyfzf592yW/jA5e8EHN4tNMjjXHQaYWEq5+L05w==",
+ "resolved": "6.24.0",
+ "contentHash": "ZPqHi86UYuqJXJ7bLnlEctHKkPKT4lGUFbotoCNiXNCSL02emYlcxzGYsRGWWmbFEcYDMi2dcTLLYNzHqWOTsw==",
"dependencies": {
"Microsoft.CSharp": "4.5.0",
- "Microsoft.IdentityModel.Logging": "6.21.0",
+ "Microsoft.IdentityModel.Logging": "6.24.0",
"System.Security.Cryptography.Cng": "4.5.0"
}
},
@@ -1119,13 +1095,13 @@
},
"Newtonsoft.Json": {
"type": "Transitive",
- "resolved": "13.0.1",
- "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
+ "resolved": "13.0.3",
+ "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ=="
},
"Npgsql": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "7UVPYy2RP0ci04PED1tc9ZCaTw/DfSdSkLiGEFCAvwMwsgA/bAluj1liNzP1IpN0MFofnOF0cm1zJfmbEuCehg==",
+ "resolved": "7.0.6",
+ "contentHash": "TAqvwRnm3NJ0QvN7cvu6geJkbI0XPzGVRElVY5hF4gsgA+BnE12x6GM1TLhdeq+7ZKvvo3BD8jXKnXmr3tvdEw==",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "6.0.0",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
@@ -1133,13 +1109,13 @@
},
"Npgsql.EntityFrameworkCore.PostgreSQL": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "ZYMtyG6pmLtUsFAx0/XaIlVkJM+1gArWEKD55cLLxiVlGScAphjiGj+G7Gk16yg5lhhdWx+bgXWpIUISXuS33g==",
+ "resolved": "7.0.11",
+ "contentHash": "cHEgEz0ldXc9wVANs8sJqC+3eilqefrkasCBgaVT0tyj8tb1p3/pwy2ngjboNkDG3M0z+xJsJ4jC5p8wySAM3w==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, 8.0.0)",
- "Npgsql": "7.0.4"
+ "Microsoft.EntityFrameworkCore": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.11, 8.0.0)",
+ "Npgsql": "7.0.6"
}
},
"NSec.Cryptography": {
@@ -1472,8 +1448,8 @@
},
"Serilog.Sinks.SyslogMessages": {
"type": "Transitive",
- "resolved": "2.0.6",
- "contentHash": "V2Yq2GEbk7taEPbpBLFzLXhrHrUzKf4sQu/zLrANU8XIoUn/Mr08M2E8PrcrWVXCj0R4xLMWYe0Z1sxOrMF3IA==",
+ "resolved": "2.0.9",
+ "contentHash": "y7J+/h/Nf5EAtbpa6lC1nDhK/F9kC5oxuVYmQivv242Oh4hAVMeoAk5Gv6bgb/KbmqufGPXUFkX/AlcrvZ8Ywg==",
"dependencies": {
"Serilog": "2.5.0",
"Serilog.Sinks.PeriodicBatching": "2.3.0"
@@ -1664,8 +1640,8 @@
},
"System.Configuration.ConfigurationManager": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "7T+m0kDSlIPTHIkPMIu6m6tV6qsMqJpvQWW2jIc2qi7sn40qxFo0q+7mEQAhMPXZHMKnWrnv47ntGlM/ejvw3g==",
+ "resolved": "6.0.1",
+ "contentHash": "jXw9MlUu/kRfEU0WyTptAVueupqIeE3/rl0EZDMlf8pcvJnitQ8HeVEp69rZdaStXwTV72boi/Bhw8lOeO+U2w==",
"dependencies": {
"System.Security.Cryptography.ProtectedData": "6.0.0",
"System.Security.Permissions": "6.0.0"
@@ -1823,11 +1799,11 @@
},
"System.IdentityModel.Tokens.Jwt": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "JRD8AuypBE+2zYxT3dMJomQVsPYsCqlyZhWel3J1d5nzQokSRyTueF+Q4ID3Jcu6zSZKuzOdJ1MLTkbQsDqcvQ==",
+ "resolved": "6.24.0",
+ "contentHash": "Qibsj9MPWq8S/C0FgvmsLfIlHLE7ay0MJIaAmK94ivN3VyDdglqReed5qMvdQhSL0BzK6v0Z1wB/sD88zVu6Jw==",
"dependencies": {
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"System.IO": {
@@ -2281,10 +2257,10 @@
},
"System.Runtime.Caching": {
"type": "Transitive",
- "resolved": "5.0.0",
- "contentHash": "30D6MkO8WF9jVGWZIP0hmCN8l9BTY4LCsAzLIe4xFSXzs+AjDotR7DpSmj27pFskDURzUvqYYY0ikModgBTxWw==",
+ "resolved": "6.0.0",
+ "contentHash": "E0e03kUp5X2k+UAoVl6efmI7uU7JRBWi5EIdlQ7cr0NpBGjHG4fWII35PgsBY9T4fJQ8E4QPsL0rKksU9gcL5A==",
"dependencies": {
- "System.Configuration.ConfigurationManager": "5.0.0"
+ "System.Configuration.ConfigurationManager": "6.0.0"
}
},
"System.Runtime.CompilerServices.Unsafe": {
@@ -2849,7 +2825,7 @@
"dependencies": {
"AutoFixture.AutoNSubstitute": "[4.17.0, )",
"AutoFixture.Xunit2": "[4.17.0, )",
- "Core": "[2023.10.2, )",
+ "Core": "[2023.12.0, )",
"Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )",
"Microsoft.NET.Test.Sdk": "[17.1.0, )",
"NSubstitute": "[4.3.0, )",
@@ -2871,11 +2847,10 @@
"BitPay.Light": "[1.0.1907, )",
"Braintree": "[5.19.0, )",
"DnsClient": "[1.7.0, )",
+ "Duende.IdentityServer": "[6.0.4, )",
"Fido2.AspNet": "[3.0.1, )",
- "Handlebars.Net": "[2.1.2, )",
- "IdentityServer4": "[4.1.2, )",
- "IdentityServer4.AccessTokenValidation": "[3.0.1, )",
- "LaunchDarkly.ServerSdk": "[7.0.0, )",
+ "Handlebars.Net": "[2.1.4, )",
+ "LaunchDarkly.ServerSdk": "[8.0.0, )",
"MailKit": "[4.2.0, )",
"Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )",
"Microsoft.Azure.Cosmos.Table": "[1.0.8, )",
@@ -2885,7 +2860,7 @@
"Microsoft.Extensions.Configuration.EnvironmentVariables": "[6.0.1, )",
"Microsoft.Extensions.Configuration.UserSecrets": "[6.0.1, )",
"Microsoft.Extensions.Identity.Stores": "[6.0.4, )",
- "Newtonsoft.Json": "[13.0.1, )",
+ "Newtonsoft.Json": "[13.0.3, )",
"Otp.NET": "[1.2.2, )",
"Quartz": "[3.4.0, )",
"SendGrid": "[9.27.0, )",
@@ -2894,7 +2869,7 @@
"Serilog.Extensions.Logging": "[3.1.0, )",
"Serilog.Extensions.Logging.File": "[2.0.0, )",
"Serilog.Sinks.AzureCosmosDB": "[2.0.0, )",
- "Serilog.Sinks.SyslogMessages": "[2.0.6, )",
+ "Serilog.Sinks.SyslogMessages": "[2.0.9, )",
"Stripe.net": "[40.0.0, )",
"YubicoDotNetClient": "[1.2.0, )"
}
@@ -2902,36 +2877,36 @@
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "Dapper": "[2.0.123, )"
+ "Core": "[2023.12.0, )",
+ "Dapper": "[2.1.24, )"
}
},
"infrastructure.entityframework": {
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )",
- "Core": "[2023.10.2, )",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )",
- "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )",
- "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )",
- "Npgsql.EntityFrameworkCore.PostgreSQL": "[7.0.4, )",
+ "Core": "[2023.12.0, )",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.14, )",
+ "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.14, )",
+ "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.14, )",
+ "Npgsql.EntityFrameworkCore.PostgreSQL": "[7.0.11, )",
"Pomelo.EntityFrameworkCore.MySql": "[7.0.0, )",
- "linq2db.EntityFrameworkCore": "[7.5.0, )"
+ "linq2db.EntityFrameworkCore": "[7.6.0, )"
}
},
"scim": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "SharedWeb": "[2023.10.2, )"
+ "Core": "[2023.12.0, )",
+ "SharedWeb": "[2023.12.0, )"
}
},
"sharedweb": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "Infrastructure.Dapper": "[2023.10.2, )",
- "Infrastructure.EntityFramework": "[2023.10.2, )"
+ "Core": "[2023.12.0, )",
+ "Infrastructure.Dapper": "[2023.12.0, )",
+ "Infrastructure.EntityFramework": "[2023.12.0, )"
}
}
}
diff --git a/global.json b/global.json
index 13a0d55fff..10b65be864 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,6 @@
{
"sdk": {
- "version": "6.0.415",
+ "version": "6.0.100",
"rollForward": "latestFeature"
}
}
diff --git a/perf/MicroBenchmarks/MicroBenchmarks.csproj b/perf/MicroBenchmarks/MicroBenchmarks.csproj
index b29687af46..f33beb4551 100644
--- a/perf/MicroBenchmarks/MicroBenchmarks.csproj
+++ b/perf/MicroBenchmarks/MicroBenchmarks.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/perf/MicroBenchmarks/packages.lock.json b/perf/MicroBenchmarks/packages.lock.json
index 94d685e95a..ce61c248d1 100644
--- a/perf/MicroBenchmarks/packages.lock.json
+++ b/perf/MicroBenchmarks/packages.lock.json
@@ -4,22 +4,20 @@
"net6.0": {
"BenchmarkDotNet": {
"type": "Direct",
- "requested": "[0.13.2, )",
- "resolved": "0.13.2",
- "contentHash": "82IflYxY8qnQXEA3kXtqC9pntrkJYJZbQ9PV7hEV/XcfCtOdwLz84ilyO8tLRVbiliWttvmt/v44P+visN+fPQ==",
+ "requested": "[0.13.10, )",
+ "resolved": "0.13.10",
+ "contentHash": "p/LrTtR5TlwhZIvy2hG9VzTFWEDPS90r3QP9Q9pL4/B1iXzC/JNrpYyCWW3Xeg4vuiq/qV8hvJkJmT1sj+5LSw==",
"dependencies": {
- "BenchmarkDotNet.Annotations": "0.13.2",
- "CommandLineParser": "2.4.3",
+ "BenchmarkDotNet.Annotations": "0.13.10",
+ "CommandLineParser": "2.9.1",
+ "Gee.External.Capstone": "2.3.0",
"Iced": "1.17.0",
- "Microsoft.CodeAnalysis.CSharp": "3.0.0",
+ "Microsoft.CodeAnalysis.CSharp": "4.1.0",
"Microsoft.Diagnostics.Runtime": "2.2.332302",
"Microsoft.Diagnostics.Tracing.TraceEvent": "3.0.2",
"Microsoft.DotNet.PlatformAbstractions": "3.1.6",
- "Perfolizer": "0.2.1",
- "System.Management": "6.0.0",
- "System.Reflection.Emit": "4.7.0",
- "System.Reflection.Emit.Lightweight": "4.7.0",
- "System.Threading.Tasks.Extensions": "4.5.4"
+ "Perfolizer": "[0.2.1]",
+ "System.Management": "5.0.0"
}
},
"AspNetCoreRateLimit": {
@@ -153,8 +151,8 @@
},
"BenchmarkDotNet.Annotations": {
"type": "Transitive",
- "resolved": "0.13.2",
- "contentHash": "+SGOYyXT6fiagbtrni38B8BqBgjruYKU3PfROI0lDIYo8jQ+APUmLKMEswK7zwR5fEOCrDmoAHSH6oykBkqPgA=="
+ "resolved": "0.13.10",
+ "contentHash": "abYKp+P5NBuam7q0w7AFgOYF3nqAvKBw6MLq96Kjk1WdaRDNpgBc6uCgOP4pVIH/g0IF9d4ubnFLBwiJuIAHMw=="
},
"BitPay.Light": {
"type": "Transitive",
@@ -181,8 +179,8 @@
},
"CommandLineParser": {
"type": "Transitive",
- "resolved": "2.4.3",
- "contentHash": "U2FC9Y8NyIxxU6MpFFdWWu1xwiqz/61v/Doou7kmVjpeIEMLWyiNNkzNlSE84kyJ0O1LKApuEj5z48Ow0Hi4OQ=="
+ "resolved": "2.9.1",
+ "contentHash": "OE0sl1/sQ37bjVsPKKtwQlWDgqaxWgtme3xZz7JssWUzg5JpMIyHgCTY9MVMxOg48fJ1AgGT3tgdH5m/kQ5xhA=="
},
"DnsClient": {
"type": "Transitive",
@@ -192,6 +190,24 @@
"Microsoft.Win32.Registry": "5.0.0"
}
},
+ "Duende.IdentityServer": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "4HVjzx1F8v5J+U7oa8RGAQGj2QzmzNSu87r18Sh+dlh10uyZZL8teAaT/FaVLDObnfItGdPFvN8mwpF/HkI3Xw==",
+ "dependencies": {
+ "Duende.IdentityServer.Storage": "6.0.4",
+ "Microsoft.AspNetCore.Authentication.OpenIdConnect": "6.0.0"
+ }
+ },
+ "Duende.IdentityServer.Storage": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "s5gAjfbpr2IMgI+fU2Nx+2AZdzstmbt9gpo13iX7GwvqSeSaBVqj9ZskAN0R2KF1OemPdZuGnfaTcevdXMUrrw==",
+ "dependencies": {
+ "IdentityModel": "6.0.0",
+ "Microsoft.AspNetCore.DataProtection.Abstractions": "6.0.0"
+ }
+ },
"Fido2": {
"type": "Transitive",
"resolved": "3.0.1",
@@ -218,10 +234,15 @@
"resolved": "3.0.1",
"contentHash": "mgjcuGETuYSCUEaZG+jQeeuuEMkDLc4GDJHBvKDdOz6oSOWp5adPdWP4btZx7Pi+9fu4szN3JIjJmby67MaILw=="
},
+ "Gee.External.Capstone": {
+ "type": "Transitive",
+ "resolved": "2.3.0",
+ "contentHash": "2ap/rYmjtzCOT8hxrnEW/QeiOt+paD8iRrIcdKX0cxVwWLFa1e+JDBNeECakmccXrSFeBQuu5AV8SNkipFMMMw=="
+ },
"Handlebars.Net": {
"type": "Transitive",
- "resolved": "2.1.2",
- "contentHash": "p60QyeBYpZmcZdIXRMqs9XySIBaxJ0lj3+QD0EJVr4ybTigOTCumXMMin5dPwjo9At1UwkDZ3gGwa1lmGjG6DA==",
+ "resolved": "2.1.4",
+ "contentHash": "Od7MWDfGxYKRtxETFMlcvCrY8hAqyuXZDX4EsOfiI/jzh+PVBuVxazHBC1HmVqTKX1JnRtoxIMcH95K9UFlYog==",
"dependencies": {
"Microsoft.CSharp": "4.7.0"
}
@@ -233,49 +254,8 @@
},
"IdentityModel": {
"type": "Transitive",
- "resolved": "4.4.0",
- "contentHash": "b18wrIx5wnZlMxAX7oVsE+nDtAJ4hajYlH0xPlaRvo4r/fz08K6pPeZvbiqS9nfNbzfIgLFmNX+FL9qR9ZR5PA==",
- "dependencies": {
- "Newtonsoft.Json": "11.0.2",
- "System.Text.Encodings.Web": "4.7.0"
- }
- },
- "IdentityModel.AspNetCore.OAuth2Introspection": {
- "type": "Transitive",
- "resolved": "4.0.1",
- "contentHash": "ZNdMZMaj9fqR3j50vYsu+1U3QGd6n8+fqwf+a8mCTcmXGor+HgFDfdq0mM34bsmD6uEgAQup7sv2ZW5kR36dbA==",
- "dependencies": {
- "IdentityModel": "4.0.0"
- }
- },
- "IdentityServer4": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "blaxxGuOA7v/w1q+fxn97wZ+x2ecG1ZD4mc/N/ZOXMNeFZZhqv+4LF26Gecyik3nWrJPmbMEtQbLmRsKG8k61w==",
- "dependencies": {
- "IdentityModel": "4.4.0",
- "IdentityServer4.Storage": "4.1.2",
- "Microsoft.AspNetCore.Authentication.OpenIdConnect": "3.1.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.6.0",
- "Newtonsoft.Json": "12.0.2"
- }
- },
- "IdentityServer4.AccessTokenValidation": {
- "type": "Transitive",
- "resolved": "3.0.1",
- "contentHash": "qu/M6UyN4o9NVep7q545Ms7hYAnsQqSdLbN1Fjjrn4m35lyBfeQPSSNzDryAKHbodyWOQfHaOqKEyMEJQ5Rpgw==",
- "dependencies": {
- "IdentityModel.AspNetCore.OAuth2Introspection": "4.0.1",
- "Microsoft.AspNetCore.Authentication.JwtBearer": "3.0.0"
- }
- },
- "IdentityServer4.Storage": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "KoSffyZyyeCNTIyJiZnCuPakJ1QbCHlpty6gbWUj/7yl+w0PXIchgmmJnJSvddzBb8iZ2xew/vGlxWUIP17P2g==",
- "dependencies": {
- "IdentityModel": "4.4.0"
- }
+ "resolved": "6.0.0",
+ "contentHash": "eVHCR7a6m/dm5RFcBzE3qs/Jg5j9R5Rjpu8aTOv9e4AFvaQtBXb5ah7kmwU+YwA0ufRwz4wf1hnIvsD2hSnI4g=="
},
"LaunchDarkly.Cache": {
"type": "Transitive",
@@ -284,26 +264,27 @@
},
"LaunchDarkly.CommonSdk": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "YYYq+41gZRMQ8dIoMC6HOq/dI+4RY3HsexLLAaE9T1+1tVMeQkbCqak7sVeKX4QcE7xlXx23lWgipYUkRoRUyw==",
+ "resolved": "6.2.0",
+ "contentHash": "eLeb+tTNLwOxlUIsZWzJlcPmG9Wyf20NYyucP6MW6aqKW6doKFeSO+aJe0z+WyijbvfX1Dp1U1HQatOu6fa1Gg==",
"dependencies": {
+ "LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
},
"LaunchDarkly.EventSource": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "DN44Ry5M4lyrjiF7LEu0Ijco7Wm8R7mJopN+giYsYjkQlszsXdFvm3POoehIDAOtL1HHl5bZvF9k9xK034u3IA==",
+ "resolved": "5.1.0",
+ "contentHash": "PztDWiMvPWODx+kfBnCroZ8Lpya4nPc7ZO4TZysOogODbVXDDPDYrdcgVivCMgf4davhGrp61ekvZc+Uy1NYMA==",
"dependencies": {
- "LaunchDarkly.Logging": "[1.0.1, 3.0.0)"
+ "LaunchDarkly.Logging": "[2.0.0, 3.0.0)"
}
},
"LaunchDarkly.InternalSdk": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "jW8VEfFciuCcJUEuvSzmrbMVYYXwGL/ZWHUZLiA4aDOQ1LcEXp32uK405NQW/izEypUfWB+9TaSjPpFIC+5Wzw==",
+ "resolved": "3.3.0",
+ "contentHash": "TBvs/B6iyXp9MqRKjIoBZ/T0+/xgp5xg+MuHqr5U+N5+7DghtI2FnsmgeBedTIeQdA3Tk8Z4Bj4hlqU9FBiEnw==",
"dependencies": {
- "LaunchDarkly.CommonSdk": "6.0.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
"LaunchDarkly.Logging": "[2.0.0, 3.0.0)",
"System.Collections.Immutable": "1.7.1"
}
@@ -318,13 +299,13 @@
},
"LaunchDarkly.ServerSdk": {
"type": "Transitive",
- "resolved": "7.0.0",
- "contentHash": "gkTWb+f5QlsXIqFAciBef3qKZU2y0Hy3Fpt4pvZoxNcnBKg2PNTDSnbpbYEKPeQ1yk1avNaI/tKprnahfrmJFg==",
+ "resolved": "8.0.0",
+ "contentHash": "vosFEXYJABuIDIA0+6sncalTmrKXEkBKeqzuP9/vvcCVlFSXUl/ZnrkrAVg3ViDWDi7kjpJSk2W3h5D0TUfCGA==",
"dependencies": {
"LaunchDarkly.Cache": "1.0.2",
- "LaunchDarkly.CommonSdk": "6.0.0",
- "LaunchDarkly.EventSource": "5.0.1",
- "LaunchDarkly.InternalSdk": "3.1.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
+ "LaunchDarkly.EventSource": "5.1.0",
+ "LaunchDarkly.InternalSdk": "3.3.0",
"LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
@@ -352,10 +333,10 @@
},
"Microsoft.AspNetCore.Authentication.OpenIdConnect": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "O1cAQYUTU8EfRqwc5/rfTns4E4hKlFlg59fuKRrST+PzsxI6H07KqRN/JjdYhAuVYxF8jPnIGbj+zuc5paOWUw==",
+ "resolved": "6.0.0",
+ "contentHash": "cJxdro36spFzk/K2OFCddM6vZ+yoj6ug8mTFRH3Gdv1Pul/buSuCtfb/FSCp31UmS5S4C1315dU7wX3ErLFuDg==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.5.0"
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.10.0"
}
},
"Microsoft.AspNetCore.Cryptography.Internal": {
@@ -388,8 +369,8 @@
},
"Microsoft.AspNetCore.DataProtection.Abstractions": {
"type": "Transitive",
- "resolved": "3.1.32",
- "contentHash": "MPL4iVyiaRxnOUY5VATHjvhDWaAEFb77KFiUxVRklv3Z3v+STofUr1UG/aCt1O9cgN7FVTDaC5A7U+zsLub8Xg=="
+ "resolved": "6.0.0",
+ "contentHash": "Z/UU4NEBm5UgNufJmw+j5baW26ytCOIZ0G7sZocPaOzsUeBon1bkM3lSMNZQG2GmDjAIVP2XMSODf2jzSGbibw=="
},
"Microsoft.Azure.Amqp": {
"type": "Transitive",
@@ -469,29 +450,29 @@
},
"Microsoft.CodeAnalysis.Analyzers": {
"type": "Transitive",
- "resolved": "2.6.2-beta2",
- "contentHash": "rg5Ql73AmGCMG5Q40Kzbndq7C7S4XvsJA+2QXfZBCy2dRqD+a7BSbx/3942EoRUJ/8Wh9+kLg2G2qC46o3f1Aw=="
+ "resolved": "3.3.3",
+ "contentHash": "j/rOZtLMVJjrfLRlAMckJLPW/1rze9MT1yfWqSIbUPGRu1m1P0fuo9PmqapwsmePfGB5PJrudQLvmUOAMF0DqQ=="
},
"Microsoft.CodeAnalysis.Common": {
"type": "Transitive",
- "resolved": "3.0.0",
- "contentHash": "HEnLZ9Op5IoXeuokhfSLIXstXfEyPzXhQ/xsnvUmxzb+7YpwuLk57txArzGs/Wne5bWmU7Uey4Q1jUZ3++heqg==",
+ "resolved": "4.1.0",
+ "contentHash": "bNzTyxP3iD5FPFHfVDl15Y6/wSoI7e3MeV0lOaj9igbIKTjgrmuw6LoVJ06jUNFA7+KaDC/OIsStWl/FQJz6sQ==",
"dependencies": {
- "Microsoft.CodeAnalysis.Analyzers": "2.6.2-beta2",
- "System.Collections.Immutable": "1.5.0",
- "System.Memory": "4.5.1",
- "System.Reflection.Metadata": "1.6.0",
- "System.Runtime.CompilerServices.Unsafe": "4.5.0",
- "System.Text.Encoding.CodePages": "4.5.0",
- "System.Threading.Tasks.Extensions": "4.5.0"
+ "Microsoft.CodeAnalysis.Analyzers": "3.3.3",
+ "System.Collections.Immutable": "5.0.0",
+ "System.Memory": "4.5.4",
+ "System.Reflection.Metadata": "5.0.0",
+ "System.Runtime.CompilerServices.Unsafe": "5.0.0",
+ "System.Text.Encoding.CodePages": "4.5.1",
+ "System.Threading.Tasks.Extensions": "4.5.4"
}
},
"Microsoft.CodeAnalysis.CSharp": {
"type": "Transitive",
- "resolved": "3.0.0",
- "contentHash": "hWFUxc0iUbVvIKWJODErOeOa5GiqZuEcetxaCfHqZ04zHy0ZCLx3v4/TdF/6Erx1mXPHfoT2Tiz5rZCQZ6OyxQ==",
+ "resolved": "4.1.0",
+ "contentHash": "sbu6kDGzo9bfQxuqWpeEE7I9P30bSuZEnpDz9/qz20OU6pm79Z63+/BsAzO2e/R/Q97kBrpj647wokZnEVr97w==",
"dependencies": {
- "Microsoft.CodeAnalysis.Common": "[3.0.0]"
+ "Microsoft.CodeAnalysis.Common": "[4.1.0]"
}
},
"Microsoft.CSharp": {
@@ -979,8 +960,8 @@
},
"Newtonsoft.Json": {
"type": "Transitive",
- "resolved": "13.0.1",
- "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
+ "resolved": "13.0.3",
+ "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ=="
},
"NSec.Cryptography": {
"type": "Transitive",
@@ -1301,8 +1282,8 @@
},
"Serilog.Sinks.SyslogMessages": {
"type": "Transitive",
- "resolved": "2.0.6",
- "contentHash": "V2Yq2GEbk7taEPbpBLFzLXhrHrUzKf4sQu/zLrANU8XIoUn/Mr08M2E8PrcrWVXCj0R4xLMWYe0Z1sxOrMF3IA==",
+ "resolved": "2.0.9",
+ "contentHash": "y7J+/h/Nf5EAtbpa6lC1nDhK/F9kC5oxuVYmQivv242Oh4hAVMeoAk5Gv6bgb/KbmqufGPXUFkX/AlcrvZ8Ywg==",
"dependencies": {
"Serilog": "2.5.0",
"Serilog.Sinks.PeriodicBatching": "2.3.0"
@@ -1346,8 +1327,8 @@
},
"System.CodeDom": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "CPc6tWO1LAer3IzfZufDBRL+UZQcj5uS207NHALQzP84Vp/z6wF0Aa0YZImOQY8iStY0A2zI/e3ihKNPfUm8XA=="
+ "resolved": "5.0.0",
+ "contentHash": "JPJArwA1kdj8qDAkY2XGjSWoYnqiM7q/3yRNkt6n28Mnn95MuEGkZXUbPBf7qc3IjwrGY5ttQon7yqHZyQJmOQ=="
},
"System.Collections": {
"type": "Transitive",
@@ -1722,10 +1703,12 @@
},
"System.Management": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "sHsESYMmPDhQuOC66h6AEOs/XowzKsbT9srMbX71TCXP58hkpn1BqBjdmKj1+DCA/WlBETX1K5WjQHwmV0Txrg==",
+ "resolved": "5.0.0",
+ "contentHash": "MF1CHaRcC+MLFdnDthv4/bKWBZnlnSpkGqa87pKukQefgEdwtb9zFW6zs0GjPp73qtpYYg4q6PEKbzJbxCpKfw==",
"dependencies": {
- "System.CodeDom": "6.0.0"
+ "Microsoft.NETCore.Platforms": "5.0.0",
+ "Microsoft.Win32.Registry": "5.0.0",
+ "System.CodeDom": "5.0.0"
}
},
"System.Memory": {
@@ -1947,8 +1930,15 @@
},
"System.Reflection.Emit": {
"type": "Transitive",
- "resolved": "4.7.0",
- "contentHash": "VR4kk8XLKebQ4MZuKuIni/7oh+QGFmZW3qORd1GvBq/8026OpW501SzT/oypwiQl4TvT8ErnReh/NzY9u+C6wQ=="
+ "resolved": "4.3.0",
+ "contentHash": "228FG0jLcIwTVJyz8CLFKueVqQK36ANazUManGaJHkO0icjiIypKW7YLWLIWahyIkdh5M7mV2dJepllLyA1SKg==",
+ "dependencies": {
+ "System.IO": "4.3.0",
+ "System.Reflection": "4.3.0",
+ "System.Reflection.Emit.ILGeneration": "4.3.0",
+ "System.Reflection.Primitives": "4.3.0",
+ "System.Runtime": "4.3.0"
+ }
},
"System.Reflection.Emit.ILGeneration": {
"type": "Transitive",
@@ -1962,8 +1952,14 @@
},
"System.Reflection.Emit.Lightweight": {
"type": "Transitive",
- "resolved": "4.7.0",
- "contentHash": "a4OLB4IITxAXJeV74MDx49Oq2+PsF6Sml54XAFv+2RyWwtDBcabzoxiiJRhdhx+gaohLh4hEGCLQyBozXoQPqA=="
+ "resolved": "4.3.0",
+ "contentHash": "oadVHGSMsTmZsAF864QYN1t1QzZjIcuKU3l2S9cZOwDdDueNTrqq1yRj7koFfIGEnKpt6NjpL3rOzRhs4ryOgA==",
+ "dependencies": {
+ "System.Reflection": "4.3.0",
+ "System.Reflection.Emit.ILGeneration": "4.3.0",
+ "System.Reflection.Primitives": "4.3.0",
+ "System.Runtime": "4.3.0"
+ }
},
"System.Reflection.Extensions": {
"type": "Transitive",
@@ -1978,8 +1974,8 @@
},
"System.Reflection.Metadata": {
"type": "Transitive",
- "resolved": "1.6.0",
- "contentHash": "COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ=="
+ "resolved": "5.0.0",
+ "contentHash": "5NecZgXktdGg34rh1OenY1rFNDCI8xSjFr+Z4OU4cU06AQHUdRnIIEeWENu3Wl4YowbzkymAIMvi3WyK9U53pQ=="
},
"System.Reflection.Primitives": {
"type": "Transitive",
@@ -2556,11 +2552,10 @@
"BitPay.Light": "[1.0.1907, )",
"Braintree": "[5.19.0, )",
"DnsClient": "[1.7.0, )",
+ "Duende.IdentityServer": "[6.0.4, )",
"Fido2.AspNet": "[3.0.1, )",
- "Handlebars.Net": "[2.1.2, )",
- "IdentityServer4": "[4.1.2, )",
- "IdentityServer4.AccessTokenValidation": "[3.0.1, )",
- "LaunchDarkly.ServerSdk": "[7.0.0, )",
+ "Handlebars.Net": "[2.1.4, )",
+ "LaunchDarkly.ServerSdk": "[8.0.0, )",
"MailKit": "[4.2.0, )",
"Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )",
"Microsoft.Azure.Cosmos.Table": "[1.0.8, )",
@@ -2570,7 +2565,7 @@
"Microsoft.Extensions.Configuration.EnvironmentVariables": "[6.0.1, )",
"Microsoft.Extensions.Configuration.UserSecrets": "[6.0.1, )",
"Microsoft.Extensions.Identity.Stores": "[6.0.4, )",
- "Newtonsoft.Json": "[13.0.1, )",
+ "Newtonsoft.Json": "[13.0.3, )",
"Otp.NET": "[1.2.2, )",
"Quartz": "[3.4.0, )",
"SendGrid": "[9.27.0, )",
@@ -2579,7 +2574,7 @@
"Serilog.Extensions.Logging": "[3.1.0, )",
"Serilog.Extensions.Logging.File": "[2.0.0, )",
"Serilog.Sinks.AzureCosmosDB": "[2.0.0, )",
- "Serilog.Sinks.SyslogMessages": "[2.0.6, )",
+ "Serilog.Sinks.SyslogMessages": "[2.0.9, )",
"Stripe.net": "[40.0.0, )",
"YubicoDotNetClient": "[1.2.0, )"
}
diff --git a/src/Admin/Controllers/OrganizationsController.cs b/src/Admin/Controllers/OrganizationsController.cs
index f671df558d..aebdcefe4f 100644
--- a/src/Admin/Controllers/OrganizationsController.cs
+++ b/src/Admin/Controllers/OrganizationsController.cs
@@ -5,7 +5,6 @@ using Bit.Admin.Utilities;
using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Context;
-using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Exceptions;
using Bit.Core.Models.OrganizationConnectionConfigs;
@@ -21,7 +20,6 @@ using Bit.Core.Utilities;
using Bit.Core.Vault.Repositories;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
-using Stripe;
namespace Bit.Admin.Controllers;
@@ -50,7 +48,6 @@ public class OrganizationsController : Controller
private readonly ISecretRepository _secretRepository;
private readonly IProjectRepository _projectRepository;
private readonly IServiceAccountRepository _serviceAccountRepository;
- private readonly IStripeSyncService _stripeSyncService;
public OrganizationsController(
IOrganizationService organizationService,
@@ -74,8 +71,7 @@ public class OrganizationsController : Controller
ICurrentContext currentContext,
ISecretRepository secretRepository,
IProjectRepository projectRepository,
- IServiceAccountRepository serviceAccountRepository,
- IStripeSyncService stripeSyncService)
+ IServiceAccountRepository serviceAccountRepository)
{
_organizationService = organizationService;
_organizationRepository = organizationRepository;
@@ -99,7 +95,6 @@ public class OrganizationsController : Controller
_secretRepository = secretRepository;
_projectRepository = projectRepository;
_serviceAccountRepository = serviceAccountRepository;
- _stripeSyncService = stripeSyncService;
}
[RequirePermission(Permission.Org_List_View)]
@@ -213,19 +208,6 @@ public class OrganizationsController : Controller
throw new BadRequestException("Plan does not support Secrets Manager");
}
- try
- {
- if (!string.IsNullOrWhiteSpace(organization.GatewayCustomerId) && !string.IsNullOrWhiteSpace(organization.BillingEmail))
- {
- await _stripeSyncService.UpdateCustomerEmailAddress(organization.GatewayCustomerId, organization.BillingEmail);
- }
- }
- catch (StripeException stripeException)
- {
- _logger.LogError(stripeException, "Failed to update billing email address in Stripe for Organization with ID '{organizationId}'", organization.Id);
- throw;
- }
-
await _organizationRepository.ReplaceAsync(organization);
await _applicationCacheService.UpsertOrganizationAbilityAsync(organization);
await _referenceEventService.RaiseEventAsync(new ReferenceEvent(ReferenceEventType.OrganizationEditedByAdmin, organization, _currentContext)
diff --git a/src/Admin/Controllers/ToolsController.cs b/src/Admin/Controllers/ToolsController.cs
index d3d5b1783c..2b59441a54 100644
--- a/src/Admin/Controllers/ToolsController.cs
+++ b/src/Admin/Controllers/ToolsController.cs
@@ -3,6 +3,7 @@ using System.Text.Json;
using Bit.Admin.Enums;
using Bit.Admin.Models;
using Bit.Admin.Utilities;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.Entities;
using Bit.Core.Models.BitStripe;
using Bit.Core.OrganizationFeatures.OrganizationLicenses.Interfaces;
diff --git a/src/Admin/Controllers/UsersController.cs b/src/Admin/Controllers/UsersController.cs
index 30565ca3d9..e4ff88a68e 100644
--- a/src/Admin/Controllers/UsersController.cs
+++ b/src/Admin/Controllers/UsersController.cs
@@ -2,6 +2,8 @@
using Bit.Admin.Models;
using Bit.Admin.Services;
using Bit.Admin.Utilities;
+using Bit.Core;
+using Bit.Core.Context;
using Bit.Core.Entities;
using Bit.Core.Repositories;
using Bit.Core.Services;
@@ -21,19 +23,28 @@ public class UsersController : Controller
private readonly IPaymentService _paymentService;
private readonly GlobalSettings _globalSettings;
private readonly IAccessControlService _accessControlService;
+ private readonly ICurrentContext _currentContext;
+ private readonly IFeatureService _featureService;
+
+ private bool UseFlexibleCollections =>
+ _featureService.IsEnabled(FeatureFlagKeys.FlexibleCollections, _currentContext);
public UsersController(
IUserRepository userRepository,
ICipherRepository cipherRepository,
IPaymentService paymentService,
GlobalSettings globalSettings,
- IAccessControlService accessControlService)
+ IAccessControlService accessControlService,
+ ICurrentContext currentContext,
+ IFeatureService featureService)
{
_userRepository = userRepository;
_cipherRepository = cipherRepository;
_paymentService = paymentService;
_globalSettings = globalSettings;
_accessControlService = accessControlService;
+ _currentContext = currentContext;
+ _featureService = featureService;
}
[RequirePermission(Permission.User_List_View)]
@@ -69,7 +80,7 @@ public class UsersController : Controller
return RedirectToAction("Index");
}
- var ciphers = await _cipherRepository.GetManyByUserIdAsync(id);
+ var ciphers = await _cipherRepository.GetManyByUserIdAsync(id, useFlexibleCollections: UseFlexibleCollections);
return View(new UserViewModel(user, ciphers));
}
@@ -82,7 +93,7 @@ public class UsersController : Controller
return RedirectToAction("Index");
}
- var ciphers = await _cipherRepository.GetManyByUserIdAsync(id);
+ var ciphers = await _cipherRepository.GetManyByUserIdAsync(id, useFlexibleCollections: UseFlexibleCollections);
var billingInfo = await _paymentService.GetBillingAsync(user);
return View(new UserEditModel(user, ciphers, billingInfo, _globalSettings));
}
diff --git a/src/Admin/Models/OrganizationSelectableViewModel.cs b/src/Admin/Models/OrganizationSelectableViewModel.cs
index 0daa5fda88..e43bb19723 100644
--- a/src/Admin/Models/OrganizationSelectableViewModel.cs
+++ b/src/Admin/Models/OrganizationSelectableViewModel.cs
@@ -1,4 +1,4 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
namespace Bit.Admin.Models;
diff --git a/src/Admin/Models/OrganizationsModel.cs b/src/Admin/Models/OrganizationsModel.cs
index 706377f8e2..ea2a370d51 100644
--- a/src/Admin/Models/OrganizationsModel.cs
+++ b/src/Admin/Models/OrganizationsModel.cs
@@ -1,4 +1,4 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
namespace Bit.Admin.Models;
diff --git a/src/Admin/Views/Shared/_OrganizationForm.cshtml b/src/Admin/Views/Shared/_OrganizationForm.cshtml
index 76502ff75b..72076cbd37 100644
--- a/src/Admin/Views/Shared/_OrganizationForm.cshtml
+++ b/src/Admin/Views/Shared/_OrganizationForm.cshtml
@@ -82,7 +82,11 @@
@{
var planTypes = Enum.GetValues()
- .Where(p => Model.Provider == null || p is >= PlanType.TeamsMonthly and <= PlanType.TeamsStarter)
+ .Where(p =>
+ Model.Provider == null ||
+ (Model.Provider != null
+ && p is >= PlanType.TeamsMonthly2019 and <= PlanType.EnterpriseAnnually2019 or >= PlanType.TeamsMonthly2020 and <= PlanType.EnterpriseAnnually)
+ )
.Select(e => new SelectListItem
{
Value = ((int)e).ToString(),
diff --git a/src/Admin/packages.lock.json b/src/Admin/packages.lock.json
index 470e991b07..b95c61893e 100644
--- a/src/Admin/packages.lock.json
+++ b/src/Admin/packages.lock.json
@@ -193,13 +193,13 @@
},
"Dapper": {
"type": "Transitive",
- "resolved": "2.0.123",
- "contentHash": "RDFF4rBLLmbpi6pwkY7q/M6UXHRJEOerplDGE5jwEkP/JGJnBauAClYavNKJPW1yOTWRPIyfj4is3EaJxQXILQ=="
+ "resolved": "2.1.24",
+ "contentHash": "/2t2vsdJyZRsk13AsWigZpsuFvEwK+o3v862cEULXoww905gyKhJFSuwmZI/4Ui9COX9ZCFCI09UHyH4wVYl3A=="
},
"dbup-core": {
"type": "Transitive",
- "resolved": "5.0.8",
- "contentHash": "d+3RxJDftcarp1Y7jI78HRdRWRC7VFjM+rB2CFHWDmao6OixuLrqiyEo1DeuMNrWLTR5mmE8p1YTpFOvozI9ZQ==",
+ "resolved": "5.0.37",
+ "contentHash": "++z5z25tgkJ4eiLp3MahAmTkEDQogj5SoGXfDX0PxatjQfGszuR5hK3JBaB1orfCJ68mjZGtKWEp9YcxXa4jjg==",
"dependencies": {
"Microsoft.CSharp": "4.7.0",
"System.Diagnostics.TraceSource": "4.3.0"
@@ -207,12 +207,12 @@
},
"dbup-sqlserver": {
"type": "Transitive",
- "resolved": "5.0.8",
- "contentHash": "b954l5Zgj9qgHtm16SLq2qGLJ0gIZtrWdh6JHoUsCLMHYW+0K2Oevabquw447At4U6X2t4CNuy7ZLHYf/Z/8yg==",
+ "resolved": "5.0.37",
+ "contentHash": "nSmm8ImnqY/cyvlUolyn7cl+xekEe2syq2jb6mpqCsGvDUnJNFTQGE2N0R3wtIDBBc/e/waTMzYvVCgQkLxNnw==",
"dependencies": {
"Microsoft.Azure.Services.AppAuthentication": "1.6.2",
- "Microsoft.Data.SqlClient": "5.0.1",
- "dbup-core": "5.0.8"
+ "Microsoft.Data.SqlClient": "5.1.1",
+ "dbup-core": "5.0.37"
}
},
"DnsClient": {
@@ -223,6 +223,24 @@
"Microsoft.Win32.Registry": "5.0.0"
}
},
+ "Duende.IdentityServer": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "4HVjzx1F8v5J+U7oa8RGAQGj2QzmzNSu87r18Sh+dlh10uyZZL8teAaT/FaVLDObnfItGdPFvN8mwpF/HkI3Xw==",
+ "dependencies": {
+ "Duende.IdentityServer.Storage": "6.0.4",
+ "Microsoft.AspNetCore.Authentication.OpenIdConnect": "6.0.0"
+ }
+ },
+ "Duende.IdentityServer.Storage": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "s5gAjfbpr2IMgI+fU2Nx+2AZdzstmbt9gpo13iX7GwvqSeSaBVqj9ZskAN0R2KF1OemPdZuGnfaTcevdXMUrrw==",
+ "dependencies": {
+ "IdentityModel": "6.0.0",
+ "Microsoft.AspNetCore.DataProtection.Abstractions": "6.0.0"
+ }
+ },
"Fido2": {
"type": "Transitive",
"resolved": "3.0.1",
@@ -251,57 +269,16 @@
},
"Handlebars.Net": {
"type": "Transitive",
- "resolved": "2.1.2",
- "contentHash": "p60QyeBYpZmcZdIXRMqs9XySIBaxJ0lj3+QD0EJVr4ybTigOTCumXMMin5dPwjo9At1UwkDZ3gGwa1lmGjG6DA==",
+ "resolved": "2.1.4",
+ "contentHash": "Od7MWDfGxYKRtxETFMlcvCrY8hAqyuXZDX4EsOfiI/jzh+PVBuVxazHBC1HmVqTKX1JnRtoxIMcH95K9UFlYog==",
"dependencies": {
"Microsoft.CSharp": "4.7.0"
}
},
"IdentityModel": {
"type": "Transitive",
- "resolved": "4.4.0",
- "contentHash": "b18wrIx5wnZlMxAX7oVsE+nDtAJ4hajYlH0xPlaRvo4r/fz08K6pPeZvbiqS9nfNbzfIgLFmNX+FL9qR9ZR5PA==",
- "dependencies": {
- "Newtonsoft.Json": "11.0.2",
- "System.Text.Encodings.Web": "4.7.0"
- }
- },
- "IdentityModel.AspNetCore.OAuth2Introspection": {
- "type": "Transitive",
- "resolved": "4.0.1",
- "contentHash": "ZNdMZMaj9fqR3j50vYsu+1U3QGd6n8+fqwf+a8mCTcmXGor+HgFDfdq0mM34bsmD6uEgAQup7sv2ZW5kR36dbA==",
- "dependencies": {
- "IdentityModel": "4.0.0"
- }
- },
- "IdentityServer4": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "blaxxGuOA7v/w1q+fxn97wZ+x2ecG1ZD4mc/N/ZOXMNeFZZhqv+4LF26Gecyik3nWrJPmbMEtQbLmRsKG8k61w==",
- "dependencies": {
- "IdentityModel": "4.4.0",
- "IdentityServer4.Storage": "4.1.2",
- "Microsoft.AspNetCore.Authentication.OpenIdConnect": "3.1.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.6.0",
- "Newtonsoft.Json": "12.0.2"
- }
- },
- "IdentityServer4.AccessTokenValidation": {
- "type": "Transitive",
- "resolved": "3.0.1",
- "contentHash": "qu/M6UyN4o9NVep7q545Ms7hYAnsQqSdLbN1Fjjrn4m35lyBfeQPSSNzDryAKHbodyWOQfHaOqKEyMEJQ5Rpgw==",
- "dependencies": {
- "IdentityModel.AspNetCore.OAuth2Introspection": "4.0.1",
- "Microsoft.AspNetCore.Authentication.JwtBearer": "3.0.0"
- }
- },
- "IdentityServer4.Storage": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "KoSffyZyyeCNTIyJiZnCuPakJ1QbCHlpty6gbWUj/7yl+w0PXIchgmmJnJSvddzBb8iZ2xew/vGlxWUIP17P2g==",
- "dependencies": {
- "IdentityModel": "4.4.0"
- }
+ "resolved": "6.0.0",
+ "contentHash": "eVHCR7a6m/dm5RFcBzE3qs/Jg5j9R5Rjpu8aTOv9e4AFvaQtBXb5ah7kmwU+YwA0ufRwz4wf1hnIvsD2hSnI4g=="
},
"LaunchDarkly.Cache": {
"type": "Transitive",
@@ -310,26 +287,27 @@
},
"LaunchDarkly.CommonSdk": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "YYYq+41gZRMQ8dIoMC6HOq/dI+4RY3HsexLLAaE9T1+1tVMeQkbCqak7sVeKX4QcE7xlXx23lWgipYUkRoRUyw==",
+ "resolved": "6.2.0",
+ "contentHash": "eLeb+tTNLwOxlUIsZWzJlcPmG9Wyf20NYyucP6MW6aqKW6doKFeSO+aJe0z+WyijbvfX1Dp1U1HQatOu6fa1Gg==",
"dependencies": {
+ "LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
},
"LaunchDarkly.EventSource": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "DN44Ry5M4lyrjiF7LEu0Ijco7Wm8R7mJopN+giYsYjkQlszsXdFvm3POoehIDAOtL1HHl5bZvF9k9xK034u3IA==",
+ "resolved": "5.1.0",
+ "contentHash": "PztDWiMvPWODx+kfBnCroZ8Lpya4nPc7ZO4TZysOogODbVXDDPDYrdcgVivCMgf4davhGrp61ekvZc+Uy1NYMA==",
"dependencies": {
- "LaunchDarkly.Logging": "[1.0.1, 3.0.0)"
+ "LaunchDarkly.Logging": "[2.0.0, 3.0.0)"
}
},
"LaunchDarkly.InternalSdk": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "jW8VEfFciuCcJUEuvSzmrbMVYYXwGL/ZWHUZLiA4aDOQ1LcEXp32uK405NQW/izEypUfWB+9TaSjPpFIC+5Wzw==",
+ "resolved": "3.3.0",
+ "contentHash": "TBvs/B6iyXp9MqRKjIoBZ/T0+/xgp5xg+MuHqr5U+N5+7DghtI2FnsmgeBedTIeQdA3Tk8Z4Bj4hlqU9FBiEnw==",
"dependencies": {
- "LaunchDarkly.CommonSdk": "6.0.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
"LaunchDarkly.Logging": "[2.0.0, 3.0.0)",
"System.Collections.Immutable": "1.7.1"
}
@@ -344,13 +322,13 @@
},
"LaunchDarkly.ServerSdk": {
"type": "Transitive",
- "resolved": "7.0.0",
- "contentHash": "gkTWb+f5QlsXIqFAciBef3qKZU2y0Hy3Fpt4pvZoxNcnBKg2PNTDSnbpbYEKPeQ1yk1avNaI/tKprnahfrmJFg==",
+ "resolved": "8.0.0",
+ "contentHash": "vosFEXYJABuIDIA0+6sncalTmrKXEkBKeqzuP9/vvcCVlFSXUl/ZnrkrAVg3ViDWDi7kjpJSk2W3h5D0TUfCGA==",
"dependencies": {
"LaunchDarkly.Cache": "1.0.2",
- "LaunchDarkly.CommonSdk": "6.0.0",
- "LaunchDarkly.EventSource": "5.0.1",
- "LaunchDarkly.InternalSdk": "3.1.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
+ "LaunchDarkly.EventSource": "5.1.0",
+ "LaunchDarkly.InternalSdk": "3.3.0",
"LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
@@ -362,16 +340,16 @@
},
"linq2db": {
"type": "Transitive",
- "resolved": "5.2.1",
- "contentHash": "OOBM8s39zhbZAgqFnl2KGxT5RqBDw21X69U528qV2PgQispaA3f+or0ILrLEgnNIJuB4EBgaw8gC6ttSHn4X0Q=="
+ "resolved": "5.3.1",
+ "contentHash": "707mIbEmtptvKeUW940UwoNwq05I7OUu0VWtclLtyYaASp+ugX4I/Er1UVpeldsDawqlVMXB5EQ5/Oar6AkUGQ=="
},
"linq2db.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.5.0",
- "contentHash": "ePHzO99xbObgMLlAFh08of1SnVhg6j4Su9327DrIB7RZWCgtQIX6k+nbl+HRVOooAndZSs7b+DduSgdnJjaJGw==",
+ "resolved": "7.6.0",
+ "contentHash": "T1W9o8wVzApsUwu7SRg/L7487kaiLQYt2AqRVnXVGfobD+ZKy2oRsUMws0PICtciaz4qbfLp/r/+NksfuYsFlw==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Relational": "7.0.0",
- "linq2db": "5.2.1"
+ "linq2db": "5.3.1"
}
},
"MailKit": {
@@ -392,10 +370,10 @@
},
"Microsoft.AspNetCore.Authentication.OpenIdConnect": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "O1cAQYUTU8EfRqwc5/rfTns4E4hKlFlg59fuKRrST+PzsxI6H07KqRN/JjdYhAuVYxF8jPnIGbj+zuc5paOWUw==",
+ "resolved": "6.0.0",
+ "contentHash": "cJxdro36spFzk/K2OFCddM6vZ+yoj6ug8mTFRH3Gdv1Pul/buSuCtfb/FSCp31UmS5S4C1315dU7wX3ErLFuDg==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.5.0"
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.10.0"
}
},
"Microsoft.AspNetCore.Cryptography.Internal": {
@@ -428,8 +406,8 @@
},
"Microsoft.AspNetCore.DataProtection.Abstractions": {
"type": "Transitive",
- "resolved": "3.1.32",
- "contentHash": "MPL4iVyiaRxnOUY5VATHjvhDWaAEFb77KFiUxVRklv3Z3v+STofUr1UG/aCt1O9cgN7FVTDaC5A7U+zsLub8Xg=="
+ "resolved": "6.0.0",
+ "contentHash": "Z/UU4NEBm5UgNufJmw+j5baW26ytCOIZ0G7sZocPaOzsUeBon1bkM3lSMNZQG2GmDjAIVP2XMSODf2jzSGbibw=="
},
"Microsoft.Azure.Amqp": {
"type": "Transitive",
@@ -504,48 +482,44 @@
},
"Microsoft.Data.SqlClient": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "uu8dfrsx081cSbEevWuZAvqdmANDGJkbLBL2G3j0LAZxX1Oy8RCVAaC4Lcuak6jNicWP6CWvHqBTIEmQNSxQlw==",
+ "resolved": "5.1.1",
+ "contentHash": "MW5E9HFvCaV069o8b6YpuRDPBux8s96qDnOJ+4N9QNUCs7c5W3KxwQ+ftpAjbMUlImL+c9WR+l+f5hzjkqhu2g==",
"dependencies": {
- "Azure.Identity": "1.6.0",
- "Microsoft.Data.SqlClient.SNI.runtime": "5.0.1",
- "Microsoft.Identity.Client": "4.45.0",
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.21.0",
+ "Azure.Identity": "1.7.0",
+ "Microsoft.Data.SqlClient.SNI.runtime": "5.1.0",
+ "Microsoft.Identity.Client": "4.47.2",
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.24.0",
"Microsoft.SqlServer.Server": "1.0.0",
- "Microsoft.Win32.Registry": "5.0.0",
- "System.Buffers": "4.5.1",
- "System.Configuration.ConfigurationManager": "5.0.0",
- "System.Diagnostics.DiagnosticSource": "5.0.0",
- "System.IO": "4.3.0",
- "System.Resources.ResourceManager": "4.3.0",
- "System.Runtime.Caching": "5.0.0",
+ "System.Configuration.ConfigurationManager": "6.0.1",
+ "System.Diagnostics.DiagnosticSource": "6.0.0",
+ "System.Runtime.Caching": "6.0.0",
"System.Security.Cryptography.Cng": "5.0.0",
"System.Security.Principal.Windows": "5.0.0",
- "System.Text.Encoding.CodePages": "5.0.0",
- "System.Text.Encodings.Web": "4.7.2"
+ "System.Text.Encoding.CodePages": "6.0.0",
+ "System.Text.Encodings.Web": "6.0.0"
}
},
"Microsoft.Data.SqlClient.SNI.runtime": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "y0X5MxiNdbITJYoafJ2ruaX6hqO0twpCGR/ipiDOe85JKLU8WL4TuAQfDe5qtt3bND5Je26HnrarLSAMMnVTNg=="
+ "resolved": "5.1.0",
+ "contentHash": "jVsElisM5sfBzaaV9kdq2NXZLwIbytetnsOIlJ0cQGgQP4zFNBmkfHBnpwtmKrtBJBEV9+9PVQPVrcCVhDgcIg=="
},
"Microsoft.Data.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "FTerRmQPqHrCrnoUzhBu+E+1DNGwyrAMLqHkAqOOOu5pGfyMOj8qQUBxI/gDtWtG11p49UxSfWmBzRNlwZqfUg==",
+ "resolved": "7.0.14",
+ "contentHash": "qvYae3/v9Fvqsjp/7OKQBuJK+Uc3m/WctfpIUMmGMDot2Bd8UWBKiMSlh26UtfQa9x4N+k7NxCT+AbZVoNrCdg==",
"dependencies": {
"SQLitePCLRaw.core": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "RXbRLHHWP2Z3pq8qcL5nQ6LPeoOyp8hasM5bd0Te8PiQi3RjWQR4tcbdY5XMqQ+oTO9wA8/RLhZRn/hnxlTDnQ==",
+ "resolved": "7.0.14",
+ "contentHash": "0KYkAemPygW6yzifciFlmMzkO4sI4Dw69xLgwg3ui5rXJS5XvzuAWVvfdrKJciqeCbCnVS/ZbOWpcwWgqce5bQ==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Abstractions": "7.0.5",
- "Microsoft.EntityFrameworkCore.Analyzers": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Abstractions": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Analyzers": "7.0.14",
"Microsoft.Extensions.Caching.Memory": "7.0.0",
"Microsoft.Extensions.DependencyInjection": "7.0.0",
"Microsoft.Extensions.Logging": "7.0.0"
@@ -553,49 +527,49 @@
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "iwQso+hFRsEWjhH2WsEQj1D2QE5BlEXiXEt6A3SlYTPRPdZsyTNDeDDEdtxL+H/UJPQgQYY+9SMMRcEiXBmCAA=="
+ "resolved": "7.0.14",
+ "contentHash": "aEcXDSYpDdD5wdIRKTqcS44f3W4capqQ1BWVRPJgacATfHkO62RX9Nnh0hUFg+rei9OLuJp0Y4zsy1fNeOXv5g=="
},
"Microsoft.EntityFrameworkCore.Analyzers": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "yMLM/aK1MikVqpjxd7PJ1Pjgztd3VAd26ZHxyjxG3RPeM9cHjvS5tCg9kAAayR6eHmBg0ffZsHdT28WfA5tTlA=="
+ "resolved": "7.0.14",
+ "contentHash": "esI4RF6mix4DDFBhWB9k1vJxAL8GouSf5ZV8oFJoVsIQ9d2J3MPgC1VL2qM9Vw5cH7Vg7TzRyKNpCRXFVkWs9w=="
},
"Microsoft.EntityFrameworkCore.Relational": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "u/33DC4S6g2hpMPgBc5Kdnlz//nqHR5c/ovgjtiP/wQ7sOd0EOdygVzUJAAOxCwbtAHDsJXS9Vc3jLFYq0yu8Q==",
+ "resolved": "7.0.14",
+ "contentHash": "MrVBnWOFYwfLMGQfrcIuqEM9Xvokv1vJeYxqNH3K3xOtAdHwHQTrKnpDP97tU+LBlvcnyXAtAtryYcpLXWtRNA==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "7.0.5",
+ "Microsoft.EntityFrameworkCore": "7.0.14",
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.Sqlite": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "2XPZB9OLF5/m13HgZp7/Dv0u8FWEJzcaBsMYR9Kp3R6aygkb3RnOijofPDTsmdhAqG9YTysCmh2bFaGs0TCc7A==",
+ "resolved": "7.0.14",
+ "contentHash": "8c8Hw2tmfy5YEsi9RL2/u2Qi9IwVbmj/yDlJy4iJPadeE3/AssLrgtobOBz4ftg2y5PVjFL59Gq7YzGLQH5q1A==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.14",
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "4C+9ct6A/Bq61Ta9Uh2td4/XwNpRCiPI03SWTa3hPJjA/g8wCw2hetbh3DDe5HcydzgDq/lRRjU/eRy3UODklQ==",
+ "resolved": "7.0.14",
+ "contentHash": "JNUkZVff1V/A/P3JiBbgt+Y2oCQSuzORxE3jOqFDbFjSFu7jHDEetJ/afSF/taa0lbyN9OpvaKjsbKk3Iis29Q==",
"dependencies": {
- "Microsoft.Data.Sqlite.Core": "7.0.5",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5",
+ "Microsoft.Data.Sqlite.Core": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14",
"Microsoft.Extensions.DependencyModel": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.SqlServer": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "cUJqCiamT0EvpKNgZEV5fqNv2MyVfKNgOPQfFINqHiIKHOYrS0nTCUJP97+UuG0JIIrP792/PwnuNjbekImtBg==",
+ "resolved": "7.0.14",
+ "contentHash": "d9hqEw4W/TdQ1WDm03uyFuDoehL6GNq/NMChFaC4dcV60I42vKdUC0fYTuE2QPunVUpf5XUTCkJ6fYGjMos2AA==",
"dependencies": {
- "Microsoft.Data.SqlClient": "5.0.1",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5"
+ "Microsoft.Data.SqlClient": "5.1.1",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14"
}
},
"Microsoft.Extensions.Caching.Abstractions": {
@@ -848,8 +822,8 @@
},
"Microsoft.IdentityModel.Abstractions": {
"type": "Transitive",
- "resolved": "6.22.0",
- "contentHash": "iI+9V+2ciCrbheeLjpmjcqCnhy+r6yCoEcid3nkoFWerHgjVuT6CPM4HODUTtUPe1uwks4wcnAujJ8u+IKogHQ=="
+ "resolved": "6.24.0",
+ "contentHash": "X6aBK56Ot15qKyG7X37KsPnrwah+Ka55NJWPppWVTDi8xWq7CJgeNw2XyaeHgE1o/mW4THwoabZkBbeG2TPBiw=="
},
"Microsoft.IdentityModel.Clients.ActiveDirectory": {
"type": "Transitive",
@@ -873,45 +847,47 @@
},
"Microsoft.IdentityModel.JsonWebTokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "d3h1/BaMeylKTkdP6XwRCxuOoDJZ44V9xaXr6gl5QxmpnZGdoK3bySo3OQN8ehRLJHShb94ElLUvoXyglQtgAw==",
+ "resolved": "6.24.0",
+ "contentHash": "XDWrkThcxfuWp79AvAtg5f+uRS1BxkIbJnsG/e8VPzOWkYYuDg33emLjp5EWcwXYYIDsHnVZD/00kM/PYFQc/g==",
"dependencies": {
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Tokens": "6.24.0",
+ "System.Text.Encoding": "4.3.0",
+ "System.Text.Json": "4.7.2"
}
},
"Microsoft.IdentityModel.Logging": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "tuEhHIQwvBEhMf8I50hy8FHmRSUkffDFP5EdLsSDV4qRcl2wvOPkQxYqEzWkh+ytW6sbdJGEXElGhmhDfAxAKg==",
+ "resolved": "6.24.0",
+ "contentHash": "qLYWDOowM/zghmYKXw1yfYKlHOdS41i8t4hVXr9bSI90zHqhyhQh9GwVy8pENzs5wHeytU23DymluC9NtgYv7w==",
"dependencies": {
- "Microsoft.IdentityModel.Abstractions": "6.21.0"
+ "Microsoft.IdentityModel.Abstractions": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "0FqY5cTLQKtHrClzHEI+QxJl8OBT2vUiEQQB7UKk832JDiJJmetzYZ3AdSrPjN/3l3nkhByeWzXnhrX0JbifKg==",
+ "resolved": "6.24.0",
+ "contentHash": "+NzKCkvsQ8X1r/Ff74V7CFr9OsdMRaB6DsV+qpH7NNLdYJ8O4qHbmTnNEsjFcDmk/gVNDwhoL2gN5pkPVq0lwQ==",
"dependencies": {
- "Microsoft.IdentityModel.Logging": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Logging": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols.OpenIdConnect": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "vtSKL7n6EnAsLyxmiviusm6LKrblT2ndnNqN6rvVq6iIHAnPCK9E2DkDx6h1Jrpy1cvbp40r0cnTg23nhEAGTA==",
+ "resolved": "6.24.0",
+ "contentHash": "a/2RRrc8C9qaw8qdD9hv1ES9YKFgxaqr/SnwMSLbwQZJSUQDd4qx1K4EYgWaQWs73R+VXLyKSxN0f/uE9CsBiQ==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols": "6.21.0",
- "System.IdentityModel.Tokens.Jwt": "6.21.0"
+ "Microsoft.IdentityModel.Protocols": "6.24.0",
+ "System.IdentityModel.Tokens.Jwt": "6.24.0"
}
},
"Microsoft.IdentityModel.Tokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "AAEHZvZyb597a+QJSmtxH3n2P1nIJGpZ4Q89GTenknRx6T6zyfzf592yW/jA5e8EHN4tNMjjXHQaYWEq5+L05w==",
+ "resolved": "6.24.0",
+ "contentHash": "ZPqHi86UYuqJXJ7bLnlEctHKkPKT4lGUFbotoCNiXNCSL02emYlcxzGYsRGWWmbFEcYDMi2dcTLLYNzHqWOTsw==",
"dependencies": {
"Microsoft.CSharp": "4.5.0",
- "Microsoft.IdentityModel.Logging": "6.21.0",
+ "Microsoft.IdentityModel.Logging": "6.24.0",
"System.Security.Cryptography.Cng": "4.5.0"
}
},
@@ -1042,13 +1018,13 @@
},
"Newtonsoft.Json": {
"type": "Transitive",
- "resolved": "13.0.1",
- "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
+ "resolved": "13.0.3",
+ "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ=="
},
"Npgsql": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "7UVPYy2RP0ci04PED1tc9ZCaTw/DfSdSkLiGEFCAvwMwsgA/bAluj1liNzP1IpN0MFofnOF0cm1zJfmbEuCehg==",
+ "resolved": "7.0.6",
+ "contentHash": "TAqvwRnm3NJ0QvN7cvu6geJkbI0XPzGVRElVY5hF4gsgA+BnE12x6GM1TLhdeq+7ZKvvo3BD8jXKnXmr3tvdEw==",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "6.0.0",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
@@ -1056,13 +1032,13 @@
},
"Npgsql.EntityFrameworkCore.PostgreSQL": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "ZYMtyG6pmLtUsFAx0/XaIlVkJM+1gArWEKD55cLLxiVlGScAphjiGj+G7Gk16yg5lhhdWx+bgXWpIUISXuS33g==",
+ "resolved": "7.0.11",
+ "contentHash": "cHEgEz0ldXc9wVANs8sJqC+3eilqefrkasCBgaVT0tyj8tb1p3/pwy2ngjboNkDG3M0z+xJsJ4jC5p8wySAM3w==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, 8.0.0)",
- "Npgsql": "7.0.4"
+ "Microsoft.EntityFrameworkCore": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.11, 8.0.0)",
+ "Npgsql": "7.0.6"
}
},
"NSec.Cryptography": {
@@ -1385,8 +1361,8 @@
},
"Serilog.Sinks.SyslogMessages": {
"type": "Transitive",
- "resolved": "2.0.6",
- "contentHash": "V2Yq2GEbk7taEPbpBLFzLXhrHrUzKf4sQu/zLrANU8XIoUn/Mr08M2E8PrcrWVXCj0R4xLMWYe0Z1sxOrMF3IA==",
+ "resolved": "2.0.9",
+ "contentHash": "y7J+/h/Nf5EAtbpa6lC1nDhK/F9kC5oxuVYmQivv242Oh4hAVMeoAk5Gv6bgb/KbmqufGPXUFkX/AlcrvZ8Ywg==",
"dependencies": {
"Serilog": "2.5.0",
"Serilog.Sinks.PeriodicBatching": "2.3.0"
@@ -1559,8 +1535,8 @@
},
"System.Configuration.ConfigurationManager": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "7T+m0kDSlIPTHIkPMIu6m6tV6qsMqJpvQWW2jIc2qi7sn40qxFo0q+7mEQAhMPXZHMKnWrnv47ntGlM/ejvw3g==",
+ "resolved": "6.0.1",
+ "contentHash": "jXw9MlUu/kRfEU0WyTptAVueupqIeE3/rl0EZDMlf8pcvJnitQ8HeVEp69rZdaStXwTV72boi/Bhw8lOeO+U2w==",
"dependencies": {
"System.Security.Cryptography.ProtectedData": "6.0.0",
"System.Security.Permissions": "6.0.0"
@@ -1746,11 +1722,11 @@
},
"System.IdentityModel.Tokens.Jwt": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "JRD8AuypBE+2zYxT3dMJomQVsPYsCqlyZhWel3J1d5nzQokSRyTueF+Q4ID3Jcu6zSZKuzOdJ1MLTkbQsDqcvQ==",
+ "resolved": "6.24.0",
+ "contentHash": "Qibsj9MPWq8S/C0FgvmsLfIlHLE7ay0MJIaAmK94ivN3VyDdglqReed5qMvdQhSL0BzK6v0Z1wB/sD88zVu6Jw==",
"dependencies": {
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"System.IO": {
@@ -2240,10 +2216,10 @@
},
"System.Runtime.Caching": {
"type": "Transitive",
- "resolved": "5.0.0",
- "contentHash": "30D6MkO8WF9jVGWZIP0hmCN8l9BTY4LCsAzLIe4xFSXzs+AjDotR7DpSmj27pFskDURzUvqYYY0ikModgBTxWw==",
+ "resolved": "6.0.0",
+ "contentHash": "E0e03kUp5X2k+UAoVl6efmI7uU7JRBWi5EIdlQ7cr0NpBGjHG4fWII35PgsBY9T4fJQ8E4QPsL0rKksU9gcL5A==",
"dependencies": {
- "System.Configuration.ConfigurationManager": "5.0.0"
+ "System.Configuration.ConfigurationManager": "6.0.0"
}
},
"System.Runtime.CompilerServices.Unsafe": {
@@ -2807,15 +2783,15 @@
"commercial.core": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )"
+ "Core": "[2023.12.0, )"
}
},
"commercial.infrastructure.entityframework": {
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )",
- "Core": "[2023.10.2, )",
- "Infrastructure.EntityFramework": "[2023.10.2, )"
+ "Core": "[2023.12.0, )",
+ "Infrastructure.EntityFramework": "[2023.12.0, )"
}
},
"core": {
@@ -2833,11 +2809,10 @@
"BitPay.Light": "[1.0.1907, )",
"Braintree": "[5.19.0, )",
"DnsClient": "[1.7.0, )",
+ "Duende.IdentityServer": "[6.0.4, )",
"Fido2.AspNet": "[3.0.1, )",
- "Handlebars.Net": "[2.1.2, )",
- "IdentityServer4": "[4.1.2, )",
- "IdentityServer4.AccessTokenValidation": "[3.0.1, )",
- "LaunchDarkly.ServerSdk": "[7.0.0, )",
+ "Handlebars.Net": "[2.1.4, )",
+ "LaunchDarkly.ServerSdk": "[8.0.0, )",
"MailKit": "[4.2.0, )",
"Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )",
"Microsoft.Azure.Cosmos.Table": "[1.0.8, )",
@@ -2847,7 +2822,7 @@
"Microsoft.Extensions.Configuration.EnvironmentVariables": "[6.0.1, )",
"Microsoft.Extensions.Configuration.UserSecrets": "[6.0.1, )",
"Microsoft.Extensions.Identity.Stores": "[6.0.4, )",
- "Newtonsoft.Json": "[13.0.1, )",
+ "Newtonsoft.Json": "[13.0.3, )",
"Otp.NET": "[1.2.2, )",
"Quartz": "[3.4.0, )",
"SendGrid": "[9.27.0, )",
@@ -2856,7 +2831,7 @@
"Serilog.Extensions.Logging": "[3.1.0, )",
"Serilog.Extensions.Logging.File": "[2.0.0, )",
"Serilog.Sinks.AzureCosmosDB": "[2.0.0, )",
- "Serilog.Sinks.SyslogMessages": "[2.0.6, )",
+ "Serilog.Sinks.SyslogMessages": "[2.0.9, )",
"Stripe.net": "[40.0.0, )",
"YubicoDotNetClient": "[1.2.0, )"
}
@@ -2864,58 +2839,58 @@
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "Dapper": "[2.0.123, )"
+ "Core": "[2023.12.0, )",
+ "Dapper": "[2.1.24, )"
}
},
"infrastructure.entityframework": {
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )",
- "Core": "[2023.10.2, )",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )",
- "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )",
- "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )",
- "Npgsql.EntityFrameworkCore.PostgreSQL": "[7.0.4, )",
+ "Core": "[2023.12.0, )",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.14, )",
+ "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.14, )",
+ "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.14, )",
+ "Npgsql.EntityFrameworkCore.PostgreSQL": "[7.0.11, )",
"Pomelo.EntityFrameworkCore.MySql": "[7.0.0, )",
- "linq2db.EntityFrameworkCore": "[7.5.0, )"
+ "linq2db.EntityFrameworkCore": "[7.6.0, )"
}
},
"migrator": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
+ "Core": "[2023.12.0, )",
"Microsoft.Extensions.Logging": "[6.0.0, )",
- "dbup-sqlserver": "[5.0.8, )"
+ "dbup-sqlserver": "[5.0.37, )"
}
},
"mysqlmigrations": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "Infrastructure.EntityFramework": "[2023.10.2, )"
+ "Core": "[2023.12.0, )",
+ "Infrastructure.EntityFramework": "[2023.12.0, )"
}
},
"postgresmigrations": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "Infrastructure.EntityFramework": "[2023.10.2, )"
+ "Core": "[2023.12.0, )",
+ "Infrastructure.EntityFramework": "[2023.12.0, )"
}
},
"sharedweb": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "Infrastructure.Dapper": "[2023.10.2, )",
- "Infrastructure.EntityFramework": "[2023.10.2, )"
+ "Core": "[2023.12.0, )",
+ "Infrastructure.Dapper": "[2023.12.0, )",
+ "Infrastructure.EntityFramework": "[2023.12.0, )"
}
},
"sqlitemigrations": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "Infrastructure.EntityFramework": "[2023.10.2, )"
+ "Core": "[2023.12.0, )",
+ "Infrastructure.EntityFramework": "[2023.12.0, )"
}
}
}
diff --git a/src/Api/AdminConsole/Controllers/OrganizationUsersController.cs b/src/Api/AdminConsole/Controllers/OrganizationUsersController.cs
index 73140cea4e..5ca1003fd4 100644
--- a/src/Api/AdminConsole/Controllers/OrganizationUsersController.cs
+++ b/src/Api/AdminConsole/Controllers/OrganizationUsersController.cs
@@ -2,6 +2,8 @@
using Bit.Api.AdminConsole.Models.Response.Organizations;
using Bit.Api.Models.Request.Organizations;
using Bit.Api.Models.Response;
+using Bit.Core.AdminConsole.Enums;
+using Bit.Core.AdminConsole.Models.Data.Organizations.Policies;
using Bit.Core.AdminConsole.OrganizationFeatures.OrganizationUsers.Interfaces;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Context;
@@ -9,7 +11,6 @@ using Bit.Core.Enums;
using Bit.Core.Exceptions;
using Bit.Core.Models.Business;
using Bit.Core.Models.Data.Organizations.OrganizationUsers;
-using Bit.Core.Models.Data.Organizations.Policies;
using Bit.Core.OrganizationFeatures.OrganizationSubscriptions.Interface;
using Bit.Core.OrganizationFeatures.OrganizationUsers.Interfaces;
using Bit.Core.Repositories;
diff --git a/src/Api/AdminConsole/Controllers/OrganizationsController.cs b/src/Api/AdminConsole/Controllers/OrganizationsController.cs
index 632230ebcd..130f286ec7 100644
--- a/src/Api/AdminConsole/Controllers/OrganizationsController.cs
+++ b/src/Api/AdminConsole/Controllers/OrganizationsController.cs
@@ -11,6 +11,8 @@ using Bit.Api.Models.Request.Accounts;
using Bit.Api.Models.Request.Organizations;
using Bit.Api.Models.Response;
using Bit.Core;
+using Bit.Core.AdminConsole.Enums;
+using Bit.Core.AdminConsole.Models.Data.Organizations.Policies;
using Bit.Core.AdminConsole.OrganizationFeatures.OrganizationApiKeys.Interfaces;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Auth.Enums;
@@ -20,7 +22,6 @@ using Bit.Core.Context;
using Bit.Core.Enums;
using Bit.Core.Exceptions;
using Bit.Core.Models.Business;
-using Bit.Core.Models.Data.Organizations.Policies;
using Bit.Core.OrganizationFeatures.OrganizationLicenses.Interfaces;
using Bit.Core.OrganizationFeatures.OrganizationSubscriptions.Interface;
using Bit.Core.Repositories;
@@ -794,7 +795,15 @@ public class OrganizationsController : Controller
throw new NotFoundException();
}
- await _organizationService.UpdateAsync(model.ToOrganization(organization));
+ var v1Enabled = _featureService.IsEnabled(FeatureFlagKeys.FlexibleCollectionsV1, _currentContext);
+
+ if (!v1Enabled)
+ {
+ // V1 is disabled, ensure V1 setting doesn't change
+ model.AllowAdminAccessToAllCollectionItems = organization.AllowAdminAccessToAllCollectionItems;
+ }
+
+ await _organizationService.UpdateAsync(model.ToOrganization(organization), eventType: EventType.Organization_CollectionManagement_Updated);
return new OrganizationResponseModel(organization);
}
diff --git a/src/Api/AdminConsole/Controllers/PoliciesController.cs b/src/Api/AdminConsole/Controllers/PoliciesController.cs
index 60257814e9..5668031d24 100644
--- a/src/Api/AdminConsole/Controllers/PoliciesController.cs
+++ b/src/Api/AdminConsole/Controllers/PoliciesController.cs
@@ -1,10 +1,13 @@
using Bit.Api.AdminConsole.Models.Request;
using Bit.Api.Models.Response;
+using Bit.Core.AdminConsole.Enums;
+using Bit.Core.AdminConsole.Models.Api.Response;
+using Bit.Core.AdminConsole.Repositories;
+using Bit.Core.AdminConsole.Services;
using Bit.Core.Auth.Models.Business.Tokenables;
using Bit.Core.Context;
using Bit.Core.Enums;
using Bit.Core.Exceptions;
-using Bit.Core.Models.Api.Response;
using Bit.Core.Repositories;
using Bit.Core.Services;
using Bit.Core.Settings;
diff --git a/src/Api/AdminConsole/Models/Request/Organizations/OrganizationKeysRequestModel.cs b/src/Api/AdminConsole/Models/Request/Organizations/OrganizationKeysRequestModel.cs
index 3a343caa21..4afa5b54ea 100644
--- a/src/Api/AdminConsole/Models/Request/Organizations/OrganizationKeysRequestModel.cs
+++ b/src/Api/AdminConsole/Models/Request/Organizations/OrganizationKeysRequestModel.cs
@@ -1,5 +1,5 @@
using System.ComponentModel.DataAnnotations;
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.Models.Business;
namespace Bit.Api.AdminConsole.Models.Request.Organizations;
diff --git a/src/Api/AdminConsole/Models/Request/Organizations/OrganizationUpdateRequestModel.cs b/src/Api/AdminConsole/Models/Request/Organizations/OrganizationUpdateRequestModel.cs
index be526ee6cc..10c36cd116 100644
--- a/src/Api/AdminConsole/Models/Request/Organizations/OrganizationUpdateRequestModel.cs
+++ b/src/Api/AdminConsole/Models/Request/Organizations/OrganizationUpdateRequestModel.cs
@@ -1,5 +1,5 @@
using System.ComponentModel.DataAnnotations;
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.Models.Data;
using Bit.Core.Settings;
diff --git a/src/Api/AdminConsole/Models/Request/PolicyRequestModel.cs b/src/Api/AdminConsole/Models/Request/PolicyRequestModel.cs
index b3ba3a6bca..db191194d7 100644
--- a/src/Api/AdminConsole/Models/Request/PolicyRequestModel.cs
+++ b/src/Api/AdminConsole/Models/Request/PolicyRequestModel.cs
@@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using System.Text.Json;
-using Bit.Core.Entities;
-using Bit.Core.Enums;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.AdminConsole.Enums;
namespace Bit.Api.AdminConsole.Models.Request;
diff --git a/src/Api/AdminConsole/Models/Response/Organizations/OrganizationKeysResponseModel.cs b/src/Api/AdminConsole/Models/Response/Organizations/OrganizationKeysResponseModel.cs
index a2e4fe058d..15dbb18102 100644
--- a/src/Api/AdminConsole/Models/Response/Organizations/OrganizationKeysResponseModel.cs
+++ b/src/Api/AdminConsole/Models/Response/Organizations/OrganizationKeysResponseModel.cs
@@ -1,4 +1,4 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.Models.Api;
namespace Bit.Api.AdminConsole.Models.Response.Organizations;
diff --git a/src/Api/AdminConsole/Models/Response/Organizations/OrganizationPublicKeyResponseModel.cs b/src/Api/AdminConsole/Models/Response/Organizations/OrganizationPublicKeyResponseModel.cs
index dc12479618..defae9ba4d 100644
--- a/src/Api/AdminConsole/Models/Response/Organizations/OrganizationPublicKeyResponseModel.cs
+++ b/src/Api/AdminConsole/Models/Response/Organizations/OrganizationPublicKeyResponseModel.cs
@@ -1,4 +1,4 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.Models.Api;
namespace Bit.Api.AdminConsole.Models.Response.Organizations;
diff --git a/src/Api/AdminConsole/Models/Response/Organizations/OrganizationResponseModel.cs b/src/Api/AdminConsole/Models/Response/Organizations/OrganizationResponseModel.cs
index 82b17c0328..b1a5bb1cff 100644
--- a/src/Api/AdminConsole/Models/Response/Organizations/OrganizationResponseModel.cs
+++ b/src/Api/AdminConsole/Models/Response/Organizations/OrganizationResponseModel.cs
@@ -1,5 +1,5 @@
using Bit.Api.Models.Response;
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.Enums;
using Bit.Core.Models.Api;
using Bit.Core.Models.Business;
@@ -55,6 +55,7 @@ public class OrganizationResponseModel : ResponseModel
MaxAutoscaleSmSeats = organization.MaxAutoscaleSmSeats;
MaxAutoscaleSmServiceAccounts = organization.MaxAutoscaleSmServiceAccounts;
LimitCollectionCreationDeletion = organization.LimitCollectionCreationDeletion;
+ AllowAdminAccessToAllCollectionItems = organization.AllowAdminAccessToAllCollectionItems;
}
public Guid Id { get; set; }
@@ -95,6 +96,7 @@ public class OrganizationResponseModel : ResponseModel
public int? MaxAutoscaleSmSeats { get; set; }
public int? MaxAutoscaleSmServiceAccounts { get; set; }
public bool LimitCollectionCreationDeletion { get; set; }
+ public bool AllowAdminAccessToAllCollectionItems { get; set; }
}
public class OrganizationSubscriptionResponseModel : OrganizationResponseModel
diff --git a/src/Api/AdminConsole/Models/Response/ProfileOrganizationResponseModel.cs b/src/Api/AdminConsole/Models/Response/ProfileOrganizationResponseModel.cs
index e0d1433c15..be4f76da16 100644
--- a/src/Api/AdminConsole/Models/Response/ProfileOrganizationResponseModel.cs
+++ b/src/Api/AdminConsole/Models/Response/ProfileOrganizationResponseModel.cs
@@ -60,6 +60,7 @@ public class ProfileOrganizationResponseModel : ResponseModel
FamilySponsorshipValidUntil = organization.FamilySponsorshipValidUntil;
AccessSecretsManager = organization.AccessSecretsManager;
LimitCollectionCreationDeletion = organization.LimitCollectionCreationDeletion;
+ AllowAdminAccessToAllCollectionItems = organization.AllowAdminAccessToAllCollectionItems;
if (organization.SsoConfig != null)
{
@@ -114,4 +115,5 @@ public class ProfileOrganizationResponseModel : ResponseModel
public bool? FamilySponsorshipToDelete { get; set; }
public bool AccessSecretsManager { get; set; }
public bool LimitCollectionCreationDeletion { get; set; }
+ public bool AllowAdminAccessToAllCollectionItems { get; set; }
}
diff --git a/src/Api/AdminConsole/Public/Controllers/PoliciesController.cs b/src/Api/AdminConsole/Public/Controllers/PoliciesController.cs
index bcabb969c6..1d7eb65185 100644
--- a/src/Api/AdminConsole/Public/Controllers/PoliciesController.cs
+++ b/src/Api/AdminConsole/Public/Controllers/PoliciesController.cs
@@ -2,9 +2,10 @@
using Bit.Api.AdminConsole.Public.Models.Request;
using Bit.Api.AdminConsole.Public.Models.Response;
using Bit.Api.Models.Public.Response;
+using Bit.Core.AdminConsole.Enums;
+using Bit.Core.AdminConsole.Repositories;
+using Bit.Core.AdminConsole.Services;
using Bit.Core.Context;
-using Bit.Core.Enums;
-using Bit.Core.Repositories;
using Bit.Core.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
diff --git a/src/Api/AdminConsole/Public/Models/Request/PolicyUpdateRequestModel.cs b/src/Api/AdminConsole/Public/Models/Request/PolicyUpdateRequestModel.cs
index 1866da6eca..80b7874a0b 100644
--- a/src/Api/AdminConsole/Public/Models/Request/PolicyUpdateRequestModel.cs
+++ b/src/Api/AdminConsole/Public/Models/Request/PolicyUpdateRequestModel.cs
@@ -1,5 +1,5 @@
using System.Text.Json;
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
namespace Bit.Api.AdminConsole.Public.Models.Request;
diff --git a/src/Api/AdminConsole/Public/Models/Response/PolicyResponseModel.cs b/src/Api/AdminConsole/Public/Models/Response/PolicyResponseModel.cs
index 3b196874d5..27da5cc561 100644
--- a/src/Api/AdminConsole/Public/Models/Response/PolicyResponseModel.cs
+++ b/src/Api/AdminConsole/Public/Models/Response/PolicyResponseModel.cs
@@ -1,8 +1,8 @@
using System.ComponentModel.DataAnnotations;
using System.Text.Json;
using Bit.Api.Models.Public.Response;
-using Bit.Core.Entities;
-using Bit.Core.Enums;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.AdminConsole.Enums;
namespace Bit.Api.AdminConsole.Public.Models.Response;
diff --git a/src/Api/Controllers/AccountsController.cs b/src/Api/Auth/Controllers/AccountsController.cs
similarity index 94%
rename from src/Api/Controllers/AccountsController.cs
rename to src/Api/Auth/Controllers/AccountsController.cs
index 7dbcf07d06..e49ce9dd2b 100644
--- a/src/Api/Controllers/AccountsController.cs
+++ b/src/Api/Auth/Controllers/AccountsController.cs
@@ -1,12 +1,17 @@
using Bit.Api.AdminConsole.Models.Response;
+using Bit.Api.Auth.Models.Request;
using Bit.Api.Auth.Models.Request.Accounts;
+using Bit.Api.Auth.Validators;
using Bit.Api.Models.Request;
using Bit.Api.Models.Request.Accounts;
using Bit.Api.Models.Response;
using Bit.Api.Utilities;
+using Bit.Api.Vault.Models.Request;
using Bit.Core;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.AdminConsole.Repositories;
+using Bit.Core.AdminConsole.Services;
+using Bit.Core.Auth.Entities;
using Bit.Core.Auth.Models.Api.Request.Accounts;
using Bit.Core.Auth.Models.Api.Response.Accounts;
using Bit.Core.Auth.Models.Data;
@@ -15,6 +20,7 @@ using Bit.Core.Auth.UserFeatures.UserKey;
using Bit.Core.Auth.UserFeatures.UserMasterPassword.Interfaces;
using Bit.Core.Auth.Utilities;
using Bit.Core.Context;
+using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Exceptions;
using Bit.Core.Models.Api.Response;
@@ -33,7 +39,7 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
-namespace Bit.Api.Controllers;
+namespace Bit.Api.Auth.Controllers;
[Route("accounts")]
[Authorize("Application")]
@@ -57,6 +63,14 @@ public class AccountsController : Controller
private readonly IFeatureService _featureService;
private readonly ICurrentContext _currentContext;
+ private bool UseFlexibleCollections =>
+ _featureService.IsEnabled(FeatureFlagKeys.FlexibleCollections, _currentContext);
+
+ private readonly IRotationValidator, IEnumerable> _cipherValidator;
+ private readonly IRotationValidator, IEnumerable> _folderValidator;
+ private readonly IRotationValidator, IEnumerable>
+ _emergencyAccessValidator;
+
public AccountsController(
GlobalSettings globalSettings,
@@ -75,7 +89,11 @@ public class AccountsController : Controller
ISetInitialMasterPasswordCommand setInitialMasterPasswordCommand,
IRotateUserKeyCommand rotateUserKeyCommand,
IFeatureService featureService,
- ICurrentContext currentContext
+ ICurrentContext currentContext,
+ IRotationValidator, IEnumerable> cipherValidator,
+ IRotationValidator, IEnumerable> folderValidator,
+ IRotationValidator, IEnumerable>
+ emergencyAccessValidator
)
{
_cipherRepository = cipherRepository;
@@ -95,6 +113,9 @@ public class AccountsController : Controller
_rotateUserKeyCommand = rotateUserKeyCommand;
_featureService = featureService;
_currentContext = currentContext;
+ _cipherValidator = cipherValidator;
+ _folderValidator = folderValidator;
+ _emergencyAccessValidator = emergencyAccessValidator;
}
#region DEPRECATED (Moved to Identity Service)
@@ -110,7 +131,7 @@ public class AccountsController : Controller
kdfInformation = new UserKdfInformation
{
Kdf = KdfType.PBKDF2_SHA256,
- KdfIterations = 100000,
+ KdfIterations = AuthConstants.PBKDF2_ITERATIONS.Default,
};
}
return new PreloginResponseModel(kdfInformation);
@@ -400,21 +421,21 @@ public class AccountsController : Controller
MasterPasswordHash = model.MasterPasswordHash,
Key = model.Key,
PrivateKey = model.PrivateKey,
- // Ciphers = await _cipherValidator.ValidateAsync(user, model.Ciphers),
- // Folders = await _folderValidator.ValidateAsync(user, model.Folders),
- // Sends = await _sendValidator.ValidateAsync(user, model.Sends),
- // EmergencyAccessKeys = await _emergencyAccessValidator.ValidateAsync(user, model.EmergencyAccessKeys),
- // ResetPasswordKeys = await _accountRecoveryValidator.ValidateAsync(user, model.ResetPasswordKeys),
+ Ciphers = await _cipherValidator.ValidateAsync(user, model.Ciphers),
+ Folders = await _folderValidator.ValidateAsync(user, model.Folders),
+ Sends = new List(),
+ EmergencyAccessKeys = await _emergencyAccessValidator.ValidateAsync(user, model.EmergencyAccessKeys),
+ ResetPasswordKeys = new List(),
};
- result = await _rotateUserKeyCommand.RotateUserKeyAsync(dataModel);
+ result = await _rotateUserKeyCommand.RotateUserKeyAsync(user, dataModel);
}
else
{
var ciphers = new List();
if (model.Ciphers.Any())
{
- var existingCiphers = await _cipherRepository.GetManyByUserIdAsync(user.Id);
+ var existingCiphers = await _cipherRepository.GetManyByUserIdAsync(user.Id, useFlexibleCollections: UseFlexibleCollections);
ciphers.AddRange(existingCiphers
.Join(model.Ciphers, c => c.Id, c => c.Id, (existing, c) => c.ToCipher(existing)));
}
diff --git a/src/Api/Auth/Controllers/EmergencyAccessController.cs b/src/Api/Auth/Controllers/EmergencyAccessController.cs
index ec2a9fc6b7..95fac234c8 100644
--- a/src/Api/Auth/Controllers/EmergencyAccessController.cs
+++ b/src/Api/Auth/Controllers/EmergencyAccessController.cs
@@ -3,10 +3,10 @@ using Bit.Api.Auth.Models.Request;
using Bit.Api.Auth.Models.Response;
using Bit.Api.Models.Response;
using Bit.Api.Vault.Models.Response;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.AdminConsole.Models.Api.Response;
using Bit.Core.Auth.Services;
-using Bit.Core.Entities;
using Bit.Core.Exceptions;
-using Bit.Core.Models.Api.Response;
using Bit.Core.Repositories;
using Bit.Core.Services;
using Bit.Core.Settings;
diff --git a/src/Api/Auth/Controllers/WebAuthnController.cs b/src/Api/Auth/Controllers/WebAuthnController.cs
index e62d1a95ba..a30e83a5e0 100644
--- a/src/Api/Auth/Controllers/WebAuthnController.cs
+++ b/src/Api/Auth/Controllers/WebAuthnController.cs
@@ -3,9 +3,10 @@ using Bit.Api.Auth.Models.Request.Webauthn;
using Bit.Api.Auth.Models.Response.WebAuthn;
using Bit.Api.Models.Response;
using Bit.Core;
+using Bit.Core.AdminConsole.Enums;
+using Bit.Core.AdminConsole.Services;
using Bit.Core.Auth.Models.Business.Tokenables;
using Bit.Core.Auth.Repositories;
-using Bit.Core.Enums;
using Bit.Core.Exceptions;
using Bit.Core.Services;
using Bit.Core.Tokens;
diff --git a/src/Api/Auth/Models/Request/Accounts/SetKeyConnectorKeyRequestModel.cs b/src/Api/Auth/Models/Request/Accounts/SetKeyConnectorKeyRequestModel.cs
index 68cc15d422..25d543b916 100644
--- a/src/Api/Auth/Models/Request/Accounts/SetKeyConnectorKeyRequestModel.cs
+++ b/src/Api/Auth/Models/Request/Accounts/SetKeyConnectorKeyRequestModel.cs
@@ -2,11 +2,10 @@
using Bit.Core.Auth.Models.Api.Request.Accounts;
using Bit.Core.Entities;
using Bit.Core.Enums;
-using Bit.Core.Utilities;
namespace Bit.Api.Auth.Models.Request.Accounts;
-public class SetKeyConnectorKeyRequestModel : IValidatableObject
+public class SetKeyConnectorKeyRequestModel
{
[Required]
public string Key { get; set; }
@@ -31,9 +30,4 @@ public class SetKeyConnectorKeyRequestModel : IValidatableObject
Keys.ToUser(existingUser);
return existingUser;
}
-
- public IEnumerable Validate(ValidationContext validationContext)
- {
- return KdfSettingsValidator.Validate(Kdf, KdfIterations, KdfMemory, KdfParallelism);
- }
}
diff --git a/src/Api/Auth/Models/Request/Accounts/SetPasswordRequestModel.cs b/src/Api/Auth/Models/Request/Accounts/SetPasswordRequestModel.cs
index 3dd43aa5e3..b07c7ea81f 100644
--- a/src/Api/Auth/Models/Request/Accounts/SetPasswordRequestModel.cs
+++ b/src/Api/Auth/Models/Request/Accounts/SetPasswordRequestModel.cs
@@ -2,11 +2,10 @@
using Bit.Core.Auth.Models.Api.Request.Accounts;
using Bit.Core.Entities;
using Bit.Core.Enums;
-using Bit.Core.Utilities;
namespace Bit.Api.Auth.Models.Request.Accounts;
-public class SetPasswordRequestModel : IValidatableObject
+public class SetPasswordRequestModel
{
[Required]
[StringLength(300)]
@@ -35,9 +34,4 @@ public class SetPasswordRequestModel : IValidatableObject
Keys?.ToUser(existingUser);
return existingUser;
}
-
- public IEnumerable Validate(ValidationContext validationContext)
- {
- return KdfSettingsValidator.Validate(Kdf, KdfIterations, KdfMemory, KdfParallelism);
- }
}
diff --git a/src/Api/Auth/Models/Request/Accounts/UpdateKeyRequestModel.cs b/src/Api/Auth/Models/Request/Accounts/UpdateKeyRequestModel.cs
index 3a9e6e2fc3..a34ce6fd28 100644
--- a/src/Api/Auth/Models/Request/Accounts/UpdateKeyRequestModel.cs
+++ b/src/Api/Auth/Models/Request/Accounts/UpdateKeyRequestModel.cs
@@ -17,7 +17,7 @@ public class UpdateKeyRequestModel
public IEnumerable Ciphers { get; set; }
public IEnumerable Folders { get; set; }
public IEnumerable Sends { get; set; }
- public IEnumerable EmergencyAccessKeys { get; set; }
+ public IEnumerable EmergencyAccessKeys { get; set; }
public IEnumerable ResetPasswordKeys { get; set; }
}
diff --git a/src/Api/Auth/Models/Request/EmergencyAccessRequstModels.cs b/src/Api/Auth/Models/Request/EmergencyAccessRequestModels.cs
similarity index 91%
rename from src/Api/Auth/Models/Request/EmergencyAccessRequstModels.cs
rename to src/Api/Auth/Models/Request/EmergencyAccessRequestModels.cs
index b6862151a5..8b1d5e883b 100644
--- a/src/Api/Auth/Models/Request/EmergencyAccessRequstModels.cs
+++ b/src/Api/Auth/Models/Request/EmergencyAccessRequestModels.cs
@@ -46,3 +46,9 @@ public class EmergencyAccessPasswordRequestModel
[Required]
public string Key { get; set; }
}
+
+public class EmergencyAccessWithIdRequestModel : EmergencyAccessUpdateRequestModel
+{
+ [Required]
+ public Guid Id { get; set; }
+}
diff --git a/src/Api/Auth/Models/Request/TwoFactorRequestModels.cs b/src/Api/Auth/Models/Request/TwoFactorRequestModels.cs
index d946f09840..3bd8c5506f 100644
--- a/src/Api/Auth/Models/Request/TwoFactorRequestModels.cs
+++ b/src/Api/Auth/Models/Request/TwoFactorRequestModels.cs
@@ -1,5 +1,6 @@
using System.ComponentModel.DataAnnotations;
using Bit.Api.Auth.Models.Request.Accounts;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.Auth.Enums;
using Bit.Core.Auth.Models;
using Bit.Core.Auth.Utilities;
@@ -203,7 +204,7 @@ public class TwoFactorEmailRequestModel : SecretVerificationRequestModel
[StringLength(256)]
public string Email { get; set; }
public string AuthRequestId { get; set; }
- // An auth session token used for obtaining email and as an authN factor for the sending of emailed 2FA OTPs.
+ // An auth session token used for obtaining email and as an authN factor for the sending of emailed 2FA OTPs.
public string SsoEmail2FaSessionToken { get; set; }
public User ToUser(User existingUser)
{
diff --git a/src/Api/Auth/Models/Response/OrganizationSsoResponseModel.cs b/src/Api/Auth/Models/Response/OrganizationSsoResponseModel.cs
index b2643a2f5f..bbf9d57c79 100644
--- a/src/Api/Auth/Models/Response/OrganizationSsoResponseModel.cs
+++ b/src/Api/Auth/Models/Response/OrganizationSsoResponseModel.cs
@@ -1,6 +1,6 @@
-using Bit.Core.Auth.Entities;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.Auth.Entities;
using Bit.Core.Auth.Models.Data;
-using Bit.Core.Entities;
using Bit.Core.Models.Api;
using Bit.Core.Settings;
diff --git a/src/Api/Auth/Models/Response/TwoFactor/TwoFactorDuoResponseModel.cs b/src/Api/Auth/Models/Response/TwoFactor/TwoFactorDuoResponseModel.cs
index 775c367a28..1537c1b93e 100644
--- a/src/Api/Auth/Models/Response/TwoFactor/TwoFactorDuoResponseModel.cs
+++ b/src/Api/Auth/Models/Response/TwoFactor/TwoFactorDuoResponseModel.cs
@@ -1,4 +1,5 @@
-using Bit.Core.Auth.Enums;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.Auth.Enums;
using Bit.Core.Auth.Models;
using Bit.Core.Entities;
using Bit.Core.Models.Api;
diff --git a/src/Api/Auth/Models/Response/TwoFactor/TwoFactorProviderResponseModel.cs b/src/Api/Auth/Models/Response/TwoFactor/TwoFactorProviderResponseModel.cs
index 66e41e80e1..760fddc1fb 100644
--- a/src/Api/Auth/Models/Response/TwoFactor/TwoFactorProviderResponseModel.cs
+++ b/src/Api/Auth/Models/Response/TwoFactor/TwoFactorProviderResponseModel.cs
@@ -1,4 +1,5 @@
-using Bit.Core.Auth.Enums;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.Auth.Enums;
using Bit.Core.Auth.Models;
using Bit.Core.Entities;
using Bit.Core.Models.Api;
diff --git a/src/Api/Auth/Validators/EmergencyAccessRotationValidator.cs b/src/Api/Auth/Validators/EmergencyAccessRotationValidator.cs
new file mode 100644
index 0000000000..dd75f6a761
--- /dev/null
+++ b/src/Api/Auth/Validators/EmergencyAccessRotationValidator.cs
@@ -0,0 +1,58 @@
+using Bit.Api.Auth.Models.Request;
+using Bit.Core.Auth.Entities;
+using Bit.Core.Entities;
+using Bit.Core.Exceptions;
+using Bit.Core.Repositories;
+using Bit.Core.Services;
+
+namespace Bit.Api.Auth.Validators;
+
+public class EmergencyAccessRotationValidator : IRotationValidator,
+ IEnumerable>
+{
+ private readonly IEmergencyAccessRepository _emergencyAccessRepository;
+ private readonly IUserService _userService;
+
+ public EmergencyAccessRotationValidator(IEmergencyAccessRepository emergencyAccessRepository,
+ IUserService userService)
+ {
+ _emergencyAccessRepository = emergencyAccessRepository;
+ _userService = userService;
+ }
+
+ public async Task> ValidateAsync(User user,
+ IEnumerable emergencyAccessKeys)
+ {
+ var result = new List();
+ if (emergencyAccessKeys == null || !emergencyAccessKeys.Any())
+ {
+ return result;
+ }
+
+ var existing = await _emergencyAccessRepository.GetManyDetailsByGrantorIdAsync(user.Id);
+ if (existing == null || !existing.Any())
+ {
+ return result;
+ }
+ // Exclude any emergency access that has not been confirmed yet.
+ existing = existing.Where(ea => ea.KeyEncrypted != null).ToList();
+
+ foreach (var ea in existing)
+ {
+ var emergencyAccess = emergencyAccessKeys.FirstOrDefault(c => c.Id == ea.Id);
+ if (emergencyAccess == null)
+ {
+ throw new BadRequestException("All existing emergency access keys must be included in the rotation.");
+ }
+
+ if (emergencyAccess.KeyEncrypted == null)
+ {
+ throw new BadRequestException("Emergency access keys cannot be set to null during rotation.");
+ }
+
+ result.Add(emergencyAccess.ToEmergencyAccess(ea));
+ }
+
+ return result;
+ }
+}
diff --git a/src/Api/Auth/Validators/IRotationValidator.cs b/src/Api/Auth/Validators/IRotationValidator.cs
new file mode 100644
index 0000000000..7360a4570c
--- /dev/null
+++ b/src/Api/Auth/Validators/IRotationValidator.cs
@@ -0,0 +1,15 @@
+using Bit.Core.Entities;
+
+namespace Bit.Api.Auth.Validators;
+
+///
+/// A consistent interface for domains to validate re-encrypted data before saved to database. Some examples are:
+/// - All available encrypted data is accounted for
+/// - All provided encrypted data belongs to the user
+///
+/// Request model
+/// Domain model
+public interface IRotationValidator
+{
+ Task ValidateAsync(User user, T data);
+}
diff --git a/src/Api/Controllers/CollectionsController.cs b/src/Api/Controllers/CollectionsController.cs
index 9a5a12cff9..8d8e737a6f 100644
--- a/src/Api/Controllers/CollectionsController.cs
+++ b/src/Api/Controllers/CollectionsController.cs
@@ -4,7 +4,9 @@ using Bit.Api.Vault.AuthorizationHandlers.Collections;
using Bit.Core;
using Bit.Core.Context;
using Bit.Core.Entities;
+using Bit.Core.Enums;
using Bit.Core.Exceptions;
+using Bit.Core.Models.Data;
using Bit.Core.OrganizationFeatures.OrganizationCollections.Interfaces;
using Bit.Core.Repositories;
using Bit.Core.Services;
@@ -26,6 +28,7 @@ public class CollectionsController : Controller
private readonly ICurrentContext _currentContext;
private readonly IBulkAddCollectionAccessCommand _bulkAddCollectionAccessCommand;
private readonly IFeatureService _featureService;
+ private readonly IOrganizationUserRepository _organizationUserRepository;
public CollectionsController(
ICollectionRepository collectionRepository,
@@ -35,7 +38,8 @@ public class CollectionsController : Controller
IAuthorizationService authorizationService,
ICurrentContext currentContext,
IBulkAddCollectionAccessCommand bulkAddCollectionAccessCommand,
- IFeatureService featureService)
+ IFeatureService featureService,
+ IOrganizationUserRepository organizationUserRepository)
{
_collectionRepository = collectionRepository;
_collectionService = collectionService;
@@ -45,6 +49,7 @@ public class CollectionsController : Controller
_currentContext = currentContext;
_bulkAddCollectionAccessCommand = bulkAddCollectionAccessCommand;
_featureService = featureService;
+ _organizationUserRepository = organizationUserRepository;
}
private bool FlexibleCollectionsIsEnabled => _featureService.IsEnabled(FeatureFlagKeys.FlexibleCollections, _currentContext);
@@ -168,7 +173,29 @@ public class CollectionsController : Controller
}
var groups = model.Groups?.Select(g => g.ToSelectionReadOnly());
- var users = model.Users?.Select(g => g.ToSelectionReadOnly());
+ var users = model.Users?.Select(g => g.ToSelectionReadOnly()).ToList() ?? new List();
+
+ // Pre-flexible collections logic assigned Managers to collections they create
+ var assignUserToCollection =
+ !FlexibleCollectionsIsEnabled &&
+ !await _currentContext.EditAnyCollection(orgId) &&
+ await _currentContext.EditAssignedCollections(orgId);
+ var isNewCollection = collection.Id == default;
+
+ if (assignUserToCollection && isNewCollection && _currentContext.UserId.HasValue)
+ {
+ var orgUser = await _organizationUserRepository.GetByOrganizationAsync(orgId, _currentContext.UserId.Value);
+ // don't add duplicate access if the user has already specified it themselves
+ var existingAccess = users.Any(u => u.Id == orgUser.Id);
+ if (orgUser is { Status: OrganizationUserStatusType.Confirmed } && !existingAccess)
+ {
+ users.Add(new CollectionAccessSelection
+ {
+ Id = orgUser.Id,
+ ReadOnly = false
+ });
+ }
+ }
await _collectionService.SaveAsync(collection, groups, users);
return new CollectionResponseModel(collection);
diff --git a/src/Api/Controllers/PlansController.cs b/src/Api/Controllers/PlansController.cs
index 09aa0ba1e4..80aca2d827 100644
--- a/src/Api/Controllers/PlansController.cs
+++ b/src/Api/Controllers/PlansController.cs
@@ -1,9 +1,5 @@
using Bit.Api.Models.Response;
-using Bit.Core;
-using Bit.Core.Context;
-using Bit.Core.Enums;
using Bit.Core.Repositories;
-using Bit.Core.Services;
using Bit.Core.Utilities;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
@@ -15,42 +11,14 @@ namespace Bit.Api.Controllers;
public class PlansController : Controller
{
private readonly ITaxRateRepository _taxRateRepository;
- private readonly IFeatureService _featureService;
- private readonly ICurrentContext _currentContext;
- public PlansController(
- ITaxRateRepository taxRateRepository,
- IFeatureService featureService,
- ICurrentContext currentContext)
- {
- _taxRateRepository = taxRateRepository;
- _featureService = featureService;
- _currentContext = currentContext;
- }
+ public PlansController(ITaxRateRepository taxRateRepository) => _taxRateRepository = taxRateRepository;
[HttpGet("")]
[AllowAnonymous]
public ListResponseModel Get()
{
- var plansUpgradeIsEnabled = _featureService.IsEnabled(FeatureFlagKeys.BillingPlansUpgrade, _currentContext);
- var teamsStarterPlanIsEnabled = _featureService.IsEnabled(FeatureFlagKeys.BillingStarterPlan, _currentContext);
- var responses = StaticStore.Plans
- // If plans upgrade is disabled, return only the original plans. Otherwise, return everything
- .Where(plan => plansUpgradeIsEnabled || plan.Type <= PlanType.EnterpriseAnnually2020 || plan.Type == PlanType.TeamsStarter)
- // If teams starter is disabled, don't return that plan, otherwise return everything
- .Where(plan => teamsStarterPlanIsEnabled || plan.Product != ProductType.TeamsStarter)
- .Select(plan =>
- {
- if (!plansUpgradeIsEnabled && plan.Type is <= PlanType.EnterpriseAnnually2020 and >= PlanType.TeamsMonthly2020)
- {
- plan.LegacyYear = null;
- }
- else if (plansUpgradeIsEnabled && plan.Type is <= PlanType.EnterpriseAnnually2020 and >= PlanType.TeamsMonthly2020)
- {
- plan.LegacyYear = 2023;
- }
- return new PlanResponseModel(plan);
- });
+ var responses = StaticStore.Plans.Select(plan => new PlanResponseModel(plan));
return new ListResponseModel(responses);
}
diff --git a/src/Api/Models/Request/Organizations/OrganizationCollectionManagementUpdateRequestModel.cs b/src/Api/Models/Request/Organizations/OrganizationCollectionManagementUpdateRequestModel.cs
index de370f714d..68e87b522b 100644
--- a/src/Api/Models/Request/Organizations/OrganizationCollectionManagementUpdateRequestModel.cs
+++ b/src/Api/Models/Request/Organizations/OrganizationCollectionManagementUpdateRequestModel.cs
@@ -1,14 +1,16 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
namespace Bit.Api.Models.Request.Organizations;
public class OrganizationCollectionManagementUpdateRequestModel
{
public bool LimitCreateDeleteOwnerAdmin { get; set; }
+ public bool AllowAdminAccessToAllCollectionItems { get; set; }
public virtual Organization ToOrganization(Organization existingOrganization)
{
existingOrganization.LimitCollectionCreationDeletion = LimitCreateDeleteOwnerAdmin;
+ existingOrganization.AllowAdminAccessToAllCollectionItems = AllowAdminAccessToAllCollectionItems;
return existingOrganization;
}
}
diff --git a/src/Api/Models/Request/Organizations/SecretsManagerSubscriptionUpdateRequestModel.cs b/src/Api/Models/Request/Organizations/SecretsManagerSubscriptionUpdateRequestModel.cs
index 96e9603fc3..18bc66a0b6 100644
--- a/src/Api/Models/Request/Organizations/SecretsManagerSubscriptionUpdateRequestModel.cs
+++ b/src/Api/Models/Request/Organizations/SecretsManagerSubscriptionUpdateRequestModel.cs
@@ -1,5 +1,5 @@
using System.ComponentModel.DataAnnotations;
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.Models.Business;
namespace Bit.Api.Models.Request.Organizations;
diff --git a/src/Api/Models/Response/DomainsResponseModel.cs b/src/Api/Models/Response/DomainsResponseModel.cs
index b7f1028458..5b6b4e59c8 100644
--- a/src/Api/Models/Response/DomainsResponseModel.cs
+++ b/src/Api/Models/Response/DomainsResponseModel.cs
@@ -43,12 +43,12 @@ public class DomainsResponseModel : ResponseModel
IEnumerable excludedDomains,
bool excluded)
{
- Type = globalDomain;
+ Type = (byte)globalDomain;
Domains = domains;
Excluded = excluded && (excludedDomains?.Contains(globalDomain) ?? false);
}
- public GlobalEquivalentDomainsType Type { get; set; }
+ public byte Type { get; set; }
public IEnumerable Domains { get; set; }
public bool Excluded { get; set; }
}
diff --git a/src/Api/Program.cs b/src/Api/Program.cs
index b44ffa835f..2fd25eaefa 100644
--- a/src/Api/Program.cs
+++ b/src/Api/Program.cs
@@ -31,8 +31,8 @@ public class Program
return e.Level >= globalSettings.MinLogLevel.ApiSettings.IpRateLimit;
}
- if (context.Contains("IdentityServer4.Validation.TokenValidator") ||
- context.Contains("IdentityServer4.Validation.TokenRequestValidator"))
+ if (context.Contains("Duende.IdentityServer.Validation.TokenValidator") ||
+ context.Contains("Duende.IdentityServer.Validation.TokenRequestValidator"))
{
return e.Level >= globalSettings.MinLogLevel.ApiSettings.IdentityToken;
}
diff --git a/src/Api/SecretsManager/Models/Request/SMImportRequestModel.cs b/src/Api/SecretsManager/Models/Request/SMImportRequestModel.cs
index 13cc3b6f73..a63e2c180d 100644
--- a/src/Api/SecretsManager/Models/Request/SMImportRequestModel.cs
+++ b/src/Api/SecretsManager/Models/Request/SMImportRequestModel.cs
@@ -36,12 +36,12 @@ public class SMImportRequestModel
[Required]
[EncryptedString]
- [EncryptedStringLength(1000)]
+ [EncryptedStringLength(35000)]
public string Value { get; set; }
[Required]
[EncryptedString]
- [EncryptedStringLength(1000)]
+ [EncryptedStringLength(10000)]
public string Note { get; set; }
[Required]
diff --git a/src/Api/Startup.cs b/src/Api/Startup.cs
index fce3ef4756..1b8505e477 100644
--- a/src/Api/Startup.cs
+++ b/src/Api/Startup.cs
@@ -7,6 +7,11 @@ using Stripe;
using Bit.Core.Utilities;
using IdentityModel;
using System.Globalization;
+using Bit.Api.Auth.Models.Request;
+using Bit.Api.Auth.Validators;
+using Bit.Api.Vault.Models.Request;
+using Bit.Api.Vault.Validators;
+using Bit.Core.Auth.Entities;
using Bit.Core.IdentityServer;
using Bit.SharedWeb.Health;
using Microsoft.IdentityModel.Logging;
@@ -18,6 +23,7 @@ using Bit.Core.Auth.Identity;
using Bit.Core.Auth.UserFeatures.UserKey;
using Bit.Core.Auth.UserFeatures.UserKey.Implementations;
using Bit.Core.OrganizationFeatures.OrganizationSubscriptions;
+using Bit.Core.Vault.Entities;
#if !OSS
using Bit.Commercial.Core.SecretsManager;
@@ -135,6 +141,15 @@ public class Startup
// Key Rotation
services.AddScoped();
+ services
+ .AddScoped, IEnumerable>,
+ EmergencyAccessRotationValidator>();
+ services
+ .AddScoped, IEnumerable>,
+ CipherRotationValidator>();
+ services
+ .AddScoped, IEnumerable>,
+ FolderRotationValidator>();
// Services
services.AddBaseServices(globalSettings);
diff --git a/src/Api/Vault/AuthorizationHandlers/Collections/CollectionAuthorizationHandler.cs b/src/Api/Vault/AuthorizationHandlers/Collections/CollectionAuthorizationHandler.cs
index 626402f715..9bbfc94ff2 100644
--- a/src/Api/Vault/AuthorizationHandlers/Collections/CollectionAuthorizationHandler.cs
+++ b/src/Api/Vault/AuthorizationHandlers/Collections/CollectionAuthorizationHandler.cs
@@ -1,4 +1,5 @@
-using Bit.Core;
+#nullable enable
+using Bit.Core;
using Bit.Core.Context;
using Bit.Core.Entities;
using Bit.Core.Enums;
@@ -19,6 +20,7 @@ public class CollectionAuthorizationHandler : BulkAuthorizationHandler resources)
+ CollectionOperationRequirement requirement, ICollection? resources)
{
if (!_featureService.IsEnabled(FeatureFlagKeys.FlexibleCollections, _currentContext))
{
@@ -50,21 +52,15 @@ public class CollectionAuthorizationHandler : BulkAuthorizationHandler tc.OrganizationId != targetOrganizationId))
+ if (resources.Any(tc => tc.OrganizationId != _targetOrganizationId))
{
throw new BadRequestException("Requested collections must belong to the same organization.");
}
- // Acting user is not a member of the target organization, fail
- var org = _currentContext.GetOrganization(targetOrganizationId);
- if (org == null)
- {
- context.Fail();
- return;
- }
+ var org = _currentContext.GetOrganization(_targetOrganizationId);
switch (requirement)
{
@@ -83,95 +79,100 @@ public class CollectionAuthorizationHandler : BulkAuthorizationHandler resources, CurrentContextOrganization org)
+ ICollection resources, CurrentContextOrganization? org)
{
- // Owners, Admins, Providers, and users with DeleteAnyCollection permission can always delete collections
- if (
- org.Type is OrganizationUserType.Owner or OrganizationUserType.Admin ||
- org.Permissions is { DeleteAnyCollection: true } ||
- await _currentContext.ProviderUserForOrgAsync(org.Id))
+ // Owners, Admins, and users with DeleteAnyCollection permission can always delete collections
+ if (org is
+ { Type: OrganizationUserType.Owner or OrganizationUserType.Admin } or
+ { Permissions.DeleteAnyCollection: true })
{
context.Succeed(requirement);
return;
}
- // The limit collection management setting is enabled and we are not an Admin (above condition), fail
- if (org.LimitCollectionCreationDeletion)
+ // The limit collection management setting is disabled,
+ // ensure acting user has manage permissions for all collections being deleted
+ if (org is { LimitCollectionCreationDeletion: false })
{
- context.Fail();
- return;
+ var manageableCollectionIds =
+ (await _collectionRepository.GetManyByUserIdAsync(_currentContext.UserId!.Value))
+ .Where(c => c.Manage && c.OrganizationId == org.Id)
+ .Select(c => c.Id)
+ .ToHashSet();
+
+ // The acting user has permission to manage all target collections, succeed
+ if (resources.All(c => manageableCollectionIds.Contains(c.Id)))
+ {
+ context.Succeed(requirement);
+ return;
+ }
}
- // Other members types should have the Manage capability for all collections being deleted
- var manageableCollectionIds =
- (await _collectionRepository.GetManyByUserIdAsync(_currentContext.UserId!.Value))
- .Where(c => c.Manage && c.OrganizationId == org.Id)
- .Select(c => c.Id)
- .ToHashSet();
-
- // The acting user does not have permission to manage all target collections, fail
- if (resources.Any(c => !manageableCollectionIds.Contains(c.Id)))
+ // Allow providers to delete collections if they are a provider for the target organization
+ if (await _currentContext.ProviderUserForOrgAsync(_targetOrganizationId))
{
- context.Fail();
- return;
+ context.Succeed(requirement);
}
-
- context.Succeed(requirement);
}
///
/// Ensures the acting user is allowed to manage access permissions for the target collections.
///
private async Task CanManageCollectionAccessAsync(AuthorizationHandlerContext context,
- IAuthorizationRequirement requirement, ICollection targetCollections, CurrentContextOrganization org)
+ IAuthorizationRequirement requirement, ICollection targetCollections,
+ CurrentContextOrganization? org)
{
- // Owners, Admins, Providers, and users with EditAnyCollection permission can always manage collection access
- if (
- org.Permissions is { EditAnyCollection: true } ||
- org.Type is OrganizationUserType.Owner or OrganizationUserType.Admin ||
- await _currentContext.ProviderUserForOrgAsync(org.Id))
+ // Owners, Admins, and users with EditAnyCollection permission can always manage collection access
+ if (org is
+ { Type: OrganizationUserType.Owner or OrganizationUserType.Admin } or
+ { Permissions.EditAnyCollection: true })
{
context.Succeed(requirement);
return;
}
- // List of collection Ids the acting user is allowed to manage
- var manageableCollectionIds =
- (await _collectionRepository.GetManyByUserIdAsync(_currentContext.UserId!.Value))
- .Where(c => c.Manage && c.OrganizationId == org.Id)
- .Select(c => c.Id)
- .ToHashSet();
-
- // The acting user does not have permission to manage all target collections, fail
- if (targetCollections.Any(tc => !manageableCollectionIds.Contains(tc.Id)))
+ // Only check collection management permissions if the user is a member of the target organization (org != null)
+ if (org is not null)
{
- context.Fail();
- return;
+ var manageableCollectionIds =
+ (await _collectionRepository.GetManyByUserIdAsync(_currentContext.UserId!.Value))
+ .Where(c => c.Manage && c.OrganizationId == org.Id)
+ .Select(c => c.Id)
+ .ToHashSet();
+
+ // The acting user has permission to manage all target collections, succeed
+ if (targetCollections.All(c => manageableCollectionIds.Contains(c.Id)))
+ {
+ context.Succeed(requirement);
+ return;
+ }
}
- context.Succeed(requirement);
+ // Allow providers to manage collections if they are a provider for the target organization
+ if (await _currentContext.ProviderUserForOrgAsync(_targetOrganizationId))
+ {
+ context.Succeed(requirement);
+ }
}
}
diff --git a/src/Api/Vault/Controllers/CiphersController.cs b/src/Api/Vault/Controllers/CiphersController.cs
index ad0db8f6b3..a99d2b01c2 100644
--- a/src/Api/Vault/Controllers/CiphersController.cs
+++ b/src/Api/Vault/Controllers/CiphersController.cs
@@ -40,6 +40,10 @@ public class CiphersController : Controller
private readonly ILogger _logger;
private readonly GlobalSettings _globalSettings;
private readonly Version _cipherKeyEncryptionMinimumVersion = new Version(Constants.CipherKeyEncryptionMinimumVersion);
+ private readonly IFeatureService _featureService;
+
+ private bool UseFlexibleCollections =>
+ _featureService.IsEnabled(FeatureFlagKeys.FlexibleCollections, _currentContext);
public CiphersController(
ICipherRepository cipherRepository,
@@ -50,7 +54,8 @@ public class CiphersController : Controller
IProviderService providerService,
ICurrentContext currentContext,
ILogger logger,
- GlobalSettings globalSettings)
+ GlobalSettings globalSettings,
+ IFeatureService featureService)
{
_cipherRepository = cipherRepository;
_collectionCipherRepository = collectionCipherRepository;
@@ -61,13 +66,14 @@ public class CiphersController : Controller
_currentContext = currentContext;
_logger = logger;
_globalSettings = globalSettings;
+ _featureService = featureService;
}
[HttpGet("{id}")]
- public async Task Get(string id)
+ public async Task Get(Guid id)
{
var userId = _userService.GetProperUserId(User).Value;
- var cipher = await _cipherRepository.GetByIdAsync(new Guid(id), userId);
+ var cipher = await GetByIdAsync(id, userId);
if (cipher == null)
{
throw new NotFoundException();
@@ -91,17 +97,16 @@ public class CiphersController : Controller
[HttpGet("{id}/full-details")]
[HttpGet("{id}/details")]
- public async Task GetDetails(string id)
+ public async Task GetDetails(Guid id)
{
var userId = _userService.GetProperUserId(User).Value;
- var cipherId = new Guid(id);
- var cipher = await _cipherRepository.GetByIdAsync(cipherId, userId);
+ var cipher = await GetByIdAsync(id, userId);
if (cipher == null)
{
throw new NotFoundException();
}
- var collectionCiphers = await _collectionCipherRepository.GetManyByUserIdCipherIdAsync(userId, cipherId);
+ var collectionCiphers = await _collectionCipherRepository.GetManyByUserIdCipherIdAsync(userId, id, UseFlexibleCollections);
return new CipherDetailsResponseModel(cipher, _globalSettings, collectionCiphers);
}
@@ -111,11 +116,11 @@ public class CiphersController : Controller
var userId = _userService.GetProperUserId(User).Value;
var hasOrgs = _currentContext.Organizations?.Any() ?? false;
// TODO: Use hasOrgs proper for cipher listing here?
- var ciphers = await _cipherRepository.GetManyByUserIdAsync(userId, true || hasOrgs);
+ var ciphers = await _cipherRepository.GetManyByUserIdAsync(userId, useFlexibleCollections: UseFlexibleCollections, withOrganizations: true || hasOrgs);
Dictionary> collectionCiphersGroupDict = null;
if (hasOrgs)
{
- var collectionCiphers = await _collectionCipherRepository.GetManyByUserIdAsync(userId);
+ var collectionCiphers = await _collectionCipherRepository.GetManyByUserIdAsync(userId, UseFlexibleCollections);
collectionCiphersGroupDict = collectionCiphers.GroupBy(c => c.CipherId).ToDictionary(s => s.Key);
}
@@ -175,7 +180,7 @@ public class CiphersController : Controller
public async Task Put(Guid id, [FromBody] CipherRequestModel model)
{
var userId = _userService.GetProperUserId(User).Value;
- var cipher = await _cipherRepository.GetByIdAsync(id, userId);
+ var cipher = await GetByIdAsync(id, userId);
if (cipher == null)
{
throw new NotFoundException();
@@ -184,7 +189,7 @@ public class CiphersController : Controller
ValidateClientVersionForItemLevelEncryptionSupport(cipher);
ValidateClientVersionForFido2CredentialSupport(cipher);
- var collectionIds = (await _collectionCipherRepository.GetManyByUserIdCipherIdAsync(userId, id)).Select(c => c.CollectionId).ToList();
+ var collectionIds = (await _collectionCipherRepository.GetManyByUserIdCipherIdAsync(userId, id, UseFlexibleCollections)).Select(c => c.CollectionId).ToList();
var modelOrgId = string.IsNullOrWhiteSpace(model.OrganizationId) ?
(Guid?)null : new Guid(model.OrganizationId);
if (cipher.OrganizationId != modelOrgId)
@@ -215,7 +220,7 @@ public class CiphersController : Controller
throw new NotFoundException();
}
- var collectionIds = (await _collectionCipherRepository.GetManyByUserIdCipherIdAsync(userId, id)).Select(c => c.CollectionId).ToList();
+ var collectionIds = (await _collectionCipherRepository.GetManyByUserIdCipherIdAsync(userId, id, UseFlexibleCollections)).Select(c => c.CollectionId).ToList();
// object cannot be a descendant of CipherDetails, so let's clone it.
var cipherClone = model.ToCipher(cipher).Clone();
await _cipherService.SaveAsync(cipherClone, userId, model.LastKnownRevisionDate, collectionIds, true, false);
@@ -247,25 +252,23 @@ public class CiphersController : Controller
[HttpPut("{id}/partial")]
[HttpPost("{id}/partial")]
- public async Task PutPartial(string id, [FromBody] CipherPartialRequestModel model)
+ public async Task PutPartial(Guid id, [FromBody] CipherPartialRequestModel model)
{
var userId = _userService.GetProperUserId(User).Value;
var folderId = string.IsNullOrWhiteSpace(model.FolderId) ? null : (Guid?)new Guid(model.FolderId);
- var cipherId = new Guid(id);
- await _cipherRepository.UpdatePartialAsync(cipherId, userId, folderId, model.Favorite);
+ await _cipherRepository.UpdatePartialAsync(id, userId, folderId, model.Favorite);
- var cipher = await _cipherRepository.GetByIdAsync(cipherId, userId);
+ var cipher = await GetByIdAsync(id, userId);
var response = new CipherResponseModel(cipher, _globalSettings);
return response;
}
[HttpPut("{id}/share")]
[HttpPost("{id}/share")]
- public async Task PutShare(string id, [FromBody] CipherShareRequestModel model)
+ public async Task PutShare(Guid id, [FromBody] CipherShareRequestModel model)
{
var userId = _userService.GetProperUserId(User).Value;
- var cipherId = new Guid(id);
- var cipher = await _cipherRepository.GetByIdAsync(cipherId);
+ var cipher = await _cipherRepository.GetByIdAsync(id);
if (cipher == null || cipher.UserId != userId ||
!await _currentContext.OrganizationUser(new Guid(model.Cipher.OrganizationId)))
{
@@ -279,17 +282,17 @@ public class CiphersController : Controller
await _cipherService.ShareAsync(original, model.Cipher.ToCipher(cipher), new Guid(model.Cipher.OrganizationId),
model.CollectionIds.Select(c => new Guid(c)), userId, model.Cipher.LastKnownRevisionDate);
- var sharedCipher = await _cipherRepository.GetByIdAsync(cipherId, userId);
+ var sharedCipher = await GetByIdAsync(id, userId);
var response = new CipherResponseModel(sharedCipher, _globalSettings);
return response;
}
[HttpPut("{id}/collections")]
[HttpPost("{id}/collections")]
- public async Task PutCollections(string id, [FromBody] CipherCollectionsRequestModel model)
+ public async Task PutCollections(Guid id, [FromBody] CipherCollectionsRequestModel model)
{
var userId = _userService.GetProperUserId(User).Value;
- var cipher = await _cipherRepository.GetByIdAsync(new Guid(id), userId);
+ var cipher = await GetByIdAsync(id, userId);
if (cipher == null || !cipher.OrganizationId.HasValue ||
!await _currentContext.OrganizationUser(cipher.OrganizationId.Value))
{
@@ -318,10 +321,10 @@ public class CiphersController : Controller
[HttpDelete("{id}")]
[HttpPost("{id}/delete")]
- public async Task Delete(string id)
+ public async Task Delete(Guid id)
{
var userId = _userService.GetProperUserId(User).Value;
- var cipher = await _cipherRepository.GetByIdAsync(new Guid(id), userId);
+ var cipher = await GetByIdAsync(id, userId);
if (cipher == null)
{
throw new NotFoundException();
@@ -380,10 +383,10 @@ public class CiphersController : Controller
}
[HttpPut("{id}/delete")]
- public async Task PutDelete(string id)
+ public async Task PutDelete(Guid id)
{
var userId = _userService.GetProperUserId(User).Value;
- var cipher = await _cipherRepository.GetByIdAsync(new Guid(id), userId);
+ var cipher = await GetByIdAsync(id, userId);
if (cipher == null)
{
throw new NotFoundException();
@@ -436,10 +439,10 @@ public class CiphersController : Controller
}
[HttpPut("{id}/restore")]
- public async Task PutRestore(string id)
+ public async Task PutRestore(Guid id)
{
var userId = _userService.GetProperUserId(User).Value;
- var cipher = await _cipherRepository.GetByIdAsync(new Guid(id), userId);
+ var cipher = await GetByIdAsync(id, userId);
if (cipher == null)
{
throw new NotFoundException();
@@ -526,7 +529,7 @@ public class CiphersController : Controller
}
var userId = _userService.GetProperUserId(User).Value;
- var ciphers = await _cipherRepository.GetManyByUserIdAsync(userId, false);
+ var ciphers = await _cipherRepository.GetManyByUserIdAsync(userId, useFlexibleCollections: UseFlexibleCollections, withOrganizations: false);
var ciphersDict = ciphers.ToDictionary(c => c.Id);
var shareCiphers = new List<(Cipher, DateTime?)>();
@@ -581,13 +584,12 @@ public class CiphersController : Controller
}
[HttpPost("{id}/attachment/v2")]
- public async Task PostAttachment(string id, [FromBody] AttachmentRequestModel request)
+ public async Task PostAttachment(Guid id, [FromBody] AttachmentRequestModel request)
{
- var idGuid = new Guid(id);
var userId = _userService.GetProperUserId(User).Value;
var cipher = request.AdminRequest ?
- await _cipherRepository.GetOrganizationDetailsByIdAsync(idGuid) :
- await _cipherRepository.GetByIdAsync(idGuid, userId);
+ await _cipherRepository.GetOrganizationDetailsByIdAsync(id) :
+ await GetByIdAsync(id, userId);
if (cipher == null || (request.AdminRequest && (!cipher.OrganizationId.HasValue ||
!await _currentContext.EditAnyCollection(cipher.OrganizationId.Value))))
@@ -615,11 +617,10 @@ public class CiphersController : Controller
}
[HttpGet("{id}/attachment/{attachmentId}/renew")]
- public async Task RenewFileUploadUrl(string id, string attachmentId)
+ public async Task RenewFileUploadUrl(Guid id, string attachmentId)
{
var userId = _userService.GetProperUserId(User).Value;
- var cipherId = new Guid(id);
- var cipher = await _cipherRepository.GetByIdAsync(cipherId, userId);
+ var cipher = await GetByIdAsync(id, userId);
var attachments = cipher?.GetAttachments();
if (attachments == null || !attachments.ContainsKey(attachmentId) || attachments[attachmentId].Validated)
@@ -638,7 +639,7 @@ public class CiphersController : Controller
[SelfHosted(SelfHostedOnly = true)]
[RequestSizeLimit(Constants.FileSize501mb)]
[DisableFormValueModelBinding]
- public async Task PostFileForExistingAttachment(string id, string attachmentId)
+ public async Task PostFileForExistingAttachment(Guid id, string attachmentId)
{
if (!Request?.ContentType.Contains("multipart/") ?? true)
{
@@ -646,7 +647,7 @@ public class CiphersController : Controller
}
var userId = _userService.GetProperUserId(User).Value;
- var cipher = await _cipherRepository.GetByIdAsync(new Guid(id), userId);
+ var cipher = await GetByIdAsync(id, userId);
var attachments = cipher?.GetAttachments();
if (attachments == null || !attachments.ContainsKey(attachmentId))
{
@@ -664,13 +665,12 @@ public class CiphersController : Controller
[Obsolete("Deprecated Attachments API", false)]
[RequestSizeLimit(Constants.FileSize101mb)]
[DisableFormValueModelBinding]
- public async Task PostAttachment(string id)
+ public async Task PostAttachment(Guid id)
{
ValidateAttachment();
- var idGuid = new Guid(id);
var userId = _userService.GetProperUserId(User).Value;
- var cipher = await _cipherRepository.GetByIdAsync(idGuid, userId);
+ var cipher = await GetByIdAsync(id, userId);
if (cipher == null)
{
throw new NotFoundException();
@@ -711,10 +711,10 @@ public class CiphersController : Controller
}
[HttpGet("{id}/attachment/{attachmentId}")]
- public async Task GetAttachmentData(string id, string attachmentId)
+ public async Task GetAttachmentData(Guid id, string attachmentId)
{
var userId = _userService.GetProperUserId(User).Value;
- var cipher = await _cipherRepository.GetByIdAsync(new Guid(id), userId);
+ var cipher = await GetByIdAsync(id, userId);
var result = await _cipherService.GetAttachmentDownloadDataAsync(cipher, attachmentId);
return new AttachmentResponseModel(result);
}
@@ -742,11 +742,10 @@ public class CiphersController : Controller
[HttpDelete("{id}/attachment/{attachmentId}")]
[HttpPost("{id}/attachment/{attachmentId}/delete")]
- public async Task DeleteAttachment(string id, string attachmentId)
+ public async Task DeleteAttachment(Guid id, string attachmentId)
{
- var idGuid = new Guid(id);
var userId = _userService.GetProperUserId(User).Value;
- var cipher = await _cipherRepository.GetByIdAsync(idGuid, userId);
+ var cipher = await GetByIdAsync(id, userId);
if (cipher == null)
{
throw new NotFoundException();
@@ -836,4 +835,9 @@ public class CiphersController : Controller
}
}
}
+
+ private async Task GetByIdAsync(Guid cipherId, Guid userId)
+ {
+ return await _cipherRepository.GetByIdAsync(cipherId, userId, UseFlexibleCollections);
+ }
}
diff --git a/src/Api/Vault/Controllers/SyncController.cs b/src/Api/Vault/Controllers/SyncController.cs
index ac7ef9acdc..7bf26e714e 100644
--- a/src/Api/Vault/Controllers/SyncController.cs
+++ b/src/Api/Vault/Controllers/SyncController.cs
@@ -1,6 +1,9 @@
using Bit.Api.Vault.Models.Response;
+using Bit.Core;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.AdminConsole.Repositories;
+using Bit.Core.Context;
using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Exceptions;
@@ -29,6 +32,11 @@ public class SyncController : Controller
private readonly IPolicyRepository _policyRepository;
private readonly ISendRepository _sendRepository;
private readonly GlobalSettings _globalSettings;
+ private readonly ICurrentContext _currentContext;
+ private readonly IFeatureService _featureService;
+
+ private bool UseFlexibleCollections =>
+ _featureService.IsEnabled(FeatureFlagKeys.FlexibleCollections, _currentContext);
public SyncController(
IUserService userService,
@@ -40,7 +48,9 @@ public class SyncController : Controller
IProviderUserRepository providerUserRepository,
IPolicyRepository policyRepository,
ISendRepository sendRepository,
- GlobalSettings globalSettings)
+ GlobalSettings globalSettings,
+ ICurrentContext currentContext,
+ IFeatureService featureService)
{
_userService = userService;
_folderRepository = folderRepository;
@@ -52,6 +62,8 @@ public class SyncController : Controller
_policyRepository = policyRepository;
_sendRepository = sendRepository;
_globalSettings = globalSettings;
+ _currentContext = currentContext;
+ _featureService = featureService;
}
[HttpGet("")]
@@ -73,7 +85,7 @@ public class SyncController : Controller
var hasEnabledOrgs = organizationUserDetails.Any(o => o.Enabled);
var folders = await _folderRepository.GetManyByUserIdAsync(user.Id);
- var ciphers = await _cipherRepository.GetManyByUserIdAsync(user.Id, hasEnabledOrgs);
+ var ciphers = await _cipherRepository.GetManyByUserIdAsync(user.Id, useFlexibleCollections: UseFlexibleCollections, withOrganizations: hasEnabledOrgs);
var sends = await _sendRepository.GetManyByUserIdAsync(user.Id);
IEnumerable collections = null;
@@ -83,7 +95,7 @@ public class SyncController : Controller
if (hasEnabledOrgs)
{
collections = await _collectionRepository.GetManyByUserIdAsync(user.Id);
- var collectionCiphers = await _collectionCipherRepository.GetManyByUserIdAsync(user.Id);
+ var collectionCiphers = await _collectionCipherRepository.GetManyByUserIdAsync(user.Id, UseFlexibleCollections);
collectionCiphersGroupDict = collectionCiphers.GroupBy(c => c.CipherId).ToDictionary(s => s.Key);
}
diff --git a/src/Api/Vault/Models/CipherFido2CredentialModel.cs b/src/Api/Vault/Models/CipherFido2CredentialModel.cs
index 32f6104a9a..09d66a22e5 100644
--- a/src/Api/Vault/Models/CipherFido2CredentialModel.cs
+++ b/src/Api/Vault/Models/CipherFido2CredentialModel.cs
@@ -18,6 +18,7 @@ public class CipherFido2CredentialModel
RpId = data.RpId;
RpName = data.RpName;
UserHandle = data.UserHandle;
+ UserName = data.UserName;
UserDisplayName = data.UserDisplayName;
Counter = data.Counter;
Discoverable = data.Discoverable;
@@ -50,6 +51,9 @@ public class CipherFido2CredentialModel
public string UserHandle { get; set; }
[EncryptedString]
[EncryptedStringLength(1000)]
+ public string UserName { get; set; }
+ [EncryptedString]
+ [EncryptedStringLength(1000)]
public string UserDisplayName { get; set; }
[EncryptedString]
[EncryptedStringLength(1000)]
@@ -72,6 +76,7 @@ public class CipherFido2CredentialModel
RpId = RpId,
RpName = RpName,
UserHandle = UserHandle,
+ UserName = UserName,
UserDisplayName = UserDisplayName,
Counter = Counter,
Discoverable = Discoverable,
diff --git a/src/Api/Vault/Models/Response/SyncResponseModel.cs b/src/Api/Vault/Models/Response/SyncResponseModel.cs
index 817f233e11..ca833738a1 100644
--- a/src/Api/Vault/Models/Response/SyncResponseModel.cs
+++ b/src/Api/Vault/Models/Response/SyncResponseModel.cs
@@ -1,9 +1,10 @@
using Bit.Api.Models.Response;
using Bit.Api.Tools.Models.Response;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.AdminConsole.Models.Api.Response;
using Bit.Core.AdminConsole.Models.Data.Provider;
using Bit.Core.Entities;
using Bit.Core.Models.Api;
-using Bit.Core.Models.Api.Response;
using Bit.Core.Models.Data;
using Bit.Core.Models.Data.Organizations.OrganizationUsers;
using Bit.Core.Settings;
diff --git a/src/Api/Vault/Validators/CipherRotationValidator.cs b/src/Api/Vault/Validators/CipherRotationValidator.cs
new file mode 100644
index 0000000000..9259235d8c
--- /dev/null
+++ b/src/Api/Vault/Validators/CipherRotationValidator.cs
@@ -0,0 +1,56 @@
+using Bit.Api.Auth.Validators;
+using Bit.Api.Vault.Models.Request;
+using Bit.Core;
+using Bit.Core.Context;
+using Bit.Core.Entities;
+using Bit.Core.Exceptions;
+using Bit.Core.Services;
+using Bit.Core.Vault.Entities;
+using Bit.Core.Vault.Repositories;
+
+namespace Bit.Api.Vault.Validators;
+
+public class CipherRotationValidator : IRotationValidator, IEnumerable>
+{
+ private readonly ICipherRepository _cipherRepository;
+ private readonly ICurrentContext _currentContext;
+ private readonly IFeatureService _featureService;
+
+ private bool UseFlexibleCollections =>
+ _featureService.IsEnabled(FeatureFlagKeys.FlexibleCollections, _currentContext);
+
+ public CipherRotationValidator(ICipherRepository cipherRepository, ICurrentContext currentContext,
+ IFeatureService featureService)
+ {
+ _cipherRepository = cipherRepository;
+ _currentContext = currentContext;
+ _featureService = featureService;
+
+ }
+
+ public async Task> ValidateAsync(User user, IEnumerable ciphers)
+ {
+ var result = new List();
+ if (ciphers == null || !ciphers.Any())
+ {
+ return result;
+ }
+
+ var existingCiphers = await _cipherRepository.GetManyByUserIdAsync(user.Id, UseFlexibleCollections);
+ if (existingCiphers == null || !existingCiphers.Any())
+ {
+ return result;
+ }
+
+ foreach (var existing in existingCiphers)
+ {
+ var cipher = ciphers.FirstOrDefault(c => c.Id == existing.Id);
+ if (cipher == null)
+ {
+ throw new BadRequestException("All existing ciphers must be included in the rotation.");
+ }
+ result.Add(cipher.ToCipher(existing));
+ }
+ return result;
+ }
+}
diff --git a/src/Api/Vault/Validators/FolderRotationValidator.cs b/src/Api/Vault/Validators/FolderRotationValidator.cs
new file mode 100644
index 0000000000..b79c38e7a0
--- /dev/null
+++ b/src/Api/Vault/Validators/FolderRotationValidator.cs
@@ -0,0 +1,44 @@
+using Bit.Api.Auth.Validators;
+using Bit.Api.Vault.Models.Request;
+using Bit.Core.Entities;
+using Bit.Core.Exceptions;
+using Bit.Core.Vault.Entities;
+using Bit.Core.Vault.Repositories;
+
+namespace Bit.Api.Vault.Validators;
+
+public class FolderRotationValidator : IRotationValidator, IEnumerable>
+{
+ private readonly IFolderRepository _folderRepository;
+
+ public FolderRotationValidator(IFolderRepository folderRepository)
+ {
+ _folderRepository = folderRepository;
+ }
+
+ public async Task> ValidateAsync(User user, IEnumerable folders)
+ {
+ var result = new List();
+ if (folders == null || !folders.Any())
+ {
+ return result;
+ }
+
+ var existingFolders = await _folderRepository.GetManyByUserIdAsync(user.Id);
+ if (existingFolders == null || !existingFolders.Any())
+ {
+ return result;
+ }
+
+ foreach (var existing in existingFolders)
+ {
+ var folder = folders.FirstOrDefault(c => c.Id == existing.Id);
+ if (folder == null)
+ {
+ throw new BadRequestException("All existing folders must be included in the rotation.");
+ }
+ result.Add(folder.ToFolder(existing));
+ }
+ return result;
+ }
+}
diff --git a/src/Api/packages.lock.json b/src/Api/packages.lock.json
index 95d163f2ae..873d703de9 100644
--- a/src/Api/packages.lock.json
+++ b/src/Api/packages.lock.json
@@ -296,8 +296,8 @@
},
"Dapper": {
"type": "Transitive",
- "resolved": "2.0.123",
- "contentHash": "RDFF4rBLLmbpi6pwkY7q/M6UXHRJEOerplDGE5jwEkP/JGJnBauAClYavNKJPW1yOTWRPIyfj4is3EaJxQXILQ=="
+ "resolved": "2.1.24",
+ "contentHash": "/2t2vsdJyZRsk13AsWigZpsuFvEwK+o3v862cEULXoww905gyKhJFSuwmZI/4Ui9COX9ZCFCI09UHyH4wVYl3A=="
},
"DnsClient": {
"type": "Transitive",
@@ -307,6 +307,24 @@
"Microsoft.Win32.Registry": "5.0.0"
}
},
+ "Duende.IdentityServer": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "4HVjzx1F8v5J+U7oa8RGAQGj2QzmzNSu87r18Sh+dlh10uyZZL8teAaT/FaVLDObnfItGdPFvN8mwpF/HkI3Xw==",
+ "dependencies": {
+ "Duende.IdentityServer.Storage": "6.0.4",
+ "Microsoft.AspNetCore.Authentication.OpenIdConnect": "6.0.0"
+ }
+ },
+ "Duende.IdentityServer.Storage": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "s5gAjfbpr2IMgI+fU2Nx+2AZdzstmbt9gpo13iX7GwvqSeSaBVqj9ZskAN0R2KF1OemPdZuGnfaTcevdXMUrrw==",
+ "dependencies": {
+ "IdentityModel": "6.0.0",
+ "Microsoft.AspNetCore.DataProtection.Abstractions": "6.0.0"
+ }
+ },
"Fido2": {
"type": "Transitive",
"resolved": "3.0.1",
@@ -335,57 +353,16 @@
},
"Handlebars.Net": {
"type": "Transitive",
- "resolved": "2.1.2",
- "contentHash": "p60QyeBYpZmcZdIXRMqs9XySIBaxJ0lj3+QD0EJVr4ybTigOTCumXMMin5dPwjo9At1UwkDZ3gGwa1lmGjG6DA==",
+ "resolved": "2.1.4",
+ "contentHash": "Od7MWDfGxYKRtxETFMlcvCrY8hAqyuXZDX4EsOfiI/jzh+PVBuVxazHBC1HmVqTKX1JnRtoxIMcH95K9UFlYog==",
"dependencies": {
"Microsoft.CSharp": "4.7.0"
}
},
"IdentityModel": {
"type": "Transitive",
- "resolved": "4.4.0",
- "contentHash": "b18wrIx5wnZlMxAX7oVsE+nDtAJ4hajYlH0xPlaRvo4r/fz08K6pPeZvbiqS9nfNbzfIgLFmNX+FL9qR9ZR5PA==",
- "dependencies": {
- "Newtonsoft.Json": "11.0.2",
- "System.Text.Encodings.Web": "4.7.0"
- }
- },
- "IdentityModel.AspNetCore.OAuth2Introspection": {
- "type": "Transitive",
- "resolved": "4.0.1",
- "contentHash": "ZNdMZMaj9fqR3j50vYsu+1U3QGd6n8+fqwf+a8mCTcmXGor+HgFDfdq0mM34bsmD6uEgAQup7sv2ZW5kR36dbA==",
- "dependencies": {
- "IdentityModel": "4.0.0"
- }
- },
- "IdentityServer4": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "blaxxGuOA7v/w1q+fxn97wZ+x2ecG1ZD4mc/N/ZOXMNeFZZhqv+4LF26Gecyik3nWrJPmbMEtQbLmRsKG8k61w==",
- "dependencies": {
- "IdentityModel": "4.4.0",
- "IdentityServer4.Storage": "4.1.2",
- "Microsoft.AspNetCore.Authentication.OpenIdConnect": "3.1.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.6.0",
- "Newtonsoft.Json": "12.0.2"
- }
- },
- "IdentityServer4.AccessTokenValidation": {
- "type": "Transitive",
- "resolved": "3.0.1",
- "contentHash": "qu/M6UyN4o9NVep7q545Ms7hYAnsQqSdLbN1Fjjrn4m35lyBfeQPSSNzDryAKHbodyWOQfHaOqKEyMEJQ5Rpgw==",
- "dependencies": {
- "IdentityModel.AspNetCore.OAuth2Introspection": "4.0.1",
- "Microsoft.AspNetCore.Authentication.JwtBearer": "3.0.0"
- }
- },
- "IdentityServer4.Storage": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "KoSffyZyyeCNTIyJiZnCuPakJ1QbCHlpty6gbWUj/7yl+w0PXIchgmmJnJSvddzBb8iZ2xew/vGlxWUIP17P2g==",
- "dependencies": {
- "IdentityModel": "4.4.0"
- }
+ "resolved": "6.0.0",
+ "contentHash": "eVHCR7a6m/dm5RFcBzE3qs/Jg5j9R5Rjpu8aTOv9e4AFvaQtBXb5ah7kmwU+YwA0ufRwz4wf1hnIvsD2hSnI4g=="
},
"LaunchDarkly.Cache": {
"type": "Transitive",
@@ -394,26 +371,27 @@
},
"LaunchDarkly.CommonSdk": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "YYYq+41gZRMQ8dIoMC6HOq/dI+4RY3HsexLLAaE9T1+1tVMeQkbCqak7sVeKX4QcE7xlXx23lWgipYUkRoRUyw==",
+ "resolved": "6.2.0",
+ "contentHash": "eLeb+tTNLwOxlUIsZWzJlcPmG9Wyf20NYyucP6MW6aqKW6doKFeSO+aJe0z+WyijbvfX1Dp1U1HQatOu6fa1Gg==",
"dependencies": {
+ "LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
},
"LaunchDarkly.EventSource": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "DN44Ry5M4lyrjiF7LEu0Ijco7Wm8R7mJopN+giYsYjkQlszsXdFvm3POoehIDAOtL1HHl5bZvF9k9xK034u3IA==",
+ "resolved": "5.1.0",
+ "contentHash": "PztDWiMvPWODx+kfBnCroZ8Lpya4nPc7ZO4TZysOogODbVXDDPDYrdcgVivCMgf4davhGrp61ekvZc+Uy1NYMA==",
"dependencies": {
- "LaunchDarkly.Logging": "[1.0.1, 3.0.0)"
+ "LaunchDarkly.Logging": "[2.0.0, 3.0.0)"
}
},
"LaunchDarkly.InternalSdk": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "jW8VEfFciuCcJUEuvSzmrbMVYYXwGL/ZWHUZLiA4aDOQ1LcEXp32uK405NQW/izEypUfWB+9TaSjPpFIC+5Wzw==",
+ "resolved": "3.3.0",
+ "contentHash": "TBvs/B6iyXp9MqRKjIoBZ/T0+/xgp5xg+MuHqr5U+N5+7DghtI2FnsmgeBedTIeQdA3Tk8Z4Bj4hlqU9FBiEnw==",
"dependencies": {
- "LaunchDarkly.CommonSdk": "6.0.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
"LaunchDarkly.Logging": "[2.0.0, 3.0.0)",
"System.Collections.Immutable": "1.7.1"
}
@@ -428,13 +406,13 @@
},
"LaunchDarkly.ServerSdk": {
"type": "Transitive",
- "resolved": "7.0.0",
- "contentHash": "gkTWb+f5QlsXIqFAciBef3qKZU2y0Hy3Fpt4pvZoxNcnBKg2PNTDSnbpbYEKPeQ1yk1avNaI/tKprnahfrmJFg==",
+ "resolved": "8.0.0",
+ "contentHash": "vosFEXYJABuIDIA0+6sncalTmrKXEkBKeqzuP9/vvcCVlFSXUl/ZnrkrAVg3ViDWDi7kjpJSk2W3h5D0TUfCGA==",
"dependencies": {
"LaunchDarkly.Cache": "1.0.2",
- "LaunchDarkly.CommonSdk": "6.0.0",
- "LaunchDarkly.EventSource": "5.0.1",
- "LaunchDarkly.InternalSdk": "3.1.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
+ "LaunchDarkly.EventSource": "5.1.0",
+ "LaunchDarkly.InternalSdk": "3.3.0",
"LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
@@ -446,16 +424,16 @@
},
"linq2db": {
"type": "Transitive",
- "resolved": "5.2.1",
- "contentHash": "OOBM8s39zhbZAgqFnl2KGxT5RqBDw21X69U528qV2PgQispaA3f+or0ILrLEgnNIJuB4EBgaw8gC6ttSHn4X0Q=="
+ "resolved": "5.3.1",
+ "contentHash": "707mIbEmtptvKeUW940UwoNwq05I7OUu0VWtclLtyYaASp+ugX4I/Er1UVpeldsDawqlVMXB5EQ5/Oar6AkUGQ=="
},
"linq2db.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.5.0",
- "contentHash": "ePHzO99xbObgMLlAFh08of1SnVhg6j4Su9327DrIB7RZWCgtQIX6k+nbl+HRVOooAndZSs7b+DduSgdnJjaJGw==",
+ "resolved": "7.6.0",
+ "contentHash": "T1W9o8wVzApsUwu7SRg/L7487kaiLQYt2AqRVnXVGfobD+ZKy2oRsUMws0PICtciaz4qbfLp/r/+NksfuYsFlw==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Relational": "7.0.0",
- "linq2db": "5.2.1"
+ "linq2db": "5.3.1"
}
},
"MailKit": {
@@ -476,10 +454,10 @@
},
"Microsoft.AspNetCore.Authentication.OpenIdConnect": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "O1cAQYUTU8EfRqwc5/rfTns4E4hKlFlg59fuKRrST+PzsxI6H07KqRN/JjdYhAuVYxF8jPnIGbj+zuc5paOWUw==",
+ "resolved": "6.0.0",
+ "contentHash": "cJxdro36spFzk/K2OFCddM6vZ+yoj6ug8mTFRH3Gdv1Pul/buSuCtfb/FSCp31UmS5S4C1315dU7wX3ErLFuDg==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.5.0"
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.10.0"
}
},
"Microsoft.AspNetCore.Cryptography.Internal": {
@@ -512,8 +490,8 @@
},
"Microsoft.AspNetCore.DataProtection.Abstractions": {
"type": "Transitive",
- "resolved": "3.1.32",
- "contentHash": "MPL4iVyiaRxnOUY5VATHjvhDWaAEFb77KFiUxVRklv3Z3v+STofUr1UG/aCt1O9cgN7FVTDaC5A7U+zsLub8Xg=="
+ "resolved": "6.0.0",
+ "contentHash": "Z/UU4NEBm5UgNufJmw+j5baW26ytCOIZ0G7sZocPaOzsUeBon1bkM3lSMNZQG2GmDjAIVP2XMSODf2jzSGbibw=="
},
"Microsoft.Azure.Amqp": {
"type": "Transitive",
@@ -598,48 +576,44 @@
},
"Microsoft.Data.SqlClient": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "uu8dfrsx081cSbEevWuZAvqdmANDGJkbLBL2G3j0LAZxX1Oy8RCVAaC4Lcuak6jNicWP6CWvHqBTIEmQNSxQlw==",
+ "resolved": "5.1.1",
+ "contentHash": "MW5E9HFvCaV069o8b6YpuRDPBux8s96qDnOJ+4N9QNUCs7c5W3KxwQ+ftpAjbMUlImL+c9WR+l+f5hzjkqhu2g==",
"dependencies": {
- "Azure.Identity": "1.6.0",
- "Microsoft.Data.SqlClient.SNI.runtime": "5.0.1",
- "Microsoft.Identity.Client": "4.45.0",
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.21.0",
+ "Azure.Identity": "1.7.0",
+ "Microsoft.Data.SqlClient.SNI.runtime": "5.1.0",
+ "Microsoft.Identity.Client": "4.47.2",
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.24.0",
"Microsoft.SqlServer.Server": "1.0.0",
- "Microsoft.Win32.Registry": "5.0.0",
- "System.Buffers": "4.5.1",
- "System.Configuration.ConfigurationManager": "5.0.0",
- "System.Diagnostics.DiagnosticSource": "5.0.0",
- "System.IO": "4.3.0",
- "System.Resources.ResourceManager": "4.3.0",
- "System.Runtime.Caching": "5.0.0",
+ "System.Configuration.ConfigurationManager": "6.0.1",
+ "System.Diagnostics.DiagnosticSource": "6.0.0",
+ "System.Runtime.Caching": "6.0.0",
"System.Security.Cryptography.Cng": "5.0.0",
"System.Security.Principal.Windows": "5.0.0",
- "System.Text.Encoding.CodePages": "5.0.0",
- "System.Text.Encodings.Web": "4.7.2"
+ "System.Text.Encoding.CodePages": "6.0.0",
+ "System.Text.Encodings.Web": "6.0.0"
}
},
"Microsoft.Data.SqlClient.SNI.runtime": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "y0X5MxiNdbITJYoafJ2ruaX6hqO0twpCGR/ipiDOe85JKLU8WL4TuAQfDe5qtt3bND5Je26HnrarLSAMMnVTNg=="
+ "resolved": "5.1.0",
+ "contentHash": "jVsElisM5sfBzaaV9kdq2NXZLwIbytetnsOIlJ0cQGgQP4zFNBmkfHBnpwtmKrtBJBEV9+9PVQPVrcCVhDgcIg=="
},
"Microsoft.Data.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "FTerRmQPqHrCrnoUzhBu+E+1DNGwyrAMLqHkAqOOOu5pGfyMOj8qQUBxI/gDtWtG11p49UxSfWmBzRNlwZqfUg==",
+ "resolved": "7.0.14",
+ "contentHash": "qvYae3/v9Fvqsjp/7OKQBuJK+Uc3m/WctfpIUMmGMDot2Bd8UWBKiMSlh26UtfQa9x4N+k7NxCT+AbZVoNrCdg==",
"dependencies": {
"SQLitePCLRaw.core": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "RXbRLHHWP2Z3pq8qcL5nQ6LPeoOyp8hasM5bd0Te8PiQi3RjWQR4tcbdY5XMqQ+oTO9wA8/RLhZRn/hnxlTDnQ==",
+ "resolved": "7.0.14",
+ "contentHash": "0KYkAemPygW6yzifciFlmMzkO4sI4Dw69xLgwg3ui5rXJS5XvzuAWVvfdrKJciqeCbCnVS/ZbOWpcwWgqce5bQ==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Abstractions": "7.0.5",
- "Microsoft.EntityFrameworkCore.Analyzers": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Abstractions": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Analyzers": "7.0.14",
"Microsoft.Extensions.Caching.Memory": "7.0.0",
"Microsoft.Extensions.DependencyInjection": "7.0.0",
"Microsoft.Extensions.Logging": "7.0.0"
@@ -647,49 +621,49 @@
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "iwQso+hFRsEWjhH2WsEQj1D2QE5BlEXiXEt6A3SlYTPRPdZsyTNDeDDEdtxL+H/UJPQgQYY+9SMMRcEiXBmCAA=="
+ "resolved": "7.0.14",
+ "contentHash": "aEcXDSYpDdD5wdIRKTqcS44f3W4capqQ1BWVRPJgacATfHkO62RX9Nnh0hUFg+rei9OLuJp0Y4zsy1fNeOXv5g=="
},
"Microsoft.EntityFrameworkCore.Analyzers": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "yMLM/aK1MikVqpjxd7PJ1Pjgztd3VAd26ZHxyjxG3RPeM9cHjvS5tCg9kAAayR6eHmBg0ffZsHdT28WfA5tTlA=="
+ "resolved": "7.0.14",
+ "contentHash": "esI4RF6mix4DDFBhWB9k1vJxAL8GouSf5ZV8oFJoVsIQ9d2J3MPgC1VL2qM9Vw5cH7Vg7TzRyKNpCRXFVkWs9w=="
},
"Microsoft.EntityFrameworkCore.Relational": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "u/33DC4S6g2hpMPgBc5Kdnlz//nqHR5c/ovgjtiP/wQ7sOd0EOdygVzUJAAOxCwbtAHDsJXS9Vc3jLFYq0yu8Q==",
+ "resolved": "7.0.14",
+ "contentHash": "MrVBnWOFYwfLMGQfrcIuqEM9Xvokv1vJeYxqNH3K3xOtAdHwHQTrKnpDP97tU+LBlvcnyXAtAtryYcpLXWtRNA==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "7.0.5",
+ "Microsoft.EntityFrameworkCore": "7.0.14",
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.Sqlite": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "2XPZB9OLF5/m13HgZp7/Dv0u8FWEJzcaBsMYR9Kp3R6aygkb3RnOijofPDTsmdhAqG9YTysCmh2bFaGs0TCc7A==",
+ "resolved": "7.0.14",
+ "contentHash": "8c8Hw2tmfy5YEsi9RL2/u2Qi9IwVbmj/yDlJy4iJPadeE3/AssLrgtobOBz4ftg2y5PVjFL59Gq7YzGLQH5q1A==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.14",
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "4C+9ct6A/Bq61Ta9Uh2td4/XwNpRCiPI03SWTa3hPJjA/g8wCw2hetbh3DDe5HcydzgDq/lRRjU/eRy3UODklQ==",
+ "resolved": "7.0.14",
+ "contentHash": "JNUkZVff1V/A/P3JiBbgt+Y2oCQSuzORxE3jOqFDbFjSFu7jHDEetJ/afSF/taa0lbyN9OpvaKjsbKk3Iis29Q==",
"dependencies": {
- "Microsoft.Data.Sqlite.Core": "7.0.5",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5",
+ "Microsoft.Data.Sqlite.Core": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14",
"Microsoft.Extensions.DependencyModel": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.SqlServer": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "cUJqCiamT0EvpKNgZEV5fqNv2MyVfKNgOPQfFINqHiIKHOYrS0nTCUJP97+UuG0JIIrP792/PwnuNjbekImtBg==",
+ "resolved": "7.0.14",
+ "contentHash": "d9hqEw4W/TdQ1WDm03uyFuDoehL6GNq/NMChFaC4dcV60I42vKdUC0fYTuE2QPunVUpf5XUTCkJ6fYGjMos2AA==",
"dependencies": {
- "Microsoft.Data.SqlClient": "5.0.1",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5"
+ "Microsoft.Data.SqlClient": "5.1.1",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14"
}
},
"Microsoft.Extensions.ApiDescription.Server": {
@@ -962,50 +936,52 @@
},
"Microsoft.IdentityModel.Abstractions": {
"type": "Transitive",
- "resolved": "6.22.0",
- "contentHash": "iI+9V+2ciCrbheeLjpmjcqCnhy+r6yCoEcid3nkoFWerHgjVuT6CPM4HODUTtUPe1uwks4wcnAujJ8u+IKogHQ=="
+ "resolved": "6.24.0",
+ "contentHash": "X6aBK56Ot15qKyG7X37KsPnrwah+Ka55NJWPppWVTDi8xWq7CJgeNw2XyaeHgE1o/mW4THwoabZkBbeG2TPBiw=="
},
"Microsoft.IdentityModel.JsonWebTokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "d3h1/BaMeylKTkdP6XwRCxuOoDJZ44V9xaXr6gl5QxmpnZGdoK3bySo3OQN8ehRLJHShb94ElLUvoXyglQtgAw==",
+ "resolved": "6.24.0",
+ "contentHash": "XDWrkThcxfuWp79AvAtg5f+uRS1BxkIbJnsG/e8VPzOWkYYuDg33emLjp5EWcwXYYIDsHnVZD/00kM/PYFQc/g==",
"dependencies": {
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Tokens": "6.24.0",
+ "System.Text.Encoding": "4.3.0",
+ "System.Text.Json": "4.7.2"
}
},
"Microsoft.IdentityModel.Logging": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "tuEhHIQwvBEhMf8I50hy8FHmRSUkffDFP5EdLsSDV4qRcl2wvOPkQxYqEzWkh+ytW6sbdJGEXElGhmhDfAxAKg==",
+ "resolved": "6.24.0",
+ "contentHash": "qLYWDOowM/zghmYKXw1yfYKlHOdS41i8t4hVXr9bSI90zHqhyhQh9GwVy8pENzs5wHeytU23DymluC9NtgYv7w==",
"dependencies": {
- "Microsoft.IdentityModel.Abstractions": "6.21.0"
+ "Microsoft.IdentityModel.Abstractions": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "0FqY5cTLQKtHrClzHEI+QxJl8OBT2vUiEQQB7UKk832JDiJJmetzYZ3AdSrPjN/3l3nkhByeWzXnhrX0JbifKg==",
+ "resolved": "6.24.0",
+ "contentHash": "+NzKCkvsQ8X1r/Ff74V7CFr9OsdMRaB6DsV+qpH7NNLdYJ8O4qHbmTnNEsjFcDmk/gVNDwhoL2gN5pkPVq0lwQ==",
"dependencies": {
- "Microsoft.IdentityModel.Logging": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Logging": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols.OpenIdConnect": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "vtSKL7n6EnAsLyxmiviusm6LKrblT2ndnNqN6rvVq6iIHAnPCK9E2DkDx6h1Jrpy1cvbp40r0cnTg23nhEAGTA==",
+ "resolved": "6.24.0",
+ "contentHash": "a/2RRrc8C9qaw8qdD9hv1ES9YKFgxaqr/SnwMSLbwQZJSUQDd4qx1K4EYgWaQWs73R+VXLyKSxN0f/uE9CsBiQ==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols": "6.21.0",
- "System.IdentityModel.Tokens.Jwt": "6.21.0"
+ "Microsoft.IdentityModel.Protocols": "6.24.0",
+ "System.IdentityModel.Tokens.Jwt": "6.24.0"
}
},
"Microsoft.IdentityModel.Tokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "AAEHZvZyb597a+QJSmtxH3n2P1nIJGpZ4Q89GTenknRx6T6zyfzf592yW/jA5e8EHN4tNMjjXHQaYWEq5+L05w==",
+ "resolved": "6.24.0",
+ "contentHash": "ZPqHi86UYuqJXJ7bLnlEctHKkPKT4lGUFbotoCNiXNCSL02emYlcxzGYsRGWWmbFEcYDMi2dcTLLYNzHqWOTsw==",
"dependencies": {
"Microsoft.CSharp": "4.5.0",
- "Microsoft.IdentityModel.Logging": "6.21.0",
+ "Microsoft.IdentityModel.Logging": "6.24.0",
"System.Security.Cryptography.Cng": "4.5.0"
}
},
@@ -1141,13 +1117,13 @@
},
"Newtonsoft.Json": {
"type": "Transitive",
- "resolved": "13.0.1",
- "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
+ "resolved": "13.0.3",
+ "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ=="
},
"Npgsql": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "7UVPYy2RP0ci04PED1tc9ZCaTw/DfSdSkLiGEFCAvwMwsgA/bAluj1liNzP1IpN0MFofnOF0cm1zJfmbEuCehg==",
+ "resolved": "7.0.6",
+ "contentHash": "TAqvwRnm3NJ0QvN7cvu6geJkbI0XPzGVRElVY5hF4gsgA+BnE12x6GM1TLhdeq+7ZKvvo3BD8jXKnXmr3tvdEw==",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "6.0.0",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
@@ -1155,13 +1131,13 @@
},
"Npgsql.EntityFrameworkCore.PostgreSQL": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "ZYMtyG6pmLtUsFAx0/XaIlVkJM+1gArWEKD55cLLxiVlGScAphjiGj+G7Gk16yg5lhhdWx+bgXWpIUISXuS33g==",
+ "resolved": "7.0.11",
+ "contentHash": "cHEgEz0ldXc9wVANs8sJqC+3eilqefrkasCBgaVT0tyj8tb1p3/pwy2ngjboNkDG3M0z+xJsJ4jC5p8wySAM3w==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, 8.0.0)",
- "Npgsql": "7.0.4"
+ "Microsoft.EntityFrameworkCore": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.11, 8.0.0)",
+ "Npgsql": "7.0.6"
}
},
"NSec.Cryptography": {
@@ -1484,8 +1460,8 @@
},
"Serilog.Sinks.SyslogMessages": {
"type": "Transitive",
- "resolved": "2.0.6",
- "contentHash": "V2Yq2GEbk7taEPbpBLFzLXhrHrUzKf4sQu/zLrANU8XIoUn/Mr08M2E8PrcrWVXCj0R4xLMWYe0Z1sxOrMF3IA==",
+ "resolved": "2.0.9",
+ "contentHash": "y7J+/h/Nf5EAtbpa6lC1nDhK/F9kC5oxuVYmQivv242Oh4hAVMeoAk5Gv6bgb/KbmqufGPXUFkX/AlcrvZ8Ywg==",
"dependencies": {
"Serilog": "2.5.0",
"Serilog.Sinks.PeriodicBatching": "2.3.0"
@@ -1652,8 +1628,8 @@
},
"System.Configuration.ConfigurationManager": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "7T+m0kDSlIPTHIkPMIu6m6tV6qsMqJpvQWW2jIc2qi7sn40qxFo0q+7mEQAhMPXZHMKnWrnv47ntGlM/ejvw3g==",
+ "resolved": "6.0.1",
+ "contentHash": "jXw9MlUu/kRfEU0WyTptAVueupqIeE3/rl0EZDMlf8pcvJnitQ8HeVEp69rZdaStXwTV72boi/Bhw8lOeO+U2w==",
"dependencies": {
"System.Security.Cryptography.ProtectedData": "6.0.0",
"System.Security.Permissions": "6.0.0"
@@ -1812,11 +1788,11 @@
},
"System.IdentityModel.Tokens.Jwt": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "JRD8AuypBE+2zYxT3dMJomQVsPYsCqlyZhWel3J1d5nzQokSRyTueF+Q4ID3Jcu6zSZKuzOdJ1MLTkbQsDqcvQ==",
+ "resolved": "6.24.0",
+ "contentHash": "Qibsj9MPWq8S/C0FgvmsLfIlHLE7ay0MJIaAmK94ivN3VyDdglqReed5qMvdQhSL0BzK6v0Z1wB/sD88zVu6Jw==",
"dependencies": {
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"System.IO": {
@@ -2261,10 +2237,10 @@
},
"System.Runtime.Caching": {
"type": "Transitive",
- "resolved": "5.0.0",
- "contentHash": "30D6MkO8WF9jVGWZIP0hmCN8l9BTY4LCsAzLIe4xFSXzs+AjDotR7DpSmj27pFskDURzUvqYYY0ikModgBTxWw==",
+ "resolved": "6.0.0",
+ "contentHash": "E0e03kUp5X2k+UAoVl6efmI7uU7JRBWi5EIdlQ7cr0NpBGjHG4fWII35PgsBY9T4fJQ8E4QPsL0rKksU9gcL5A==",
"dependencies": {
- "System.Configuration.ConfigurationManager": "5.0.0"
+ "System.Configuration.ConfigurationManager": "6.0.0"
}
},
"System.Runtime.CompilerServices.Unsafe": {
@@ -2787,15 +2763,15 @@
"commercial.core": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )"
+ "Core": "[2023.12.0, )"
}
},
"commercial.infrastructure.entityframework": {
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )",
- "Core": "[2023.10.2, )",
- "Infrastructure.EntityFramework": "[2023.10.2, )"
+ "Core": "[2023.12.0, )",
+ "Infrastructure.EntityFramework": "[2023.12.0, )"
}
},
"core": {
@@ -2813,11 +2789,10 @@
"BitPay.Light": "[1.0.1907, )",
"Braintree": "[5.19.0, )",
"DnsClient": "[1.7.0, )",
+ "Duende.IdentityServer": "[6.0.4, )",
"Fido2.AspNet": "[3.0.1, )",
- "Handlebars.Net": "[2.1.2, )",
- "IdentityServer4": "[4.1.2, )",
- "IdentityServer4.AccessTokenValidation": "[3.0.1, )",
- "LaunchDarkly.ServerSdk": "[7.0.0, )",
+ "Handlebars.Net": "[2.1.4, )",
+ "LaunchDarkly.ServerSdk": "[8.0.0, )",
"MailKit": "[4.2.0, )",
"Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )",
"Microsoft.Azure.Cosmos.Table": "[1.0.8, )",
@@ -2827,7 +2802,7 @@
"Microsoft.Extensions.Configuration.EnvironmentVariables": "[6.0.1, )",
"Microsoft.Extensions.Configuration.UserSecrets": "[6.0.1, )",
"Microsoft.Extensions.Identity.Stores": "[6.0.4, )",
- "Newtonsoft.Json": "[13.0.1, )",
+ "Newtonsoft.Json": "[13.0.3, )",
"Otp.NET": "[1.2.2, )",
"Quartz": "[3.4.0, )",
"SendGrid": "[9.27.0, )",
@@ -2836,7 +2811,7 @@
"Serilog.Extensions.Logging": "[3.1.0, )",
"Serilog.Extensions.Logging.File": "[2.0.0, )",
"Serilog.Sinks.AzureCosmosDB": "[2.0.0, )",
- "Serilog.Sinks.SyslogMessages": "[2.0.6, )",
+ "Serilog.Sinks.SyslogMessages": "[2.0.9, )",
"Stripe.net": "[40.0.0, )",
"YubicoDotNetClient": "[1.2.0, )"
}
@@ -2844,29 +2819,29 @@
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "Dapper": "[2.0.123, )"
+ "Core": "[2023.12.0, )",
+ "Dapper": "[2.1.24, )"
}
},
"infrastructure.entityframework": {
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )",
- "Core": "[2023.10.2, )",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )",
- "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )",
- "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )",
- "Npgsql.EntityFrameworkCore.PostgreSQL": "[7.0.4, )",
+ "Core": "[2023.12.0, )",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.14, )",
+ "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.14, )",
+ "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.14, )",
+ "Npgsql.EntityFrameworkCore.PostgreSQL": "[7.0.11, )",
"Pomelo.EntityFrameworkCore.MySql": "[7.0.0, )",
- "linq2db.EntityFrameworkCore": "[7.5.0, )"
+ "linq2db.EntityFrameworkCore": "[7.6.0, )"
}
},
"sharedweb": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "Infrastructure.Dapper": "[2023.10.2, )",
- "Infrastructure.EntityFramework": "[2023.10.2, )"
+ "Core": "[2023.12.0, )",
+ "Infrastructure.Dapper": "[2023.12.0, )",
+ "Infrastructure.EntityFramework": "[2023.12.0, )"
}
}
}
diff --git a/src/Billing/Controllers/StripeController.cs b/src/Billing/Controllers/StripeController.cs
index 64053b31f2..e0adcd042a 100644
--- a/src/Billing/Controllers/StripeController.cs
+++ b/src/Billing/Controllers/StripeController.cs
@@ -1,7 +1,7 @@
using Bit.Billing.Constants;
using Bit.Billing.Services;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.Context;
-using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.OrganizationFeatures.OrganizationSponsorships.FamiliesForEnterprise.Interfaces;
using Bit.Core.Repositories;
@@ -264,9 +264,16 @@ public class StripeController : Controller
await SendEmails(new List { organization.BillingEmail });
- var ownerEmails = await _organizationRepository.GetOwnerEmailAddressesById(organization.Id);
+ /*
+ * TODO: https://bitwarden.atlassian.net/browse/PM-4862
+ * Disabling this as part of a hot fix. It needs to check whether the organization
+ * belongs to a Reseller provider and only send an email to the organization owners if it does.
+ * It also requires a new email template as the current one contains too much billing information.
+ */
- await SendEmails(ownerEmails);
+ // var ownerEmails = await _organizationRepository.GetOwnerEmailAddressesById(organization.Id);
+
+ // await SendEmails(ownerEmails);
}
else if (userId.HasValue)
{
diff --git a/src/Billing/packages.lock.json b/src/Billing/packages.lock.json
index 9b76d1089e..7d0df69c5b 100644
--- a/src/Billing/packages.lock.json
+++ b/src/Billing/packages.lock.json
@@ -173,8 +173,8 @@
},
"Dapper": {
"type": "Transitive",
- "resolved": "2.0.123",
- "contentHash": "RDFF4rBLLmbpi6pwkY7q/M6UXHRJEOerplDGE5jwEkP/JGJnBauAClYavNKJPW1yOTWRPIyfj4is3EaJxQXILQ=="
+ "resolved": "2.1.24",
+ "contentHash": "/2t2vsdJyZRsk13AsWigZpsuFvEwK+o3v862cEULXoww905gyKhJFSuwmZI/4Ui9COX9ZCFCI09UHyH4wVYl3A=="
},
"DnsClient": {
"type": "Transitive",
@@ -184,6 +184,24 @@
"Microsoft.Win32.Registry": "5.0.0"
}
},
+ "Duende.IdentityServer": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "4HVjzx1F8v5J+U7oa8RGAQGj2QzmzNSu87r18Sh+dlh10uyZZL8teAaT/FaVLDObnfItGdPFvN8mwpF/HkI3Xw==",
+ "dependencies": {
+ "Duende.IdentityServer.Storage": "6.0.4",
+ "Microsoft.AspNetCore.Authentication.OpenIdConnect": "6.0.0"
+ }
+ },
+ "Duende.IdentityServer.Storage": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "s5gAjfbpr2IMgI+fU2Nx+2AZdzstmbt9gpo13iX7GwvqSeSaBVqj9ZskAN0R2KF1OemPdZuGnfaTcevdXMUrrw==",
+ "dependencies": {
+ "IdentityModel": "6.0.0",
+ "Microsoft.AspNetCore.DataProtection.Abstractions": "6.0.0"
+ }
+ },
"Fido2": {
"type": "Transitive",
"resolved": "3.0.1",
@@ -212,57 +230,16 @@
},
"Handlebars.Net": {
"type": "Transitive",
- "resolved": "2.1.2",
- "contentHash": "p60QyeBYpZmcZdIXRMqs9XySIBaxJ0lj3+QD0EJVr4ybTigOTCumXMMin5dPwjo9At1UwkDZ3gGwa1lmGjG6DA==",
+ "resolved": "2.1.4",
+ "contentHash": "Od7MWDfGxYKRtxETFMlcvCrY8hAqyuXZDX4EsOfiI/jzh+PVBuVxazHBC1HmVqTKX1JnRtoxIMcH95K9UFlYog==",
"dependencies": {
"Microsoft.CSharp": "4.7.0"
}
},
"IdentityModel": {
"type": "Transitive",
- "resolved": "4.4.0",
- "contentHash": "b18wrIx5wnZlMxAX7oVsE+nDtAJ4hajYlH0xPlaRvo4r/fz08K6pPeZvbiqS9nfNbzfIgLFmNX+FL9qR9ZR5PA==",
- "dependencies": {
- "Newtonsoft.Json": "11.0.2",
- "System.Text.Encodings.Web": "4.7.0"
- }
- },
- "IdentityModel.AspNetCore.OAuth2Introspection": {
- "type": "Transitive",
- "resolved": "4.0.1",
- "contentHash": "ZNdMZMaj9fqR3j50vYsu+1U3QGd6n8+fqwf+a8mCTcmXGor+HgFDfdq0mM34bsmD6uEgAQup7sv2ZW5kR36dbA==",
- "dependencies": {
- "IdentityModel": "4.0.0"
- }
- },
- "IdentityServer4": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "blaxxGuOA7v/w1q+fxn97wZ+x2ecG1ZD4mc/N/ZOXMNeFZZhqv+4LF26Gecyik3nWrJPmbMEtQbLmRsKG8k61w==",
- "dependencies": {
- "IdentityModel": "4.4.0",
- "IdentityServer4.Storage": "4.1.2",
- "Microsoft.AspNetCore.Authentication.OpenIdConnect": "3.1.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.6.0",
- "Newtonsoft.Json": "12.0.2"
- }
- },
- "IdentityServer4.AccessTokenValidation": {
- "type": "Transitive",
- "resolved": "3.0.1",
- "contentHash": "qu/M6UyN4o9NVep7q545Ms7hYAnsQqSdLbN1Fjjrn4m35lyBfeQPSSNzDryAKHbodyWOQfHaOqKEyMEJQ5Rpgw==",
- "dependencies": {
- "IdentityModel.AspNetCore.OAuth2Introspection": "4.0.1",
- "Microsoft.AspNetCore.Authentication.JwtBearer": "3.0.0"
- }
- },
- "IdentityServer4.Storage": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "KoSffyZyyeCNTIyJiZnCuPakJ1QbCHlpty6gbWUj/7yl+w0PXIchgmmJnJSvddzBb8iZ2xew/vGlxWUIP17P2g==",
- "dependencies": {
- "IdentityModel": "4.4.0"
- }
+ "resolved": "6.0.0",
+ "contentHash": "eVHCR7a6m/dm5RFcBzE3qs/Jg5j9R5Rjpu8aTOv9e4AFvaQtBXb5ah7kmwU+YwA0ufRwz4wf1hnIvsD2hSnI4g=="
},
"LaunchDarkly.Cache": {
"type": "Transitive",
@@ -271,26 +248,27 @@
},
"LaunchDarkly.CommonSdk": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "YYYq+41gZRMQ8dIoMC6HOq/dI+4RY3HsexLLAaE9T1+1tVMeQkbCqak7sVeKX4QcE7xlXx23lWgipYUkRoRUyw==",
+ "resolved": "6.2.0",
+ "contentHash": "eLeb+tTNLwOxlUIsZWzJlcPmG9Wyf20NYyucP6MW6aqKW6doKFeSO+aJe0z+WyijbvfX1Dp1U1HQatOu6fa1Gg==",
"dependencies": {
+ "LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
},
"LaunchDarkly.EventSource": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "DN44Ry5M4lyrjiF7LEu0Ijco7Wm8R7mJopN+giYsYjkQlszsXdFvm3POoehIDAOtL1HHl5bZvF9k9xK034u3IA==",
+ "resolved": "5.1.0",
+ "contentHash": "PztDWiMvPWODx+kfBnCroZ8Lpya4nPc7ZO4TZysOogODbVXDDPDYrdcgVivCMgf4davhGrp61ekvZc+Uy1NYMA==",
"dependencies": {
- "LaunchDarkly.Logging": "[1.0.1, 3.0.0)"
+ "LaunchDarkly.Logging": "[2.0.0, 3.0.0)"
}
},
"LaunchDarkly.InternalSdk": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "jW8VEfFciuCcJUEuvSzmrbMVYYXwGL/ZWHUZLiA4aDOQ1LcEXp32uK405NQW/izEypUfWB+9TaSjPpFIC+5Wzw==",
+ "resolved": "3.3.0",
+ "contentHash": "TBvs/B6iyXp9MqRKjIoBZ/T0+/xgp5xg+MuHqr5U+N5+7DghtI2FnsmgeBedTIeQdA3Tk8Z4Bj4hlqU9FBiEnw==",
"dependencies": {
- "LaunchDarkly.CommonSdk": "6.0.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
"LaunchDarkly.Logging": "[2.0.0, 3.0.0)",
"System.Collections.Immutable": "1.7.1"
}
@@ -305,13 +283,13 @@
},
"LaunchDarkly.ServerSdk": {
"type": "Transitive",
- "resolved": "7.0.0",
- "contentHash": "gkTWb+f5QlsXIqFAciBef3qKZU2y0Hy3Fpt4pvZoxNcnBKg2PNTDSnbpbYEKPeQ1yk1avNaI/tKprnahfrmJFg==",
+ "resolved": "8.0.0",
+ "contentHash": "vosFEXYJABuIDIA0+6sncalTmrKXEkBKeqzuP9/vvcCVlFSXUl/ZnrkrAVg3ViDWDi7kjpJSk2W3h5D0TUfCGA==",
"dependencies": {
"LaunchDarkly.Cache": "1.0.2",
- "LaunchDarkly.CommonSdk": "6.0.0",
- "LaunchDarkly.EventSource": "5.0.1",
- "LaunchDarkly.InternalSdk": "3.1.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
+ "LaunchDarkly.EventSource": "5.1.0",
+ "LaunchDarkly.InternalSdk": "3.3.0",
"LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
@@ -323,16 +301,16 @@
},
"linq2db": {
"type": "Transitive",
- "resolved": "5.2.1",
- "contentHash": "OOBM8s39zhbZAgqFnl2KGxT5RqBDw21X69U528qV2PgQispaA3f+or0ILrLEgnNIJuB4EBgaw8gC6ttSHn4X0Q=="
+ "resolved": "5.3.1",
+ "contentHash": "707mIbEmtptvKeUW940UwoNwq05I7OUu0VWtclLtyYaASp+ugX4I/Er1UVpeldsDawqlVMXB5EQ5/Oar6AkUGQ=="
},
"linq2db.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.5.0",
- "contentHash": "ePHzO99xbObgMLlAFh08of1SnVhg6j4Su9327DrIB7RZWCgtQIX6k+nbl+HRVOooAndZSs7b+DduSgdnJjaJGw==",
+ "resolved": "7.6.0",
+ "contentHash": "T1W9o8wVzApsUwu7SRg/L7487kaiLQYt2AqRVnXVGfobD+ZKy2oRsUMws0PICtciaz4qbfLp/r/+NksfuYsFlw==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Relational": "7.0.0",
- "linq2db": "5.2.1"
+ "linq2db": "5.3.1"
}
},
"MailKit": {
@@ -353,10 +331,10 @@
},
"Microsoft.AspNetCore.Authentication.OpenIdConnect": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "O1cAQYUTU8EfRqwc5/rfTns4E4hKlFlg59fuKRrST+PzsxI6H07KqRN/JjdYhAuVYxF8jPnIGbj+zuc5paOWUw==",
+ "resolved": "6.0.0",
+ "contentHash": "cJxdro36spFzk/K2OFCddM6vZ+yoj6ug8mTFRH3Gdv1Pul/buSuCtfb/FSCp31UmS5S4C1315dU7wX3ErLFuDg==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.5.0"
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.10.0"
}
},
"Microsoft.AspNetCore.Cryptography.Internal": {
@@ -389,8 +367,8 @@
},
"Microsoft.AspNetCore.DataProtection.Abstractions": {
"type": "Transitive",
- "resolved": "3.1.32",
- "contentHash": "MPL4iVyiaRxnOUY5VATHjvhDWaAEFb77KFiUxVRklv3Z3v+STofUr1UG/aCt1O9cgN7FVTDaC5A7U+zsLub8Xg=="
+ "resolved": "6.0.0",
+ "contentHash": "Z/UU4NEBm5UgNufJmw+j5baW26ytCOIZ0G7sZocPaOzsUeBon1bkM3lSMNZQG2GmDjAIVP2XMSODf2jzSGbibw=="
},
"Microsoft.Azure.Amqp": {
"type": "Transitive",
@@ -475,48 +453,44 @@
},
"Microsoft.Data.SqlClient": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "uu8dfrsx081cSbEevWuZAvqdmANDGJkbLBL2G3j0LAZxX1Oy8RCVAaC4Lcuak6jNicWP6CWvHqBTIEmQNSxQlw==",
+ "resolved": "5.1.1",
+ "contentHash": "MW5E9HFvCaV069o8b6YpuRDPBux8s96qDnOJ+4N9QNUCs7c5W3KxwQ+ftpAjbMUlImL+c9WR+l+f5hzjkqhu2g==",
"dependencies": {
- "Azure.Identity": "1.6.0",
- "Microsoft.Data.SqlClient.SNI.runtime": "5.0.1",
- "Microsoft.Identity.Client": "4.45.0",
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.21.0",
+ "Azure.Identity": "1.7.0",
+ "Microsoft.Data.SqlClient.SNI.runtime": "5.1.0",
+ "Microsoft.Identity.Client": "4.47.2",
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.24.0",
"Microsoft.SqlServer.Server": "1.0.0",
- "Microsoft.Win32.Registry": "5.0.0",
- "System.Buffers": "4.5.1",
- "System.Configuration.ConfigurationManager": "5.0.0",
- "System.Diagnostics.DiagnosticSource": "5.0.0",
- "System.IO": "4.3.0",
- "System.Resources.ResourceManager": "4.3.0",
- "System.Runtime.Caching": "5.0.0",
+ "System.Configuration.ConfigurationManager": "6.0.1",
+ "System.Diagnostics.DiagnosticSource": "6.0.0",
+ "System.Runtime.Caching": "6.0.0",
"System.Security.Cryptography.Cng": "5.0.0",
"System.Security.Principal.Windows": "5.0.0",
- "System.Text.Encoding.CodePages": "5.0.0",
- "System.Text.Encodings.Web": "4.7.2"
+ "System.Text.Encoding.CodePages": "6.0.0",
+ "System.Text.Encodings.Web": "6.0.0"
}
},
"Microsoft.Data.SqlClient.SNI.runtime": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "y0X5MxiNdbITJYoafJ2ruaX6hqO0twpCGR/ipiDOe85JKLU8WL4TuAQfDe5qtt3bND5Je26HnrarLSAMMnVTNg=="
+ "resolved": "5.1.0",
+ "contentHash": "jVsElisM5sfBzaaV9kdq2NXZLwIbytetnsOIlJ0cQGgQP4zFNBmkfHBnpwtmKrtBJBEV9+9PVQPVrcCVhDgcIg=="
},
"Microsoft.Data.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "FTerRmQPqHrCrnoUzhBu+E+1DNGwyrAMLqHkAqOOOu5pGfyMOj8qQUBxI/gDtWtG11p49UxSfWmBzRNlwZqfUg==",
+ "resolved": "7.0.14",
+ "contentHash": "qvYae3/v9Fvqsjp/7OKQBuJK+Uc3m/WctfpIUMmGMDot2Bd8UWBKiMSlh26UtfQa9x4N+k7NxCT+AbZVoNrCdg==",
"dependencies": {
"SQLitePCLRaw.core": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "RXbRLHHWP2Z3pq8qcL5nQ6LPeoOyp8hasM5bd0Te8PiQi3RjWQR4tcbdY5XMqQ+oTO9wA8/RLhZRn/hnxlTDnQ==",
+ "resolved": "7.0.14",
+ "contentHash": "0KYkAemPygW6yzifciFlmMzkO4sI4Dw69xLgwg3ui5rXJS5XvzuAWVvfdrKJciqeCbCnVS/ZbOWpcwWgqce5bQ==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Abstractions": "7.0.5",
- "Microsoft.EntityFrameworkCore.Analyzers": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Abstractions": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Analyzers": "7.0.14",
"Microsoft.Extensions.Caching.Memory": "7.0.0",
"Microsoft.Extensions.DependencyInjection": "7.0.0",
"Microsoft.Extensions.Logging": "7.0.0"
@@ -524,49 +498,49 @@
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "iwQso+hFRsEWjhH2WsEQj1D2QE5BlEXiXEt6A3SlYTPRPdZsyTNDeDDEdtxL+H/UJPQgQYY+9SMMRcEiXBmCAA=="
+ "resolved": "7.0.14",
+ "contentHash": "aEcXDSYpDdD5wdIRKTqcS44f3W4capqQ1BWVRPJgacATfHkO62RX9Nnh0hUFg+rei9OLuJp0Y4zsy1fNeOXv5g=="
},
"Microsoft.EntityFrameworkCore.Analyzers": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "yMLM/aK1MikVqpjxd7PJ1Pjgztd3VAd26ZHxyjxG3RPeM9cHjvS5tCg9kAAayR6eHmBg0ffZsHdT28WfA5tTlA=="
+ "resolved": "7.0.14",
+ "contentHash": "esI4RF6mix4DDFBhWB9k1vJxAL8GouSf5ZV8oFJoVsIQ9d2J3MPgC1VL2qM9Vw5cH7Vg7TzRyKNpCRXFVkWs9w=="
},
"Microsoft.EntityFrameworkCore.Relational": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "u/33DC4S6g2hpMPgBc5Kdnlz//nqHR5c/ovgjtiP/wQ7sOd0EOdygVzUJAAOxCwbtAHDsJXS9Vc3jLFYq0yu8Q==",
+ "resolved": "7.0.14",
+ "contentHash": "MrVBnWOFYwfLMGQfrcIuqEM9Xvokv1vJeYxqNH3K3xOtAdHwHQTrKnpDP97tU+LBlvcnyXAtAtryYcpLXWtRNA==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "7.0.5",
+ "Microsoft.EntityFrameworkCore": "7.0.14",
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.Sqlite": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "2XPZB9OLF5/m13HgZp7/Dv0u8FWEJzcaBsMYR9Kp3R6aygkb3RnOijofPDTsmdhAqG9YTysCmh2bFaGs0TCc7A==",
+ "resolved": "7.0.14",
+ "contentHash": "8c8Hw2tmfy5YEsi9RL2/u2Qi9IwVbmj/yDlJy4iJPadeE3/AssLrgtobOBz4ftg2y5PVjFL59Gq7YzGLQH5q1A==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.14",
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "4C+9ct6A/Bq61Ta9Uh2td4/XwNpRCiPI03SWTa3hPJjA/g8wCw2hetbh3DDe5HcydzgDq/lRRjU/eRy3UODklQ==",
+ "resolved": "7.0.14",
+ "contentHash": "JNUkZVff1V/A/P3JiBbgt+Y2oCQSuzORxE3jOqFDbFjSFu7jHDEetJ/afSF/taa0lbyN9OpvaKjsbKk3Iis29Q==",
"dependencies": {
- "Microsoft.Data.Sqlite.Core": "7.0.5",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5",
+ "Microsoft.Data.Sqlite.Core": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14",
"Microsoft.Extensions.DependencyModel": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.SqlServer": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "cUJqCiamT0EvpKNgZEV5fqNv2MyVfKNgOPQfFINqHiIKHOYrS0nTCUJP97+UuG0JIIrP792/PwnuNjbekImtBg==",
+ "resolved": "7.0.14",
+ "contentHash": "d9hqEw4W/TdQ1WDm03uyFuDoehL6GNq/NMChFaC4dcV60I42vKdUC0fYTuE2QPunVUpf5XUTCkJ6fYGjMos2AA==",
"dependencies": {
- "Microsoft.Data.SqlClient": "5.0.1",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5"
+ "Microsoft.Data.SqlClient": "5.1.1",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14"
}
},
"Microsoft.Extensions.Caching.Abstractions": {
@@ -819,50 +793,52 @@
},
"Microsoft.IdentityModel.Abstractions": {
"type": "Transitive",
- "resolved": "6.22.0",
- "contentHash": "iI+9V+2ciCrbheeLjpmjcqCnhy+r6yCoEcid3nkoFWerHgjVuT6CPM4HODUTtUPe1uwks4wcnAujJ8u+IKogHQ=="
+ "resolved": "6.24.0",
+ "contentHash": "X6aBK56Ot15qKyG7X37KsPnrwah+Ka55NJWPppWVTDi8xWq7CJgeNw2XyaeHgE1o/mW4THwoabZkBbeG2TPBiw=="
},
"Microsoft.IdentityModel.JsonWebTokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "d3h1/BaMeylKTkdP6XwRCxuOoDJZ44V9xaXr6gl5QxmpnZGdoK3bySo3OQN8ehRLJHShb94ElLUvoXyglQtgAw==",
+ "resolved": "6.24.0",
+ "contentHash": "XDWrkThcxfuWp79AvAtg5f+uRS1BxkIbJnsG/e8VPzOWkYYuDg33emLjp5EWcwXYYIDsHnVZD/00kM/PYFQc/g==",
"dependencies": {
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Tokens": "6.24.0",
+ "System.Text.Encoding": "4.3.0",
+ "System.Text.Json": "4.7.2"
}
},
"Microsoft.IdentityModel.Logging": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "tuEhHIQwvBEhMf8I50hy8FHmRSUkffDFP5EdLsSDV4qRcl2wvOPkQxYqEzWkh+ytW6sbdJGEXElGhmhDfAxAKg==",
+ "resolved": "6.24.0",
+ "contentHash": "qLYWDOowM/zghmYKXw1yfYKlHOdS41i8t4hVXr9bSI90zHqhyhQh9GwVy8pENzs5wHeytU23DymluC9NtgYv7w==",
"dependencies": {
- "Microsoft.IdentityModel.Abstractions": "6.21.0"
+ "Microsoft.IdentityModel.Abstractions": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "0FqY5cTLQKtHrClzHEI+QxJl8OBT2vUiEQQB7UKk832JDiJJmetzYZ3AdSrPjN/3l3nkhByeWzXnhrX0JbifKg==",
+ "resolved": "6.24.0",
+ "contentHash": "+NzKCkvsQ8X1r/Ff74V7CFr9OsdMRaB6DsV+qpH7NNLdYJ8O4qHbmTnNEsjFcDmk/gVNDwhoL2gN5pkPVq0lwQ==",
"dependencies": {
- "Microsoft.IdentityModel.Logging": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Logging": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols.OpenIdConnect": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "vtSKL7n6EnAsLyxmiviusm6LKrblT2ndnNqN6rvVq6iIHAnPCK9E2DkDx6h1Jrpy1cvbp40r0cnTg23nhEAGTA==",
+ "resolved": "6.24.0",
+ "contentHash": "a/2RRrc8C9qaw8qdD9hv1ES9YKFgxaqr/SnwMSLbwQZJSUQDd4qx1K4EYgWaQWs73R+VXLyKSxN0f/uE9CsBiQ==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols": "6.21.0",
- "System.IdentityModel.Tokens.Jwt": "6.21.0"
+ "Microsoft.IdentityModel.Protocols": "6.24.0",
+ "System.IdentityModel.Tokens.Jwt": "6.24.0"
}
},
"Microsoft.IdentityModel.Tokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "AAEHZvZyb597a+QJSmtxH3n2P1nIJGpZ4Q89GTenknRx6T6zyfzf592yW/jA5e8EHN4tNMjjXHQaYWEq5+L05w==",
+ "resolved": "6.24.0",
+ "contentHash": "ZPqHi86UYuqJXJ7bLnlEctHKkPKT4lGUFbotoCNiXNCSL02emYlcxzGYsRGWWmbFEcYDMi2dcTLLYNzHqWOTsw==",
"dependencies": {
"Microsoft.CSharp": "4.5.0",
- "Microsoft.IdentityModel.Logging": "6.21.0",
+ "Microsoft.IdentityModel.Logging": "6.24.0",
"System.Security.Cryptography.Cng": "4.5.0"
}
},
@@ -993,13 +969,13 @@
},
"Newtonsoft.Json": {
"type": "Transitive",
- "resolved": "13.0.1",
- "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
+ "resolved": "13.0.3",
+ "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ=="
},
"Npgsql": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "7UVPYy2RP0ci04PED1tc9ZCaTw/DfSdSkLiGEFCAvwMwsgA/bAluj1liNzP1IpN0MFofnOF0cm1zJfmbEuCehg==",
+ "resolved": "7.0.6",
+ "contentHash": "TAqvwRnm3NJ0QvN7cvu6geJkbI0XPzGVRElVY5hF4gsgA+BnE12x6GM1TLhdeq+7ZKvvo3BD8jXKnXmr3tvdEw==",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "6.0.0",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
@@ -1007,13 +983,13 @@
},
"Npgsql.EntityFrameworkCore.PostgreSQL": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "ZYMtyG6pmLtUsFAx0/XaIlVkJM+1gArWEKD55cLLxiVlGScAphjiGj+G7Gk16yg5lhhdWx+bgXWpIUISXuS33g==",
+ "resolved": "7.0.11",
+ "contentHash": "cHEgEz0ldXc9wVANs8sJqC+3eilqefrkasCBgaVT0tyj8tb1p3/pwy2ngjboNkDG3M0z+xJsJ4jC5p8wySAM3w==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, 8.0.0)",
- "Npgsql": "7.0.4"
+ "Microsoft.EntityFrameworkCore": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.11, 8.0.0)",
+ "Npgsql": "7.0.6"
}
},
"NSec.Cryptography": {
@@ -1336,8 +1312,8 @@
},
"Serilog.Sinks.SyslogMessages": {
"type": "Transitive",
- "resolved": "2.0.6",
- "contentHash": "V2Yq2GEbk7taEPbpBLFzLXhrHrUzKf4sQu/zLrANU8XIoUn/Mr08M2E8PrcrWVXCj0R4xLMWYe0Z1sxOrMF3IA==",
+ "resolved": "2.0.9",
+ "contentHash": "y7J+/h/Nf5EAtbpa6lC1nDhK/F9kC5oxuVYmQivv242Oh4hAVMeoAk5Gv6bgb/KbmqufGPXUFkX/AlcrvZ8Ywg==",
"dependencies": {
"Serilog": "2.5.0",
"Serilog.Sinks.PeriodicBatching": "2.3.0"
@@ -1470,8 +1446,8 @@
},
"System.Configuration.ConfigurationManager": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "7T+m0kDSlIPTHIkPMIu6m6tV6qsMqJpvQWW2jIc2qi7sn40qxFo0q+7mEQAhMPXZHMKnWrnv47ntGlM/ejvw3g==",
+ "resolved": "6.0.1",
+ "contentHash": "jXw9MlUu/kRfEU0WyTptAVueupqIeE3/rl0EZDMlf8pcvJnitQ8HeVEp69rZdaStXwTV72boi/Bhw8lOeO+U2w==",
"dependencies": {
"System.Security.Cryptography.ProtectedData": "6.0.0",
"System.Security.Permissions": "6.0.0"
@@ -1630,11 +1606,11 @@
},
"System.IdentityModel.Tokens.Jwt": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "JRD8AuypBE+2zYxT3dMJomQVsPYsCqlyZhWel3J1d5nzQokSRyTueF+Q4ID3Jcu6zSZKuzOdJ1MLTkbQsDqcvQ==",
+ "resolved": "6.24.0",
+ "contentHash": "Qibsj9MPWq8S/C0FgvmsLfIlHLE7ay0MJIaAmK94ivN3VyDdglqReed5qMvdQhSL0BzK6v0Z1wB/sD88zVu6Jw==",
"dependencies": {
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"System.IO": {
@@ -2083,10 +2059,10 @@
},
"System.Runtime.Caching": {
"type": "Transitive",
- "resolved": "5.0.0",
- "contentHash": "30D6MkO8WF9jVGWZIP0hmCN8l9BTY4LCsAzLIe4xFSXzs+AjDotR7DpSmj27pFskDURzUvqYYY0ikModgBTxWw==",
+ "resolved": "6.0.0",
+ "contentHash": "E0e03kUp5X2k+UAoVl6efmI7uU7JRBWi5EIdlQ7cr0NpBGjHG4fWII35PgsBY9T4fJQ8E4QPsL0rKksU9gcL5A==",
"dependencies": {
- "System.Configuration.ConfigurationManager": "5.0.0"
+ "System.Configuration.ConfigurationManager": "6.0.0"
}
},
"System.Runtime.CompilerServices.Unsafe": {
@@ -2616,11 +2592,10 @@
"BitPay.Light": "[1.0.1907, )",
"Braintree": "[5.19.0, )",
"DnsClient": "[1.7.0, )",
+ "Duende.IdentityServer": "[6.0.4, )",
"Fido2.AspNet": "[3.0.1, )",
- "Handlebars.Net": "[2.1.2, )",
- "IdentityServer4": "[4.1.2, )",
- "IdentityServer4.AccessTokenValidation": "[3.0.1, )",
- "LaunchDarkly.ServerSdk": "[7.0.0, )",
+ "Handlebars.Net": "[2.1.4, )",
+ "LaunchDarkly.ServerSdk": "[8.0.0, )",
"MailKit": "[4.2.0, )",
"Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )",
"Microsoft.Azure.Cosmos.Table": "[1.0.8, )",
@@ -2630,7 +2605,7 @@
"Microsoft.Extensions.Configuration.EnvironmentVariables": "[6.0.1, )",
"Microsoft.Extensions.Configuration.UserSecrets": "[6.0.1, )",
"Microsoft.Extensions.Identity.Stores": "[6.0.4, )",
- "Newtonsoft.Json": "[13.0.1, )",
+ "Newtonsoft.Json": "[13.0.3, )",
"Otp.NET": "[1.2.2, )",
"Quartz": "[3.4.0, )",
"SendGrid": "[9.27.0, )",
@@ -2639,7 +2614,7 @@
"Serilog.Extensions.Logging": "[3.1.0, )",
"Serilog.Extensions.Logging.File": "[2.0.0, )",
"Serilog.Sinks.AzureCosmosDB": "[2.0.0, )",
- "Serilog.Sinks.SyslogMessages": "[2.0.6, )",
+ "Serilog.Sinks.SyslogMessages": "[2.0.9, )",
"Stripe.net": "[40.0.0, )",
"YubicoDotNetClient": "[1.2.0, )"
}
@@ -2647,29 +2622,29 @@
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "Dapper": "[2.0.123, )"
+ "Core": "[2023.12.0, )",
+ "Dapper": "[2.1.24, )"
}
},
"infrastructure.entityframework": {
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )",
- "Core": "[2023.10.2, )",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )",
- "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )",
- "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )",
- "Npgsql.EntityFrameworkCore.PostgreSQL": "[7.0.4, )",
+ "Core": "[2023.12.0, )",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.14, )",
+ "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.14, )",
+ "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.14, )",
+ "Npgsql.EntityFrameworkCore.PostgreSQL": "[7.0.11, )",
"Pomelo.EntityFrameworkCore.MySql": "[7.0.0, )",
- "linq2db.EntityFrameworkCore": "[7.5.0, )"
+ "linq2db.EntityFrameworkCore": "[7.6.0, )"
}
},
"sharedweb": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "Infrastructure.Dapper": "[2023.10.2, )",
- "Infrastructure.EntityFramework": "[2023.10.2, )"
+ "Core": "[2023.12.0, )",
+ "Infrastructure.Dapper": "[2023.12.0, )",
+ "Infrastructure.EntityFramework": "[2023.12.0, )"
}
}
}
diff --git a/src/Core/Context/CurrentContextOrganization.cs b/src/Core/AdminConsole/Context/CurrentContextOrganization.cs
similarity index 85%
rename from src/Core/Context/CurrentContextOrganization.cs
rename to src/Core/AdminConsole/Context/CurrentContextOrganization.cs
index b812143e2f..a1806137eb 100644
--- a/src/Core/Context/CurrentContextOrganization.cs
+++ b/src/Core/AdminConsole/Context/CurrentContextOrganization.cs
@@ -16,6 +16,7 @@ public class CurrentContextOrganization
Permissions = CoreHelpers.LoadClassFromJsonData(orgUser.Permissions);
AccessSecretsManager = orgUser.AccessSecretsManager && orgUser.UseSecretsManager && orgUser.Enabled;
LimitCollectionCreationDeletion = orgUser.LimitCollectionCreationDeletion;
+ AllowAdminAccessToAllCollectionItems = orgUser.AllowAdminAccessToAllCollectionItems;
}
public Guid Id { get; set; }
@@ -23,4 +24,5 @@ public class CurrentContextOrganization
public Permissions Permissions { get; set; } = new();
public bool AccessSecretsManager { get; set; }
public bool LimitCollectionCreationDeletion { get; set; }
+ public bool AllowAdminAccessToAllCollectionItems { get; set; }
}
diff --git a/src/Core/Entities/Organization.cs b/src/Core/AdminConsole/Entities/Organization.cs
similarity index 94%
rename from src/Core/Entities/Organization.cs
rename to src/Core/AdminConsole/Entities/Organization.cs
index a909a64376..0f1edb8de8 100644
--- a/src/Core/Entities/Organization.cs
+++ b/src/Core/AdminConsole/Entities/Organization.cs
@@ -2,12 +2,13 @@
using System.Text.Json;
using Bit.Core.Auth.Enums;
using Bit.Core.Auth.Models;
+using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Models.Business;
using Bit.Core.Tools.Entities;
using Bit.Core.Utilities;
-namespace Bit.Core.Entities;
+namespace Bit.Core.AdminConsole.Entities;
public class Organization : ITableObject, ISubscriber, IStorable, IStorableSubscriber, IRevisable, IReferenceable
{
@@ -82,6 +83,14 @@ public class Organization : ITableObject, ISubscriber, IStorable, IStorabl
/// Refers to the ability for an organization to limit collection creation and deletion to owners and admins only
///
public bool LimitCollectionCreationDeletion { get; set; }
+ ///
+ /// Refers to the ability for an organization to limit owner/admin access to all collection items
+ ///
+ /// True: Owner/admins can access all items belonging to any collections
+ /// False: Owner/admins can only access items for collections they are assigned
+ ///
+ ///
+ public bool AllowAdminAccessToAllCollectionItems { get; set; }
public void SetNewId()
{
diff --git a/src/Core/Entities/OrganizationUser.cs b/src/Core/AdminConsole/Entities/OrganizationUser.cs
similarity index 100%
rename from src/Core/Entities/OrganizationUser.cs
rename to src/Core/AdminConsole/Entities/OrganizationUser.cs
diff --git a/src/Core/Entities/Policy.cs b/src/Core/AdminConsole/Entities/Policy.cs
similarity index 82%
rename from src/Core/Entities/Policy.cs
rename to src/Core/AdminConsole/Entities/Policy.cs
index 4863b8ccc8..daf0699145 100644
--- a/src/Core/Entities/Policy.cs
+++ b/src/Core/AdminConsole/Entities/Policy.cs
@@ -1,8 +1,9 @@
-using Bit.Core.Enums;
-using Bit.Core.Models.Data.Organizations.Policies;
+using Bit.Core.AdminConsole.Enums;
+using Bit.Core.AdminConsole.Models.Data.Organizations.Policies;
+using Bit.Core.Entities;
using Bit.Core.Utilities;
-namespace Bit.Core.Entities;
+namespace Bit.Core.AdminConsole.Entities;
public class Policy : ITableObject
{
diff --git a/src/Core/Enums/OrganizationStatusType.cs b/src/Core/AdminConsole/Enums/OrganizationStatusType.cs
similarity index 100%
rename from src/Core/Enums/OrganizationStatusType.cs
rename to src/Core/AdminConsole/Enums/OrganizationStatusType.cs
diff --git a/src/Core/Enums/OrganizationUserStatusType.cs b/src/Core/AdminConsole/Enums/OrganizationUserStatusType.cs
similarity index 100%
rename from src/Core/Enums/OrganizationUserStatusType.cs
rename to src/Core/AdminConsole/Enums/OrganizationUserStatusType.cs
diff --git a/src/Core/Enums/OrganizationUserType.cs b/src/Core/AdminConsole/Enums/OrganizationUserType.cs
similarity index 100%
rename from src/Core/Enums/OrganizationUserType.cs
rename to src/Core/AdminConsole/Enums/OrganizationUserType.cs
diff --git a/src/Core/Enums/PolicyType.cs b/src/Core/AdminConsole/Enums/PolicyType.cs
similarity index 89%
rename from src/Core/Enums/PolicyType.cs
rename to src/Core/AdminConsole/Enums/PolicyType.cs
index 30dac3d917..583d1187e8 100644
--- a/src/Core/Enums/PolicyType.cs
+++ b/src/Core/AdminConsole/Enums/PolicyType.cs
@@ -1,4 +1,4 @@
-namespace Bit.Core.Enums;
+namespace Bit.Core.AdminConsole.Enums;
public enum PolicyType : byte
{
diff --git a/src/Core/Models/Api/Response/PolicyResponseModel.cs b/src/Core/AdminConsole/Models/Api/Response/PolicyResponseModel.cs
similarity index 83%
rename from src/Core/Models/Api/Response/PolicyResponseModel.cs
rename to src/Core/AdminConsole/Models/Api/Response/PolicyResponseModel.cs
index 997e918d09..7ef6b15737 100644
--- a/src/Core/Models/Api/Response/PolicyResponseModel.cs
+++ b/src/Core/AdminConsole/Models/Api/Response/PolicyResponseModel.cs
@@ -1,8 +1,9 @@
using System.Text.Json;
-using Bit.Core.Entities;
-using Bit.Core.Enums;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.AdminConsole.Enums;
+using Bit.Core.Models.Api;
-namespace Bit.Core.Models.Api.Response;
+namespace Bit.Core.AdminConsole.Models.Api.Response;
public class PolicyResponseModel : ResponseModel
{
diff --git a/src/Core/Models/Business/ImportedOrganizationUser.cs b/src/Core/AdminConsole/Models/Business/ImportedOrganizationUser.cs
similarity index 100%
rename from src/Core/Models/Business/ImportedOrganizationUser.cs
rename to src/Core/AdminConsole/Models/Business/ImportedOrganizationUser.cs
diff --git a/src/Core/Models/Business/OrganizationUserInvite.cs b/src/Core/AdminConsole/Models/Business/OrganizationUserInvite.cs
similarity index 100%
rename from src/Core/Models/Business/OrganizationUserInvite.cs
rename to src/Core/AdminConsole/Models/Business/OrganizationUserInvite.cs
diff --git a/src/Core/Models/Data/Organizations/OrganizationAbility.cs b/src/Core/AdminConsole/Models/Data/Organizations/OrganizationAbility.cs
similarity index 97%
rename from src/Core/Models/Data/Organizations/OrganizationAbility.cs
rename to src/Core/AdminConsole/Models/Data/Organizations/OrganizationAbility.cs
index 22bf4008eb..e4506a82d3 100644
--- a/src/Core/Models/Data/Organizations/OrganizationAbility.cs
+++ b/src/Core/AdminConsole/Models/Data/Organizations/OrganizationAbility.cs
@@ -1,4 +1,4 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
namespace Bit.Core.Models.Data.Organizations;
diff --git a/src/Core/Models/Data/Organizations/OrganizationUsers/OrganizationUserInviteData.cs b/src/Core/AdminConsole/Models/Data/Organizations/OrganizationUsers/OrganizationUserInviteData.cs
similarity index 100%
rename from src/Core/Models/Data/Organizations/OrganizationUsers/OrganizationUserInviteData.cs
rename to src/Core/AdminConsole/Models/Data/Organizations/OrganizationUsers/OrganizationUserInviteData.cs
diff --git a/src/Core/Models/Data/Organizations/OrganizationUsers/OrganizationUserOrganizationDetails.cs b/src/Core/AdminConsole/Models/Data/Organizations/OrganizationUsers/OrganizationUserOrganizationDetails.cs
similarity index 97%
rename from src/Core/Models/Data/Organizations/OrganizationUsers/OrganizationUserOrganizationDetails.cs
rename to src/Core/AdminConsole/Models/Data/Organizations/OrganizationUsers/OrganizationUserOrganizationDetails.cs
index 6566568c17..52a1904929 100644
--- a/src/Core/Models/Data/Organizations/OrganizationUsers/OrganizationUserOrganizationDetails.cs
+++ b/src/Core/AdminConsole/Models/Data/Organizations/OrganizationUsers/OrganizationUserOrganizationDetails.cs
@@ -49,4 +49,5 @@ public class OrganizationUserOrganizationDetails
public int? SmSeats { get; set; }
public int? SmServiceAccounts { get; set; }
public bool LimitCollectionCreationDeletion { get; set; }
+ public bool AllowAdminAccessToAllCollectionItems { get; set; }
}
diff --git a/src/Core/Models/Data/Organizations/OrganizationUsers/OrganizationUserPolicyDetails.cs b/src/Core/AdminConsole/Models/Data/Organizations/OrganizationUsers/OrganizationUserPolicyDetails.cs
similarity index 90%
rename from src/Core/Models/Data/Organizations/OrganizationUsers/OrganizationUserPolicyDetails.cs
rename to src/Core/AdminConsole/Models/Data/Organizations/OrganizationUsers/OrganizationUserPolicyDetails.cs
index 1ae93ccf53..84939ecf79 100644
--- a/src/Core/Models/Data/Organizations/OrganizationUsers/OrganizationUserPolicyDetails.cs
+++ b/src/Core/AdminConsole/Models/Data/Organizations/OrganizationUsers/OrganizationUserPolicyDetails.cs
@@ -1,4 +1,5 @@
-using Bit.Core.Enums;
+using Bit.Core.AdminConsole.Enums;
+using Bit.Core.Enums;
namespace Bit.Core.Models.Data.Organizations.OrganizationUsers;
diff --git a/src/Core/Models/Data/Organizations/OrganizationUsers/OrganizationUserPublicKey.cs b/src/Core/AdminConsole/Models/Data/Organizations/OrganizationUsers/OrganizationUserPublicKey.cs
similarity index 100%
rename from src/Core/Models/Data/Organizations/OrganizationUsers/OrganizationUserPublicKey.cs
rename to src/Core/AdminConsole/Models/Data/Organizations/OrganizationUsers/OrganizationUserPublicKey.cs
diff --git a/src/Core/Models/Data/Organizations/OrganizationUsers/OrganizationUserResetPasswordDetails.cs b/src/Core/AdminConsole/Models/Data/Organizations/OrganizationUsers/OrganizationUserResetPasswordDetails.cs
similarity index 94%
rename from src/Core/Models/Data/Organizations/OrganizationUsers/OrganizationUserResetPasswordDetails.cs
rename to src/Core/AdminConsole/Models/Data/Organizations/OrganizationUsers/OrganizationUserResetPasswordDetails.cs
index 6edba19d99..ba3c821b2a 100644
--- a/src/Core/Models/Data/Organizations/OrganizationUsers/OrganizationUserResetPasswordDetails.cs
+++ b/src/Core/AdminConsole/Models/Data/Organizations/OrganizationUsers/OrganizationUserResetPasswordDetails.cs
@@ -1,4 +1,5 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.Entities;
using Bit.Core.Enums;
namespace Bit.Core.Models.Data.Organizations.OrganizationUsers;
diff --git a/src/Core/Models/Data/Organizations/OrganizationUsers/OrganizationUserUserDetails.cs b/src/Core/AdminConsole/Models/Data/Organizations/OrganizationUsers/OrganizationUserUserDetails.cs
similarity index 100%
rename from src/Core/Models/Data/Organizations/OrganizationUsers/OrganizationUserUserDetails.cs
rename to src/Core/AdminConsole/Models/Data/Organizations/OrganizationUsers/OrganizationUserUserDetails.cs
diff --git a/src/Core/Models/Data/Organizations/OrganizationUsers/OrganizationUserWithCollections.cs b/src/Core/AdminConsole/Models/Data/Organizations/OrganizationUsers/OrganizationUserWithCollections.cs
similarity index 100%
rename from src/Core/Models/Data/Organizations/OrganizationUsers/OrganizationUserWithCollections.cs
rename to src/Core/AdminConsole/Models/Data/Organizations/OrganizationUsers/OrganizationUserWithCollections.cs
diff --git a/src/Core/AdminConsole/Models/Data/Organizations/Policies/IPolicyDataModel.cs b/src/Core/AdminConsole/Models/Data/Organizations/Policies/IPolicyDataModel.cs
new file mode 100644
index 0000000000..9e666f5a10
--- /dev/null
+++ b/src/Core/AdminConsole/Models/Data/Organizations/Policies/IPolicyDataModel.cs
@@ -0,0 +1,5 @@
+namespace Bit.Core.AdminConsole.Models.Data.Organizations.Policies;
+
+public interface IPolicyDataModel
+{
+}
diff --git a/src/Core/Models/Data/Organizations/Policies/MasterPasswordPolicyData.cs b/src/Core/AdminConsole/Models/Data/Organizations/Policies/MasterPasswordPolicyData.cs
similarity index 95%
rename from src/Core/Models/Data/Organizations/Policies/MasterPasswordPolicyData.cs
rename to src/Core/AdminConsole/Models/Data/Organizations/Policies/MasterPasswordPolicyData.cs
index 30294620bf..f2f275b708 100644
--- a/src/Core/Models/Data/Organizations/Policies/MasterPasswordPolicyData.cs
+++ b/src/Core/AdminConsole/Models/Data/Organizations/Policies/MasterPasswordPolicyData.cs
@@ -1,4 +1,4 @@
-namespace Bit.Core.Models.Data.Organizations.Policies;
+namespace Bit.Core.AdminConsole.Models.Data.Organizations.Policies;
public class MasterPasswordPolicyData : IPolicyDataModel
{
diff --git a/src/Core/Models/Data/Organizations/Policies/ResetPasswordDataModel.cs b/src/Core/AdminConsole/Models/Data/Organizations/Policies/ResetPasswordDataModel.cs
similarity index 75%
rename from src/Core/Models/Data/Organizations/Policies/ResetPasswordDataModel.cs
rename to src/Core/AdminConsole/Models/Data/Organizations/Policies/ResetPasswordDataModel.cs
index 1931cc5b79..62c8473612 100644
--- a/src/Core/Models/Data/Organizations/Policies/ResetPasswordDataModel.cs
+++ b/src/Core/AdminConsole/Models/Data/Organizations/Policies/ResetPasswordDataModel.cs
@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
-namespace Bit.Core.Models.Data.Organizations.Policies;
+namespace Bit.Core.AdminConsole.Models.Data.Organizations.Policies;
public class ResetPasswordDataModel : IPolicyDataModel
{
diff --git a/src/Core/Models/Data/Organizations/Policies/SendOptionsPolicyData.cs b/src/Core/AdminConsole/Models/Data/Organizations/Policies/SendOptionsPolicyData.cs
similarity index 74%
rename from src/Core/Models/Data/Organizations/Policies/SendOptionsPolicyData.cs
rename to src/Core/AdminConsole/Models/Data/Organizations/Policies/SendOptionsPolicyData.cs
index aa9f651665..57a8544b40 100644
--- a/src/Core/Models/Data/Organizations/Policies/SendOptionsPolicyData.cs
+++ b/src/Core/AdminConsole/Models/Data/Organizations/Policies/SendOptionsPolicyData.cs
@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
-namespace Bit.Core.Models.Data.Organizations.Policies;
+namespace Bit.Core.AdminConsole.Models.Data.Organizations.Policies;
public class SendOptionsPolicyData : IPolicyDataModel
{
diff --git a/src/Core/Models/Data/Organizations/SelfHostedOrganizationDetails.cs b/src/Core/AdminConsole/Models/Data/Organizations/SelfHostedOrganizationDetails.cs
similarity index 96%
rename from src/Core/Models/Data/Organizations/SelfHostedOrganizationDetails.cs
rename to src/Core/AdminConsole/Models/Data/Organizations/SelfHostedOrganizationDetails.cs
index d501263f4e..ddca0d3c8a 100644
--- a/src/Core/Models/Data/Organizations/SelfHostedOrganizationDetails.cs
+++ b/src/Core/AdminConsole/Models/Data/Organizations/SelfHostedOrganizationDetails.cs
@@ -1,4 +1,6 @@
-using Bit.Core.AdminConsole.Models.OrganizationConnectionConfigs;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.AdminConsole.Enums;
+using Bit.Core.AdminConsole.Models.OrganizationConnectionConfigs;
using Bit.Core.Auth.Entities;
using Bit.Core.Auth.Enums;
using Bit.Core.Entities;
@@ -143,6 +145,7 @@ public class SelfHostedOrganizationDetails : Organization
MaxAutoscaleSeats = MaxAutoscaleSeats,
OwnersNotifiedOfAutoscaling = OwnersNotifiedOfAutoscaling,
LimitCollectionCreationDeletion = LimitCollectionCreationDeletion,
+ AllowAdminAccessToAllCollectionItems = AllowAdminAccessToAllCollectionItems
};
}
}
diff --git a/src/Core/Models/Data/Permissions.cs b/src/Core/AdminConsole/Models/Data/Permissions.cs
similarity index 100%
rename from src/Core/Models/Data/Permissions.cs
rename to src/Core/AdminConsole/Models/Data/Permissions.cs
diff --git a/src/Core/AdminConsole/OrganizationFeatures/Groups/CreateGroupCommand.cs b/src/Core/AdminConsole/OrganizationFeatures/Groups/CreateGroupCommand.cs
index 94e03afd8c..6c2dfd6b58 100644
--- a/src/Core/AdminConsole/OrganizationFeatures/Groups/CreateGroupCommand.cs
+++ b/src/Core/AdminConsole/OrganizationFeatures/Groups/CreateGroupCommand.cs
@@ -2,7 +2,6 @@
using Bit.Core.AdminConsole.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Context;
-using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Exceptions;
using Bit.Core.Models.Data;
diff --git a/src/Core/AdminConsole/OrganizationFeatures/Groups/Interfaces/ICreateGroupCommand.cs b/src/Core/AdminConsole/OrganizationFeatures/Groups/Interfaces/ICreateGroupCommand.cs
index 54f5bc2ec2..428bd13462 100644
--- a/src/Core/AdminConsole/OrganizationFeatures/Groups/Interfaces/ICreateGroupCommand.cs
+++ b/src/Core/AdminConsole/OrganizationFeatures/Groups/Interfaces/ICreateGroupCommand.cs
@@ -1,5 +1,4 @@
using Bit.Core.AdminConsole.Entities;
-using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Models.Data;
diff --git a/src/Core/AdminConsole/OrganizationFeatures/Groups/Interfaces/IUpdateGroupCommand.cs b/src/Core/AdminConsole/OrganizationFeatures/Groups/Interfaces/IUpdateGroupCommand.cs
index 97b32fd950..fae217aad1 100644
--- a/src/Core/AdminConsole/OrganizationFeatures/Groups/Interfaces/IUpdateGroupCommand.cs
+++ b/src/Core/AdminConsole/OrganizationFeatures/Groups/Interfaces/IUpdateGroupCommand.cs
@@ -1,5 +1,4 @@
using Bit.Core.AdminConsole.Entities;
-using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Models.Data;
diff --git a/src/Core/AdminConsole/OrganizationFeatures/Groups/UpdateGroupCommand.cs b/src/Core/AdminConsole/OrganizationFeatures/Groups/UpdateGroupCommand.cs
index 3deb6994ac..3bc241221c 100644
--- a/src/Core/AdminConsole/OrganizationFeatures/Groups/UpdateGroupCommand.cs
+++ b/src/Core/AdminConsole/OrganizationFeatures/Groups/UpdateGroupCommand.cs
@@ -1,7 +1,6 @@
using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.AdminConsole.Repositories;
-using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Exceptions;
using Bit.Core.Models.Data;
diff --git a/src/Core/AdminConsole/OrganizationFeatures/OrganizationConnections/Interfaces/IValidateBillingSyncKeyCommand.cs b/src/Core/AdminConsole/OrganizationFeatures/OrganizationConnections/Interfaces/IValidateBillingSyncKeyCommand.cs
index 78a28d3ec3..33b6f48b60 100644
--- a/src/Core/AdminConsole/OrganizationFeatures/OrganizationConnections/Interfaces/IValidateBillingSyncKeyCommand.cs
+++ b/src/Core/AdminConsole/OrganizationFeatures/OrganizationConnections/Interfaces/IValidateBillingSyncKeyCommand.cs
@@ -1,4 +1,4 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
namespace Bit.Core.AdminConsole.OrganizationFeatures.OrganizationConnections.Interfaces;
diff --git a/src/Core/AdminConsole/OrganizationFeatures/OrganizationConnections/ValidateBillingSyncKeyCommand.cs b/src/Core/AdminConsole/OrganizationFeatures/OrganizationConnections/ValidateBillingSyncKeyCommand.cs
index 11360f2fa1..3e19c773ef 100644
--- a/src/Core/AdminConsole/OrganizationFeatures/OrganizationConnections/ValidateBillingSyncKeyCommand.cs
+++ b/src/Core/AdminConsole/OrganizationFeatures/OrganizationConnections/ValidateBillingSyncKeyCommand.cs
@@ -1,5 +1,5 @@
-using Bit.Core.AdminConsole.OrganizationFeatures.OrganizationConnections.Interfaces;
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.AdminConsole.OrganizationFeatures.OrganizationConnections.Interfaces;
using Bit.Core.Exceptions;
using Bit.Core.Repositories;
diff --git a/src/Core/OrganizationFeatures/OrganizationUsers/AcceptOrgUserCommand.cs b/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/AcceptOrgUserCommand.cs
similarity index 98%
rename from src/Core/OrganizationFeatures/OrganizationUsers/AcceptOrgUserCommand.cs
rename to src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/AcceptOrgUserCommand.cs
index 5baff54634..e0c2bada48 100644
--- a/src/Core/OrganizationFeatures/OrganizationUsers/AcceptOrgUserCommand.cs
+++ b/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/AcceptOrgUserCommand.cs
@@ -1,4 +1,6 @@
-using Bit.Core.Auth.Models.Business.Tokenables;
+using Bit.Core.AdminConsole.Enums;
+using Bit.Core.AdminConsole.Services;
+using Bit.Core.Auth.Models.Business.Tokenables;
using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Exceptions;
diff --git a/src/Core/OrganizationFeatures/OrganizationUsers/Interfaces/IAcceptOrgUserCommand.cs b/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/Interfaces/IAcceptOrgUserCommand.cs
similarity index 100%
rename from src/Core/OrganizationFeatures/OrganizationUsers/Interfaces/IAcceptOrgUserCommand.cs
rename to src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/Interfaces/IAcceptOrgUserCommand.cs
diff --git a/src/Core/Repositories/IOrganizationRepository.cs b/src/Core/AdminConsole/Repositories/IOrganizationRepository.cs
similarity index 95%
rename from src/Core/Repositories/IOrganizationRepository.cs
rename to src/Core/AdminConsole/Repositories/IOrganizationRepository.cs
index 4ac518489b..4598a11fb9 100644
--- a/src/Core/Repositories/IOrganizationRepository.cs
+++ b/src/Core/AdminConsole/Repositories/IOrganizationRepository.cs
@@ -1,4 +1,4 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.Models.Data.Organizations;
namespace Bit.Core.Repositories;
diff --git a/src/Core/Repositories/IOrganizationUserRepository.cs b/src/Core/AdminConsole/Repositories/IOrganizationUserRepository.cs
similarity index 98%
rename from src/Core/Repositories/IOrganizationUserRepository.cs
rename to src/Core/AdminConsole/Repositories/IOrganizationUserRepository.cs
index f9dfa12c2c..751bfdc4aa 100644
--- a/src/Core/Repositories/IOrganizationUserRepository.cs
+++ b/src/Core/AdminConsole/Repositories/IOrganizationUserRepository.cs
@@ -1,4 +1,5 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Enums;
+using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Models.Data;
using Bit.Core.Models.Data.Organizations.OrganizationUsers;
diff --git a/src/Core/Repositories/IPolicyRepository.cs b/src/Core/AdminConsole/Repositories/IPolicyRepository.cs
similarity index 66%
rename from src/Core/Repositories/IPolicyRepository.cs
rename to src/Core/AdminConsole/Repositories/IPolicyRepository.cs
index 389d116c40..6050a7f69f 100644
--- a/src/Core/Repositories/IPolicyRepository.cs
+++ b/src/Core/AdminConsole/Repositories/IPolicyRepository.cs
@@ -1,7 +1,8 @@
-using Bit.Core.Entities;
-using Bit.Core.Enums;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.AdminConsole.Enums;
+using Bit.Core.Repositories;
-namespace Bit.Core.Repositories;
+namespace Bit.Core.AdminConsole.Repositories;
public interface IPolicyRepository : IRepository
{
diff --git a/src/Core/Services/IOrganizationService.cs b/src/Core/AdminConsole/Services/IOrganizationService.cs
similarity index 98%
rename from src/Core/Services/IOrganizationService.cs
rename to src/Core/AdminConsole/Services/IOrganizationService.cs
index 6da6d8fd73..e03ac4936f 100644
--- a/src/Core/Services/IOrganizationService.cs
+++ b/src/Core/AdminConsole/Services/IOrganizationService.cs
@@ -1,4 +1,5 @@
using System.Security.Claims;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.Models.Business;
using Bit.Core.Auth.Enums;
using Bit.Core.Entities;
@@ -27,7 +28,7 @@ public interface IOrganizationService
Task DisableAsync(Guid organizationId, DateTime? expirationDate);
Task UpdateExpirationDateAsync(Guid organizationId, DateTime? expirationDate);
Task EnableAsync(Guid organizationId);
- Task UpdateAsync(Organization organization, bool updateBilling = false);
+ Task UpdateAsync(Organization organization, bool updateBilling = false, EventType eventType = EventType.Organization_Updated);
Task UpdateTwoFactorProviderAsync(Organization organization, TwoFactorProviderType type);
Task DisableTwoFactorProviderAsync(Organization organization, TwoFactorProviderType type);
Task> InviteUsersAsync(Guid organizationId, Guid? invitingUserId,
diff --git a/src/Core/Services/IPolicyService.cs b/src/Core/AdminConsole/Services/IPolicyService.cs
similarity index 77%
rename from src/Core/Services/IPolicyService.cs
rename to src/Core/AdminConsole/Services/IPolicyService.cs
index 51867ec966..e2f2fa7942 100644
--- a/src/Core/Services/IPolicyService.cs
+++ b/src/Core/AdminConsole/Services/IPolicyService.cs
@@ -1,9 +1,12 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.AdminConsole.Enums;
+using Bit.Core.AdminConsole.Models.Data.Organizations.Policies;
+using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Models.Data.Organizations.OrganizationUsers;
-using Bit.Core.Models.Data.Organizations.Policies;
+using Bit.Core.Services;
-namespace Bit.Core.Services;
+namespace Bit.Core.AdminConsole.Services;
public interface IPolicyService
{
diff --git a/src/Core/Services/Implementations/OrganizationService.cs b/src/Core/AdminConsole/Services/Implementations/OrganizationService.cs
similarity index 98%
rename from src/Core/Services/Implementations/OrganizationService.cs
rename to src/Core/AdminConsole/Services/Implementations/OrganizationService.cs
index e7275a6d26..2b3dece37c 100644
--- a/src/Core/Services/Implementations/OrganizationService.cs
+++ b/src/Core/AdminConsole/Services/Implementations/OrganizationService.cs
@@ -1,10 +1,13 @@
using System.Security.Claims;
using System.Text.Json;
using Bit.Core.AdminConsole.Entities;
+using Bit.Core.AdminConsole.Enums;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.AdminConsole.Models.Business;
+using Bit.Core.AdminConsole.Models.Data.Organizations.Policies;
using Bit.Core.AdminConsole.OrganizationFeatures.OrganizationUsers.Interfaces;
using Bit.Core.AdminConsole.Repositories;
+using Bit.Core.AdminConsole.Services;
using Bit.Core.Auth.Enums;
using Bit.Core.Auth.Models.Business;
using Bit.Core.Auth.Models.Business.Tokenables;
@@ -15,7 +18,6 @@ using Bit.Core.Enums;
using Bit.Core.Exceptions;
using Bit.Core.Models.Business;
using Bit.Core.Models.Data;
-using Bit.Core.Models.Data.Organizations.Policies;
using Bit.Core.OrganizationFeatures.OrganizationSubscriptions.Interface;
using Bit.Core.Repositories;
using Bit.Core.Settings;
@@ -57,6 +59,7 @@ public class OrganizationService : IOrganizationService
private readonly IProviderUserRepository _providerUserRepository;
private readonly ICountNewSmSeatsRequiredQuery _countNewSmSeatsRequiredQuery;
private readonly IUpdateSecretsManagerSubscriptionCommand _updateSecretsManagerSubscriptionCommand;
+ private readonly IProviderRepository _providerRepository;
private readonly IOrgUserInviteTokenableFactory _orgUserInviteTokenableFactory;
private readonly IDataProtectorTokenFactory _orgUserInviteTokenDataFactory;
private readonly IFeatureService _featureService;
@@ -90,6 +93,7 @@ public class OrganizationService : IOrganizationService
IOrgUserInviteTokenableFactory orgUserInviteTokenableFactory,
IDataProtectorTokenFactory orgUserInviteTokenDataFactory,
IUpdateSecretsManagerSubscriptionCommand updateSecretsManagerSubscriptionCommand,
+ IProviderRepository providerRepository,
IFeatureService featureService)
{
_organizationRepository = organizationRepository;
@@ -118,6 +122,7 @@ public class OrganizationService : IOrganizationService
_providerUserRepository = providerUserRepository;
_countNewSmSeatsRequiredQuery = countNewSmSeatsRequiredQuery;
_updateSecretsManagerSubscriptionCommand = updateSecretsManagerSubscriptionCommand;
+ _providerRepository = providerRepository;
_orgUserInviteTokenableFactory = orgUserInviteTokenableFactory;
_orgUserInviteTokenDataFactory = orgUserInviteTokenDataFactory;
_featureService = featureService;
@@ -434,6 +439,8 @@ public class OrganizationService : IOrganizationService
var flexibleCollectionsIsEnabled =
_featureService.IsEnabled(FeatureFlagKeys.FlexibleCollections, _currentContext);
+ var flexibleCollectionsV1IsEnabled =
+ _featureService.IsEnabled(FeatureFlagKeys.FlexibleCollectionsV1, _currentContext);
var organization = new Organization
{
@@ -472,7 +479,8 @@ public class OrganizationService : IOrganizationService
Status = OrganizationStatusType.Created,
UsePasswordManager = true,
UseSecretsManager = signup.UseSecretsManager,
- LimitCollectionCreationDeletion = !flexibleCollectionsIsEnabled
+ LimitCollectionCreationDeletion = !flexibleCollectionsIsEnabled,
+ AllowAdminAccessToAllCollectionItems = !flexibleCollectionsV1IsEnabled
};
if (signup.UseSecretsManager)
@@ -736,7 +744,7 @@ public class OrganizationService : IOrganizationService
}
}
- public async Task UpdateAsync(Organization organization, bool updateBilling = false)
+ public async Task UpdateAsync(Organization organization, bool updateBilling = false, EventType eventType = EventType.Organization_Updated)
{
if (organization.Id == default(Guid))
{
@@ -752,7 +760,7 @@ public class OrganizationService : IOrganizationService
}
}
- await ReplaceAndUpdateCacheAsync(organization, EventType.Organization_Updated);
+ await ReplaceAndUpdateCacheAsync(organization, eventType);
if (updateBilling && !string.IsNullOrWhiteSpace(organization.GatewayCustomerId))
{
@@ -862,7 +870,7 @@ public class OrganizationService : IOrganizationService
if (newSeatsRequired > 0)
{
- var (canScale, failureReason) = CanScale(organization, newSeatsRequired);
+ var (canScale, failureReason) = await CanScaleAsync(organization, newSeatsRequired);
if (!canScale)
{
throw new BadRequestException(failureReason);
@@ -1182,7 +1190,8 @@ public class OrganizationService : IOrganizationService
return result;
}
- internal (bool canScale, string failureReason) CanScale(Organization organization,
+ internal async Task<(bool canScale, string failureReason)> CanScaleAsync(
+ Organization organization,
int seatsToAdd)
{
var failureReason = "";
@@ -1197,6 +1206,13 @@ public class OrganizationService : IOrganizationService
return (true, failureReason);
}
+ var provider = await _providerRepository.GetByOrganizationIdAsync(organization.Id);
+
+ if (provider is { Enabled: true, Type: ProviderType.Reseller })
+ {
+ return (false, "Seat limit has been reached. Contact your provider to purchase additional seats.");
+ }
+
if (organization.Seats.HasValue &&
organization.MaxAutoscaleSeats.HasValue &&
organization.MaxAutoscaleSeats.Value < organization.Seats.Value + seatsToAdd)
@@ -1214,7 +1230,7 @@ public class OrganizationService : IOrganizationService
return;
}
- var (canScale, failureMessage) = CanScale(organization, seatsToAdd);
+ var (canScale, failureMessage) = await CanScaleAsync(organization, seatsToAdd);
if (!canScale)
{
throw new BadRequestException(failureMessage);
diff --git a/src/Core/Services/Implementations/PolicyService.cs b/src/Core/AdminConsole/Services/Implementations/PolicyService.cs
similarity index 93%
rename from src/Core/Services/Implementations/PolicyService.cs
rename to src/Core/AdminConsole/Services/Implementations/PolicyService.cs
index 2c9b6c73e1..4726de0160 100644
--- a/src/Core/Services/Implementations/PolicyService.cs
+++ b/src/Core/AdminConsole/Services/Implementations/PolicyService.cs
@@ -1,14 +1,18 @@
-using Bit.Core.Auth.Enums;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.AdminConsole.Enums;
+using Bit.Core.AdminConsole.Models.Data.Organizations.Policies;
+using Bit.Core.AdminConsole.Repositories;
+using Bit.Core.Auth.Enums;
using Bit.Core.Auth.Repositories;
using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Exceptions;
using Bit.Core.Models.Data.Organizations.OrganizationUsers;
-using Bit.Core.Models.Data.Organizations.Policies;
using Bit.Core.Repositories;
+using Bit.Core.Services;
using Bit.Core.Settings;
-namespace Bit.Core.Services;
+namespace Bit.Core.AdminConsole.Services.Implementations;
public class PolicyService : IPolicyService
{
@@ -114,12 +118,12 @@ public class PolicyService : IPolicyService
var orgUsers = await _organizationUserRepository.GetManyDetailsByOrganizationAsync(
policy.OrganizationId);
var removableOrgUsers = orgUsers.Where(ou =>
- ou.Status != Enums.OrganizationUserStatusType.Invited && ou.Status != Enums.OrganizationUserStatusType.Revoked &&
- ou.Type != Enums.OrganizationUserType.Owner && ou.Type != Enums.OrganizationUserType.Admin &&
+ ou.Status != OrganizationUserStatusType.Invited && ou.Status != OrganizationUserStatusType.Revoked &&
+ ou.Type != OrganizationUserType.Owner && ou.Type != OrganizationUserType.Admin &&
ou.UserId != savingUserId);
switch (policy.Type)
{
- case Enums.PolicyType.TwoFactorAuthentication:
+ case PolicyType.TwoFactorAuthentication:
foreach (var orgUser in removableOrgUsers)
{
if (!await userService.TwoFactorIsEnabledAsync(orgUser))
@@ -131,7 +135,7 @@ public class PolicyService : IPolicyService
}
}
break;
- case Enums.PolicyType.SingleOrg:
+ case PolicyType.SingleOrg:
var userOrgs = await _organizationUserRepository.GetManyByManyUsersAsync(
removableOrgUsers.Select(ou => ou.UserId.Value));
foreach (var orgUser in removableOrgUsers)
@@ -154,7 +158,7 @@ public class PolicyService : IPolicyService
}
policy.RevisionDate = now;
await _policyRepository.UpsertAsync(policy);
- await _eventService.LogPolicyEventAsync(policy, Enums.EventType.Policy_Updated);
+ await _eventService.LogPolicyEventAsync(policy, EventType.Policy_Updated);
}
public async Task GetMasterPasswordPolicyForUserAsync(User user)
diff --git a/src/Core/Auth/Enums/WebAuthnLoginAssertionOptionsScope.cs b/src/Core/Auth/Enums/WebAuthnLoginAssertionOptionsScope.cs
new file mode 100644
index 0000000000..bcafc0e89f
--- /dev/null
+++ b/src/Core/Auth/Enums/WebAuthnLoginAssertionOptionsScope.cs
@@ -0,0 +1,7 @@
+namespace Bit.Core.Auth.Enums;
+
+public enum WebAuthnLoginAssertionOptionsScope
+{
+ Authentication = 0,
+ PrfRegistration = 1
+}
diff --git a/src/Core/Auth/Identity/IOrganizationTwoFactorTokenProvider.cs b/src/Core/Auth/Identity/IOrganizationTwoFactorTokenProvider.cs
index 81ce2adae9..4226cd0361 100644
--- a/src/Core/Auth/Identity/IOrganizationTwoFactorTokenProvider.cs
+++ b/src/Core/Auth/Identity/IOrganizationTwoFactorTokenProvider.cs
@@ -1,4 +1,5 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.Entities;
namespace Bit.Core.Auth.Identity;
diff --git a/src/Core/Auth/Identity/OrganizationDuoWebTokenProvider.cs b/src/Core/Auth/Identity/OrganizationDuoWebTokenProvider.cs
index 2b66e550c7..58bcf5efd8 100644
--- a/src/Core/Auth/Identity/OrganizationDuoWebTokenProvider.cs
+++ b/src/Core/Auth/Identity/OrganizationDuoWebTokenProvider.cs
@@ -1,4 +1,5 @@
-using Bit.Core.Auth.Enums;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.Auth.Enums;
using Bit.Core.Auth.Models;
using Bit.Core.Auth.Utilities.Duo;
using Bit.Core.Entities;
diff --git a/src/Core/Auth/Models/Api/Response/Accounts/WebAuthnLoginAssertionOptionsResponseModel.cs b/src/Core/Auth/Models/Api/Response/Accounts/WebAuthnLoginAssertionOptionsResponseModel.cs
new file mode 100644
index 0000000000..6a0641246b
--- /dev/null
+++ b/src/Core/Auth/Models/Api/Response/Accounts/WebAuthnLoginAssertionOptionsResponseModel.cs
@@ -0,0 +1,18 @@
+
+using Bit.Core.Models.Api;
+using Fido2NetLib;
+
+namespace Bit.Core.Auth.Models.Api.Response.Accounts;
+
+public class WebAuthnLoginAssertionOptionsResponseModel : ResponseModel
+{
+ private const string ResponseObj = "webAuthnLoginAssertionOptions";
+
+ public WebAuthnLoginAssertionOptionsResponseModel() : base(ResponseObj)
+ {
+ }
+
+ public AssertionOptions Options { get; set; }
+ public string Token { get; set; }
+}
+
diff --git a/src/Core/Auth/Models/Api/Response/UserDecryptionOptions.cs b/src/Core/Auth/Models/Api/Response/UserDecryptionOptions.cs
index edfcce5a51..06990afea9 100644
--- a/src/Core/Auth/Models/Api/Response/UserDecryptionOptions.cs
+++ b/src/Core/Auth/Models/Api/Response/UserDecryptionOptions.cs
@@ -16,6 +16,12 @@ public class UserDecryptionOptions : ResponseModel
///
public bool HasMasterPassword { get; set; }
+ ///
+ /// Gets or sets the WebAuthn PRF decryption keys.
+ ///
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public WebAuthnPrfDecryptionOption? WebAuthnPrfOption { get; set; }
+
///
/// Gets or sets information regarding this users trusted device decryption setup.
///
@@ -29,6 +35,20 @@ public class UserDecryptionOptions : ResponseModel
public KeyConnectorUserDecryptionOption? KeyConnectorOption { get; set; }
}
+public class WebAuthnPrfDecryptionOption
+{
+ public string EncryptedPrivateKey { get; }
+ public string EncryptedUserKey { get; }
+
+ public WebAuthnPrfDecryptionOption(
+ string encryptedPrivateKey,
+ string encryptedUserKey)
+ {
+ EncryptedPrivateKey = encryptedPrivateKey;
+ EncryptedUserKey = encryptedUserKey;
+ }
+}
+
public class TrustedDeviceUserDecryptionOption
{
public bool HasAdminApproval { get; }
diff --git a/src/Core/Auth/Models/Business/Tokenables/SsoTokenable.cs b/src/Core/Auth/Models/Business/Tokenables/SsoTokenable.cs
index 1f7bdfbc0f..48386c5439 100644
--- a/src/Core/Auth/Models/Business/Tokenables/SsoTokenable.cs
+++ b/src/Core/Auth/Models/Business/Tokenables/SsoTokenable.cs
@@ -1,5 +1,5 @@
using System.Text.Json.Serialization;
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.Tokens;
namespace Bit.Core.Auth.Models.Business.Tokenables;
@@ -35,7 +35,7 @@ public class SsoTokenable : ExpiringTokenable
&& organization.Id.Equals(OrganizationId);
}
- // Validates deserialized
+ // Validates deserialized
protected override bool TokenIsValid() =>
Identifier == TokenIdentifier
&& OrganizationId != default
diff --git a/src/Core/Auth/Models/Business/Tokenables/WebAuthnLoginAssertionOptionsTokenable.cs b/src/Core/Auth/Models/Business/Tokenables/WebAuthnLoginAssertionOptionsTokenable.cs
new file mode 100644
index 0000000000..017033b00a
--- /dev/null
+++ b/src/Core/Auth/Models/Business/Tokenables/WebAuthnLoginAssertionOptionsTokenable.cs
@@ -0,0 +1,47 @@
+using System.Text.Json.Serialization;
+using Bit.Core.Auth.Enums;
+using Bit.Core.Tokens;
+using Fido2NetLib;
+
+namespace Bit.Core.Auth.Models.Business.Tokenables;
+
+public class WebAuthnLoginAssertionOptionsTokenable : ExpiringTokenable
+{
+ // Lifetime 17 minutes =
+ // - 6 Minutes for Attestation (max webauthn timeout)
+ // - 6 Minutes for PRF Assertion (max webauthn timeout)
+ // - 5 minutes for user to complete the process (name their passkey, etc)
+ private static readonly TimeSpan _tokenLifetime = TimeSpan.FromMinutes(17);
+ public const string ClearTextPrefix = "BWWebAuthnLoginAssertionOptions_";
+ public const string DataProtectorPurpose = "WebAuthnLoginAssertionOptionsDataProtector";
+ public const string TokenIdentifier = "WebAuthnLoginAssertionOptionsToken";
+
+ public string Identifier { get; set; } = TokenIdentifier;
+ public AssertionOptions Options { get; set; }
+ public WebAuthnLoginAssertionOptionsScope Scope { get; set; }
+
+ [JsonConstructor]
+ public WebAuthnLoginAssertionOptionsTokenable()
+ {
+ ExpirationDate = DateTime.UtcNow.Add(_tokenLifetime);
+ }
+
+ public WebAuthnLoginAssertionOptionsTokenable(WebAuthnLoginAssertionOptionsScope scope, AssertionOptions options) : this()
+ {
+ Scope = scope;
+ Options = options;
+ }
+
+ public bool TokenIsValid(WebAuthnLoginAssertionOptionsScope scope)
+ {
+ if (!Valid)
+ {
+ return false;
+ }
+
+ return Scope == scope;
+ }
+
+ protected override bool TokenIsValid() => Identifier == TokenIdentifier && Options != null;
+}
+
diff --git a/src/Core/Auth/Models/Business/Tokenables/WebAuthnLoginTokenable.cs b/src/Core/Auth/Models/Business/Tokenables/WebAuthnLoginTokenable.cs
deleted file mode 100644
index b27b1fb355..0000000000
--- a/src/Core/Auth/Models/Business/Tokenables/WebAuthnLoginTokenable.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-using System.Text.Json.Serialization;
-using Bit.Core.Entities;
-using Bit.Core.Tokens;
-
-namespace Bit.Core.Auth.Models.Business.Tokenables;
-
-public class WebAuthnLoginTokenable : ExpiringTokenable
-{
- private const double _tokenLifetimeInHours = (double)1 / 60; // 1 minute
- public const string ClearTextPrefix = "BWWebAuthnLogin_";
- public const string DataProtectorPurpose = "WebAuthnLoginDataProtector";
- public const string TokenIdentifier = "WebAuthnLoginToken";
-
- public string Identifier { get; set; } = TokenIdentifier;
- public Guid Id { get; set; }
- public string Email { get; set; }
-
- [JsonConstructor]
- public WebAuthnLoginTokenable()
- {
- ExpirationDate = DateTime.UtcNow.AddHours(_tokenLifetimeInHours);
- }
-
- public WebAuthnLoginTokenable(User user) : this()
- {
- Id = user?.Id ?? default;
- Email = user?.Email;
- }
-
- public bool TokenIsValid(User user)
- {
- if (Id == default || Email == default || user == null)
- {
- return false;
- }
-
- return Id == user.Id &&
- Email.Equals(user.Email, StringComparison.InvariantCultureIgnoreCase);
- }
-
- // Validates deserialized
- protected override bool TokenIsValid() => Identifier == TokenIdentifier && Id != default && !string.IsNullOrWhiteSpace(Email);
-}
diff --git a/src/Core/Auth/Models/Data/RotateUserKeyData.cs b/src/Core/Auth/Models/Data/RotateUserKeyData.cs
index ecd1bd6ddb..23b6beb710 100644
--- a/src/Core/Auth/Models/Data/RotateUserKeyData.cs
+++ b/src/Core/Auth/Models/Data/RotateUserKeyData.cs
@@ -7,7 +7,6 @@ namespace Bit.Core.Auth.Models.Data;
public class RotateUserKeyData
{
- public User User { get; set; }
public string MasterPasswordHash { get; set; }
public string Key { get; set; }
public string PrivateKey { get; set; }
diff --git a/src/Core/Auth/Repositories/IEmergencyAccessRepository.cs b/src/Core/Auth/Repositories/IEmergencyAccessRepository.cs
index 64e7cd872c..e22e934882 100644
--- a/src/Core/Auth/Repositories/IEmergencyAccessRepository.cs
+++ b/src/Core/Auth/Repositories/IEmergencyAccessRepository.cs
@@ -1,5 +1,6 @@
using Bit.Core.Auth.Entities;
using Bit.Core.Auth.Models.Data;
+using Bit.Core.Auth.UserFeatures.UserKey;
namespace Bit.Core.Repositories;
@@ -11,4 +12,12 @@ public interface IEmergencyAccessRepository : IRepository
Task GetDetailsByIdGrantorIdAsync(Guid id, Guid grantorId);
Task> GetManyToNotifyAsync();
Task> GetExpiredRecoveriesAsync();
+
+ ///
+ /// Updates encrypted data for emergency access during a key rotation
+ ///
+ /// The grantor that initiated the key rotation
+ /// A list of emergency access with updated keys
+ UpdateEncryptedDataForKeyRotation UpdateForKeyRotation(Guid grantorId,
+ IEnumerable emergencyAccessKeys);
}
diff --git a/src/Core/Auth/Services/IEmergencyAccessService.cs b/src/Core/Auth/Services/IEmergencyAccessService.cs
index d8abedb37f..2c94632510 100644
--- a/src/Core/Auth/Services/IEmergencyAccessService.cs
+++ b/src/Core/Auth/Services/IEmergencyAccessService.cs
@@ -1,4 +1,5 @@
-using Bit.Core.Auth.Entities;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.Auth.Entities;
using Bit.Core.Auth.Enums;
using Bit.Core.Auth.Models.Data;
using Bit.Core.Entities;
diff --git a/src/Core/Auth/Services/ISsoConfigService.cs b/src/Core/Auth/Services/ISsoConfigService.cs
index 1f1ec55fda..6cad992ddd 100644
--- a/src/Core/Auth/Services/ISsoConfigService.cs
+++ b/src/Core/Auth/Services/ISsoConfigService.cs
@@ -1,5 +1,5 @@
-using Bit.Core.Auth.Entities;
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.Auth.Entities;
namespace Bit.Core.Auth.Services;
diff --git a/src/Core/Auth/Services/Implementations/EmergencyAccessService.cs b/src/Core/Auth/Services/Implementations/EmergencyAccessService.cs
index c992bb9f13..34c0e8e0e3 100644
--- a/src/Core/Auth/Services/Implementations/EmergencyAccessService.cs
+++ b/src/Core/Auth/Services/Implementations/EmergencyAccessService.cs
@@ -1,8 +1,11 @@
-using Bit.Core.Auth.Entities;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.AdminConsole.Repositories;
+using Bit.Core.Auth.Entities;
using Bit.Core.Auth.Enums;
using Bit.Core.Auth.Models;
using Bit.Core.Auth.Models.Business.Tokenables;
using Bit.Core.Auth.Models.Data;
+using Bit.Core.Context;
using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Exceptions;
@@ -31,6 +34,11 @@ public class EmergencyAccessService : IEmergencyAccessService
private readonly IPasswordHasher _passwordHasher;
private readonly IOrganizationService _organizationService;
private readonly IDataProtectorTokenFactory _dataProtectorTokenizer;
+ private readonly ICurrentContext _currentContext;
+ private readonly IFeatureService _featureService;
+
+ private bool UseFlexibleCollections =>
+ _featureService.IsEnabled(FeatureFlagKeys.FlexibleCollections, _currentContext);
public EmergencyAccessService(
IEmergencyAccessRepository emergencyAccessRepository,
@@ -44,7 +52,9 @@ public class EmergencyAccessService : IEmergencyAccessService
IPasswordHasher passwordHasher,
GlobalSettings globalSettings,
IOrganizationService organizationService,
- IDataProtectorTokenFactory dataProtectorTokenizer)
+ IDataProtectorTokenFactory dataProtectorTokenizer,
+ ICurrentContext currentContext,
+ IFeatureService featureService)
{
_emergencyAccessRepository = emergencyAccessRepository;
_organizationUserRepository = organizationUserRepository;
@@ -58,6 +68,8 @@ public class EmergencyAccessService : IEmergencyAccessService
_globalSettings = globalSettings;
_organizationService = organizationService;
_dataProtectorTokenizer = dataProtectorTokenizer;
+ _currentContext = currentContext;
+ _featureService = featureService;
}
public async Task InviteAsync(User invitingUser, string email, EmergencyAccessType type, int waitTime)
@@ -385,7 +397,7 @@ public class EmergencyAccessService : IEmergencyAccessService
throw new BadRequestException("Emergency Access not valid.");
}
- var ciphers = await _cipherRepository.GetManyByUserIdAsync(emergencyAccess.GrantorId, false);
+ var ciphers = await _cipherRepository.GetManyByUserIdAsync(emergencyAccess.GrantorId, useFlexibleCollections: UseFlexibleCollections, withOrganizations: false);
return new EmergencyAccessViewData
{
@@ -403,7 +415,7 @@ public class EmergencyAccessService : IEmergencyAccessService
throw new BadRequestException("Emergency Access not valid.");
}
- var cipher = await _cipherRepository.GetByIdAsync(cipherId, emergencyAccess.GrantorId);
+ var cipher = await _cipherRepository.GetByIdAsync(cipherId, emergencyAccess.GrantorId, UseFlexibleCollections);
return await _cipherService.GetAttachmentDownloadDataAsync(cipher, attachmentId);
}
diff --git a/src/Core/Auth/Services/Implementations/SsoConfigService.cs b/src/Core/Auth/Services/Implementations/SsoConfigService.cs
index a7e4784f49..62c8284953 100644
--- a/src/Core/Auth/Services/Implementations/SsoConfigService.cs
+++ b/src/Core/Auth/Services/Implementations/SsoConfigService.cs
@@ -1,10 +1,13 @@
-using Bit.Core.Auth.Entities;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.AdminConsole.Enums;
+using Bit.Core.AdminConsole.Models.Data.Organizations.Policies;
+using Bit.Core.AdminConsole.Repositories;
+using Bit.Core.AdminConsole.Services;
+using Bit.Core.Auth.Entities;
using Bit.Core.Auth.Enums;
using Bit.Core.Auth.Repositories;
-using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Exceptions;
-using Bit.Core.Models.Data.Organizations.Policies;
using Bit.Core.Repositories;
using Bit.Core.Services;
diff --git a/src/Core/Auth/UserFeatures/UserKey/IRotateUserKeyCommand.cs b/src/Core/Auth/UserFeatures/UserKey/IRotateUserKeyCommand.cs
index 28632758fd..4ba59ca487 100644
--- a/src/Core/Auth/UserFeatures/UserKey/IRotateUserKeyCommand.cs
+++ b/src/Core/Auth/UserFeatures/UserKey/IRotateUserKeyCommand.cs
@@ -1,4 +1,5 @@
using Bit.Core.Auth.Models.Data;
+using Bit.Core.Entities;
using Microsoft.AspNetCore.Identity;
using Microsoft.Data.SqlClient;
@@ -12,7 +13,14 @@ public interface IRotateUserKeyCommand
/// All necessary information for rotation. Warning: Any encrypted data not included will be lost.
/// An IdentityResult for verification of the master password hash
/// User must be provided.
- Task RotateUserKeyAsync(RotateUserKeyData model);
+ Task RotateUserKeyAsync(User user, RotateUserKeyData model);
}
-public delegate Task UpdateEncryptedDataForKeyRotation(SqlTransaction transaction = null);
+///
+/// A type used to implement updates to the database for key rotations. Each domain that requires an update of encrypted
+/// data during a key rotation should use this to implement its own database call. The user repository loops through
+/// these during a key rotation.
+/// Note: connection and transaction are only used for Dapper. They won't be available in EF
+///
+public delegate Task UpdateEncryptedDataForKeyRotation(SqlConnection connection = null,
+ SqlTransaction transaction = null);
diff --git a/src/Core/Auth/UserFeatures/UserKey/Implementations/RotateUserKeyCommand.cs b/src/Core/Auth/UserFeatures/UserKey/Implementations/RotateUserKeyCommand.cs
index 5eb57d62ee..34b29a246b 100644
--- a/src/Core/Auth/UserFeatures/UserKey/Implementations/RotateUserKeyCommand.cs
+++ b/src/Core/Auth/UserFeatures/UserKey/Implementations/RotateUserKeyCommand.cs
@@ -1,6 +1,8 @@
using Bit.Core.Auth.Models.Data;
+using Bit.Core.Entities;
using Bit.Core.Repositories;
using Bit.Core.Services;
+using Bit.Core.Vault.Repositories;
using Microsoft.AspNetCore.Identity;
namespace Bit.Core.Auth.UserFeatures.UserKey.Implementations;
@@ -9,53 +11,73 @@ public class RotateUserKeyCommand : IRotateUserKeyCommand
{
private readonly IUserService _userService;
private readonly IUserRepository _userRepository;
+ private readonly ICipherRepository _cipherRepository;
+ private readonly IFolderRepository _folderRepository;
+ private readonly IEmergencyAccessRepository _emergencyAccessRepository;
private readonly IPushNotificationService _pushService;
private readonly IdentityErrorDescriber _identityErrorDescriber;
public RotateUserKeyCommand(IUserService userService, IUserRepository userRepository,
+ ICipherRepository cipherRepository, IFolderRepository folderRepository,
+ IEmergencyAccessRepository emergencyAccessRepository,
IPushNotificationService pushService, IdentityErrorDescriber errors)
{
_userService = userService;
_userRepository = userRepository;
+ _cipherRepository = cipherRepository;
+ _folderRepository = folderRepository;
+ _emergencyAccessRepository = emergencyAccessRepository;
_pushService = pushService;
_identityErrorDescriber = errors;
}
///
- public async Task RotateUserKeyAsync(RotateUserKeyData model)
+ public async Task RotateUserKeyAsync(User user, RotateUserKeyData model)
{
- if (model.User == null)
+ if (user == null)
{
- throw new ArgumentNullException(nameof(model.User));
+ throw new ArgumentNullException(nameof(user));
}
- if (!await _userService.CheckPasswordAsync(model.User, model.MasterPasswordHash))
+ if (!await _userService.CheckPasswordAsync(user, model.MasterPasswordHash))
{
return IdentityResult.Failed(_identityErrorDescriber.PasswordMismatch());
}
var now = DateTime.UtcNow;
- model.User.RevisionDate = model.User.AccountRevisionDate = now;
- model.User.LastKeyRotationDate = now;
- model.User.SecurityStamp = Guid.NewGuid().ToString();
- model.User.Key = model.Key;
- model.User.PrivateKey = model.PrivateKey;
+ user.RevisionDate = user.AccountRevisionDate = now;
+ user.LastKeyRotationDate = now;
+ user.SecurityStamp = Guid.NewGuid().ToString();
+ user.Key = model.Key;
+ user.PrivateKey = model.PrivateKey;
if (model.Ciphers.Any() || model.Folders.Any() || model.Sends.Any() || model.EmergencyAccessKeys.Any() ||
model.ResetPasswordKeys.Any())
{
List saveEncryptedDataActions = new();
- // if (model.Ciphers.Any())
- // {
- // saveEncryptedDataActions.Add(_cipherRepository.SaveRotatedData);
- // }
- await _userRepository.UpdateUserKeyAndEncryptedDataAsync(model.User, saveEncryptedDataActions);
+
+ if (model.Ciphers.Any())
+ {
+ saveEncryptedDataActions.Add(_cipherRepository.UpdateForKeyRotation(user.Id, model.Ciphers));
+ }
+
+ if (model.Folders.Any())
+ {
+ saveEncryptedDataActions.Add(_folderRepository.UpdateForKeyRotation(user.Id, model.Folders));
+ }
+ if (model.EmergencyAccessKeys.Any())
+ {
+ saveEncryptedDataActions.Add(
+ _emergencyAccessRepository.UpdateForKeyRotation(user.Id, model.EmergencyAccessKeys));
+ }
+
+ await _userRepository.UpdateUserKeyAndEncryptedDataAsync(user, saveEncryptedDataActions);
}
else
{
- await _userRepository.ReplaceAsync(model.User);
+ await _userRepository.ReplaceAsync(user);
}
- await _pushService.PushLogOutAsync(model.User.Id, excludeCurrentContextFromPush: true);
+ await _pushService.PushLogOutAsync(user.Id, excludeCurrentContextFromPush: true);
return IdentityResult.Success;
}
}
diff --git a/src/Core/Auth/Utilities/GuidUtilities.cs b/src/Core/Auth/Utilities/GuidUtilities.cs
new file mode 100644
index 0000000000..043e326b12
--- /dev/null
+++ b/src/Core/Auth/Utilities/GuidUtilities.cs
@@ -0,0 +1,19 @@
+namespace Bit.Core.Auth.Utilities;
+
+public static class GuidUtilities
+{
+ public static bool TryParseBytes(ReadOnlySpan bytes, out Guid guid)
+ {
+ try
+ {
+ guid = new Guid(bytes);
+ return true;
+ }
+ catch
+ {
+ guid = Guid.Empty;
+ return false;
+ }
+ }
+}
+
diff --git a/src/Core/Constants.cs b/src/Core/Constants.cs
index 208b431162..706d6858a6 100644
--- a/src/Core/Constants.cs
+++ b/src/Core/Constants.cs
@@ -26,18 +26,48 @@ public static class Constants
public const string CipherKeyEncryptionMinimumVersion = "2023.9.2";
///
- /// When you set the ProrationBehavior to create_prorations,
- /// Stripe will automatically create prorations for any changes made to the subscription,
- /// such as changing the plan, adding or removing quantities, or applying discounts.
+ /// Used by IdentityServer to identify our own provider.
///
- public const string CreateProrations = "create_prorations";
+ public const string IdentityProvider = "bitwarden";
+}
- ///
- /// When you set the ProrationBehavior to always_invoice,
- /// Stripe will always generate an invoice when a subscription update occurs,
- /// regardless of whether there is a proration or not.
- ///
- public const string AlwaysInvoice = "always_invoice";
+public static class AuthConstants
+{
+ public static readonly RangeConstant PBKDF2_ITERATIONS = new(600_000, 2_000_000, 600_000);
+
+ public static readonly RangeConstant ARGON2_ITERATIONS = new(2, 10, 3);
+ public static readonly RangeConstant ARGON2_MEMORY = new(15, 1024, 64);
+ public static readonly RangeConstant ARGON2_PARALLELISM = new(1, 16, 4);
+
+}
+
+public class RangeConstant
+{
+ public int Default { get; }
+ public int Min { get; }
+ public int Max { get; }
+
+ public RangeConstant(int min, int max, int defaultValue)
+ {
+ Default = defaultValue;
+ Min = min;
+ Max = max;
+
+ if (Min > Max)
+ {
+ throw new ArgumentOutOfRangeException($"{Min} is larger than {Max}.");
+ }
+
+ if (!InsideRange(defaultValue))
+ {
+ throw new ArgumentOutOfRangeException($"{Default} is outside allowed range of {Min}-{Max}.");
+ }
+ }
+
+ public bool InsideRange(int number)
+ {
+ return Min <= number && number <= Max;
+ }
}
public static class TokenPurposes
@@ -57,14 +87,14 @@ public static class FeatureFlagKeys
public const string PasswordlessLogin = "passwordless-login";
public const string TrustedDeviceEncryption = "trusted-device-encryption";
public const string Fido2VaultCredentials = "fido2-vault-credentials";
+ public const string VaultOnboarding = "vault-onboarding";
public const string AutofillV2 = "autofill-v2";
public const string BrowserFilelessImport = "browser-fileless-import";
public const string FlexibleCollections = "flexible-collections";
+ public const string FlexibleCollectionsV1 = "flexible-collections-v-1"; // v-1 is intentional
public const string BulkCollectionAccess = "bulk-collection-access";
public const string AutofillOverlay = "autofill-overlay";
public const string ItemShare = "item-share";
- public const string BillingPlansUpgrade = "billing-plans-upgrade";
- public const string BillingStarterPlan = "billing-starter-plan";
public const string KeyRotationImprovements = "key-rotation-improvements";
public static List GetAllKeys()
diff --git a/src/Core/Core.csproj b/src/Core/Core.csproj
index 9085e4c708..9a0384e2c8 100644
--- a/src/Core/Core.csproj
+++ b/src/Core/Core.csproj
@@ -30,8 +30,7 @@
-
-
+
@@ -48,17 +47,17 @@
-
-
+
+
-
+
-
+
diff --git a/src/Core/Enums/EventType.cs b/src/Core/Enums/EventType.cs
index f03ce71a52..af3673f10e 100644
--- a/src/Core/Enums/EventType.cs
+++ b/src/Core/Enums/EventType.cs
@@ -67,6 +67,7 @@ public enum EventType : int
Organization_EnabledKeyConnector = 1606,
Organization_DisabledKeyConnector = 1607,
Organization_SponsorshipsSynced = 1608,
+ Organization_CollectionManagement_Updated = 1609,
Policy_Updated = 1700,
diff --git a/src/Core/IdentityServer/ApiScopes.cs b/src/Core/IdentityServer/ApiScopes.cs
index ad2f242f73..6e3ce0d140 100644
--- a/src/Core/IdentityServer/ApiScopes.cs
+++ b/src/Core/IdentityServer/ApiScopes.cs
@@ -1,4 +1,4 @@
-using IdentityServer4.Models;
+using Duende.IdentityServer.Models;
namespace Bit.Core.IdentityServer;
diff --git a/src/Core/IdentityServer/ConfigureOpenIdConnectDistributedOptions.cs b/src/Core/IdentityServer/ConfigureOpenIdConnectDistributedOptions.cs
index 084f98a275..476159b760 100644
--- a/src/Core/IdentityServer/ConfigureOpenIdConnectDistributedOptions.cs
+++ b/src/Core/IdentityServer/ConfigureOpenIdConnectDistributedOptions.cs
@@ -1,5 +1,5 @@
using Bit.Core.Settings;
-using IdentityServer4.Configuration;
+using Duende.IdentityServer.Configuration;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Caching.StackExchangeRedis;
diff --git a/src/Core/Models/Api/Response/MasterPasswordPolicyResponseModel.cs b/src/Core/Models/Api/Response/MasterPasswordPolicyResponseModel.cs
index 6a2753e769..0f45bc8e86 100644
--- a/src/Core/Models/Api/Response/MasterPasswordPolicyResponseModel.cs
+++ b/src/Core/Models/Api/Response/MasterPasswordPolicyResponseModel.cs
@@ -1,4 +1,4 @@
-using Bit.Core.Models.Data.Organizations.Policies;
+using Bit.Core.AdminConsole.Models.Data.Organizations.Policies;
namespace Bit.Core.Models.Api.Response;
diff --git a/src/Core/Models/Business/InvoicePreviewResult.cs b/src/Core/Models/Business/InvoicePreviewResult.cs
deleted file mode 100644
index d9e211cfb2..0000000000
--- a/src/Core/Models/Business/InvoicePreviewResult.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace Bit.Core.Models.Business;
-
-public class InvoicePreviewResult
-{
- public bool IsInvoicedNow { get; set; }
- public string PaymentIntentClientSecret { get; set; }
-}
diff --git a/src/Core/Models/Business/OrganizationLicense.cs b/src/Core/Models/Business/OrganizationLicense.cs
index c9d6724184..73605bd9b0 100644
--- a/src/Core/Models/Business/OrganizationLicense.cs
+++ b/src/Core/Models/Business/OrganizationLicense.cs
@@ -3,7 +3,7 @@ using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Text.Json.Serialization;
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.Enums;
using Bit.Core.Services;
using Bit.Core.Settings;
@@ -13,12 +13,13 @@ namespace Bit.Core.Models.Business;
public class OrganizationLicense : ILicense
{
public OrganizationLicense()
- { }
+ {
+ }
public OrganizationLicense(Organization org, SubscriptionInfo subscriptionInfo, Guid installationId,
ILicensingService licenseService, int? version = null)
{
- Version = version.GetValueOrDefault(CURRENT_LICENSE_FILE_VERSION); // TODO: Remember to change the constant
+ Version = version.GetValueOrDefault(CurrentLicenseFileVersion); // TODO: Remember to change the constant
LicenseType = Enums.LicenseType.Organization;
LicenseKey = org.LicenseKey;
InstallationId = installationId;
@@ -66,7 +67,7 @@ public class OrganizationLicense : ILicense
}
}
else if (subscriptionInfo.Subscription.TrialEndDate.HasValue &&
- subscriptionInfo.Subscription.TrialEndDate.Value > DateTime.UtcNow)
+ subscriptionInfo.Subscription.TrialEndDate.Value > DateTime.UtcNow)
{
Expires = Refresh = subscriptionInfo.Subscription.TrialEndDate.Value;
Trial = true;
@@ -79,10 +80,11 @@ public class OrganizationLicense : ILicense
Expires = Refresh = org.ExpirationDate.Value;
}
else if (subscriptionInfo?.Subscription?.PeriodDuration != null &&
- subscriptionInfo.Subscription.PeriodDuration > TimeSpan.FromDays(180))
+ subscriptionInfo.Subscription.PeriodDuration > TimeSpan.FromDays(180))
{
Refresh = DateTime.UtcNow.AddDays(30);
- Expires = subscriptionInfo.Subscription.PeriodEndDate?.AddDays(Constants.OrganizationSelfHostSubscriptionGracePeriodDays);
+ Expires = subscriptionInfo.Subscription.PeriodEndDate?.AddDays(Constants
+ .OrganizationSelfHostSubscriptionGracePeriodDays);
ExpirationWithoutGracePeriod = subscriptionInfo.Subscription.PeriodEndDate;
}
else
@@ -137,15 +139,15 @@ public class OrganizationLicense : ILicense
public LicenseType? LicenseType { get; set; }
public string Hash { get; set; }
public string Signature { get; set; }
- [JsonIgnore]
- public byte[] SignatureBytes => Convert.FromBase64String(Signature);
+ [JsonIgnore] public byte[] SignatureBytes => Convert.FromBase64String(Signature);
///
/// Represents the current version of the license format. Should be updated whenever new fields are added.
///
/// Intentionally set one version behind to allow self hosted users some time to update before
/// getting out of date license errors
- private const int CURRENT_LICENSE_FILE_VERSION = 12;
+ public const int CurrentLicenseFileVersion = 12;
+
private bool ValidLicenseVersion
{
get => Version is >= 1 and <= 13;
@@ -235,14 +237,14 @@ public class OrganizationLicense : ILicense
if (InstallationId != globalSettings.Installation.Id || !SelfHost)
{
exception = "Invalid license. Make sure your license allows for on-premise " +
- "hosting of organizations and that the installation id matches your current installation.";
+ "hosting of organizations and that the installation id matches your current installation.";
return false;
}
if (LicenseType != null && LicenseType != Enums.LicenseType.Organization)
{
exception = "Premium licenses cannot be applied to an organization. "
- + "Upload this license from your personal account settings page.";
+ + "Upload this license from your personal account settings page.";
return false;
}
@@ -331,9 +333,9 @@ public class OrganizationLicense : ILicense
if (valid && Version >= 13)
{
valid = organization.UseSecretsManager == UseSecretsManager &&
- organization.UsePasswordManager == UsePasswordManager &&
- organization.SmSeats == SmSeats &&
- organization.SmServiceAccounts == SmServiceAccounts;
+ organization.UsePasswordManager == UsePasswordManager &&
+ organization.SmSeats == SmSeats &&
+ organization.SmServiceAccounts == SmServiceAccounts;
}
return valid;
diff --git a/src/Core/Models/Business/PendingInoviceItems.cs b/src/Core/Models/Business/PendingInoviceItems.cs
deleted file mode 100644
index 1aee15a3aa..0000000000
--- a/src/Core/Models/Business/PendingInoviceItems.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-using Stripe;
-
-namespace Bit.Core.Models.Business;
-
-public class PendingInoviceItems
-{
- public IEnumerable PendingInvoiceItems { get; set; }
- public IDictionary PendingInvoiceItemsDict { get; set; }
-}
diff --git a/src/Core/Models/Business/SeatSubscriptionUpdate.cs b/src/Core/Models/Business/SeatSubscriptionUpdate.cs
index 8b4c613d61..c5ea1a7474 100644
--- a/src/Core/Models/Business/SeatSubscriptionUpdate.cs
+++ b/src/Core/Models/Business/SeatSubscriptionUpdate.cs
@@ -1,4 +1,4 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
using Stripe;
namespace Bit.Core.Models.Business;
diff --git a/src/Core/Models/Business/SecretsManagerSubscribeUpdate.cs b/src/Core/Models/Business/SecretsManagerSubscribeUpdate.cs
index 54bc8cb95e..857c98fb8e 100644
--- a/src/Core/Models/Business/SecretsManagerSubscribeUpdate.cs
+++ b/src/Core/Models/Business/SecretsManagerSubscribeUpdate.cs
@@ -1,4 +1,4 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
using Stripe;
namespace Bit.Core.Models.Business;
@@ -44,7 +44,7 @@ public class SecretsManagerSubscribeUpdate : SubscriptionUpdate
{
updatedItems.Add(new SubscriptionItemOptions
{
- Plan = _plan.SecretsManager.StripeSeatPlanId,
+ Price = _plan.SecretsManager.StripeSeatPlanId,
Quantity = _additionalSeats
});
}
@@ -53,7 +53,7 @@ public class SecretsManagerSubscribeUpdate : SubscriptionUpdate
{
updatedItems.Add(new SubscriptionItemOptions
{
- Plan = _plan.SecretsManager.StripeServiceAccountPlanId,
+ Price = _plan.SecretsManager.StripeServiceAccountPlanId,
Quantity = _additionalServiceAccounts
});
}
@@ -63,14 +63,14 @@ public class SecretsManagerSubscribeUpdate : SubscriptionUpdate
{
updatedItems.Add(new SubscriptionItemOptions
{
- Plan = _plan.SecretsManager.StripeSeatPlanId,
+ Price = _plan.SecretsManager.StripeSeatPlanId,
Quantity = _previousSeats,
Deleted = _previousSeats == 0 ? true : (bool?)null,
});
updatedItems.Add(new SubscriptionItemOptions
{
- Plan = _plan.SecretsManager.StripeServiceAccountPlanId,
+ Price = _plan.SecretsManager.StripeServiceAccountPlanId,
Quantity = _previousServiceAccounts,
Deleted = _previousServiceAccounts == 0 ? true : (bool?)null,
});
diff --git a/src/Core/Models/Business/SecretsManagerSubscriptionUpdate.cs b/src/Core/Models/Business/SecretsManagerSubscriptionUpdate.cs
index 3787470588..e731377b7b 100644
--- a/src/Core/Models/Business/SecretsManagerSubscriptionUpdate.cs
+++ b/src/Core/Models/Business/SecretsManagerSubscriptionUpdate.cs
@@ -1,4 +1,4 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.Exceptions;
using Bit.Core.Models.StaticStore;
diff --git a/src/Core/Models/Business/ServiceAccountSubscriptionUpdate.cs b/src/Core/Models/Business/ServiceAccountSubscriptionUpdate.cs
index b49c9cd6c5..c93212eac8 100644
--- a/src/Core/Models/Business/ServiceAccountSubscriptionUpdate.cs
+++ b/src/Core/Models/Business/ServiceAccountSubscriptionUpdate.cs
@@ -1,4 +1,4 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
using Stripe;
namespace Bit.Core.Models.Business;
diff --git a/src/Core/Models/Business/SmSeatSubscriptionUpdate.cs b/src/Core/Models/Business/SmSeatSubscriptionUpdate.cs
index ddc126a261..ff6bb55011 100644
--- a/src/Core/Models/Business/SmSeatSubscriptionUpdate.cs
+++ b/src/Core/Models/Business/SmSeatSubscriptionUpdate.cs
@@ -1,4 +1,4 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
using Stripe;
namespace Bit.Core.Models.Business;
diff --git a/src/Core/Models/Business/SubscriptionCreateOptions.cs b/src/Core/Models/Business/SubscriptionCreateOptions.cs
index 17faef40a4..64626780ef 100644
--- a/src/Core/Models/Business/SubscriptionCreateOptions.cs
+++ b/src/Core/Models/Business/SubscriptionCreateOptions.cs
@@ -1,4 +1,4 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
using Stripe;
using Plan = Bit.Core.Models.StaticStore.Plan;
diff --git a/src/Core/Models/Data/Organizations/Policies/IPolicyDataModel.cs b/src/Core/Models/Data/Organizations/Policies/IPolicyDataModel.cs
deleted file mode 100644
index ef8789d483..0000000000
--- a/src/Core/Models/Data/Organizations/Policies/IPolicyDataModel.cs
+++ /dev/null
@@ -1,5 +0,0 @@
-namespace Bit.Core.Models.Data.Organizations.Policies;
-
-public interface IPolicyDataModel
-{
-}
diff --git a/src/Core/Models/StaticStore/Plan.cs b/src/Core/Models/StaticStore/Plan.cs
index c381215f38..4f8b0435ff 100644
--- a/src/Core/Models/StaticStore/Plan.cs
+++ b/src/Core/Models/StaticStore/Plan.cs
@@ -28,7 +28,7 @@ public abstract record Plan
public bool HasCustomPermissions { get; protected init; }
public int UpgradeSortOrder { get; protected init; }
public int DisplaySortOrder { get; protected init; }
- public int? LegacyYear { get; set; }
+ public int? LegacyYear { get; protected init; }
public bool Disabled { get; protected init; }
public PasswordManagerPlanFeatures PasswordManager { get; protected init; }
public SecretsManagerPlanFeatures SecretsManager { get; protected init; }
diff --git a/src/Core/Models/StaticStore/Plans/Families2019Plan.cs b/src/Core/Models/StaticStore/Plans/Families2019Plan.cs
index 4bc9abc1f3..14ddb3405b 100644
--- a/src/Core/Models/StaticStore/Plans/Families2019Plan.cs
+++ b/src/Core/Models/StaticStore/Plans/Families2019Plan.cs
@@ -17,7 +17,6 @@ public record Families2019Plan : Models.StaticStore.Plan
HasSelfHost = true;
HasTotp = true;
- UsersGetPremium = true;
UpgradeSortOrder = 1;
DisplaySortOrder = 1;
diff --git a/src/Core/OrganizationFeatures/OrganizationLicenses/Cloud/CloudGetOrganizationLicenseQuery.cs b/src/Core/OrganizationFeatures/OrganizationLicenses/Cloud/CloudGetOrganizationLicenseQuery.cs
index a8d3a1638f..b8fad451e2 100644
--- a/src/Core/OrganizationFeatures/OrganizationLicenses/Cloud/CloudGetOrganizationLicenseQuery.cs
+++ b/src/Core/OrganizationFeatures/OrganizationLicenses/Cloud/CloudGetOrganizationLicenseQuery.cs
@@ -1,4 +1,4 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.Exceptions;
using Bit.Core.Models.Business;
using Bit.Core.OrganizationFeatures.OrganizationLicenses.Interfaces;
diff --git a/src/Core/OrganizationFeatures/OrganizationLicenses/Interfaces/IGetOrganizationLicenseQuery.cs b/src/Core/OrganizationFeatures/OrganizationLicenses/Interfaces/IGetOrganizationLicenseQuery.cs
index 2c66833e63..312b80a466 100644
--- a/src/Core/OrganizationFeatures/OrganizationLicenses/Interfaces/IGetOrganizationLicenseQuery.cs
+++ b/src/Core/OrganizationFeatures/OrganizationLicenses/Interfaces/IGetOrganizationLicenseQuery.cs
@@ -1,4 +1,5 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.Entities;
using Bit.Core.Models.Business;
namespace Bit.Core.OrganizationFeatures.OrganizationLicenses.Interfaces;
diff --git a/src/Core/OrganizationFeatures/OrganizationLicenses/Interfaces/IUpdateOrganizationLicenseCommand.cs b/src/Core/OrganizationFeatures/OrganizationLicenses/Interfaces/IUpdateOrganizationLicenseCommand.cs
index 2ba82c1c62..78f590e59f 100644
--- a/src/Core/OrganizationFeatures/OrganizationLicenses/Interfaces/IUpdateOrganizationLicenseCommand.cs
+++ b/src/Core/OrganizationFeatures/OrganizationLicenses/Interfaces/IUpdateOrganizationLicenseCommand.cs
@@ -1,6 +1,6 @@
#nullable enable
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.Models.Business;
using Bit.Core.Models.Data.Organizations;
diff --git a/src/Core/OrganizationFeatures/OrganizationLicenses/SelfHosted/SelfHostedGetOrganizationLicenseQuery.cs b/src/Core/OrganizationFeatures/OrganizationLicenses/SelfHosted/SelfHostedGetOrganizationLicenseQuery.cs
index 84ae0a27db..89ea53fc20 100644
--- a/src/Core/OrganizationFeatures/OrganizationLicenses/SelfHosted/SelfHostedGetOrganizationLicenseQuery.cs
+++ b/src/Core/OrganizationFeatures/OrganizationLicenses/SelfHosted/SelfHostedGetOrganizationLicenseQuery.cs
@@ -1,4 +1,5 @@
-using Bit.Core.Context;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.Context;
using Bit.Core.Entities;
using Bit.Core.Exceptions;
using Bit.Core.Models.Api.OrganizationLicenses;
diff --git a/src/Core/OrganizationFeatures/OrganizationLicenses/UpdateOrganizationLicenseCommand.cs b/src/Core/OrganizationFeatures/OrganizationLicenses/UpdateOrganizationLicenseCommand.cs
index 583f521434..62c46460aa 100644
--- a/src/Core/OrganizationFeatures/OrganizationLicenses/UpdateOrganizationLicenseCommand.cs
+++ b/src/Core/OrganizationFeatures/OrganizationLicenses/UpdateOrganizationLicenseCommand.cs
@@ -1,7 +1,7 @@
#nullable enable
using System.Text.Json;
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.Exceptions;
using Bit.Core.Models.Business;
using Bit.Core.Models.Data.Organizations;
diff --git a/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Cloud/CloudSyncSponsorshipsCommand.cs b/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Cloud/CloudSyncSponsorshipsCommand.cs
index d0569278bb..29ff748772 100644
--- a/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Cloud/CloudSyncSponsorshipsCommand.cs
+++ b/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Cloud/CloudSyncSponsorshipsCommand.cs
@@ -1,4 +1,5 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Exceptions;
using Bit.Core.Models.Data.Organizations.OrganizationSponsorships;
diff --git a/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Cloud/SendSponsorshipOfferCommand.cs b/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Cloud/SendSponsorshipOfferCommand.cs
index 5f9a62d25f..0af62b10ff 100644
--- a/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Cloud/SendSponsorshipOfferCommand.cs
+++ b/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Cloud/SendSponsorshipOfferCommand.cs
@@ -1,4 +1,5 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Exceptions;
using Bit.Core.Models.Business.Tokenables;
diff --git a/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Cloud/SetUpSponsorshipCommand.cs b/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Cloud/SetUpSponsorshipCommand.cs
index 9230e7d13d..c43e64f69b 100644
--- a/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Cloud/SetUpSponsorshipCommand.cs
+++ b/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Cloud/SetUpSponsorshipCommand.cs
@@ -1,4 +1,5 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.Entities;
using Bit.Core.Exceptions;
using Bit.Core.OrganizationFeatures.OrganizationSponsorships.FamiliesForEnterprise.Interfaces;
using Bit.Core.Repositories;
diff --git a/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Cloud/ValidateSponsorshipCommand.cs b/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Cloud/ValidateSponsorshipCommand.cs
index 3f2d7af5eb..83a0249e80 100644
--- a/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Cloud/ValidateSponsorshipCommand.cs
+++ b/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Cloud/ValidateSponsorshipCommand.cs
@@ -1,4 +1,5 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.Entities;
using Bit.Core.OrganizationFeatures.OrganizationSponsorships.FamiliesForEnterprise.Interfaces;
using Bit.Core.Repositories;
using Bit.Core.Services;
diff --git a/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/CreateSponsorshipCommand.cs b/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/CreateSponsorshipCommand.cs
index 69e6c3232c..f6373c3dcb 100644
--- a/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/CreateSponsorshipCommand.cs
+++ b/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/CreateSponsorshipCommand.cs
@@ -1,4 +1,5 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Exceptions;
using Bit.Core.OrganizationFeatures.OrganizationSponsorships.FamiliesForEnterprise.Interfaces;
diff --git a/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Interfaces/ICreateSponsorshipCommand.cs b/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Interfaces/ICreateSponsorshipCommand.cs
index 1ba4b36628..8e3d055a79 100644
--- a/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Interfaces/ICreateSponsorshipCommand.cs
+++ b/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Interfaces/ICreateSponsorshipCommand.cs
@@ -1,4 +1,5 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.Entities;
using Bit.Core.Enums;
namespace Bit.Core.OrganizationFeatures.OrganizationSponsorships.FamiliesForEnterprise.Interfaces;
diff --git a/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Interfaces/ISendSponsorshipOfferCommand.cs b/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Interfaces/ISendSponsorshipOfferCommand.cs
index 9795ed00f2..2f7f2ba1f1 100644
--- a/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Interfaces/ISendSponsorshipOfferCommand.cs
+++ b/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Interfaces/ISendSponsorshipOfferCommand.cs
@@ -1,4 +1,5 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.Entities;
namespace Bit.Core.OrganizationFeatures.OrganizationSponsorships.FamiliesForEnterprise.Interfaces;
diff --git a/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Interfaces/ISetUpSponsorshipCommand.cs b/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Interfaces/ISetUpSponsorshipCommand.cs
index 4c57c90728..45976b82ea 100644
--- a/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Interfaces/ISetUpSponsorshipCommand.cs
+++ b/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Interfaces/ISetUpSponsorshipCommand.cs
@@ -1,4 +1,5 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.Entities;
namespace Bit.Core.OrganizationFeatures.OrganizationSponsorships.FamiliesForEnterprise.Interfaces;
diff --git a/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Interfaces/ISyncOrganizationSponsorshipsCommand.cs b/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Interfaces/ISyncOrganizationSponsorshipsCommand.cs
index 0b8bb6444d..a4351625a6 100644
--- a/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Interfaces/ISyncOrganizationSponsorshipsCommand.cs
+++ b/src/Core/OrganizationFeatures/OrganizationSponsorships/FamiliesForEnterprise/Interfaces/ISyncOrganizationSponsorshipsCommand.cs
@@ -1,4 +1,5 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.Entities;
using Bit.Core.Models.Data.Organizations.OrganizationSponsorships;
namespace Bit.Core.OrganizationFeatures.OrganizationSponsorships.FamiliesForEnterprise.Interfaces;
diff --git a/src/Core/OrganizationFeatures/OrganizationSubscriptions/AddSecretsManagerSubscriptionCommand.cs b/src/Core/OrganizationFeatures/OrganizationSubscriptions/AddSecretsManagerSubscriptionCommand.cs
index 951246bd25..4187bd7be5 100644
--- a/src/Core/OrganizationFeatures/OrganizationSubscriptions/AddSecretsManagerSubscriptionCommand.cs
+++ b/src/Core/OrganizationFeatures/OrganizationSubscriptions/AddSecretsManagerSubscriptionCommand.cs
@@ -1,6 +1,6 @@
-using Bit.Core.AdminConsole.Enums.Provider;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.AdminConsole.Repositories;
-using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Exceptions;
using Bit.Core.Models.Business;
diff --git a/src/Core/OrganizationFeatures/OrganizationSubscriptions/Interface/IAddSecretsManagerSubscriptionCommand.cs b/src/Core/OrganizationFeatures/OrganizationSubscriptions/Interface/IAddSecretsManagerSubscriptionCommand.cs
index 79adc740a5..7ae2bd92cb 100644
--- a/src/Core/OrganizationFeatures/OrganizationSubscriptions/Interface/IAddSecretsManagerSubscriptionCommand.cs
+++ b/src/Core/OrganizationFeatures/OrganizationSubscriptions/Interface/IAddSecretsManagerSubscriptionCommand.cs
@@ -1,4 +1,4 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
namespace Bit.Core.OrganizationFeatures.OrganizationSubscriptions.Interface;
diff --git a/src/Core/OrganizationFeatures/OrganizationSubscriptions/UpdateSecretsManagerSubscriptionCommand.cs b/src/Core/OrganizationFeatures/OrganizationSubscriptions/UpdateSecretsManagerSubscriptionCommand.cs
index ddfdee3f62..16c4682ad2 100644
--- a/src/Core/OrganizationFeatures/OrganizationSubscriptions/UpdateSecretsManagerSubscriptionCommand.cs
+++ b/src/Core/OrganizationFeatures/OrganizationSubscriptions/UpdateSecretsManagerSubscriptionCommand.cs
@@ -1,4 +1,4 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.Enums;
using Bit.Core.Exceptions;
using Bit.Core.Models.Business;
diff --git a/src/Core/OrganizationFeatures/OrganizationSubscriptions/UpgradeOrganizationPlanCommand.cs b/src/Core/OrganizationFeatures/OrganizationSubscriptions/UpgradeOrganizationPlanCommand.cs
index b9e3c74da7..08b33e6664 100644
--- a/src/Core/OrganizationFeatures/OrganizationSubscriptions/UpgradeOrganizationPlanCommand.cs
+++ b/src/Core/OrganizationFeatures/OrganizationSubscriptions/UpgradeOrganizationPlanCommand.cs
@@ -1,9 +1,10 @@
-using Bit.Core.AdminConsole.Models.OrganizationConnectionConfigs;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.AdminConsole.Enums;
+using Bit.Core.AdminConsole.Models.OrganizationConnectionConfigs;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Auth.Enums;
using Bit.Core.Auth.Repositories;
using Bit.Core.Context;
-using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Exceptions;
using Bit.Core.Models.Business;
diff --git a/src/Core/Repositories/ICollectionCipherRepository.cs b/src/Core/Repositories/ICollectionCipherRepository.cs
index 2721288100..5bf00c614b 100644
--- a/src/Core/Repositories/ICollectionCipherRepository.cs
+++ b/src/Core/Repositories/ICollectionCipherRepository.cs
@@ -4,11 +4,11 @@ namespace Bit.Core.Repositories;
public interface ICollectionCipherRepository
{
- Task> GetManyByUserIdAsync(Guid userId);
+ Task> GetManyByUserIdAsync(Guid userId, bool useFlexibleCollections);
Task> GetManyByOrganizationIdAsync(Guid organizationId);
- Task> GetManyByUserIdCipherIdAsync(Guid userId, Guid cipherId);
- Task UpdateCollectionsAsync(Guid cipherId, Guid userId, IEnumerable collectionIds);
+ Task> GetManyByUserIdCipherIdAsync(Guid userId, Guid cipherId, bool useFlexibleCollections);
+ Task UpdateCollectionsAsync(Guid cipherId, Guid userId, IEnumerable collectionIds, bool useFlexibleCollections);
Task UpdateCollectionsForAdminAsync(Guid cipherId, Guid organizationId, IEnumerable collectionIds);
Task UpdateCollectionsForCiphersAsync(IEnumerable cipherIds, Guid userId, Guid organizationId,
- IEnumerable collectionIds);
+ IEnumerable collectionIds, bool useFlexibleCollections);
}
diff --git a/src/Core/Services/IApplicationCacheService.cs b/src/Core/Services/IApplicationCacheService.cs
index 0537251af2..9c9b8ca550 100644
--- a/src/Core/Services/IApplicationCacheService.cs
+++ b/src/Core/Services/IApplicationCacheService.cs
@@ -1,6 +1,6 @@
-using Bit.Core.AdminConsole.Entities.Provider;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Models.Data.Provider;
-using Bit.Core.Entities;
using Bit.Core.Models.Data.Organizations;
namespace Bit.Core.Services;
diff --git a/src/Core/Services/ILicensingService.cs b/src/Core/Services/ILicensingService.cs
index bf3b5ee425..e92fa87fd6 100644
--- a/src/Core/Services/ILicensingService.cs
+++ b/src/Core/Services/ILicensingService.cs
@@ -1,4 +1,5 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.Entities;
using Bit.Core.Models.Business;
namespace Bit.Core.Services;
diff --git a/src/Core/Services/IMailService.cs b/src/Core/Services/IMailService.cs
index 1b673c9fae..2920175d06 100644
--- a/src/Core/Services/IMailService.cs
+++ b/src/Core/Services/IMailService.cs
@@ -1,4 +1,5 @@
-using Bit.Core.AdminConsole.Entities.Provider;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.Auth.Entities;
using Bit.Core.Auth.Models.Business;
using Bit.Core.Entities;
diff --git a/src/Core/Services/IPaymentService.cs b/src/Core/Services/IPaymentService.cs
index 82386a1cf2..2385155d3f 100644
--- a/src/Core/Services/IPaymentService.cs
+++ b/src/Core/Services/IPaymentService.cs
@@ -1,4 +1,5 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Models.Business;
using Bit.Core.Models.StaticStore;
diff --git a/src/Core/Services/IStripeAdapter.cs b/src/Core/Services/IStripeAdapter.cs
index f79cc1200e..60d14ffad8 100644
--- a/src/Core/Services/IStripeAdapter.cs
+++ b/src/Core/Services/IStripeAdapter.cs
@@ -1,5 +1,4 @@
using Bit.Core.Models.BitStripe;
-using Stripe;
namespace Bit.Core.Services;
@@ -15,11 +14,8 @@ public interface IStripeAdapter
Task SubscriptionUpdateAsync(string id, Stripe.SubscriptionUpdateOptions options = null);
Task SubscriptionCancelAsync(string Id, Stripe.SubscriptionCancelOptions options = null);
Task InvoiceUpcomingAsync(Stripe.UpcomingInvoiceOptions options);
- Task InvoiceCreateAsync(Stripe.InvoiceCreateOptions options);
- Task InvoiceItemCreateAsync(Stripe.InvoiceItemCreateOptions options);
Task InvoiceGetAsync(string id, Stripe.InvoiceGetOptions options);
Task> InvoiceListAsync(StripeInvoiceListOptions options);
- IEnumerable InvoiceItemListAsync(InvoiceItemListOptions options);
Task InvoiceUpdateAsync(string id, Stripe.InvoiceUpdateOptions options);
Task InvoiceFinalizeInvoiceAsync(string id, Stripe.InvoiceFinalizeOptions options);
Task InvoiceSendInvoiceAsync(string id, Stripe.InvoiceSendOptions options);
diff --git a/src/Core/Services/IUserService.cs b/src/Core/Services/IUserService.cs
index 14401548b2..c9ccef661f 100644
--- a/src/Core/Services/IUserService.cs
+++ b/src/Core/Services/IUserService.cs
@@ -1,4 +1,5 @@
using System.Security.Claims;
+using Bit.Core.Auth.Entities;
using Bit.Core.Auth.Enums;
using Bit.Core.Auth.Models;
using Bit.Core.Entities;
@@ -29,8 +30,8 @@ public interface IUserService
Task CompleteWebAuthRegistrationAsync(User user, int value, string name, AuthenticatorAttestationRawResponse attestationResponse);
Task StartWebAuthnLoginRegistrationAsync(User user);
Task CompleteWebAuthLoginRegistrationAsync(User user, string name, CredentialCreateOptions options, AuthenticatorAttestationRawResponse attestationResponse, bool supportsPrf, string encryptedUserKey = null, string encryptedPublicKey = null, string encryptedPrivateKey = null);
- Task StartWebAuthnLoginAssertionAsync(User user);
- Task CompleteWebAuthLoginAssertionAsync(AuthenticatorAssertionRawResponse assertionResponse, User user);
+ AssertionOptions StartWebAuthnLoginAssertion();
+ Task<(User, WebAuthnCredential)> CompleteWebAuthLoginAssertionAsync(AssertionOptions options, AuthenticatorAssertionRawResponse assertionResponse);
Task SendEmailVerificationAsync(User user);
Task ConfirmEmailAsync(User user, string token);
Task InitiateEmailChangeAsync(User user, string newEmail);
diff --git a/src/Core/Services/Implementations/HandlebarsMailService.cs b/src/Core/Services/Implementations/HandlebarsMailService.cs
index 0e55407da7..601fc292b8 100644
--- a/src/Core/Services/Implementations/HandlebarsMailService.cs
+++ b/src/Core/Services/Implementations/HandlebarsMailService.cs
@@ -1,5 +1,6 @@
using System.Net;
using System.Reflection;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.Auth.Entities;
using Bit.Core.Auth.Models.Business;
diff --git a/src/Core/Services/Implementations/InMemoryApplicationCacheService.cs b/src/Core/Services/Implementations/InMemoryApplicationCacheService.cs
index 140392ba2b..63db4a88b6 100644
--- a/src/Core/Services/Implementations/InMemoryApplicationCacheService.cs
+++ b/src/Core/Services/Implementations/InMemoryApplicationCacheService.cs
@@ -1,7 +1,7 @@
-using Bit.Core.AdminConsole.Entities.Provider;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Models.Data.Provider;
using Bit.Core.AdminConsole.Repositories;
-using Bit.Core.Entities;
using Bit.Core.Models.Data.Organizations;
using Bit.Core.Repositories;
diff --git a/src/Core/Services/Implementations/InMemoryServiceBusApplicationCacheService.cs b/src/Core/Services/Implementations/InMemoryServiceBusApplicationCacheService.cs
index e4ae033169..677a18bc21 100644
--- a/src/Core/Services/Implementations/InMemoryServiceBusApplicationCacheService.cs
+++ b/src/Core/Services/Implementations/InMemoryServiceBusApplicationCacheService.cs
@@ -1,6 +1,6 @@
using Azure.Messaging.ServiceBus;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.Repositories;
-using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Repositories;
using Bit.Core.Settings;
diff --git a/src/Core/Services/Implementations/LaunchDarklyFeatureService.cs b/src/Core/Services/Implementations/LaunchDarklyFeatureService.cs
index 1a43967b34..ad3d6e82ed 100644
--- a/src/Core/Services/Implementations/LaunchDarklyFeatureService.cs
+++ b/src/Core/Services/Implementations/LaunchDarklyFeatureService.cs
@@ -1,5 +1,6 @@
using Bit.Core.Context;
using Bit.Core.Settings;
+using Bit.Core.Utilities;
using LaunchDarkly.Logging;
using LaunchDarkly.Sdk.Server;
using LaunchDarkly.Sdk.Server.Integrations;
@@ -17,6 +18,16 @@ public class LaunchDarklyFeatureService : IFeatureService, IDisposable
var ldConfig = Configuration.Builder(globalSettings.LaunchDarkly?.SdkKey);
ldConfig.Logging(Components.Logging().Level(LogLevel.Error));
+ if (!string.IsNullOrEmpty(globalSettings.ProjectName))
+ {
+ ldConfig.ApplicationInfo(Components.ApplicationInfo()
+ .ApplicationId(globalSettings.ProjectName)
+ .ApplicationName(globalSettings.ProjectName)
+ .ApplicationVersion(AssemblyHelpers.GetGitHash() ?? $"v{AssemblyHelpers.GetVersion()}")
+ .ApplicationVersionName(AssemblyHelpers.GetVersion())
+ );
+ }
+
if (string.IsNullOrEmpty(globalSettings.LaunchDarkly?.SdkKey))
{
// support a file to load flag values
diff --git a/src/Core/Services/Implementations/LicensingService.cs b/src/Core/Services/Implementations/LicensingService.cs
index fc8cfe5737..f84e68c256 100644
--- a/src/Core/Services/Implementations/LicensingService.cs
+++ b/src/Core/Services/Implementations/LicensingService.cs
@@ -1,6 +1,7 @@
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Text.Json;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.Entities;
using Bit.Core.Models.Business;
using Bit.Core.Repositories;
diff --git a/src/Core/Services/Implementations/StripeAdapter.cs b/src/Core/Services/Implementations/StripeAdapter.cs
index 28dd35034c..747510d052 100644
--- a/src/Core/Services/Implementations/StripeAdapter.cs
+++ b/src/Core/Services/Implementations/StripeAdapter.cs
@@ -1,5 +1,4 @@
using Bit.Core.Models.BitStripe;
-using Stripe;
namespace Bit.Core.Services;
@@ -17,7 +16,6 @@ public class StripeAdapter : IStripeAdapter
private readonly Stripe.BankAccountService _bankAccountService;
private readonly Stripe.PriceService _priceService;
private readonly Stripe.TestHelpers.TestClockService _testClockService;
- private readonly Stripe.InvoiceItemService _invoiceItemService;
public StripeAdapter()
{
@@ -33,7 +31,6 @@ public class StripeAdapter : IStripeAdapter
_bankAccountService = new Stripe.BankAccountService();
_priceService = new Stripe.PriceService();
_testClockService = new Stripe.TestHelpers.TestClockService();
- _invoiceItemService = new Stripe.InvoiceItemService();
}
public Task CustomerCreateAsync(Stripe.CustomerCreateOptions options)
@@ -82,16 +79,6 @@ public class StripeAdapter : IStripeAdapter
return _invoiceService.UpcomingAsync(options);
}
- public Task InvoiceCreateAsync(Stripe.InvoiceCreateOptions options)
- {
- return _invoiceService.CreateAsync(options);
- }
-
- public Task InvoiceItemCreateAsync(Stripe.InvoiceItemCreateOptions options)
- {
- return _invoiceItemService.CreateAsync(options);
- }
-
public Task InvoiceGetAsync(string id, Stripe.InvoiceGetOptions options)
{
return _invoiceService.GetAsync(id, options);
@@ -116,11 +103,6 @@ public class StripeAdapter : IStripeAdapter
return invoices;
}
- public IEnumerable InvoiceItemListAsync(InvoiceItemListOptions options)
- {
- return _invoiceItemService.ListAutoPaging(options);
- }
-
public Task InvoiceUpdateAsync(string id, Stripe.InvoiceUpdateOptions options)
{
return _invoiceService.UpdateAsync(id, options);
diff --git a/src/Core/Services/Implementations/StripePaymentService.cs b/src/Core/Services/Implementations/StripePaymentService.cs
index 67de73a188..4de12c6afd 100644
--- a/src/Core/Services/Implementations/StripePaymentService.cs
+++ b/src/Core/Services/Implementations/StripePaymentService.cs
@@ -1,4 +1,5 @@
using Bit.Billing.Models;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Exceptions;
@@ -7,7 +8,6 @@ using Bit.Core.Models.Business;
using Bit.Core.Repositories;
using Bit.Core.Settings;
using Microsoft.Extensions.Logging;
-using Stripe;
using StaticStore = Bit.Core.Models.StaticStore;
using TaxRate = Bit.Core.Entities.TaxRate;
@@ -751,14 +751,16 @@ public class StripePaymentService : IPaymentService
prorationDate ??= DateTime.UtcNow;
var collectionMethod = sub.CollectionMethod;
var daysUntilDue = sub.DaysUntilDue;
+ var chargeNow = collectionMethod == "charge_automatically";
var updatedItemOptions = subscriptionUpdate.UpgradeItemsOptions(sub);
var subUpdateOptions = new Stripe.SubscriptionUpdateOptions
{
Items = updatedItemOptions,
- ProrationBehavior = Constants.CreateProrations,
+ ProrationBehavior = "always_invoice",
DaysUntilDue = daysUntilDue ?? 1,
- CollectionMethod = "send_invoice"
+ CollectionMethod = "send_invoice",
+ ProrationDate = prorationDate,
};
if (!subscriptionUpdate.UpdateNeeded(sub))
@@ -792,50 +794,66 @@ public class StripePaymentService : IPaymentService
string paymentIntentClientSecret = null;
try
{
- var subItemOptions = updatedItemOptions.Select(itemOption =>
- new Stripe.InvoiceSubscriptionItemOptions
- {
- Id = itemOption.Id,
- Plan = itemOption.Plan,
- Quantity = itemOption.Quantity,
- }).ToList();
-
- var reviewInvoiceResponse = await PreviewUpcomingInvoiceAndPayAsync(storableSubscriber, subItemOptions);
- paymentIntentClientSecret = reviewInvoiceResponse.PaymentIntentClientSecret;
-
var subResponse = await _stripeAdapter.SubscriptionUpdateAsync(sub.Id, subUpdateOptions);
- var invoice =
- await _stripeAdapter.InvoiceGetAsync(subResponse?.LatestInvoiceId, new Stripe.InvoiceGetOptions());
+
+ var invoice = await _stripeAdapter.InvoiceGetAsync(subResponse?.LatestInvoiceId, new Stripe.InvoiceGetOptions());
if (invoice == null)
{
throw new BadRequestException("Unable to locate draft invoice for subscription update.");
}
- }
- catch (Exception e)
- {
- // Need to revert the subscription
- await _stripeAdapter.SubscriptionUpdateAsync(sub.Id, new Stripe.SubscriptionUpdateOptions
+
+ if (invoice.AmountDue > 0 && updatedItemOptions.Any(i => i.Quantity > 0))
{
- Items = subscriptionUpdate.RevertItemsOptions(sub),
- // This proration behavior prevents a false "credit" from
- // being applied forward to the next month's invoice
- ProrationBehavior = "none",
- CollectionMethod = collectionMethod,
- DaysUntilDue = daysUntilDue,
- });
- throw;
+ try
+ {
+ if (chargeNow)
+ {
+ paymentIntentClientSecret = await PayInvoiceAfterSubscriptionChangeAsync(
+ storableSubscriber, invoice);
+ }
+ else
+ {
+ invoice = await _stripeAdapter.InvoiceFinalizeInvoiceAsync(subResponse.LatestInvoiceId, new Stripe.InvoiceFinalizeOptions
+ {
+ AutoAdvance = false,
+ });
+ await _stripeAdapter.InvoiceSendInvoiceAsync(invoice.Id, new Stripe.InvoiceSendOptions());
+ paymentIntentClientSecret = null;
+ }
+ }
+ catch
+ {
+ // Need to revert the subscription
+ await _stripeAdapter.SubscriptionUpdateAsync(sub.Id, new Stripe.SubscriptionUpdateOptions
+ {
+ Items = subscriptionUpdate.RevertItemsOptions(sub),
+ // This proration behavior prevents a false "credit" from
+ // being applied forward to the next month's invoice
+ ProrationBehavior = "none",
+ CollectionMethod = collectionMethod,
+ DaysUntilDue = daysUntilDue,
+ });
+ throw;
+ }
+ }
+ else if (!invoice.Paid)
+ {
+ // Pay invoice with no charge to customer this completes the invoice immediately without waiting the scheduled 1h
+ invoice = await _stripeAdapter.InvoicePayAsync(subResponse.LatestInvoiceId);
+ paymentIntentClientSecret = null;
+ }
+
}
finally
{
// Change back the subscription collection method and/or days until due
if (collectionMethod != "send_invoice" || daysUntilDue == null)
{
- await _stripeAdapter.SubscriptionUpdateAsync(sub.Id,
- new Stripe.SubscriptionUpdateOptions
- {
- CollectionMethod = collectionMethod,
- DaysUntilDue = daysUntilDue,
- });
+ await _stripeAdapter.SubscriptionUpdateAsync(sub.Id, new Stripe.SubscriptionUpdateOptions
+ {
+ CollectionMethod = collectionMethod,
+ DaysUntilDue = daysUntilDue,
+ });
}
}
@@ -918,7 +936,6 @@ public class StripePaymentService : IPaymentService
await _stripeAdapter.CustomerDeleteAsync(subscriber.GatewayCustomerId);
}
- //This method is no-longer is use because we return the dollar threshold feature on invoice will be generated. but we dont want to lose this implementation.
public async Task PayInvoiceAfterSubscriptionChangeAsync(ISubscriber subscriber, Stripe.Invoice invoice)
{
var customerOptions = new Stripe.CustomerGetOptions();
@@ -1088,310 +1105,6 @@ public class StripePaymentService : IPaymentService
return paymentIntentClientSecret;
}
- internal async Task PreviewUpcomingInvoiceAndPayAsync(ISubscriber subscriber,
- List subItemOptions, int prorateThreshold = 50000)
- {
- var customer = await CheckInAppPurchaseMethod(subscriber);
-
- string paymentIntentClientSecret = null;
-
- var pendingInvoiceItems = GetPendingInvoiceItems(subscriber);
-
- var upcomingPreview = await GetUpcomingInvoiceAsync(subscriber, subItemOptions);
-
- var itemsForInvoice = GetItemsForInvoice(subItemOptions, upcomingPreview, pendingInvoiceItems);
- var invoiceAmount = itemsForInvoice?.Sum(i => i.Amount) ?? 0;
- var invoiceNow = invoiceAmount >= prorateThreshold;
- if (invoiceNow)
- {
- await ProcessImmediateInvoiceAsync(subscriber, upcomingPreview, invoiceAmount, customer, itemsForInvoice, pendingInvoiceItems, paymentIntentClientSecret);
- }
-
- return new InvoicePreviewResult { IsInvoicedNow = invoiceNow, PaymentIntentClientSecret = paymentIntentClientSecret };
- }
-
- private async Task ProcessImmediateInvoiceAsync(ISubscriber subscriber, Invoice upcomingPreview, long invoiceAmount,
- Customer customer, IEnumerable itemsForInvoice, PendingInoviceItems pendingInvoiceItems,
- string paymentIntentClientSecret)
- {
- // Owes more than prorateThreshold on the next invoice.
- // Invoice them and pay now instead of waiting until the next billing cycle.
-
- string cardPaymentMethodId = null;
- var invoiceAmountDue = upcomingPreview.StartingBalance + invoiceAmount;
- cardPaymentMethodId = GetCardPaymentMethodId(invoiceAmountDue, customer, cardPaymentMethodId);
-
- Stripe.Invoice invoice = null;
- var createdInvoiceItems = new List();
- Braintree.Transaction braintreeTransaction = null;
-
- try
- {
- await CreateInvoiceItemsAsync(subscriber, itemsForInvoice, pendingInvoiceItems, createdInvoiceItems);
-
- invoice = await CreateInvoiceAsync(subscriber, cardPaymentMethodId);
-
- var invoicePayOptions = new Stripe.InvoicePayOptions();
- await CreateBrainTreeTransactionRequestAsync(subscriber, invoice, customer, invoicePayOptions,
- cardPaymentMethodId, braintreeTransaction);
-
- await InvoicePayAsync(invoicePayOptions, invoice, paymentIntentClientSecret);
- }
- catch (Exception e)
- {
- if (braintreeTransaction != null)
- {
- await _btGateway.Transaction.RefundAsync(braintreeTransaction.Id);
- }
-
- if (invoice != null)
- {
- if (invoice.Status == "paid")
- {
- // It's apparently paid, so we return without throwing an exception
- return new InvoicePreviewResult
- {
- IsInvoicedNow = false,
- PaymentIntentClientSecret = paymentIntentClientSecret
- };
- }
-
- await RestoreInvoiceItemsAsync(invoice, customer, pendingInvoiceItems.PendingInvoiceItems);
- }
- else
- {
- foreach (var ii in createdInvoiceItems)
- {
- await _stripeAdapter.InvoiceDeleteAsync(ii.Id);
- }
- }
-
- if (e is Stripe.StripeException strEx &&
- (strEx.StripeError?.Message?.Contains("cannot be used because it is not verified") ?? false))
- {
- throw new GatewayException("Bank account is not yet verified.");
- }
-
- throw;
- }
-
- return new InvoicePreviewResult
- {
- IsInvoicedNow = false,
- PaymentIntentClientSecret = paymentIntentClientSecret
- };
- }
-
- private static IEnumerable GetItemsForInvoice(List subItemOptions, Invoice upcomingPreview,
- PendingInoviceItems pendingInvoiceItems)
- {
- var itemsForInvoice = upcomingPreview.Lines?.Data?
- .Where(i => pendingInvoiceItems.PendingInvoiceItemsDict.ContainsKey(i.Id) ||
- (i.Plan.Id == subItemOptions[0]?.Plan && i.Proration));
- return itemsForInvoice;
- }
-
- private PendingInoviceItems GetPendingInvoiceItems(ISubscriber subscriber)
- {
- var pendingInvoiceItems = new PendingInoviceItems();
- var invoiceItems = _stripeAdapter.InvoiceItemListAsync(new Stripe.InvoiceItemListOptions
- {
- Customer = subscriber.GatewayCustomerId
- }).ToList().Where(i => i.InvoiceId == null);
- pendingInvoiceItems.PendingInvoiceItemsDict = invoiceItems.ToDictionary(pii => pii.Id);
- return pendingInvoiceItems;
- }
-
- private async Task CheckInAppPurchaseMethod(ISubscriber subscriber)
- {
- var customerOptions = GetCustomerPaymentOptions();
- var customer = await _stripeAdapter.CustomerGetAsync(subscriber.GatewayCustomerId, customerOptions);
- var usingInAppPaymentMethod = customer.Metadata.ContainsKey("appleReceipt");
- if (usingInAppPaymentMethod)
- {
- throw new BadRequestException("Cannot perform this action with in-app purchase payment method. " +
- "Contact support.");
- }
-
- return customer;
- }
-
- private string GetCardPaymentMethodId(long invoiceAmountDue, Customer customer, string cardPaymentMethodId)
- {
- try
- {
- if (invoiceAmountDue <= 0 || customer.Metadata.ContainsKey("btCustomerId")) return cardPaymentMethodId;
- var hasDefaultCardPaymentMethod = customer.InvoiceSettings?.DefaultPaymentMethod?.Type == "card";
- var hasDefaultValidSource = customer.DefaultSource != null &&
- (customer.DefaultSource is Stripe.Card ||
- customer.DefaultSource is Stripe.BankAccount);
- if (hasDefaultCardPaymentMethod || hasDefaultValidSource) return cardPaymentMethodId;
- cardPaymentMethodId = GetLatestCardPaymentMethod(customer.Id)?.Id;
- if (cardPaymentMethodId == null)
- {
- throw new BadRequestException("No payment method is available.");
- }
- }
- catch (Exception e)
- {
- throw new BadRequestException("No payment method is available.");
- }
-
-
- return cardPaymentMethodId;
- }
-
- private async Task GetUpcomingInvoiceAsync(ISubscriber subscriber, List subItemOptions)
- {
- var upcomingPreview = await _stripeAdapter.InvoiceUpcomingAsync(new Stripe.UpcomingInvoiceOptions
- {
- Customer = subscriber.GatewayCustomerId,
- Subscription = subscriber.GatewaySubscriptionId,
- SubscriptionItems = subItemOptions
- });
- return upcomingPreview;
- }
-
- private async Task RestoreInvoiceItemsAsync(Invoice invoice, Customer customer, IEnumerable pendingInvoiceItems)
- {
- invoice = await _stripeAdapter.InvoiceVoidInvoiceAsync(invoice.Id, new Stripe.InvoiceVoidOptions());
- if (invoice.StartingBalance != 0)
- {
- await _stripeAdapter.CustomerUpdateAsync(customer.Id,
- new Stripe.CustomerUpdateOptions { Balance = customer.Balance });
- }
-
- // Restore invoice items that were brought in
- foreach (var item in pendingInvoiceItems)
- {
- var i = new Stripe.InvoiceItemCreateOptions
- {
- Currency = item.Currency,
- Description = item.Description,
- Customer = item.CustomerId,
- Subscription = item.SubscriptionId,
- Discountable = item.Discountable,
- Metadata = item.Metadata,
- Quantity = item.Proration ? 1 : item.Quantity,
- UnitAmount = item.UnitAmount
- };
- await _stripeAdapter.InvoiceItemCreateAsync(i);
- }
- }
-
- private async Task InvoicePayAsync(InvoicePayOptions invoicePayOptions, Invoice invoice, string paymentIntentClientSecret)
- {
- try
- {
- await _stripeAdapter.InvoicePayAsync(invoice.Id, invoicePayOptions);
- }
- catch (Stripe.StripeException e)
- {
- if (e.HttpStatusCode == System.Net.HttpStatusCode.PaymentRequired &&
- e.StripeError?.Code == "invoice_payment_intent_requires_action")
- {
- // SCA required, get intent client secret
- var invoiceGetOptions = new Stripe.InvoiceGetOptions();
- invoiceGetOptions.AddExpand("payment_intent");
- invoice = await _stripeAdapter.InvoiceGetAsync(invoice.Id, invoiceGetOptions);
- paymentIntentClientSecret = invoice?.PaymentIntent?.ClientSecret;
- }
- else
- {
- throw new GatewayException("Unable to pay invoice.");
- }
- }
- }
-
- private async Task CreateBrainTreeTransactionRequestAsync(ISubscriber subscriber, Invoice invoice, Customer customer,
- InvoicePayOptions invoicePayOptions, string cardPaymentMethodId, Braintree.Transaction braintreeTransaction)
- {
- if (invoice.AmountDue > 0)
- {
- if (customer?.Metadata?.ContainsKey("btCustomerId") ?? false)
- {
- invoicePayOptions.PaidOutOfBand = true;
- var btInvoiceAmount = (invoice.AmountDue / 100M);
- var transactionResult = await _btGateway.Transaction.SaleAsync(
- new Braintree.TransactionRequest
- {
- Amount = btInvoiceAmount,
- CustomerId = customer.Metadata["btCustomerId"],
- Options = new Braintree.TransactionOptionsRequest
- {
- SubmitForSettlement = true,
- PayPal = new Braintree.TransactionOptionsPayPalRequest
- {
- CustomField = $"{subscriber.BraintreeIdField()}:{subscriber.Id}"
- }
- },
- CustomFields = new Dictionary
- {
- [subscriber.BraintreeIdField()] = subscriber.Id.ToString()
- }
- });
-
- if (!transactionResult.IsSuccess())
- {
- throw new GatewayException("Failed to charge PayPal customer.");
- }
-
- braintreeTransaction = transactionResult.Target;
- await _stripeAdapter.InvoiceUpdateAsync(invoice.Id, new Stripe.InvoiceUpdateOptions
- {
- Metadata = new Dictionary
- {
- ["btTransactionId"] = braintreeTransaction.Id,
- ["btPayPalTransactionId"] =
- braintreeTransaction.PayPalDetails.AuthorizationId
- }
- });
- }
- else
- {
- invoicePayOptions.OffSession = true;
- invoicePayOptions.PaymentMethod = cardPaymentMethodId;
- }
- }
- }
-
- private async Task CreateInvoiceAsync(ISubscriber subscriber, string cardPaymentMethodId)
- {
- Invoice invoice;
- invoice = await _stripeAdapter.InvoiceCreateAsync(new Stripe.InvoiceCreateOptions
- {
- CollectionMethod = "send_invoice",
- DaysUntilDue = 1,
- Customer = subscriber.GatewayCustomerId,
- Subscription = subscriber.GatewaySubscriptionId,
- DefaultPaymentMethod = cardPaymentMethodId
- });
- return invoice;
- }
-
- private async Task CreateInvoiceItemsAsync(ISubscriber subscriber, IEnumerable itemsForInvoice,
- PendingInoviceItems pendingInvoiceItems, List createdInvoiceItems)
- {
- foreach (var invoiceLineItem in itemsForInvoice)
- {
- if (pendingInvoiceItems.PendingInvoiceItemsDict.ContainsKey(invoiceLineItem.Id))
- {
- continue;
- }
-
- var invoiceItem = await _stripeAdapter.InvoiceItemCreateAsync(new Stripe.InvoiceItemCreateOptions
- {
- Currency = invoiceLineItem.Currency,
- Description = invoiceLineItem.Description,
- Customer = subscriber.GatewayCustomerId,
- Subscription = invoiceLineItem.Subscription,
- Discountable = invoiceLineItem.Discountable,
- Amount = invoiceLineItem.Amount
- });
- createdInvoiceItems.Add(invoiceItem);
- }
- }
-
public async Task CancelSubscriptionAsync(ISubscriber subscriber, bool endOfPeriod = false,
bool skipInAppPurchaseCheck = false)
{
diff --git a/src/Core/Services/Implementations/UserService.cs b/src/Core/Services/Implementations/UserService.cs
index 95ad5ac4c6..81ce697622 100644
--- a/src/Core/Services/Implementations/UserService.cs
+++ b/src/Core/Services/Implementations/UserService.cs
@@ -1,11 +1,14 @@
using System.Security.Claims;
using System.Text.Json;
+using Bit.Core.AdminConsole.Enums;
using Bit.Core.AdminConsole.Repositories;
+using Bit.Core.AdminConsole.Services;
using Bit.Core.Auth.Entities;
using Bit.Core.Auth.Enums;
using Bit.Core.Auth.Models;
using Bit.Core.Auth.Models.Business.Tokenables;
using Bit.Core.Auth.Repositories;
+using Bit.Core.Auth.Utilities;
using Bit.Core.Context;
using Bit.Core.Entities;
using Bit.Core.Enums;
@@ -61,9 +64,8 @@ public class UserService : UserManager, IUserService, IDisposable
private readonly IAcceptOrgUserCommand _acceptOrgUserCommand;
private readonly IProviderUserRepository _providerUserRepository;
private readonly IStripeSyncService _stripeSyncService;
- private readonly IWebAuthnCredentialRepository _webAuthnCredentialRepository;
- private readonly IDataProtectorTokenFactory _webAuthnLoginTokenizer;
private readonly IDataProtectorTokenFactory _orgUserInviteTokenDataFactory;
+ private readonly IWebAuthnCredentialRepository _webAuthnCredentialRepository;
public UserService(
IUserRepository userRepository,
@@ -96,8 +98,7 @@ public class UserService : UserManager, IUserService, IDisposable
IProviderUserRepository providerUserRepository,
IStripeSyncService stripeSyncService,
IDataProtectorTokenFactory orgUserInviteTokenDataFactory,
- IWebAuthnCredentialRepository webAuthnRepository,
- IDataProtectorTokenFactory webAuthnLoginTokenizer)
+ IWebAuthnCredentialRepository webAuthnRepository)
: base(
store,
optionsAccessor,
@@ -136,7 +137,6 @@ public class UserService : UserManager, IUserService, IDisposable
_stripeSyncService = stripeSyncService;
_orgUserInviteTokenDataFactory = orgUserInviteTokenDataFactory;
_webAuthnCredentialRepository = webAuthnRepository;
- _webAuthnLoginTokenizer = webAuthnLoginTokenizer;
}
public Guid? GetProperUserId(ClaimsPrincipal principal)
@@ -586,45 +586,33 @@ public class UserService : UserManager, IUserService, IDisposable
return true;
}
- public async Task StartWebAuthnLoginAssertionAsync(User user)
+ public AssertionOptions StartWebAuthnLoginAssertion()
{
- var provider = user.GetTwoFactorProvider(TwoFactorProviderType.WebAuthn);
- var existingKeys = await _webAuthnCredentialRepository.GetManyByUserIdAsync(user.Id);
- var existingCredentials = existingKeys
- .Select(k => new PublicKeyCredentialDescriptor(CoreHelpers.Base64UrlDecode(k.CredentialId)))
- .ToList();
-
- if (existingCredentials.Count == 0)
- {
- return null;
- }
-
- // TODO: PRF?
- var exts = new AuthenticationExtensionsClientInputs
- {
- UserVerificationMethod = true
- };
- var options = _fido2.GetAssertionOptions(existingCredentials, UserVerificationRequirement.Required, exts);
-
- // TODO: temp save options to user record somehow
-
- return options;
+ return _fido2.GetAssertionOptions(Enumerable.Empty(), UserVerificationRequirement.Required);
}
- public async Task CompleteWebAuthLoginAssertionAsync(AuthenticatorAssertionRawResponse assertionResponse, User user)
+ public async Task<(User, WebAuthnCredential)> CompleteWebAuthLoginAssertionAsync(AssertionOptions options, AuthenticatorAssertionRawResponse assertionResponse)
{
- // TODO: Get options from user record somehow, then clear them
- var options = AssertionOptions.FromJson("");
-
- var userCredentials = await _webAuthnCredentialRepository.GetManyByUserIdAsync(user.Id);
- var assertionId = CoreHelpers.Base64UrlEncode(assertionResponse.Id);
- var credential = userCredentials.FirstOrDefault(c => c.CredentialId == assertionId);
- if (credential == null)
+ if (!GuidUtilities.TryParseBytes(assertionResponse.Response.UserHandle, out var userId))
{
- return null;
+ throw new BadRequestException("Invalid credential.");
}
- // TODO: Callback to ensure credential ID is unique. Do we care? I don't think so.
+ var user = await _userRepository.GetByIdAsync(userId);
+ if (user == null)
+ {
+ throw new BadRequestException("Invalid credential.");
+ }
+
+ var userCredentials = await _webAuthnCredentialRepository.GetManyByUserIdAsync(user.Id);
+ var assertedCredentialId = CoreHelpers.Base64UrlEncode(assertionResponse.Id);
+ var credential = userCredentials.FirstOrDefault(c => c.CredentialId == assertedCredentialId);
+ if (credential == null)
+ {
+ throw new BadRequestException("Invalid credential.");
+ }
+
+ // Always return true, since we've already filtered the credentials after user id
IsUserHandleOwnerOfCredentialIdAsync callback = (args, cancellationToken) => Task.FromResult(true);
var credentialPublicKey = CoreHelpers.Base64UrlDecode(credential.PublicKey);
var assertionVerificationResult = await _fido2.MakeAssertionAsync(
@@ -634,15 +622,12 @@ public class UserService : UserManager, IUserService, IDisposable
credential.Counter = (int)assertionVerificationResult.Counter;
await _webAuthnCredentialRepository.ReplaceAsync(credential);
- if (assertionVerificationResult.Status == "ok")
+ if (assertionVerificationResult.Status != "ok")
{
- var token = _webAuthnLoginTokenizer.Protect(new WebAuthnLoginTokenable(user));
- return token;
- }
- else
- {
- return null;
+ throw new BadRequestException("Invalid credential.");
}
+
+ return (user, credential);
}
public async Task SendEmailVerificationAsync(User user)
diff --git a/src/Core/Services/NoopImplementations/NoopLicensingService.cs b/src/Core/Services/NoopImplementations/NoopLicensingService.cs
index c79be8009e..8eb42a318c 100644
--- a/src/Core/Services/NoopImplementations/NoopLicensingService.cs
+++ b/src/Core/Services/NoopImplementations/NoopLicensingService.cs
@@ -1,4 +1,5 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.Entities;
using Bit.Core.Models.Business;
using Bit.Core.Settings;
using Microsoft.AspNetCore.Hosting;
diff --git a/src/Core/Services/NoopImplementations/NoopMailService.cs b/src/Core/Services/NoopImplementations/NoopMailService.cs
index e098d7051e..e404346666 100644
--- a/src/Core/Services/NoopImplementations/NoopMailService.cs
+++ b/src/Core/Services/NoopImplementations/NoopMailService.cs
@@ -1,4 +1,5 @@
-using Bit.Core.AdminConsole.Entities.Provider;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.Auth.Entities;
using Bit.Core.Auth.Models.Business;
using Bit.Core.Entities;
diff --git a/src/Core/Settings/IGlobalSettings.cs b/src/Core/Settings/IGlobalSettings.cs
index 42fc54ef8d..56b004c31a 100644
--- a/src/Core/Settings/IGlobalSettings.cs
+++ b/src/Core/Settings/IGlobalSettings.cs
@@ -8,6 +8,7 @@ public interface IGlobalSettings
bool SelfHosted { get; set; }
bool UnifiedDeployment { get; set; }
string KnownProxies { get; set; }
+ string ProjectName { get; set; }
bool EnableCloudCommunication { get; set; }
string LicenseDirectory { get; set; }
string LicenseCertificatePassword { get; set; }
diff --git a/src/Core/Tools/Entities/IReferenceable.cs b/src/Core/Tools/Entities/IReferenceable.cs
index 39d473c657..4b38ec6ccc 100644
--- a/src/Core/Tools/Entities/IReferenceable.cs
+++ b/src/Core/Tools/Entities/IReferenceable.cs
@@ -1,8 +1,29 @@
-namespace Bit.Core.Tools.Entities;
+#nullable enable
+using Bit.Core.Tools.Models.Business;
+namespace Bit.Core.Tools.Entities;
+
+///
+/// An entity that can be referenced by a .
+///
public interface IReferenceable
{
+ ///
+ /// Identifies the entity that generated the event.
+ ///
Guid Id { get; set; }
- string ReferenceData { get; set; }
+
+ ///
+ /// Contextual information included in the event.
+ ///
+ ///
+ /// Do not store secrets in this field.
+ ///
+ string? ReferenceData { get; set; }
+
+ ///
+ /// Returns when the entity is a user.
+ /// Otherwise returns .
+ ///
bool IsUser();
}
diff --git a/src/Core/Tools/Entities/Send.cs b/src/Core/Tools/Entities/Send.cs
index ae30201e86..9f09ae6bde 100644
--- a/src/Core/Tools/Entities/Send.cs
+++ b/src/Core/Tools/Entities/Send.cs
@@ -1,29 +1,125 @@
-using System.ComponentModel.DataAnnotations;
+#nullable enable
+
+using System.ComponentModel.DataAnnotations;
using Bit.Core.Entities;
using Bit.Core.Tools.Enums;
using Bit.Core.Utilities;
namespace Bit.Core.Tools.Entities;
+///
+/// An end-to-end encrypted secret accessible to arbitrary
+/// entities through a fixed URI.
+///
public class Send : ITableObject
{
+ ///
+ /// Uniquely identifies this send.
+ ///
public Guid Id { get; set; }
+
+ ///
+ /// Identifies the user that created this send.
+ ///
public Guid? UserId { get; set; }
+
+ ///
+ /// Identifies the organization that created this send.
+ ///
+ ///
+ /// Not presently in-use by client applications.
+ ///
public Guid? OrganizationId { get; set; }
+
+ ///
+ /// Describes the data being sent. This field determines how
+ /// the field is interpreted.
+ ///
public SendType Type { get; set; }
- public string Data { get; set; }
- public string Key { get; set; }
+
+ ///
+ /// Stores data containing or pointing to the transmitted secret. JSON.
+ ///
+ ///
+ /// Must be nullable due to several database column configuration.
+ /// The application and all other databases assume this is not nullable.
+ /// Tech debt ticket: PM-4128
+ ///
+ public string? Data { get; set; }
+
+ ///
+ /// Stores the data's encryption key. Encrypted.
+ ///
+ ///
+ /// Must be nullable due to MySql database column configuration.
+ /// The application and all other databases assume this is not nullable.
+ /// Tech debt ticket: PM-4128
+ ///
+ public string? Key { get; set; }
+
+ ///
+ /// Password provided by the user. Protected with pbkdf2.
+ ///
[MaxLength(300)]
- public string Password { get; set; }
+ public string? Password { get; set; }
+
+ ///
+ /// The send becomes unavailable to API callers when
+ /// >= .
+ ///
public int? MaxAccessCount { get; set; }
+
+ ///
+ /// Number of times the content was accessed.
+ ///
+ ///
+ /// This value is owned by the server. Clients cannot alter it.
+ ///
public int AccessCount { get; set; }
+
+ ///
+ /// The date this send was created.
+ ///
public DateTime CreationDate { get; internal set; } = DateTime.UtcNow;
+
+ ///
+ /// The date this send was last modified.
+ ///
public DateTime RevisionDate { get; internal set; } = DateTime.UtcNow;
+
+ ///
+ /// The date this send becomes unavailable to API callers.
+ ///
public DateTime? ExpirationDate { get; set; }
+
+ ///
+ /// The date this send will be unconditionally deleted.
+ ///
+ ///
+ /// This is set by server-side when the user doesn't specify a deletion date.
+ ///
public DateTime DeletionDate { get; set; }
+
+ ///
+ /// When this is true the send is not available to API callers,
+ /// unless they're the creator.
+ ///
public bool Disabled { get; set; }
+
+ ///
+ /// Whether the creator's email address should be shown to the recipient.
+ ///
+ ///
+ /// indicates the email may be shown.
+ /// indicates the email should be hidden.
+ /// indicates the client doesn't set the field and
+ /// the email should be hidden.
+ ///
public bool? HideEmail { get; set; }
+ ///
+ /// Generates the send's
+ ///
public void SetNewId()
{
Id = CoreHelpers.GenerateComb();
diff --git a/src/Core/Tools/Models/Business/ReferenceEvent.cs b/src/Core/Tools/Models/Business/ReferenceEvent.cs
index 393708668a..ac21c92e44 100644
--- a/src/Core/Tools/Models/Business/ReferenceEvent.cs
+++ b/src/Core/Tools/Models/Business/ReferenceEvent.cs
@@ -1,4 +1,6 @@
-using System.Text.Json.Serialization;
+#nullable enable
+
+using System.Text.Json.Serialization;
using Bit.Core.Context;
using Bit.Core.Enums;
using Bit.Core.Tools.Entities;
@@ -6,10 +8,23 @@ using Bit.Core.Tools.Enums;
namespace Bit.Core.Tools.Models.Business;
+///
+/// Product support monitoring.
+///
+///
+/// Do not store secrets in this type.
+///
public class ReferenceEvent
{
+ ///
+ /// Instantiates a .
+ ///
public ReferenceEvent() { }
+ ///
+ /// Monitored event type.
+ /// Entity that created the event.
+ /// The conditions in which the event occurred.
public ReferenceEvent(ReferenceEventType type, IReferenceable source, ICurrentContext currentContext)
{
Type = type;
@@ -26,48 +41,197 @@ public class ReferenceEvent
}
}
+ ///
+ /// Monitored event type.
+ ///
[JsonConverter(typeof(JsonStringEnumConverter))]
public ReferenceEventType Type { get; set; }
+ ///
+ /// The kind of entity that created the event.
+ ///
[JsonConverter(typeof(JsonStringEnumConverter))]
public ReferenceEventSource Source { get; set; }
+ ///
public Guid Id { get; set; }
- public string ReferenceData { get; set; }
+ ///
+ public string? ReferenceData { get; set; }
+ ///
+ /// Moment the event occurred.
+ ///
public DateTime EventDate { get; set; } = DateTime.UtcNow;
+ ///
+ /// Number of users sent invitations by an organization.
+ ///
+ ///
+ /// Should contain a value only on events.
+ /// Otherwise the value should be .
+ ///
public int? Users { get; set; }
+ ///
+ /// Whether or not a subscription was canceled immediately or at the end of the billing period.
+ ///
+ ///
+ /// when a cancellation occurs immediately.
+ /// when a cancellation occurs at the end of a customer's billing period.
+ /// Should contain a value only on events.
+ /// Otherwise the value should be .
+ ///
public bool? EndOfPeriod { get; set; }
- public string PlanName { get; set; }
+ ///
+ /// Branded name of the subscription.
+ ///
+ ///
+ /// Should contain a value only for subscription management events.
+ /// Otherwise the value should be .
+ ///
+ public string? PlanName { get; set; }
+ ///
+ /// Identifies a subscription.
+ ///
+ ///
+ /// Should contain a value only for subscription management events.
+ /// Otherwise the value should be .
+ ///
public PlanType? PlanType { get; set; }
- public string OldPlanName { get; set; }
+ ///
+ /// The branded name of the prior plan.
+ ///
+ ///
+ /// Should contain a value only on events
+ /// initiated by organizations.
+ /// Otherwise the value should be .
+ ///
+ public string? OldPlanName { get; set; }
+ ///
+ /// Identifies the prior plan
+ ///
+ ///
+ /// Should contain a value only on events
+ /// initiated by organizations.
+ /// Otherwise the value should be .
+ ///
public PlanType? OldPlanType { get; set; }
+ ///
+ /// Seat count when a billable action occurs. When adjusting seats, contains
+ /// the new seat count.
+ ///
+ ///
+ /// Should contain a value only on ,
+ /// , ,
+ /// and events initiated by organizations.
+ /// Otherwise the value should be .
+ ///
public int? Seats { get; set; }
+
+ ///
+ /// Seat count when a seat adjustment occurs.
+ ///
+ ///
+ /// Should contain a value only on
+ /// events initiated by organizations.
+ /// Otherwise the value should be .
+ ///
public int? PreviousSeats { get; set; }
+ ///
+ /// Qty in GB of storage. When adjusting storage, contains the adjusted
+ /// storage qty. Otherwise contains the total storage quantity.
+ ///
+ ///
+ /// Should contain a value only on ,
+ /// , ,
+ /// and events.
+ /// Otherwise the value should be .
+ ///
public short? Storage { get; set; }
+ ///
+ /// The type of send created or accessed.
+ ///
+ ///
+ /// Should contain a value only on
+ /// and events.
+ /// Otherwise the value should be .
+ ///
[JsonConverter(typeof(JsonStringEnumConverter))]
public SendType? SendType { get; set; }
+ ///
+ /// Whether the send has private notes.
+ ///
+ ///
+ /// when the send has private notes, otherwise .
+ /// Should contain a value only on
+ /// and events.
+ /// Otherwise the value should be .
+ ///
public bool? SendHasNotes { get; set; }
+ ///
+ /// The send expires after its access count exceeds this value.
+ ///
+ ///
+ /// This field only contains a value when the send has a max access count
+ /// and is
+ /// or events.
+ /// Otherwise, the value should be .
+ ///
public int? MaxAccessCount { get; set; }
+ ///
+ /// Whether the created send has a password.
+ ///
+ ///
+ /// Should contain a value only on
+ /// and events.
+ /// Otherwise the value should be .
+ ///
public bool? HasPassword { get; set; }
- public string EventRaisedByUser { get; set; }
+ ///
+ /// The administrator that performed the action.
+ ///
+ ///
+ /// Should contain a value only on
+ /// and events.
+ /// Otherwise the value should be .
+ ///
+ public string? EventRaisedByUser { get; set; }
+ ///
+ /// Whether or not an organization's trial period was started by a sales person.
+ ///
+ ///
+ /// Should contain a value only on
+ /// and events.
+ /// Otherwise the value should be .
+ ///
public bool? SalesAssistedTrialStarted { get; set; }
- public string ClientId { get; set; }
- public Version ClientVersion { get; set; }
+ ///
+ /// The installation id of the application that originated the event.
+ ///
+ ///
+ /// when the event was not originated by an application.
+ ///
+ public string? ClientId { get; set; }
+
+ ///
+ /// The version of the client application that originated the event.
+ ///
+ ///
+ /// when the event was not originated by an application.
+ ///
+ public Version? ClientVersion { get; set; }
}
diff --git a/src/Core/Tools/Models/Data/SendData.cs b/src/Core/Tools/Models/Data/SendData.cs
index bdddb84822..c780cccb9c 100644
--- a/src/Core/Tools/Models/Data/SendData.cs
+++ b/src/Core/Tools/Models/Data/SendData.cs
@@ -1,15 +1,33 @@
-namespace Bit.Core.Tools.Models.Data;
+#nullable enable
+namespace Bit.Core.Tools.Models.Data;
+
+///
+/// Shared data for a send
+///
public abstract class SendData
{
+ ///
+ /// Instantiates a .
+ ///
public SendData() { }
- public SendData(string name, string notes)
+ ///
+ /// User-provided name of the send.
+ /// User-provided private notes of the send.
+ public SendData(string name, string? notes)
{
Name = name;
Notes = notes;
}
- public string Name { get; set; }
- public string Notes { get; set; }
+ ///
+ /// User-provided name of the send.
+ ///
+ public string Name { get; set; } = string.Empty;
+
+ ///
+ /// User-provided private notes of the send.
+ ///
+ public string? Notes { get; set; } = null;
}
diff --git a/src/Core/Tools/Models/Data/SendFileData.cs b/src/Core/Tools/Models/Data/SendFileData.cs
index 6cf1fa3da5..11379bef58 100644
--- a/src/Core/Tools/Models/Data/SendFileData.cs
+++ b/src/Core/Tools/Models/Data/SendFileData.cs
@@ -1,22 +1,64 @@
-using System.Text.Json.Serialization;
+#nullable enable
+
+using System.Diagnostics.CodeAnalysis;
+using System.Text.Json.Serialization;
+using static System.Text.Json.Serialization.JsonNumberHandling;
namespace Bit.Core.Tools.Models.Data;
+///
+/// A file secret being sent.
+///
public class SendFileData : SendData
{
+ ///
+ /// Instantiates a .
+ ///
public SendFileData() { }
- public SendFileData(string name, string notes, string fileName)
+ ///
+ /// Attached file name.
+ /// User-provided private notes of the send.
+ /// Attached file name.
+ public SendFileData(string name, string? notes, string fileName)
: base(name, notes)
{
FileName = fileName;
}
- // We serialize Size as a string since JSON (or Javascript) doesn't support full precision for long numbers
- [JsonNumberHandling(JsonNumberHandling.WriteAsString | JsonNumberHandling.AllowReadingFromString)]
+ ///
+ /// Size of the attached file in bytes.
+ ///
+ ///
+ /// Serialized as a string since JSON (or Javascript) doesn't support
+ /// full precision for long numbers
+ ///
+ [JsonNumberHandling(WriteAsString | AllowReadingFromString)]
public long Size { get; set; }
- public string Id { get; set; }
- public string FileName { get; set; }
+ ///
+ /// Uniquely identifies an uploaded file.
+ ///
+ ///
+ /// Should contain only when a file
+ /// upload is pending. Should never contain null once the
+ /// file upload completes.
+ ///
+ [DisallowNull]
+ public string? Id { get; set; }
+
+ ///
+ /// Attached file name.
+ ///
+ ///
+ /// Should contain a non-empty string once the file upload completes.
+ ///
+ public string FileName { get; set; } = string.Empty;
+
+ ///
+ /// When true the uploaded file's length was confirmed within
+ /// the expected tolerance and below the maximum supported
+ /// file size.
+ ///
public bool Validated { get; set; } = true;
}
diff --git a/src/Core/Tools/Models/Data/SendTextData.cs b/src/Core/Tools/Models/Data/SendTextData.cs
index 41c6b042ae..5a1b8e9f3a 100644
--- a/src/Core/Tools/Models/Data/SendTextData.cs
+++ b/src/Core/Tools/Models/Data/SendTextData.cs
@@ -1,16 +1,42 @@
-namespace Bit.Core.Tools.Models.Data;
+#nullable enable
+namespace Bit.Core.Tools.Models.Data;
+
+///
+/// A text secret being sent.
+///
public class SendTextData : SendData
{
+ ///
+ /// Instantiates a .
+ ///
public SendTextData() { }
- public SendTextData(string name, string notes, string text, bool hidden)
+ ///
+ /// Attached file name.
+ /// User-provided private notes of the send.
+ /// The secret being sent.
+ ///
+ /// Indicates whether the secret should be concealed when opening the send.
+ ///
+ public SendTextData(string name, string? notes, string? text, bool hidden)
: base(name, notes)
{
Text = text;
Hidden = hidden;
}
- public string Text { get; set; }
+ ///
+ /// The secret being sent.
+ ///
+ public string? Text { get; set; }
+
+ ///
+ /// Indicates whether the secret should be concealed when opening the send.
+ ///
+ ///
+ /// when the secret should be concealed.
+ /// Otherwise .
+ ///
public bool Hidden { get; set; }
}
diff --git a/src/Core/Tools/Repositories/ISendRepository.cs b/src/Core/Tools/Repositories/ISendRepository.cs
index 3d67c990ff..421a5f4aaf 100644
--- a/src/Core/Tools/Repositories/ISendRepository.cs
+++ b/src/Core/Tools/Repositories/ISendRepository.cs
@@ -1,10 +1,36 @@
-using Bit.Core.Repositories;
+#nullable enable
+
+using Bit.Core.Repositories;
using Bit.Core.Tools.Entities;
namespace Bit.Core.Tools.Repositories;
+///
+/// Service for saving and loading s in persistent storage.
+///
public interface ISendRepository : IRepository
{
+ ///
+ /// Loads all s created by a user.
+ ///
+ ///
+ /// Identifies the user.
+ ///
+ ///
+ /// A task that completes once the s have been loaded.
+ /// The task's result contains the loaded s.
+ ///
Task> GetManyByUserIdAsync(Guid userId);
+
+ ///
+ /// Loads s scheduled for deletion.
+ ///
+ ///
+ /// Load sends whose is < this date.
+ ///
+ ///
+ /// A task that completes once the s have been loaded.
+ /// The task's result contains the loaded s.
+ ///
Task> GetManyByDeletionDateAsync(DateTime deletionDateBefore);
}
diff --git a/src/Core/Tools/Services/Implementations/SendService.cs b/src/Core/Tools/Services/Implementations/SendService.cs
index 1c1cfab4e6..fad941362b 100644
--- a/src/Core/Tools/Services/Implementations/SendService.cs
+++ b/src/Core/Tools/Services/Implementations/SendService.cs
@@ -1,9 +1,11 @@
using System.Text.Json;
+using Bit.Core.AdminConsole.Enums;
+using Bit.Core.AdminConsole.Models.Data.Organizations.Policies;
+using Bit.Core.AdminConsole.Repositories;
+using Bit.Core.AdminConsole.Services;
using Bit.Core.Context;
using Bit.Core.Entities;
-using Bit.Core.Enums;
using Bit.Core.Exceptions;
-using Bit.Core.Models.Data.Organizations.Policies;
using Bit.Core.Repositories;
using Bit.Core.Services;
using Bit.Core.Settings;
diff --git a/src/Core/Utilities/KdfSettingsValidator.cs b/src/Core/Utilities/KdfSettingsValidator.cs
index c47431d7d0..db7936acff 100644
--- a/src/Core/Utilities/KdfSettingsValidator.cs
+++ b/src/Core/Utilities/KdfSettingsValidator.cs
@@ -10,23 +10,23 @@ public static class KdfSettingsValidator
switch (kdfType)
{
case KdfType.PBKDF2_SHA256:
- if (kdfIterations < 5000 || kdfIterations > 2_000_000)
+ if (!AuthConstants.PBKDF2_ITERATIONS.InsideRange(kdfIterations))
{
- yield return new ValidationResult("KDF iterations must be between 5000 and 2000000.");
+ yield return new ValidationResult($"KDF iterations must be between {AuthConstants.PBKDF2_ITERATIONS.Min} and {AuthConstants.PBKDF2_ITERATIONS.Max}.");
}
break;
case KdfType.Argon2id:
- if (kdfIterations <= 0)
+ if (!AuthConstants.ARGON2_ITERATIONS.InsideRange(kdfIterations))
{
- yield return new ValidationResult("Argon2 iterations must be greater than 0.");
+ yield return new ValidationResult($"Argon2 iterations must be between {AuthConstants.ARGON2_ITERATIONS.Min} and {AuthConstants.ARGON2_ITERATIONS.Max}.");
}
- else if (!kdfMemory.HasValue || kdfMemory.Value < 15 || kdfMemory.Value > 1024)
+ else if (!kdfMemory.HasValue || !AuthConstants.ARGON2_MEMORY.InsideRange(kdfMemory.Value))
{
- yield return new ValidationResult("Argon2 memory must be between 15mb and 1024mb.");
+ yield return new ValidationResult($"Argon2 memory must be between {AuthConstants.ARGON2_MEMORY.Min}mb and {AuthConstants.ARGON2_MEMORY.Max}mb.");
}
- else if (!kdfParallelism.HasValue || kdfParallelism.Value < 1 || kdfParallelism.Value > 16)
+ else if (!kdfParallelism.HasValue || !AuthConstants.ARGON2_PARALLELISM.InsideRange(kdfParallelism.Value))
{
- yield return new ValidationResult("Argon2 parallelism must be between 1 and 16.");
+ yield return new ValidationResult($"Argon2 parallelism must be between {AuthConstants.ARGON2_PARALLELISM.Min} and {AuthConstants.ARGON2_PARALLELISM.Max}.");
}
break;
diff --git a/src/Core/Vault/Models/Data/CipherLoginFido2CredentialData.cs b/src/Core/Vault/Models/Data/CipherLoginFido2CredentialData.cs
index c0801d2a6c..eefb7ec6ad 100644
--- a/src/Core/Vault/Models/Data/CipherLoginFido2CredentialData.cs
+++ b/src/Core/Vault/Models/Data/CipherLoginFido2CredentialData.cs
@@ -12,6 +12,7 @@ public class CipherLoginFido2CredentialData
public string RpId { get; set; }
public string RpName { get; set; }
public string UserHandle { get; set; }
+ public string UserName { get; set; }
public string UserDisplayName { get; set; }
public string Counter { get; set; }
public string Discoverable { get; set; }
diff --git a/src/Core/Vault/Repositories/ICipherRepository.cs b/src/Core/Vault/Repositories/ICipherRepository.cs
index 401add13da..ae3b72ad0f 100644
--- a/src/Core/Vault/Repositories/ICipherRepository.cs
+++ b/src/Core/Vault/Repositories/ICipherRepository.cs
@@ -1,4 +1,5 @@
-using Bit.Core.Entities;
+using Bit.Core.Auth.UserFeatures.UserKey;
+using Bit.Core.Entities;
using Bit.Core.Repositories;
using Bit.Core.Tools.Entities;
using Bit.Core.Vault.Entities;
@@ -8,11 +9,11 @@ namespace Bit.Core.Vault.Repositories;
public interface ICipherRepository : IRepository
{
- Task GetByIdAsync(Guid id, Guid userId);
+ Task GetByIdAsync(Guid id, Guid userId, bool useFlexibleCollections);
Task GetOrganizationDetailsByIdAsync(Guid id);
Task> GetManyOrganizationDetailsByOrganizationIdAsync(Guid organizationId);
Task GetCanEditByIdAsync(Guid userId, Guid cipherId);
- Task> GetManyByUserIdAsync(Guid userId, bool withOrganizations = true);
+ Task> GetManyByUserIdAsync(Guid userId, bool useFlexibleCollections, bool withOrganizations = true);
Task> GetManyByOrganizationIdAsync(Guid organizationId);
Task CreateAsync(Cipher cipher, IEnumerable collectionIds);
Task CreateAsync(CipherDetails cipher);
@@ -23,19 +24,27 @@ public interface ICipherRepository : IRepository
Task UpdatePartialAsync(Guid id, Guid userId, Guid? folderId, bool favorite);
Task UpdateAttachmentAsync(CipherAttachment attachment);
Task DeleteAttachmentAsync(Guid cipherId, string attachmentId);
- Task DeleteAsync(IEnumerable ids, Guid userId);
+ Task DeleteAsync(IEnumerable ids, Guid userId, bool useFlexibleCollections);
Task DeleteByIdsOrganizationIdAsync(IEnumerable ids, Guid organizationId);
- Task MoveAsync(IEnumerable ids, Guid? folderId, Guid userId);
+ Task MoveAsync(IEnumerable ids, Guid? folderId, Guid userId, bool useFlexibleCollections);
Task DeleteByUserIdAsync(Guid userId);
Task DeleteByOrganizationIdAsync(Guid organizationId);
Task UpdateUserKeysAndCiphersAsync(User user, IEnumerable ciphers, IEnumerable folders, IEnumerable sends);
Task UpdateCiphersAsync(Guid userId, IEnumerable ciphers);
Task CreateAsync(IEnumerable ciphers, IEnumerable folders);
Task CreateAsync(IEnumerable ciphers, IEnumerable collections,
- IEnumerable collectionCiphers);
- Task SoftDeleteAsync(IEnumerable ids, Guid userId);
+ IEnumerable collectionCiphers, IEnumerable collectionUsers);
+ Task SoftDeleteAsync(IEnumerable ids, Guid userId, bool useFlexibleCollections);
Task SoftDeleteByIdsOrganizationIdAsync(IEnumerable ids, Guid organizationId);
- Task RestoreAsync(IEnumerable ids, Guid userId);
+ Task RestoreAsync(IEnumerable ids, Guid userId, bool useFlexibleCollections);
Task RestoreByIdsOrganizationIdAsync(IEnumerable ids, Guid organizationId);
Task DeleteDeletedAsync(DateTime deletedDateBefore);
+
+ ///
+ /// Updates encrypted data for ciphers during a key rotation
+ ///
+ /// The user that initiated the key rotation
+ /// A list of ciphers with updated data
+ UpdateEncryptedDataForKeyRotation UpdateForKeyRotation(Guid userId,
+ IEnumerable ciphers);
}
diff --git a/src/Core/Vault/Repositories/IFolderRepository.cs b/src/Core/Vault/Repositories/IFolderRepository.cs
index 3b7c2f77f1..f192437613 100644
--- a/src/Core/Vault/Repositories/IFolderRepository.cs
+++ b/src/Core/Vault/Repositories/IFolderRepository.cs
@@ -1,4 +1,5 @@
-using Bit.Core.Repositories;
+using Bit.Core.Auth.UserFeatures.UserKey;
+using Bit.Core.Repositories;
using Bit.Core.Vault.Entities;
namespace Bit.Core.Vault.Repositories;
@@ -7,4 +8,12 @@ public interface IFolderRepository : IRepository
{
Task GetByIdAsync(Guid id, Guid userId);
Task> GetManyByUserIdAsync(Guid userId);
+
+ ///
+ /// Updates encrypted data for folders during a key rotation
+ ///
+ /// The user that initiated the key rotation
+ /// A list of folders with updated data
+ UpdateEncryptedDataForKeyRotation UpdateForKeyRotation(Guid userId,
+ IEnumerable folders);
}
diff --git a/src/Core/Vault/Services/Implementations/CipherService.cs b/src/Core/Vault/Services/Implementations/CipherService.cs
index 82a6753a9d..5517be1689 100644
--- a/src/Core/Vault/Services/Implementations/CipherService.cs
+++ b/src/Core/Vault/Services/Implementations/CipherService.cs
@@ -1,4 +1,6 @@
using System.Text.Json;
+using Bit.Core.AdminConsole.Enums;
+using Bit.Core.AdminConsole.Services;
using Bit.Core.Context;
using Bit.Core.Entities;
using Bit.Core.Enums;
@@ -25,6 +27,7 @@ public class CipherService : ICipherService
private readonly ICollectionRepository _collectionRepository;
private readonly IUserRepository _userRepository;
private readonly IOrganizationRepository _organizationRepository;
+ private readonly IOrganizationUserRepository _organizationUserRepository;
private readonly ICollectionCipherRepository _collectionCipherRepository;
private readonly IPushNotificationService _pushService;
private readonly IAttachmentStorageService _attachmentStorageService;
@@ -32,9 +35,13 @@ public class CipherService : ICipherService
private readonly IUserService _userService;
private readonly IPolicyService _policyService;
private readonly GlobalSettings _globalSettings;
- private const long _fileSizeLeeway = 1024L * 1024L; // 1MB
+ private const long _fileSizeLeeway = 1024L * 1024L; // 1MB
private readonly IReferenceEventService _referenceEventService;
private readonly ICurrentContext _currentContext;
+ private readonly IFeatureService _featureService;
+
+ private bool UseFlexibleCollections =>
+ _featureService.IsEnabled(FeatureFlagKeys.FlexibleCollections, _currentContext);
public CipherService(
ICipherRepository cipherRepository,
@@ -42,6 +49,7 @@ public class CipherService : ICipherService
ICollectionRepository collectionRepository,
IUserRepository userRepository,
IOrganizationRepository organizationRepository,
+ IOrganizationUserRepository organizationUserRepository,
ICollectionCipherRepository collectionCipherRepository,
IPushNotificationService pushService,
IAttachmentStorageService attachmentStorageService,
@@ -50,13 +58,15 @@ public class CipherService : ICipherService
IPolicyService policyService,
GlobalSettings globalSettings,
IReferenceEventService referenceEventService,
- ICurrentContext currentContext)
+ ICurrentContext currentContext,
+ IFeatureService featureService)
{
_cipherRepository = cipherRepository;
_folderRepository = folderRepository;
_collectionRepository = collectionRepository;
_userRepository = userRepository;
_organizationRepository = organizationRepository;
+ _organizationUserRepository = organizationUserRepository;
_collectionCipherRepository = collectionCipherRepository;
_pushService = pushService;
_attachmentStorageService = attachmentStorageService;
@@ -66,6 +76,7 @@ public class CipherService : ICipherService
_globalSettings = globalSettings;
_referenceEventService = referenceEventService;
_currentContext = currentContext;
+ _featureService = featureService;
}
public async Task SaveAsync(Cipher cipher, Guid savingUserId, DateTime? lastKnownRevisionDate,
@@ -419,9 +430,10 @@ public class CipherService : ICipherService
}
else
{
- var ciphers = await _cipherRepository.GetManyByUserIdAsync(deletingUserId);
+ var ciphers = await _cipherRepository.GetManyByUserIdAsync(deletingUserId, useFlexibleCollections: UseFlexibleCollections);
deletingCiphers = ciphers.Where(c => cipherIdsSet.Contains(c.Id) && c.Edit).Select(x => (Cipher)x).ToList();
- await _cipherRepository.DeleteAsync(deletingCiphers.Select(c => c.Id), deletingUserId);
+
+ await _cipherRepository.DeleteAsync(deletingCiphers.Select(c => c.Id), deletingUserId, UseFlexibleCollections);
}
var events = deletingCiphers.Select(c =>
@@ -473,7 +485,7 @@ public class CipherService : ICipherService
}
}
- await _cipherRepository.MoveAsync(cipherIds, destinationFolderId, movingUserId);
+ await _cipherRepository.MoveAsync(cipherIds, destinationFolderId, movingUserId, UseFlexibleCollections);
// push
await _pushService.PushSyncCiphersAsync(movingUserId);
}
@@ -573,11 +585,11 @@ public class CipherService : ICipherService
originalCipher.SetAttachments(originalAttachments);
}
- var currentCollectionsForCipher = await _collectionCipherRepository.GetManyByUserIdCipherIdAsync(sharingUserId, originalCipher.Id);
+ var currentCollectionsForCipher = await _collectionCipherRepository.GetManyByUserIdCipherIdAsync(sharingUserId, originalCipher.Id, UseFlexibleCollections);
var currentCollectionIdsForCipher = currentCollectionsForCipher.Select(c => c.CollectionId).ToList();
currentCollectionIdsForCipher.RemoveAll(id => collectionIds.Contains(id));
- await _collectionCipherRepository.UpdateCollectionsAsync(originalCipher.Id, sharingUserId, currentCollectionIdsForCipher);
+ await _collectionCipherRepository.UpdateCollectionsAsync(originalCipher.Id, sharingUserId, currentCollectionIdsForCipher, UseFlexibleCollections);
await _cipherRepository.ReplaceAsync(originalCipher);
}
@@ -622,7 +634,7 @@ public class CipherService : ICipherService
await _cipherRepository.UpdateCiphersAsync(sharingUserId, cipherInfos.Select(c => c.cipher));
await _collectionCipherRepository.UpdateCollectionsForCiphersAsync(cipherIds, sharingUserId,
- organizationId, collectionIds);
+ organizationId, collectionIds, UseFlexibleCollections);
var events = cipherInfos.Select(c =>
new Tuple(c.cipher, EventType.Cipher_Shared, null));
@@ -650,7 +662,7 @@ public class CipherService : ICipherService
cipher.RevisionDate = DateTime.UtcNow;
- // The sprocs will validate that all collections belong to this org/user and that they have
+ // The sprocs will validate that all collections belong to this org/user and that they have
// proper write permissions.
if (orgAdmin)
{
@@ -663,7 +675,7 @@ public class CipherService : ICipherService
{
throw new BadRequestException("You do not have permissions to edit this.");
}
- await _collectionCipherRepository.UpdateCollectionsAsync(cipher.Id, savingUserId, collectionIds);
+ await _collectionCipherRepository.UpdateCollectionsAsync(cipher.Id, savingUserId, collectionIds, UseFlexibleCollections);
}
await _eventService.LogCipherEventAsync(cipher, Bit.Core.Enums.EventType.Cipher_UpdatedCollections);
@@ -745,6 +757,7 @@ public class CipherService : ICipherService
var org = collections.Count > 0 ?
await _organizationRepository.GetByIdAsync(collections[0].OrganizationId) :
await _organizationRepository.GetByIdAsync(ciphers.FirstOrDefault(c => c.OrganizationId.HasValue).OrganizationId.Value);
+ var importingOrgUser = await _organizationUserRepository.GetByOrganizationAsync(org.Id, importingUserId);
if (collections.Count > 0 && org != null && org.MaxCollections.HasValue)
{
@@ -762,18 +775,28 @@ public class CipherService : ICipherService
cipher.SetNewId();
}
- var userCollectionsIds = (await _collectionRepository.GetManyByOrganizationIdAsync(org.Id)).Select(c => c.Id).ToList();
+ var organizationCollectionsIds = (await _collectionRepository.GetManyByOrganizationIdAsync(org.Id)).Select(c => c.Id).ToList();
//Assign id to the ones that don't exist in DB
//Need to keep the list order to create the relationships
- List newCollections = new List();
+ var newCollections = new List();
+ var newCollectionUsers = new List();
foreach (var collection in collections)
{
- if (!userCollectionsIds.Contains(collection.Id))
+ if (!organizationCollectionsIds.Contains(collection.Id))
{
collection.SetNewId();
newCollections.Add(collection);
+ if (UseFlexibleCollections)
+ {
+ newCollectionUsers.Add(new CollectionUser
+ {
+ CollectionId = collection.Id,
+ OrganizationUserId = importingOrgUser.Id,
+ Manage = true
+ });
+ }
}
}
@@ -797,7 +820,7 @@ public class CipherService : ICipherService
}
// Create it all
- await _cipherRepository.CreateAsync(ciphers, newCollections, collectionCiphers);
+ await _cipherRepository.CreateAsync(ciphers, newCollections, collectionCiphers, newCollectionUsers);
// push
await _pushService.PushSyncVaultAsync(importingUserId);
@@ -852,9 +875,10 @@ public class CipherService : ICipherService
}
else
{
- var ciphers = await _cipherRepository.GetManyByUserIdAsync(deletingUserId);
+ var ciphers = await _cipherRepository.GetManyByUserIdAsync(deletingUserId, useFlexibleCollections: UseFlexibleCollections);
deletingCiphers = ciphers.Where(c => cipherIdsSet.Contains(c.Id) && c.Edit).Select(x => (Cipher)x).ToList();
- await _cipherRepository.SoftDeleteAsync(deletingCiphers.Select(c => c.Id), deletingUserId);
+
+ await _cipherRepository.SoftDeleteAsync(deletingCiphers.Select(c => c.Id), deletingUserId, UseFlexibleCollections);
}
var events = deletingCiphers.Select(c =>
@@ -917,9 +941,10 @@ public class CipherService : ICipherService
}
else
{
- var ciphers = await _cipherRepository.GetManyByUserIdAsync(restoringUserId);
+ var ciphers = await _cipherRepository.GetManyByUserIdAsync(restoringUserId, useFlexibleCollections: UseFlexibleCollections);
restoringCiphers = ciphers.Where(c => cipherIdsSet.Contains(c.Id) && c.Edit).Select(c => (CipherOrganizationDetails)c).ToList();
- revisionDate = await _cipherRepository.RestoreAsync(restoringCiphers.Select(c => c.Id), restoringUserId);
+
+ revisionDate = await _cipherRepository.RestoreAsync(restoringCiphers.Select(c => c.Id), restoringUserId, UseFlexibleCollections);
}
var events = restoringCiphers.Select(c =>
@@ -954,7 +979,7 @@ public class CipherService : ICipherService
}
else
{
- var ciphers = await _cipherRepository.GetManyByUserIdAsync(userId, true);
+ var ciphers = await _cipherRepository.GetManyByUserIdAsync(userId, useFlexibleCollections: UseFlexibleCollections, withOrganizations: true);
orgCiphers = ciphers.Where(c => c.OrganizationId == organizationId);
}
diff --git a/src/Core/packages.lock.json b/src/Core/packages.lock.json
index 66a1f8bc24..6d6604a698 100644
--- a/src/Core/packages.lock.json
+++ b/src/Core/packages.lock.json
@@ -131,6 +131,16 @@
"Microsoft.Win32.Registry": "5.0.0"
}
},
+ "Duende.IdentityServer": {
+ "type": "Direct",
+ "requested": "[6.0.4, )",
+ "resolved": "6.0.4",
+ "contentHash": "4HVjzx1F8v5J+U7oa8RGAQGj2QzmzNSu87r18Sh+dlh10uyZZL8teAaT/FaVLDObnfItGdPFvN8mwpF/HkI3Xw==",
+ "dependencies": {
+ "Duende.IdentityServer.Storage": "6.0.4",
+ "Microsoft.AspNetCore.Authentication.OpenIdConnect": "6.0.0"
+ }
+ },
"Fido2.AspNet": {
"type": "Direct",
"requested": "[3.0.1, )",
@@ -143,46 +153,23 @@
},
"Handlebars.Net": {
"type": "Direct",
- "requested": "[2.1.2, )",
- "resolved": "2.1.2",
- "contentHash": "p60QyeBYpZmcZdIXRMqs9XySIBaxJ0lj3+QD0EJVr4ybTigOTCumXMMin5dPwjo9At1UwkDZ3gGwa1lmGjG6DA==",
+ "requested": "[2.1.4, )",
+ "resolved": "2.1.4",
+ "contentHash": "Od7MWDfGxYKRtxETFMlcvCrY8hAqyuXZDX4EsOfiI/jzh+PVBuVxazHBC1HmVqTKX1JnRtoxIMcH95K9UFlYog==",
"dependencies": {
"Microsoft.CSharp": "4.7.0"
}
},
- "IdentityServer4": {
- "type": "Direct",
- "requested": "[4.1.2, )",
- "resolved": "4.1.2",
- "contentHash": "blaxxGuOA7v/w1q+fxn97wZ+x2ecG1ZD4mc/N/ZOXMNeFZZhqv+4LF26Gecyik3nWrJPmbMEtQbLmRsKG8k61w==",
- "dependencies": {
- "IdentityModel": "4.4.0",
- "IdentityServer4.Storage": "4.1.2",
- "Microsoft.AspNetCore.Authentication.OpenIdConnect": "3.1.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.6.0",
- "Newtonsoft.Json": "12.0.2"
- }
- },
- "IdentityServer4.AccessTokenValidation": {
- "type": "Direct",
- "requested": "[3.0.1, )",
- "resolved": "3.0.1",
- "contentHash": "qu/M6UyN4o9NVep7q545Ms7hYAnsQqSdLbN1Fjjrn4m35lyBfeQPSSNzDryAKHbodyWOQfHaOqKEyMEJQ5Rpgw==",
- "dependencies": {
- "IdentityModel.AspNetCore.OAuth2Introspection": "4.0.1",
- "Microsoft.AspNetCore.Authentication.JwtBearer": "3.0.0"
- }
- },
"LaunchDarkly.ServerSdk": {
"type": "Direct",
- "requested": "[7.0.0, )",
- "resolved": "7.0.0",
- "contentHash": "gkTWb+f5QlsXIqFAciBef3qKZU2y0Hy3Fpt4pvZoxNcnBKg2PNTDSnbpbYEKPeQ1yk1avNaI/tKprnahfrmJFg==",
+ "requested": "[8.0.0, )",
+ "resolved": "8.0.0",
+ "contentHash": "vosFEXYJABuIDIA0+6sncalTmrKXEkBKeqzuP9/vvcCVlFSXUl/ZnrkrAVg3ViDWDi7kjpJSk2W3h5D0TUfCGA==",
"dependencies": {
"LaunchDarkly.Cache": "1.0.2",
- "LaunchDarkly.CommonSdk": "6.0.0",
- "LaunchDarkly.EventSource": "5.0.1",
- "LaunchDarkly.InternalSdk": "3.1.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
+ "LaunchDarkly.EventSource": "5.1.0",
+ "LaunchDarkly.InternalSdk": "3.3.0",
"LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
@@ -297,9 +284,9 @@
},
"Newtonsoft.Json": {
"type": "Direct",
- "requested": "[13.0.1, )",
- "resolved": "13.0.1",
- "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
+ "requested": "[13.0.3, )",
+ "resolved": "13.0.3",
+ "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ=="
},
"Otp.NET": {
"type": "Direct",
@@ -395,9 +382,9 @@
},
"Serilog.Sinks.SyslogMessages": {
"type": "Direct",
- "requested": "[2.0.6, )",
- "resolved": "2.0.6",
- "contentHash": "V2Yq2GEbk7taEPbpBLFzLXhrHrUzKf4sQu/zLrANU8XIoUn/Mr08M2E8PrcrWVXCj0R4xLMWYe0Z1sxOrMF3IA==",
+ "requested": "[2.0.9, )",
+ "resolved": "2.0.9",
+ "contentHash": "y7J+/h/Nf5EAtbpa6lC1nDhK/F9kC5oxuVYmQivv242Oh4hAVMeoAk5Gv6bgb/KbmqufGPXUFkX/AlcrvZ8Ywg==",
"dependencies": {
"Serilog": "2.5.0",
"Serilog.Sinks.PeriodicBatching": "2.3.0"
@@ -465,6 +452,15 @@
"resolved": "2.2.1",
"contentHash": "A6Zr52zVqJKt18ZBsTnX0qhG0kwIQftVAjLmszmkiR/trSp8H+xj1gUOzk7XHwaKgyREMSV1v9XaKrBUeIOdvQ=="
},
+ "Duende.IdentityServer.Storage": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "s5gAjfbpr2IMgI+fU2Nx+2AZdzstmbt9gpo13iX7GwvqSeSaBVqj9ZskAN0R2KF1OemPdZuGnfaTcevdXMUrrw==",
+ "dependencies": {
+ "IdentityModel": "6.0.0",
+ "Microsoft.AspNetCore.DataProtection.Abstractions": "6.0.0"
+ }
+ },
"Fido2": {
"type": "Transitive",
"resolved": "3.0.1",
@@ -484,28 +480,8 @@
},
"IdentityModel": {
"type": "Transitive",
- "resolved": "4.4.0",
- "contentHash": "b18wrIx5wnZlMxAX7oVsE+nDtAJ4hajYlH0xPlaRvo4r/fz08K6pPeZvbiqS9nfNbzfIgLFmNX+FL9qR9ZR5PA==",
- "dependencies": {
- "Newtonsoft.Json": "11.0.2",
- "System.Text.Encodings.Web": "4.7.0"
- }
- },
- "IdentityModel.AspNetCore.OAuth2Introspection": {
- "type": "Transitive",
- "resolved": "4.0.1",
- "contentHash": "ZNdMZMaj9fqR3j50vYsu+1U3QGd6n8+fqwf+a8mCTcmXGor+HgFDfdq0mM34bsmD6uEgAQup7sv2ZW5kR36dbA==",
- "dependencies": {
- "IdentityModel": "4.0.0"
- }
- },
- "IdentityServer4.Storage": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "KoSffyZyyeCNTIyJiZnCuPakJ1QbCHlpty6gbWUj/7yl+w0PXIchgmmJnJSvddzBb8iZ2xew/vGlxWUIP17P2g==",
- "dependencies": {
- "IdentityModel": "4.4.0"
- }
+ "resolved": "6.0.0",
+ "contentHash": "eVHCR7a6m/dm5RFcBzE3qs/Jg5j9R5Rjpu8aTOv9e4AFvaQtBXb5ah7kmwU+YwA0ufRwz4wf1hnIvsD2hSnI4g=="
},
"LaunchDarkly.Cache": {
"type": "Transitive",
@@ -514,26 +490,27 @@
},
"LaunchDarkly.CommonSdk": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "YYYq+41gZRMQ8dIoMC6HOq/dI+4RY3HsexLLAaE9T1+1tVMeQkbCqak7sVeKX4QcE7xlXx23lWgipYUkRoRUyw==",
+ "resolved": "6.2.0",
+ "contentHash": "eLeb+tTNLwOxlUIsZWzJlcPmG9Wyf20NYyucP6MW6aqKW6doKFeSO+aJe0z+WyijbvfX1Dp1U1HQatOu6fa1Gg==",
"dependencies": {
+ "LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
},
"LaunchDarkly.EventSource": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "DN44Ry5M4lyrjiF7LEu0Ijco7Wm8R7mJopN+giYsYjkQlszsXdFvm3POoehIDAOtL1HHl5bZvF9k9xK034u3IA==",
+ "resolved": "5.1.0",
+ "contentHash": "PztDWiMvPWODx+kfBnCroZ8Lpya4nPc7ZO4TZysOogODbVXDDPDYrdcgVivCMgf4davhGrp61ekvZc+Uy1NYMA==",
"dependencies": {
- "LaunchDarkly.Logging": "[1.0.1, 3.0.0)"
+ "LaunchDarkly.Logging": "[2.0.0, 3.0.0)"
}
},
"LaunchDarkly.InternalSdk": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "jW8VEfFciuCcJUEuvSzmrbMVYYXwGL/ZWHUZLiA4aDOQ1LcEXp32uK405NQW/izEypUfWB+9TaSjPpFIC+5Wzw==",
+ "resolved": "3.3.0",
+ "contentHash": "TBvs/B6iyXp9MqRKjIoBZ/T0+/xgp5xg+MuHqr5U+N5+7DghtI2FnsmgeBedTIeQdA3Tk8Z4Bj4hlqU9FBiEnw==",
"dependencies": {
- "LaunchDarkly.CommonSdk": "6.0.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
"LaunchDarkly.Logging": "[2.0.0, 3.0.0)",
"System.Collections.Immutable": "1.7.1"
}
@@ -553,10 +530,10 @@
},
"Microsoft.AspNetCore.Authentication.OpenIdConnect": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "O1cAQYUTU8EfRqwc5/rfTns4E4hKlFlg59fuKRrST+PzsxI6H07KqRN/JjdYhAuVYxF8jPnIGbj+zuc5paOWUw==",
+ "resolved": "6.0.0",
+ "contentHash": "cJxdro36spFzk/K2OFCddM6vZ+yoj6ug8mTFRH3Gdv1Pul/buSuCtfb/FSCp31UmS5S4C1315dU7wX3ErLFuDg==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.5.0"
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.10.0"
}
},
"Microsoft.AspNetCore.Cryptography.Internal": {
@@ -589,8 +566,8 @@
},
"Microsoft.AspNetCore.DataProtection.Abstractions": {
"type": "Transitive",
- "resolved": "3.1.32",
- "contentHash": "MPL4iVyiaRxnOUY5VATHjvhDWaAEFb77KFiUxVRklv3Z3v+STofUr1UG/aCt1O9cgN7FVTDaC5A7U+zsLub8Xg=="
+ "resolved": "6.0.0",
+ "contentHash": "Z/UU4NEBm5UgNufJmw+j5baW26ytCOIZ0G7sZocPaOzsUeBon1bkM3lSMNZQG2GmDjAIVP2XMSODf2jzSGbibw=="
},
"Microsoft.Azure.Amqp": {
"type": "Transitive",
diff --git a/src/Events/Controllers/CollectController.cs b/src/Events/Controllers/CollectController.cs
index a2bef7a7df..7c7962309c 100644
--- a/src/Events/Controllers/CollectController.cs
+++ b/src/Events/Controllers/CollectController.cs
@@ -1,4 +1,5 @@
-using Bit.Core.Context;
+using Bit.Core;
+using Bit.Core.Context;
using Bit.Core.Enums;
using Bit.Core.Repositories;
using Bit.Core.Services;
@@ -18,19 +19,24 @@ public class CollectController : Controller
private readonly IEventService _eventService;
private readonly ICipherRepository _cipherRepository;
private readonly IOrganizationRepository _organizationRepository;
+ private readonly IFeatureService _featureService;
public CollectController(
ICurrentContext currentContext,
IEventService eventService,
ICipherRepository cipherRepository,
- IOrganizationRepository organizationRepository)
+ IOrganizationRepository organizationRepository,
+ IFeatureService featureService)
{
_currentContext = currentContext;
_eventService = eventService;
_cipherRepository = cipherRepository;
_organizationRepository = organizationRepository;
+ _featureService = featureService;
}
+ bool UseFlexibleCollections => _featureService.IsEnabled(FeatureFlagKeys.FlexibleCollections, _currentContext);
+
[HttpPost]
public async Task Post([FromBody] IEnumerable model)
{
@@ -69,8 +75,10 @@ public class CollectController : Controller
}
else
{
+ var useFlexibleCollections = _featureService.IsEnabled(FeatureFlagKeys.FlexibleCollections, _currentContext);
cipher = await _cipherRepository.GetByIdAsync(eventModel.CipherId.Value,
- _currentContext.UserId.Value);
+ _currentContext.UserId.Value,
+ useFlexibleCollections);
}
if (cipher == null)
{
diff --git a/src/Events/Program.cs b/src/Events/Program.cs
index e09cfc17e6..6b53e4b18c 100644
--- a/src/Events/Program.cs
+++ b/src/Events/Program.cs
@@ -16,8 +16,8 @@ public class Program
logging.AddSerilog(hostingContext, (e, globalSettings) =>
{
var context = e.Properties["SourceContext"].ToString();
- if (context.Contains("IdentityServer4.Validation.TokenValidator") ||
- context.Contains("IdentityServer4.Validation.TokenRequestValidator"))
+ if (context.Contains("Duende.IdentityServer.Validation.TokenValidator") ||
+ context.Contains("Duende.IdentityServer.Validation.TokenRequestValidator"))
{
return e.Level >= globalSettings.MinLogLevel.EventsSettings.IdentityToken;
}
diff --git a/src/Events/Startup.cs b/src/Events/Startup.cs
index d41a27be0d..2bcb7a3ba3 100644
--- a/src/Events/Startup.cs
+++ b/src/Events/Startup.cs
@@ -70,6 +70,8 @@ public class Startup
services.AddSingleton();
}
+ services.AddSingleton();
+
// Mvc
services.AddMvc(config =>
{
diff --git a/src/Events/packages.lock.json b/src/Events/packages.lock.json
index 9b76d1089e..7d0df69c5b 100644
--- a/src/Events/packages.lock.json
+++ b/src/Events/packages.lock.json
@@ -173,8 +173,8 @@
},
"Dapper": {
"type": "Transitive",
- "resolved": "2.0.123",
- "contentHash": "RDFF4rBLLmbpi6pwkY7q/M6UXHRJEOerplDGE5jwEkP/JGJnBauAClYavNKJPW1yOTWRPIyfj4is3EaJxQXILQ=="
+ "resolved": "2.1.24",
+ "contentHash": "/2t2vsdJyZRsk13AsWigZpsuFvEwK+o3v862cEULXoww905gyKhJFSuwmZI/4Ui9COX9ZCFCI09UHyH4wVYl3A=="
},
"DnsClient": {
"type": "Transitive",
@@ -184,6 +184,24 @@
"Microsoft.Win32.Registry": "5.0.0"
}
},
+ "Duende.IdentityServer": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "4HVjzx1F8v5J+U7oa8RGAQGj2QzmzNSu87r18Sh+dlh10uyZZL8teAaT/FaVLDObnfItGdPFvN8mwpF/HkI3Xw==",
+ "dependencies": {
+ "Duende.IdentityServer.Storage": "6.0.4",
+ "Microsoft.AspNetCore.Authentication.OpenIdConnect": "6.0.0"
+ }
+ },
+ "Duende.IdentityServer.Storage": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "s5gAjfbpr2IMgI+fU2Nx+2AZdzstmbt9gpo13iX7GwvqSeSaBVqj9ZskAN0R2KF1OemPdZuGnfaTcevdXMUrrw==",
+ "dependencies": {
+ "IdentityModel": "6.0.0",
+ "Microsoft.AspNetCore.DataProtection.Abstractions": "6.0.0"
+ }
+ },
"Fido2": {
"type": "Transitive",
"resolved": "3.0.1",
@@ -212,57 +230,16 @@
},
"Handlebars.Net": {
"type": "Transitive",
- "resolved": "2.1.2",
- "contentHash": "p60QyeBYpZmcZdIXRMqs9XySIBaxJ0lj3+QD0EJVr4ybTigOTCumXMMin5dPwjo9At1UwkDZ3gGwa1lmGjG6DA==",
+ "resolved": "2.1.4",
+ "contentHash": "Od7MWDfGxYKRtxETFMlcvCrY8hAqyuXZDX4EsOfiI/jzh+PVBuVxazHBC1HmVqTKX1JnRtoxIMcH95K9UFlYog==",
"dependencies": {
"Microsoft.CSharp": "4.7.0"
}
},
"IdentityModel": {
"type": "Transitive",
- "resolved": "4.4.0",
- "contentHash": "b18wrIx5wnZlMxAX7oVsE+nDtAJ4hajYlH0xPlaRvo4r/fz08K6pPeZvbiqS9nfNbzfIgLFmNX+FL9qR9ZR5PA==",
- "dependencies": {
- "Newtonsoft.Json": "11.0.2",
- "System.Text.Encodings.Web": "4.7.0"
- }
- },
- "IdentityModel.AspNetCore.OAuth2Introspection": {
- "type": "Transitive",
- "resolved": "4.0.1",
- "contentHash": "ZNdMZMaj9fqR3j50vYsu+1U3QGd6n8+fqwf+a8mCTcmXGor+HgFDfdq0mM34bsmD6uEgAQup7sv2ZW5kR36dbA==",
- "dependencies": {
- "IdentityModel": "4.0.0"
- }
- },
- "IdentityServer4": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "blaxxGuOA7v/w1q+fxn97wZ+x2ecG1ZD4mc/N/ZOXMNeFZZhqv+4LF26Gecyik3nWrJPmbMEtQbLmRsKG8k61w==",
- "dependencies": {
- "IdentityModel": "4.4.0",
- "IdentityServer4.Storage": "4.1.2",
- "Microsoft.AspNetCore.Authentication.OpenIdConnect": "3.1.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.6.0",
- "Newtonsoft.Json": "12.0.2"
- }
- },
- "IdentityServer4.AccessTokenValidation": {
- "type": "Transitive",
- "resolved": "3.0.1",
- "contentHash": "qu/M6UyN4o9NVep7q545Ms7hYAnsQqSdLbN1Fjjrn4m35lyBfeQPSSNzDryAKHbodyWOQfHaOqKEyMEJQ5Rpgw==",
- "dependencies": {
- "IdentityModel.AspNetCore.OAuth2Introspection": "4.0.1",
- "Microsoft.AspNetCore.Authentication.JwtBearer": "3.0.0"
- }
- },
- "IdentityServer4.Storage": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "KoSffyZyyeCNTIyJiZnCuPakJ1QbCHlpty6gbWUj/7yl+w0PXIchgmmJnJSvddzBb8iZ2xew/vGlxWUIP17P2g==",
- "dependencies": {
- "IdentityModel": "4.4.0"
- }
+ "resolved": "6.0.0",
+ "contentHash": "eVHCR7a6m/dm5RFcBzE3qs/Jg5j9R5Rjpu8aTOv9e4AFvaQtBXb5ah7kmwU+YwA0ufRwz4wf1hnIvsD2hSnI4g=="
},
"LaunchDarkly.Cache": {
"type": "Transitive",
@@ -271,26 +248,27 @@
},
"LaunchDarkly.CommonSdk": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "YYYq+41gZRMQ8dIoMC6HOq/dI+4RY3HsexLLAaE9T1+1tVMeQkbCqak7sVeKX4QcE7xlXx23lWgipYUkRoRUyw==",
+ "resolved": "6.2.0",
+ "contentHash": "eLeb+tTNLwOxlUIsZWzJlcPmG9Wyf20NYyucP6MW6aqKW6doKFeSO+aJe0z+WyijbvfX1Dp1U1HQatOu6fa1Gg==",
"dependencies": {
+ "LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
},
"LaunchDarkly.EventSource": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "DN44Ry5M4lyrjiF7LEu0Ijco7Wm8R7mJopN+giYsYjkQlszsXdFvm3POoehIDAOtL1HHl5bZvF9k9xK034u3IA==",
+ "resolved": "5.1.0",
+ "contentHash": "PztDWiMvPWODx+kfBnCroZ8Lpya4nPc7ZO4TZysOogODbVXDDPDYrdcgVivCMgf4davhGrp61ekvZc+Uy1NYMA==",
"dependencies": {
- "LaunchDarkly.Logging": "[1.0.1, 3.0.0)"
+ "LaunchDarkly.Logging": "[2.0.0, 3.0.0)"
}
},
"LaunchDarkly.InternalSdk": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "jW8VEfFciuCcJUEuvSzmrbMVYYXwGL/ZWHUZLiA4aDOQ1LcEXp32uK405NQW/izEypUfWB+9TaSjPpFIC+5Wzw==",
+ "resolved": "3.3.0",
+ "contentHash": "TBvs/B6iyXp9MqRKjIoBZ/T0+/xgp5xg+MuHqr5U+N5+7DghtI2FnsmgeBedTIeQdA3Tk8Z4Bj4hlqU9FBiEnw==",
"dependencies": {
- "LaunchDarkly.CommonSdk": "6.0.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
"LaunchDarkly.Logging": "[2.0.0, 3.0.0)",
"System.Collections.Immutable": "1.7.1"
}
@@ -305,13 +283,13 @@
},
"LaunchDarkly.ServerSdk": {
"type": "Transitive",
- "resolved": "7.0.0",
- "contentHash": "gkTWb+f5QlsXIqFAciBef3qKZU2y0Hy3Fpt4pvZoxNcnBKg2PNTDSnbpbYEKPeQ1yk1avNaI/tKprnahfrmJFg==",
+ "resolved": "8.0.0",
+ "contentHash": "vosFEXYJABuIDIA0+6sncalTmrKXEkBKeqzuP9/vvcCVlFSXUl/ZnrkrAVg3ViDWDi7kjpJSk2W3h5D0TUfCGA==",
"dependencies": {
"LaunchDarkly.Cache": "1.0.2",
- "LaunchDarkly.CommonSdk": "6.0.0",
- "LaunchDarkly.EventSource": "5.0.1",
- "LaunchDarkly.InternalSdk": "3.1.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
+ "LaunchDarkly.EventSource": "5.1.0",
+ "LaunchDarkly.InternalSdk": "3.3.0",
"LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
@@ -323,16 +301,16 @@
},
"linq2db": {
"type": "Transitive",
- "resolved": "5.2.1",
- "contentHash": "OOBM8s39zhbZAgqFnl2KGxT5RqBDw21X69U528qV2PgQispaA3f+or0ILrLEgnNIJuB4EBgaw8gC6ttSHn4X0Q=="
+ "resolved": "5.3.1",
+ "contentHash": "707mIbEmtptvKeUW940UwoNwq05I7OUu0VWtclLtyYaASp+ugX4I/Er1UVpeldsDawqlVMXB5EQ5/Oar6AkUGQ=="
},
"linq2db.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.5.0",
- "contentHash": "ePHzO99xbObgMLlAFh08of1SnVhg6j4Su9327DrIB7RZWCgtQIX6k+nbl+HRVOooAndZSs7b+DduSgdnJjaJGw==",
+ "resolved": "7.6.0",
+ "contentHash": "T1W9o8wVzApsUwu7SRg/L7487kaiLQYt2AqRVnXVGfobD+ZKy2oRsUMws0PICtciaz4qbfLp/r/+NksfuYsFlw==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Relational": "7.0.0",
- "linq2db": "5.2.1"
+ "linq2db": "5.3.1"
}
},
"MailKit": {
@@ -353,10 +331,10 @@
},
"Microsoft.AspNetCore.Authentication.OpenIdConnect": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "O1cAQYUTU8EfRqwc5/rfTns4E4hKlFlg59fuKRrST+PzsxI6H07KqRN/JjdYhAuVYxF8jPnIGbj+zuc5paOWUw==",
+ "resolved": "6.0.0",
+ "contentHash": "cJxdro36spFzk/K2OFCddM6vZ+yoj6ug8mTFRH3Gdv1Pul/buSuCtfb/FSCp31UmS5S4C1315dU7wX3ErLFuDg==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.5.0"
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.10.0"
}
},
"Microsoft.AspNetCore.Cryptography.Internal": {
@@ -389,8 +367,8 @@
},
"Microsoft.AspNetCore.DataProtection.Abstractions": {
"type": "Transitive",
- "resolved": "3.1.32",
- "contentHash": "MPL4iVyiaRxnOUY5VATHjvhDWaAEFb77KFiUxVRklv3Z3v+STofUr1UG/aCt1O9cgN7FVTDaC5A7U+zsLub8Xg=="
+ "resolved": "6.0.0",
+ "contentHash": "Z/UU4NEBm5UgNufJmw+j5baW26ytCOIZ0G7sZocPaOzsUeBon1bkM3lSMNZQG2GmDjAIVP2XMSODf2jzSGbibw=="
},
"Microsoft.Azure.Amqp": {
"type": "Transitive",
@@ -475,48 +453,44 @@
},
"Microsoft.Data.SqlClient": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "uu8dfrsx081cSbEevWuZAvqdmANDGJkbLBL2G3j0LAZxX1Oy8RCVAaC4Lcuak6jNicWP6CWvHqBTIEmQNSxQlw==",
+ "resolved": "5.1.1",
+ "contentHash": "MW5E9HFvCaV069o8b6YpuRDPBux8s96qDnOJ+4N9QNUCs7c5W3KxwQ+ftpAjbMUlImL+c9WR+l+f5hzjkqhu2g==",
"dependencies": {
- "Azure.Identity": "1.6.0",
- "Microsoft.Data.SqlClient.SNI.runtime": "5.0.1",
- "Microsoft.Identity.Client": "4.45.0",
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.21.0",
+ "Azure.Identity": "1.7.0",
+ "Microsoft.Data.SqlClient.SNI.runtime": "5.1.0",
+ "Microsoft.Identity.Client": "4.47.2",
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.24.0",
"Microsoft.SqlServer.Server": "1.0.0",
- "Microsoft.Win32.Registry": "5.0.0",
- "System.Buffers": "4.5.1",
- "System.Configuration.ConfigurationManager": "5.0.0",
- "System.Diagnostics.DiagnosticSource": "5.0.0",
- "System.IO": "4.3.0",
- "System.Resources.ResourceManager": "4.3.0",
- "System.Runtime.Caching": "5.0.0",
+ "System.Configuration.ConfigurationManager": "6.0.1",
+ "System.Diagnostics.DiagnosticSource": "6.0.0",
+ "System.Runtime.Caching": "6.0.0",
"System.Security.Cryptography.Cng": "5.0.0",
"System.Security.Principal.Windows": "5.0.0",
- "System.Text.Encoding.CodePages": "5.0.0",
- "System.Text.Encodings.Web": "4.7.2"
+ "System.Text.Encoding.CodePages": "6.0.0",
+ "System.Text.Encodings.Web": "6.0.0"
}
},
"Microsoft.Data.SqlClient.SNI.runtime": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "y0X5MxiNdbITJYoafJ2ruaX6hqO0twpCGR/ipiDOe85JKLU8WL4TuAQfDe5qtt3bND5Je26HnrarLSAMMnVTNg=="
+ "resolved": "5.1.0",
+ "contentHash": "jVsElisM5sfBzaaV9kdq2NXZLwIbytetnsOIlJ0cQGgQP4zFNBmkfHBnpwtmKrtBJBEV9+9PVQPVrcCVhDgcIg=="
},
"Microsoft.Data.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "FTerRmQPqHrCrnoUzhBu+E+1DNGwyrAMLqHkAqOOOu5pGfyMOj8qQUBxI/gDtWtG11p49UxSfWmBzRNlwZqfUg==",
+ "resolved": "7.0.14",
+ "contentHash": "qvYae3/v9Fvqsjp/7OKQBuJK+Uc3m/WctfpIUMmGMDot2Bd8UWBKiMSlh26UtfQa9x4N+k7NxCT+AbZVoNrCdg==",
"dependencies": {
"SQLitePCLRaw.core": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "RXbRLHHWP2Z3pq8qcL5nQ6LPeoOyp8hasM5bd0Te8PiQi3RjWQR4tcbdY5XMqQ+oTO9wA8/RLhZRn/hnxlTDnQ==",
+ "resolved": "7.0.14",
+ "contentHash": "0KYkAemPygW6yzifciFlmMzkO4sI4Dw69xLgwg3ui5rXJS5XvzuAWVvfdrKJciqeCbCnVS/ZbOWpcwWgqce5bQ==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Abstractions": "7.0.5",
- "Microsoft.EntityFrameworkCore.Analyzers": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Abstractions": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Analyzers": "7.0.14",
"Microsoft.Extensions.Caching.Memory": "7.0.0",
"Microsoft.Extensions.DependencyInjection": "7.0.0",
"Microsoft.Extensions.Logging": "7.0.0"
@@ -524,49 +498,49 @@
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "iwQso+hFRsEWjhH2WsEQj1D2QE5BlEXiXEt6A3SlYTPRPdZsyTNDeDDEdtxL+H/UJPQgQYY+9SMMRcEiXBmCAA=="
+ "resolved": "7.0.14",
+ "contentHash": "aEcXDSYpDdD5wdIRKTqcS44f3W4capqQ1BWVRPJgacATfHkO62RX9Nnh0hUFg+rei9OLuJp0Y4zsy1fNeOXv5g=="
},
"Microsoft.EntityFrameworkCore.Analyzers": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "yMLM/aK1MikVqpjxd7PJ1Pjgztd3VAd26ZHxyjxG3RPeM9cHjvS5tCg9kAAayR6eHmBg0ffZsHdT28WfA5tTlA=="
+ "resolved": "7.0.14",
+ "contentHash": "esI4RF6mix4DDFBhWB9k1vJxAL8GouSf5ZV8oFJoVsIQ9d2J3MPgC1VL2qM9Vw5cH7Vg7TzRyKNpCRXFVkWs9w=="
},
"Microsoft.EntityFrameworkCore.Relational": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "u/33DC4S6g2hpMPgBc5Kdnlz//nqHR5c/ovgjtiP/wQ7sOd0EOdygVzUJAAOxCwbtAHDsJXS9Vc3jLFYq0yu8Q==",
+ "resolved": "7.0.14",
+ "contentHash": "MrVBnWOFYwfLMGQfrcIuqEM9Xvokv1vJeYxqNH3K3xOtAdHwHQTrKnpDP97tU+LBlvcnyXAtAtryYcpLXWtRNA==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "7.0.5",
+ "Microsoft.EntityFrameworkCore": "7.0.14",
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.Sqlite": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "2XPZB9OLF5/m13HgZp7/Dv0u8FWEJzcaBsMYR9Kp3R6aygkb3RnOijofPDTsmdhAqG9YTysCmh2bFaGs0TCc7A==",
+ "resolved": "7.0.14",
+ "contentHash": "8c8Hw2tmfy5YEsi9RL2/u2Qi9IwVbmj/yDlJy4iJPadeE3/AssLrgtobOBz4ftg2y5PVjFL59Gq7YzGLQH5q1A==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.14",
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "4C+9ct6A/Bq61Ta9Uh2td4/XwNpRCiPI03SWTa3hPJjA/g8wCw2hetbh3DDe5HcydzgDq/lRRjU/eRy3UODklQ==",
+ "resolved": "7.0.14",
+ "contentHash": "JNUkZVff1V/A/P3JiBbgt+Y2oCQSuzORxE3jOqFDbFjSFu7jHDEetJ/afSF/taa0lbyN9OpvaKjsbKk3Iis29Q==",
"dependencies": {
- "Microsoft.Data.Sqlite.Core": "7.0.5",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5",
+ "Microsoft.Data.Sqlite.Core": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14",
"Microsoft.Extensions.DependencyModel": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.SqlServer": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "cUJqCiamT0EvpKNgZEV5fqNv2MyVfKNgOPQfFINqHiIKHOYrS0nTCUJP97+UuG0JIIrP792/PwnuNjbekImtBg==",
+ "resolved": "7.0.14",
+ "contentHash": "d9hqEw4W/TdQ1WDm03uyFuDoehL6GNq/NMChFaC4dcV60I42vKdUC0fYTuE2QPunVUpf5XUTCkJ6fYGjMos2AA==",
"dependencies": {
- "Microsoft.Data.SqlClient": "5.0.1",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5"
+ "Microsoft.Data.SqlClient": "5.1.1",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14"
}
},
"Microsoft.Extensions.Caching.Abstractions": {
@@ -819,50 +793,52 @@
},
"Microsoft.IdentityModel.Abstractions": {
"type": "Transitive",
- "resolved": "6.22.0",
- "contentHash": "iI+9V+2ciCrbheeLjpmjcqCnhy+r6yCoEcid3nkoFWerHgjVuT6CPM4HODUTtUPe1uwks4wcnAujJ8u+IKogHQ=="
+ "resolved": "6.24.0",
+ "contentHash": "X6aBK56Ot15qKyG7X37KsPnrwah+Ka55NJWPppWVTDi8xWq7CJgeNw2XyaeHgE1o/mW4THwoabZkBbeG2TPBiw=="
},
"Microsoft.IdentityModel.JsonWebTokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "d3h1/BaMeylKTkdP6XwRCxuOoDJZ44V9xaXr6gl5QxmpnZGdoK3bySo3OQN8ehRLJHShb94ElLUvoXyglQtgAw==",
+ "resolved": "6.24.0",
+ "contentHash": "XDWrkThcxfuWp79AvAtg5f+uRS1BxkIbJnsG/e8VPzOWkYYuDg33emLjp5EWcwXYYIDsHnVZD/00kM/PYFQc/g==",
"dependencies": {
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Tokens": "6.24.0",
+ "System.Text.Encoding": "4.3.0",
+ "System.Text.Json": "4.7.2"
}
},
"Microsoft.IdentityModel.Logging": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "tuEhHIQwvBEhMf8I50hy8FHmRSUkffDFP5EdLsSDV4qRcl2wvOPkQxYqEzWkh+ytW6sbdJGEXElGhmhDfAxAKg==",
+ "resolved": "6.24.0",
+ "contentHash": "qLYWDOowM/zghmYKXw1yfYKlHOdS41i8t4hVXr9bSI90zHqhyhQh9GwVy8pENzs5wHeytU23DymluC9NtgYv7w==",
"dependencies": {
- "Microsoft.IdentityModel.Abstractions": "6.21.0"
+ "Microsoft.IdentityModel.Abstractions": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "0FqY5cTLQKtHrClzHEI+QxJl8OBT2vUiEQQB7UKk832JDiJJmetzYZ3AdSrPjN/3l3nkhByeWzXnhrX0JbifKg==",
+ "resolved": "6.24.0",
+ "contentHash": "+NzKCkvsQ8X1r/Ff74V7CFr9OsdMRaB6DsV+qpH7NNLdYJ8O4qHbmTnNEsjFcDmk/gVNDwhoL2gN5pkPVq0lwQ==",
"dependencies": {
- "Microsoft.IdentityModel.Logging": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Logging": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols.OpenIdConnect": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "vtSKL7n6EnAsLyxmiviusm6LKrblT2ndnNqN6rvVq6iIHAnPCK9E2DkDx6h1Jrpy1cvbp40r0cnTg23nhEAGTA==",
+ "resolved": "6.24.0",
+ "contentHash": "a/2RRrc8C9qaw8qdD9hv1ES9YKFgxaqr/SnwMSLbwQZJSUQDd4qx1K4EYgWaQWs73R+VXLyKSxN0f/uE9CsBiQ==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols": "6.21.0",
- "System.IdentityModel.Tokens.Jwt": "6.21.0"
+ "Microsoft.IdentityModel.Protocols": "6.24.0",
+ "System.IdentityModel.Tokens.Jwt": "6.24.0"
}
},
"Microsoft.IdentityModel.Tokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "AAEHZvZyb597a+QJSmtxH3n2P1nIJGpZ4Q89GTenknRx6T6zyfzf592yW/jA5e8EHN4tNMjjXHQaYWEq5+L05w==",
+ "resolved": "6.24.0",
+ "contentHash": "ZPqHi86UYuqJXJ7bLnlEctHKkPKT4lGUFbotoCNiXNCSL02emYlcxzGYsRGWWmbFEcYDMi2dcTLLYNzHqWOTsw==",
"dependencies": {
"Microsoft.CSharp": "4.5.0",
- "Microsoft.IdentityModel.Logging": "6.21.0",
+ "Microsoft.IdentityModel.Logging": "6.24.0",
"System.Security.Cryptography.Cng": "4.5.0"
}
},
@@ -993,13 +969,13 @@
},
"Newtonsoft.Json": {
"type": "Transitive",
- "resolved": "13.0.1",
- "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
+ "resolved": "13.0.3",
+ "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ=="
},
"Npgsql": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "7UVPYy2RP0ci04PED1tc9ZCaTw/DfSdSkLiGEFCAvwMwsgA/bAluj1liNzP1IpN0MFofnOF0cm1zJfmbEuCehg==",
+ "resolved": "7.0.6",
+ "contentHash": "TAqvwRnm3NJ0QvN7cvu6geJkbI0XPzGVRElVY5hF4gsgA+BnE12x6GM1TLhdeq+7ZKvvo3BD8jXKnXmr3tvdEw==",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "6.0.0",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
@@ -1007,13 +983,13 @@
},
"Npgsql.EntityFrameworkCore.PostgreSQL": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "ZYMtyG6pmLtUsFAx0/XaIlVkJM+1gArWEKD55cLLxiVlGScAphjiGj+G7Gk16yg5lhhdWx+bgXWpIUISXuS33g==",
+ "resolved": "7.0.11",
+ "contentHash": "cHEgEz0ldXc9wVANs8sJqC+3eilqefrkasCBgaVT0tyj8tb1p3/pwy2ngjboNkDG3M0z+xJsJ4jC5p8wySAM3w==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, 8.0.0)",
- "Npgsql": "7.0.4"
+ "Microsoft.EntityFrameworkCore": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.11, 8.0.0)",
+ "Npgsql": "7.0.6"
}
},
"NSec.Cryptography": {
@@ -1336,8 +1312,8 @@
},
"Serilog.Sinks.SyslogMessages": {
"type": "Transitive",
- "resolved": "2.0.6",
- "contentHash": "V2Yq2GEbk7taEPbpBLFzLXhrHrUzKf4sQu/zLrANU8XIoUn/Mr08M2E8PrcrWVXCj0R4xLMWYe0Z1sxOrMF3IA==",
+ "resolved": "2.0.9",
+ "contentHash": "y7J+/h/Nf5EAtbpa6lC1nDhK/F9kC5oxuVYmQivv242Oh4hAVMeoAk5Gv6bgb/KbmqufGPXUFkX/AlcrvZ8Ywg==",
"dependencies": {
"Serilog": "2.5.0",
"Serilog.Sinks.PeriodicBatching": "2.3.0"
@@ -1470,8 +1446,8 @@
},
"System.Configuration.ConfigurationManager": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "7T+m0kDSlIPTHIkPMIu6m6tV6qsMqJpvQWW2jIc2qi7sn40qxFo0q+7mEQAhMPXZHMKnWrnv47ntGlM/ejvw3g==",
+ "resolved": "6.0.1",
+ "contentHash": "jXw9MlUu/kRfEU0WyTptAVueupqIeE3/rl0EZDMlf8pcvJnitQ8HeVEp69rZdaStXwTV72boi/Bhw8lOeO+U2w==",
"dependencies": {
"System.Security.Cryptography.ProtectedData": "6.0.0",
"System.Security.Permissions": "6.0.0"
@@ -1630,11 +1606,11 @@
},
"System.IdentityModel.Tokens.Jwt": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "JRD8AuypBE+2zYxT3dMJomQVsPYsCqlyZhWel3J1d5nzQokSRyTueF+Q4ID3Jcu6zSZKuzOdJ1MLTkbQsDqcvQ==",
+ "resolved": "6.24.0",
+ "contentHash": "Qibsj9MPWq8S/C0FgvmsLfIlHLE7ay0MJIaAmK94ivN3VyDdglqReed5qMvdQhSL0BzK6v0Z1wB/sD88zVu6Jw==",
"dependencies": {
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"System.IO": {
@@ -2083,10 +2059,10 @@
},
"System.Runtime.Caching": {
"type": "Transitive",
- "resolved": "5.0.0",
- "contentHash": "30D6MkO8WF9jVGWZIP0hmCN8l9BTY4LCsAzLIe4xFSXzs+AjDotR7DpSmj27pFskDURzUvqYYY0ikModgBTxWw==",
+ "resolved": "6.0.0",
+ "contentHash": "E0e03kUp5X2k+UAoVl6efmI7uU7JRBWi5EIdlQ7cr0NpBGjHG4fWII35PgsBY9T4fJQ8E4QPsL0rKksU9gcL5A==",
"dependencies": {
- "System.Configuration.ConfigurationManager": "5.0.0"
+ "System.Configuration.ConfigurationManager": "6.0.0"
}
},
"System.Runtime.CompilerServices.Unsafe": {
@@ -2616,11 +2592,10 @@
"BitPay.Light": "[1.0.1907, )",
"Braintree": "[5.19.0, )",
"DnsClient": "[1.7.0, )",
+ "Duende.IdentityServer": "[6.0.4, )",
"Fido2.AspNet": "[3.0.1, )",
- "Handlebars.Net": "[2.1.2, )",
- "IdentityServer4": "[4.1.2, )",
- "IdentityServer4.AccessTokenValidation": "[3.0.1, )",
- "LaunchDarkly.ServerSdk": "[7.0.0, )",
+ "Handlebars.Net": "[2.1.4, )",
+ "LaunchDarkly.ServerSdk": "[8.0.0, )",
"MailKit": "[4.2.0, )",
"Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )",
"Microsoft.Azure.Cosmos.Table": "[1.0.8, )",
@@ -2630,7 +2605,7 @@
"Microsoft.Extensions.Configuration.EnvironmentVariables": "[6.0.1, )",
"Microsoft.Extensions.Configuration.UserSecrets": "[6.0.1, )",
"Microsoft.Extensions.Identity.Stores": "[6.0.4, )",
- "Newtonsoft.Json": "[13.0.1, )",
+ "Newtonsoft.Json": "[13.0.3, )",
"Otp.NET": "[1.2.2, )",
"Quartz": "[3.4.0, )",
"SendGrid": "[9.27.0, )",
@@ -2639,7 +2614,7 @@
"Serilog.Extensions.Logging": "[3.1.0, )",
"Serilog.Extensions.Logging.File": "[2.0.0, )",
"Serilog.Sinks.AzureCosmosDB": "[2.0.0, )",
- "Serilog.Sinks.SyslogMessages": "[2.0.6, )",
+ "Serilog.Sinks.SyslogMessages": "[2.0.9, )",
"Stripe.net": "[40.0.0, )",
"YubicoDotNetClient": "[1.2.0, )"
}
@@ -2647,29 +2622,29 @@
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "Dapper": "[2.0.123, )"
+ "Core": "[2023.12.0, )",
+ "Dapper": "[2.1.24, )"
}
},
"infrastructure.entityframework": {
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )",
- "Core": "[2023.10.2, )",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )",
- "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )",
- "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )",
- "Npgsql.EntityFrameworkCore.PostgreSQL": "[7.0.4, )",
+ "Core": "[2023.12.0, )",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.14, )",
+ "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.14, )",
+ "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.14, )",
+ "Npgsql.EntityFrameworkCore.PostgreSQL": "[7.0.11, )",
"Pomelo.EntityFrameworkCore.MySql": "[7.0.0, )",
- "linq2db.EntityFrameworkCore": "[7.5.0, )"
+ "linq2db.EntityFrameworkCore": "[7.6.0, )"
}
},
"sharedweb": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "Infrastructure.Dapper": "[2023.10.2, )",
- "Infrastructure.EntityFramework": "[2023.10.2, )"
+ "Core": "[2023.12.0, )",
+ "Infrastructure.Dapper": "[2023.12.0, )",
+ "Infrastructure.EntityFramework": "[2023.12.0, )"
}
}
}
diff --git a/src/EventsProcessor/packages.lock.json b/src/EventsProcessor/packages.lock.json
index 9b76d1089e..7d0df69c5b 100644
--- a/src/EventsProcessor/packages.lock.json
+++ b/src/EventsProcessor/packages.lock.json
@@ -173,8 +173,8 @@
},
"Dapper": {
"type": "Transitive",
- "resolved": "2.0.123",
- "contentHash": "RDFF4rBLLmbpi6pwkY7q/M6UXHRJEOerplDGE5jwEkP/JGJnBauAClYavNKJPW1yOTWRPIyfj4is3EaJxQXILQ=="
+ "resolved": "2.1.24",
+ "contentHash": "/2t2vsdJyZRsk13AsWigZpsuFvEwK+o3v862cEULXoww905gyKhJFSuwmZI/4Ui9COX9ZCFCI09UHyH4wVYl3A=="
},
"DnsClient": {
"type": "Transitive",
@@ -184,6 +184,24 @@
"Microsoft.Win32.Registry": "5.0.0"
}
},
+ "Duende.IdentityServer": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "4HVjzx1F8v5J+U7oa8RGAQGj2QzmzNSu87r18Sh+dlh10uyZZL8teAaT/FaVLDObnfItGdPFvN8mwpF/HkI3Xw==",
+ "dependencies": {
+ "Duende.IdentityServer.Storage": "6.0.4",
+ "Microsoft.AspNetCore.Authentication.OpenIdConnect": "6.0.0"
+ }
+ },
+ "Duende.IdentityServer.Storage": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "s5gAjfbpr2IMgI+fU2Nx+2AZdzstmbt9gpo13iX7GwvqSeSaBVqj9ZskAN0R2KF1OemPdZuGnfaTcevdXMUrrw==",
+ "dependencies": {
+ "IdentityModel": "6.0.0",
+ "Microsoft.AspNetCore.DataProtection.Abstractions": "6.0.0"
+ }
+ },
"Fido2": {
"type": "Transitive",
"resolved": "3.0.1",
@@ -212,57 +230,16 @@
},
"Handlebars.Net": {
"type": "Transitive",
- "resolved": "2.1.2",
- "contentHash": "p60QyeBYpZmcZdIXRMqs9XySIBaxJ0lj3+QD0EJVr4ybTigOTCumXMMin5dPwjo9At1UwkDZ3gGwa1lmGjG6DA==",
+ "resolved": "2.1.4",
+ "contentHash": "Od7MWDfGxYKRtxETFMlcvCrY8hAqyuXZDX4EsOfiI/jzh+PVBuVxazHBC1HmVqTKX1JnRtoxIMcH95K9UFlYog==",
"dependencies": {
"Microsoft.CSharp": "4.7.0"
}
},
"IdentityModel": {
"type": "Transitive",
- "resolved": "4.4.0",
- "contentHash": "b18wrIx5wnZlMxAX7oVsE+nDtAJ4hajYlH0xPlaRvo4r/fz08K6pPeZvbiqS9nfNbzfIgLFmNX+FL9qR9ZR5PA==",
- "dependencies": {
- "Newtonsoft.Json": "11.0.2",
- "System.Text.Encodings.Web": "4.7.0"
- }
- },
- "IdentityModel.AspNetCore.OAuth2Introspection": {
- "type": "Transitive",
- "resolved": "4.0.1",
- "contentHash": "ZNdMZMaj9fqR3j50vYsu+1U3QGd6n8+fqwf+a8mCTcmXGor+HgFDfdq0mM34bsmD6uEgAQup7sv2ZW5kR36dbA==",
- "dependencies": {
- "IdentityModel": "4.0.0"
- }
- },
- "IdentityServer4": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "blaxxGuOA7v/w1q+fxn97wZ+x2ecG1ZD4mc/N/ZOXMNeFZZhqv+4LF26Gecyik3nWrJPmbMEtQbLmRsKG8k61w==",
- "dependencies": {
- "IdentityModel": "4.4.0",
- "IdentityServer4.Storage": "4.1.2",
- "Microsoft.AspNetCore.Authentication.OpenIdConnect": "3.1.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.6.0",
- "Newtonsoft.Json": "12.0.2"
- }
- },
- "IdentityServer4.AccessTokenValidation": {
- "type": "Transitive",
- "resolved": "3.0.1",
- "contentHash": "qu/M6UyN4o9NVep7q545Ms7hYAnsQqSdLbN1Fjjrn4m35lyBfeQPSSNzDryAKHbodyWOQfHaOqKEyMEJQ5Rpgw==",
- "dependencies": {
- "IdentityModel.AspNetCore.OAuth2Introspection": "4.0.1",
- "Microsoft.AspNetCore.Authentication.JwtBearer": "3.0.0"
- }
- },
- "IdentityServer4.Storage": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "KoSffyZyyeCNTIyJiZnCuPakJ1QbCHlpty6gbWUj/7yl+w0PXIchgmmJnJSvddzBb8iZ2xew/vGlxWUIP17P2g==",
- "dependencies": {
- "IdentityModel": "4.4.0"
- }
+ "resolved": "6.0.0",
+ "contentHash": "eVHCR7a6m/dm5RFcBzE3qs/Jg5j9R5Rjpu8aTOv9e4AFvaQtBXb5ah7kmwU+YwA0ufRwz4wf1hnIvsD2hSnI4g=="
},
"LaunchDarkly.Cache": {
"type": "Transitive",
@@ -271,26 +248,27 @@
},
"LaunchDarkly.CommonSdk": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "YYYq+41gZRMQ8dIoMC6HOq/dI+4RY3HsexLLAaE9T1+1tVMeQkbCqak7sVeKX4QcE7xlXx23lWgipYUkRoRUyw==",
+ "resolved": "6.2.0",
+ "contentHash": "eLeb+tTNLwOxlUIsZWzJlcPmG9Wyf20NYyucP6MW6aqKW6doKFeSO+aJe0z+WyijbvfX1Dp1U1HQatOu6fa1Gg==",
"dependencies": {
+ "LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
},
"LaunchDarkly.EventSource": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "DN44Ry5M4lyrjiF7LEu0Ijco7Wm8R7mJopN+giYsYjkQlszsXdFvm3POoehIDAOtL1HHl5bZvF9k9xK034u3IA==",
+ "resolved": "5.1.0",
+ "contentHash": "PztDWiMvPWODx+kfBnCroZ8Lpya4nPc7ZO4TZysOogODbVXDDPDYrdcgVivCMgf4davhGrp61ekvZc+Uy1NYMA==",
"dependencies": {
- "LaunchDarkly.Logging": "[1.0.1, 3.0.0)"
+ "LaunchDarkly.Logging": "[2.0.0, 3.0.0)"
}
},
"LaunchDarkly.InternalSdk": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "jW8VEfFciuCcJUEuvSzmrbMVYYXwGL/ZWHUZLiA4aDOQ1LcEXp32uK405NQW/izEypUfWB+9TaSjPpFIC+5Wzw==",
+ "resolved": "3.3.0",
+ "contentHash": "TBvs/B6iyXp9MqRKjIoBZ/T0+/xgp5xg+MuHqr5U+N5+7DghtI2FnsmgeBedTIeQdA3Tk8Z4Bj4hlqU9FBiEnw==",
"dependencies": {
- "LaunchDarkly.CommonSdk": "6.0.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
"LaunchDarkly.Logging": "[2.0.0, 3.0.0)",
"System.Collections.Immutable": "1.7.1"
}
@@ -305,13 +283,13 @@
},
"LaunchDarkly.ServerSdk": {
"type": "Transitive",
- "resolved": "7.0.0",
- "contentHash": "gkTWb+f5QlsXIqFAciBef3qKZU2y0Hy3Fpt4pvZoxNcnBKg2PNTDSnbpbYEKPeQ1yk1avNaI/tKprnahfrmJFg==",
+ "resolved": "8.0.0",
+ "contentHash": "vosFEXYJABuIDIA0+6sncalTmrKXEkBKeqzuP9/vvcCVlFSXUl/ZnrkrAVg3ViDWDi7kjpJSk2W3h5D0TUfCGA==",
"dependencies": {
"LaunchDarkly.Cache": "1.0.2",
- "LaunchDarkly.CommonSdk": "6.0.0",
- "LaunchDarkly.EventSource": "5.0.1",
- "LaunchDarkly.InternalSdk": "3.1.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
+ "LaunchDarkly.EventSource": "5.1.0",
+ "LaunchDarkly.InternalSdk": "3.3.0",
"LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
@@ -323,16 +301,16 @@
},
"linq2db": {
"type": "Transitive",
- "resolved": "5.2.1",
- "contentHash": "OOBM8s39zhbZAgqFnl2KGxT5RqBDw21X69U528qV2PgQispaA3f+or0ILrLEgnNIJuB4EBgaw8gC6ttSHn4X0Q=="
+ "resolved": "5.3.1",
+ "contentHash": "707mIbEmtptvKeUW940UwoNwq05I7OUu0VWtclLtyYaASp+ugX4I/Er1UVpeldsDawqlVMXB5EQ5/Oar6AkUGQ=="
},
"linq2db.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.5.0",
- "contentHash": "ePHzO99xbObgMLlAFh08of1SnVhg6j4Su9327DrIB7RZWCgtQIX6k+nbl+HRVOooAndZSs7b+DduSgdnJjaJGw==",
+ "resolved": "7.6.0",
+ "contentHash": "T1W9o8wVzApsUwu7SRg/L7487kaiLQYt2AqRVnXVGfobD+ZKy2oRsUMws0PICtciaz4qbfLp/r/+NksfuYsFlw==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Relational": "7.0.0",
- "linq2db": "5.2.1"
+ "linq2db": "5.3.1"
}
},
"MailKit": {
@@ -353,10 +331,10 @@
},
"Microsoft.AspNetCore.Authentication.OpenIdConnect": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "O1cAQYUTU8EfRqwc5/rfTns4E4hKlFlg59fuKRrST+PzsxI6H07KqRN/JjdYhAuVYxF8jPnIGbj+zuc5paOWUw==",
+ "resolved": "6.0.0",
+ "contentHash": "cJxdro36spFzk/K2OFCddM6vZ+yoj6ug8mTFRH3Gdv1Pul/buSuCtfb/FSCp31UmS5S4C1315dU7wX3ErLFuDg==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.5.0"
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.10.0"
}
},
"Microsoft.AspNetCore.Cryptography.Internal": {
@@ -389,8 +367,8 @@
},
"Microsoft.AspNetCore.DataProtection.Abstractions": {
"type": "Transitive",
- "resolved": "3.1.32",
- "contentHash": "MPL4iVyiaRxnOUY5VATHjvhDWaAEFb77KFiUxVRklv3Z3v+STofUr1UG/aCt1O9cgN7FVTDaC5A7U+zsLub8Xg=="
+ "resolved": "6.0.0",
+ "contentHash": "Z/UU4NEBm5UgNufJmw+j5baW26ytCOIZ0G7sZocPaOzsUeBon1bkM3lSMNZQG2GmDjAIVP2XMSODf2jzSGbibw=="
},
"Microsoft.Azure.Amqp": {
"type": "Transitive",
@@ -475,48 +453,44 @@
},
"Microsoft.Data.SqlClient": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "uu8dfrsx081cSbEevWuZAvqdmANDGJkbLBL2G3j0LAZxX1Oy8RCVAaC4Lcuak6jNicWP6CWvHqBTIEmQNSxQlw==",
+ "resolved": "5.1.1",
+ "contentHash": "MW5E9HFvCaV069o8b6YpuRDPBux8s96qDnOJ+4N9QNUCs7c5W3KxwQ+ftpAjbMUlImL+c9WR+l+f5hzjkqhu2g==",
"dependencies": {
- "Azure.Identity": "1.6.0",
- "Microsoft.Data.SqlClient.SNI.runtime": "5.0.1",
- "Microsoft.Identity.Client": "4.45.0",
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.21.0",
+ "Azure.Identity": "1.7.0",
+ "Microsoft.Data.SqlClient.SNI.runtime": "5.1.0",
+ "Microsoft.Identity.Client": "4.47.2",
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.24.0",
"Microsoft.SqlServer.Server": "1.0.0",
- "Microsoft.Win32.Registry": "5.0.0",
- "System.Buffers": "4.5.1",
- "System.Configuration.ConfigurationManager": "5.0.0",
- "System.Diagnostics.DiagnosticSource": "5.0.0",
- "System.IO": "4.3.0",
- "System.Resources.ResourceManager": "4.3.0",
- "System.Runtime.Caching": "5.0.0",
+ "System.Configuration.ConfigurationManager": "6.0.1",
+ "System.Diagnostics.DiagnosticSource": "6.0.0",
+ "System.Runtime.Caching": "6.0.0",
"System.Security.Cryptography.Cng": "5.0.0",
"System.Security.Principal.Windows": "5.0.0",
- "System.Text.Encoding.CodePages": "5.0.0",
- "System.Text.Encodings.Web": "4.7.2"
+ "System.Text.Encoding.CodePages": "6.0.0",
+ "System.Text.Encodings.Web": "6.0.0"
}
},
"Microsoft.Data.SqlClient.SNI.runtime": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "y0X5MxiNdbITJYoafJ2ruaX6hqO0twpCGR/ipiDOe85JKLU8WL4TuAQfDe5qtt3bND5Je26HnrarLSAMMnVTNg=="
+ "resolved": "5.1.0",
+ "contentHash": "jVsElisM5sfBzaaV9kdq2NXZLwIbytetnsOIlJ0cQGgQP4zFNBmkfHBnpwtmKrtBJBEV9+9PVQPVrcCVhDgcIg=="
},
"Microsoft.Data.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "FTerRmQPqHrCrnoUzhBu+E+1DNGwyrAMLqHkAqOOOu5pGfyMOj8qQUBxI/gDtWtG11p49UxSfWmBzRNlwZqfUg==",
+ "resolved": "7.0.14",
+ "contentHash": "qvYae3/v9Fvqsjp/7OKQBuJK+Uc3m/WctfpIUMmGMDot2Bd8UWBKiMSlh26UtfQa9x4N+k7NxCT+AbZVoNrCdg==",
"dependencies": {
"SQLitePCLRaw.core": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "RXbRLHHWP2Z3pq8qcL5nQ6LPeoOyp8hasM5bd0Te8PiQi3RjWQR4tcbdY5XMqQ+oTO9wA8/RLhZRn/hnxlTDnQ==",
+ "resolved": "7.0.14",
+ "contentHash": "0KYkAemPygW6yzifciFlmMzkO4sI4Dw69xLgwg3ui5rXJS5XvzuAWVvfdrKJciqeCbCnVS/ZbOWpcwWgqce5bQ==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Abstractions": "7.0.5",
- "Microsoft.EntityFrameworkCore.Analyzers": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Abstractions": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Analyzers": "7.0.14",
"Microsoft.Extensions.Caching.Memory": "7.0.0",
"Microsoft.Extensions.DependencyInjection": "7.0.0",
"Microsoft.Extensions.Logging": "7.0.0"
@@ -524,49 +498,49 @@
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "iwQso+hFRsEWjhH2WsEQj1D2QE5BlEXiXEt6A3SlYTPRPdZsyTNDeDDEdtxL+H/UJPQgQYY+9SMMRcEiXBmCAA=="
+ "resolved": "7.0.14",
+ "contentHash": "aEcXDSYpDdD5wdIRKTqcS44f3W4capqQ1BWVRPJgacATfHkO62RX9Nnh0hUFg+rei9OLuJp0Y4zsy1fNeOXv5g=="
},
"Microsoft.EntityFrameworkCore.Analyzers": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "yMLM/aK1MikVqpjxd7PJ1Pjgztd3VAd26ZHxyjxG3RPeM9cHjvS5tCg9kAAayR6eHmBg0ffZsHdT28WfA5tTlA=="
+ "resolved": "7.0.14",
+ "contentHash": "esI4RF6mix4DDFBhWB9k1vJxAL8GouSf5ZV8oFJoVsIQ9d2J3MPgC1VL2qM9Vw5cH7Vg7TzRyKNpCRXFVkWs9w=="
},
"Microsoft.EntityFrameworkCore.Relational": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "u/33DC4S6g2hpMPgBc5Kdnlz//nqHR5c/ovgjtiP/wQ7sOd0EOdygVzUJAAOxCwbtAHDsJXS9Vc3jLFYq0yu8Q==",
+ "resolved": "7.0.14",
+ "contentHash": "MrVBnWOFYwfLMGQfrcIuqEM9Xvokv1vJeYxqNH3K3xOtAdHwHQTrKnpDP97tU+LBlvcnyXAtAtryYcpLXWtRNA==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "7.0.5",
+ "Microsoft.EntityFrameworkCore": "7.0.14",
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.Sqlite": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "2XPZB9OLF5/m13HgZp7/Dv0u8FWEJzcaBsMYR9Kp3R6aygkb3RnOijofPDTsmdhAqG9YTysCmh2bFaGs0TCc7A==",
+ "resolved": "7.0.14",
+ "contentHash": "8c8Hw2tmfy5YEsi9RL2/u2Qi9IwVbmj/yDlJy4iJPadeE3/AssLrgtobOBz4ftg2y5PVjFL59Gq7YzGLQH5q1A==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.14",
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "4C+9ct6A/Bq61Ta9Uh2td4/XwNpRCiPI03SWTa3hPJjA/g8wCw2hetbh3DDe5HcydzgDq/lRRjU/eRy3UODklQ==",
+ "resolved": "7.0.14",
+ "contentHash": "JNUkZVff1V/A/P3JiBbgt+Y2oCQSuzORxE3jOqFDbFjSFu7jHDEetJ/afSF/taa0lbyN9OpvaKjsbKk3Iis29Q==",
"dependencies": {
- "Microsoft.Data.Sqlite.Core": "7.0.5",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5",
+ "Microsoft.Data.Sqlite.Core": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14",
"Microsoft.Extensions.DependencyModel": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.SqlServer": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "cUJqCiamT0EvpKNgZEV5fqNv2MyVfKNgOPQfFINqHiIKHOYrS0nTCUJP97+UuG0JIIrP792/PwnuNjbekImtBg==",
+ "resolved": "7.0.14",
+ "contentHash": "d9hqEw4W/TdQ1WDm03uyFuDoehL6GNq/NMChFaC4dcV60I42vKdUC0fYTuE2QPunVUpf5XUTCkJ6fYGjMos2AA==",
"dependencies": {
- "Microsoft.Data.SqlClient": "5.0.1",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5"
+ "Microsoft.Data.SqlClient": "5.1.1",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14"
}
},
"Microsoft.Extensions.Caching.Abstractions": {
@@ -819,50 +793,52 @@
},
"Microsoft.IdentityModel.Abstractions": {
"type": "Transitive",
- "resolved": "6.22.0",
- "contentHash": "iI+9V+2ciCrbheeLjpmjcqCnhy+r6yCoEcid3nkoFWerHgjVuT6CPM4HODUTtUPe1uwks4wcnAujJ8u+IKogHQ=="
+ "resolved": "6.24.0",
+ "contentHash": "X6aBK56Ot15qKyG7X37KsPnrwah+Ka55NJWPppWVTDi8xWq7CJgeNw2XyaeHgE1o/mW4THwoabZkBbeG2TPBiw=="
},
"Microsoft.IdentityModel.JsonWebTokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "d3h1/BaMeylKTkdP6XwRCxuOoDJZ44V9xaXr6gl5QxmpnZGdoK3bySo3OQN8ehRLJHShb94ElLUvoXyglQtgAw==",
+ "resolved": "6.24.0",
+ "contentHash": "XDWrkThcxfuWp79AvAtg5f+uRS1BxkIbJnsG/e8VPzOWkYYuDg33emLjp5EWcwXYYIDsHnVZD/00kM/PYFQc/g==",
"dependencies": {
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Tokens": "6.24.0",
+ "System.Text.Encoding": "4.3.0",
+ "System.Text.Json": "4.7.2"
}
},
"Microsoft.IdentityModel.Logging": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "tuEhHIQwvBEhMf8I50hy8FHmRSUkffDFP5EdLsSDV4qRcl2wvOPkQxYqEzWkh+ytW6sbdJGEXElGhmhDfAxAKg==",
+ "resolved": "6.24.0",
+ "contentHash": "qLYWDOowM/zghmYKXw1yfYKlHOdS41i8t4hVXr9bSI90zHqhyhQh9GwVy8pENzs5wHeytU23DymluC9NtgYv7w==",
"dependencies": {
- "Microsoft.IdentityModel.Abstractions": "6.21.0"
+ "Microsoft.IdentityModel.Abstractions": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "0FqY5cTLQKtHrClzHEI+QxJl8OBT2vUiEQQB7UKk832JDiJJmetzYZ3AdSrPjN/3l3nkhByeWzXnhrX0JbifKg==",
+ "resolved": "6.24.0",
+ "contentHash": "+NzKCkvsQ8X1r/Ff74V7CFr9OsdMRaB6DsV+qpH7NNLdYJ8O4qHbmTnNEsjFcDmk/gVNDwhoL2gN5pkPVq0lwQ==",
"dependencies": {
- "Microsoft.IdentityModel.Logging": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Logging": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols.OpenIdConnect": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "vtSKL7n6EnAsLyxmiviusm6LKrblT2ndnNqN6rvVq6iIHAnPCK9E2DkDx6h1Jrpy1cvbp40r0cnTg23nhEAGTA==",
+ "resolved": "6.24.0",
+ "contentHash": "a/2RRrc8C9qaw8qdD9hv1ES9YKFgxaqr/SnwMSLbwQZJSUQDd4qx1K4EYgWaQWs73R+VXLyKSxN0f/uE9CsBiQ==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols": "6.21.0",
- "System.IdentityModel.Tokens.Jwt": "6.21.0"
+ "Microsoft.IdentityModel.Protocols": "6.24.0",
+ "System.IdentityModel.Tokens.Jwt": "6.24.0"
}
},
"Microsoft.IdentityModel.Tokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "AAEHZvZyb597a+QJSmtxH3n2P1nIJGpZ4Q89GTenknRx6T6zyfzf592yW/jA5e8EHN4tNMjjXHQaYWEq5+L05w==",
+ "resolved": "6.24.0",
+ "contentHash": "ZPqHi86UYuqJXJ7bLnlEctHKkPKT4lGUFbotoCNiXNCSL02emYlcxzGYsRGWWmbFEcYDMi2dcTLLYNzHqWOTsw==",
"dependencies": {
"Microsoft.CSharp": "4.5.0",
- "Microsoft.IdentityModel.Logging": "6.21.0",
+ "Microsoft.IdentityModel.Logging": "6.24.0",
"System.Security.Cryptography.Cng": "4.5.0"
}
},
@@ -993,13 +969,13 @@
},
"Newtonsoft.Json": {
"type": "Transitive",
- "resolved": "13.0.1",
- "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
+ "resolved": "13.0.3",
+ "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ=="
},
"Npgsql": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "7UVPYy2RP0ci04PED1tc9ZCaTw/DfSdSkLiGEFCAvwMwsgA/bAluj1liNzP1IpN0MFofnOF0cm1zJfmbEuCehg==",
+ "resolved": "7.0.6",
+ "contentHash": "TAqvwRnm3NJ0QvN7cvu6geJkbI0XPzGVRElVY5hF4gsgA+BnE12x6GM1TLhdeq+7ZKvvo3BD8jXKnXmr3tvdEw==",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "6.0.0",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
@@ -1007,13 +983,13 @@
},
"Npgsql.EntityFrameworkCore.PostgreSQL": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "ZYMtyG6pmLtUsFAx0/XaIlVkJM+1gArWEKD55cLLxiVlGScAphjiGj+G7Gk16yg5lhhdWx+bgXWpIUISXuS33g==",
+ "resolved": "7.0.11",
+ "contentHash": "cHEgEz0ldXc9wVANs8sJqC+3eilqefrkasCBgaVT0tyj8tb1p3/pwy2ngjboNkDG3M0z+xJsJ4jC5p8wySAM3w==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, 8.0.0)",
- "Npgsql": "7.0.4"
+ "Microsoft.EntityFrameworkCore": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.11, 8.0.0)",
+ "Npgsql": "7.0.6"
}
},
"NSec.Cryptography": {
@@ -1336,8 +1312,8 @@
},
"Serilog.Sinks.SyslogMessages": {
"type": "Transitive",
- "resolved": "2.0.6",
- "contentHash": "V2Yq2GEbk7taEPbpBLFzLXhrHrUzKf4sQu/zLrANU8XIoUn/Mr08M2E8PrcrWVXCj0R4xLMWYe0Z1sxOrMF3IA==",
+ "resolved": "2.0.9",
+ "contentHash": "y7J+/h/Nf5EAtbpa6lC1nDhK/F9kC5oxuVYmQivv242Oh4hAVMeoAk5Gv6bgb/KbmqufGPXUFkX/AlcrvZ8Ywg==",
"dependencies": {
"Serilog": "2.5.0",
"Serilog.Sinks.PeriodicBatching": "2.3.0"
@@ -1470,8 +1446,8 @@
},
"System.Configuration.ConfigurationManager": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "7T+m0kDSlIPTHIkPMIu6m6tV6qsMqJpvQWW2jIc2qi7sn40qxFo0q+7mEQAhMPXZHMKnWrnv47ntGlM/ejvw3g==",
+ "resolved": "6.0.1",
+ "contentHash": "jXw9MlUu/kRfEU0WyTptAVueupqIeE3/rl0EZDMlf8pcvJnitQ8HeVEp69rZdaStXwTV72boi/Bhw8lOeO+U2w==",
"dependencies": {
"System.Security.Cryptography.ProtectedData": "6.0.0",
"System.Security.Permissions": "6.0.0"
@@ -1630,11 +1606,11 @@
},
"System.IdentityModel.Tokens.Jwt": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "JRD8AuypBE+2zYxT3dMJomQVsPYsCqlyZhWel3J1d5nzQokSRyTueF+Q4ID3Jcu6zSZKuzOdJ1MLTkbQsDqcvQ==",
+ "resolved": "6.24.0",
+ "contentHash": "Qibsj9MPWq8S/C0FgvmsLfIlHLE7ay0MJIaAmK94ivN3VyDdglqReed5qMvdQhSL0BzK6v0Z1wB/sD88zVu6Jw==",
"dependencies": {
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"System.IO": {
@@ -2083,10 +2059,10 @@
},
"System.Runtime.Caching": {
"type": "Transitive",
- "resolved": "5.0.0",
- "contentHash": "30D6MkO8WF9jVGWZIP0hmCN8l9BTY4LCsAzLIe4xFSXzs+AjDotR7DpSmj27pFskDURzUvqYYY0ikModgBTxWw==",
+ "resolved": "6.0.0",
+ "contentHash": "E0e03kUp5X2k+UAoVl6efmI7uU7JRBWi5EIdlQ7cr0NpBGjHG4fWII35PgsBY9T4fJQ8E4QPsL0rKksU9gcL5A==",
"dependencies": {
- "System.Configuration.ConfigurationManager": "5.0.0"
+ "System.Configuration.ConfigurationManager": "6.0.0"
}
},
"System.Runtime.CompilerServices.Unsafe": {
@@ -2616,11 +2592,10 @@
"BitPay.Light": "[1.0.1907, )",
"Braintree": "[5.19.0, )",
"DnsClient": "[1.7.0, )",
+ "Duende.IdentityServer": "[6.0.4, )",
"Fido2.AspNet": "[3.0.1, )",
- "Handlebars.Net": "[2.1.2, )",
- "IdentityServer4": "[4.1.2, )",
- "IdentityServer4.AccessTokenValidation": "[3.0.1, )",
- "LaunchDarkly.ServerSdk": "[7.0.0, )",
+ "Handlebars.Net": "[2.1.4, )",
+ "LaunchDarkly.ServerSdk": "[8.0.0, )",
"MailKit": "[4.2.0, )",
"Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )",
"Microsoft.Azure.Cosmos.Table": "[1.0.8, )",
@@ -2630,7 +2605,7 @@
"Microsoft.Extensions.Configuration.EnvironmentVariables": "[6.0.1, )",
"Microsoft.Extensions.Configuration.UserSecrets": "[6.0.1, )",
"Microsoft.Extensions.Identity.Stores": "[6.0.4, )",
- "Newtonsoft.Json": "[13.0.1, )",
+ "Newtonsoft.Json": "[13.0.3, )",
"Otp.NET": "[1.2.2, )",
"Quartz": "[3.4.0, )",
"SendGrid": "[9.27.0, )",
@@ -2639,7 +2614,7 @@
"Serilog.Extensions.Logging": "[3.1.0, )",
"Serilog.Extensions.Logging.File": "[2.0.0, )",
"Serilog.Sinks.AzureCosmosDB": "[2.0.0, )",
- "Serilog.Sinks.SyslogMessages": "[2.0.6, )",
+ "Serilog.Sinks.SyslogMessages": "[2.0.9, )",
"Stripe.net": "[40.0.0, )",
"YubicoDotNetClient": "[1.2.0, )"
}
@@ -2647,29 +2622,29 @@
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "Dapper": "[2.0.123, )"
+ "Core": "[2023.12.0, )",
+ "Dapper": "[2.1.24, )"
}
},
"infrastructure.entityframework": {
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )",
- "Core": "[2023.10.2, )",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )",
- "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )",
- "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )",
- "Npgsql.EntityFrameworkCore.PostgreSQL": "[7.0.4, )",
+ "Core": "[2023.12.0, )",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.14, )",
+ "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.14, )",
+ "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.14, )",
+ "Npgsql.EntityFrameworkCore.PostgreSQL": "[7.0.11, )",
"Pomelo.EntityFrameworkCore.MySql": "[7.0.0, )",
- "linq2db.EntityFrameworkCore": "[7.5.0, )"
+ "linq2db.EntityFrameworkCore": "[7.6.0, )"
}
},
"sharedweb": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "Infrastructure.Dapper": "[2023.10.2, )",
- "Infrastructure.EntityFramework": "[2023.10.2, )"
+ "Core": "[2023.12.0, )",
+ "Infrastructure.Dapper": "[2023.12.0, )",
+ "Infrastructure.EntityFramework": "[2023.12.0, )"
}
}
}
diff --git a/src/Icons/packages.lock.json b/src/Icons/packages.lock.json
index 23a031b4e2..ff0d461241 100644
--- a/src/Icons/packages.lock.json
+++ b/src/Icons/packages.lock.json
@@ -182,8 +182,8 @@
},
"Dapper": {
"type": "Transitive",
- "resolved": "2.0.123",
- "contentHash": "RDFF4rBLLmbpi6pwkY7q/M6UXHRJEOerplDGE5jwEkP/JGJnBauAClYavNKJPW1yOTWRPIyfj4is3EaJxQXILQ=="
+ "resolved": "2.1.24",
+ "contentHash": "/2t2vsdJyZRsk13AsWigZpsuFvEwK+o3v862cEULXoww905gyKhJFSuwmZI/4Ui9COX9ZCFCI09UHyH4wVYl3A=="
},
"DnsClient": {
"type": "Transitive",
@@ -193,6 +193,24 @@
"Microsoft.Win32.Registry": "5.0.0"
}
},
+ "Duende.IdentityServer": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "4HVjzx1F8v5J+U7oa8RGAQGj2QzmzNSu87r18Sh+dlh10uyZZL8teAaT/FaVLDObnfItGdPFvN8mwpF/HkI3Xw==",
+ "dependencies": {
+ "Duende.IdentityServer.Storage": "6.0.4",
+ "Microsoft.AspNetCore.Authentication.OpenIdConnect": "6.0.0"
+ }
+ },
+ "Duende.IdentityServer.Storage": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "s5gAjfbpr2IMgI+fU2Nx+2AZdzstmbt9gpo13iX7GwvqSeSaBVqj9ZskAN0R2KF1OemPdZuGnfaTcevdXMUrrw==",
+ "dependencies": {
+ "IdentityModel": "6.0.0",
+ "Microsoft.AspNetCore.DataProtection.Abstractions": "6.0.0"
+ }
+ },
"Fido2": {
"type": "Transitive",
"resolved": "3.0.1",
@@ -221,57 +239,16 @@
},
"Handlebars.Net": {
"type": "Transitive",
- "resolved": "2.1.2",
- "contentHash": "p60QyeBYpZmcZdIXRMqs9XySIBaxJ0lj3+QD0EJVr4ybTigOTCumXMMin5dPwjo9At1UwkDZ3gGwa1lmGjG6DA==",
+ "resolved": "2.1.4",
+ "contentHash": "Od7MWDfGxYKRtxETFMlcvCrY8hAqyuXZDX4EsOfiI/jzh+PVBuVxazHBC1HmVqTKX1JnRtoxIMcH95K9UFlYog==",
"dependencies": {
"Microsoft.CSharp": "4.7.0"
}
},
"IdentityModel": {
"type": "Transitive",
- "resolved": "4.4.0",
- "contentHash": "b18wrIx5wnZlMxAX7oVsE+nDtAJ4hajYlH0xPlaRvo4r/fz08K6pPeZvbiqS9nfNbzfIgLFmNX+FL9qR9ZR5PA==",
- "dependencies": {
- "Newtonsoft.Json": "11.0.2",
- "System.Text.Encodings.Web": "4.7.0"
- }
- },
- "IdentityModel.AspNetCore.OAuth2Introspection": {
- "type": "Transitive",
- "resolved": "4.0.1",
- "contentHash": "ZNdMZMaj9fqR3j50vYsu+1U3QGd6n8+fqwf+a8mCTcmXGor+HgFDfdq0mM34bsmD6uEgAQup7sv2ZW5kR36dbA==",
- "dependencies": {
- "IdentityModel": "4.0.0"
- }
- },
- "IdentityServer4": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "blaxxGuOA7v/w1q+fxn97wZ+x2ecG1ZD4mc/N/ZOXMNeFZZhqv+4LF26Gecyik3nWrJPmbMEtQbLmRsKG8k61w==",
- "dependencies": {
- "IdentityModel": "4.4.0",
- "IdentityServer4.Storage": "4.1.2",
- "Microsoft.AspNetCore.Authentication.OpenIdConnect": "3.1.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.6.0",
- "Newtonsoft.Json": "12.0.2"
- }
- },
- "IdentityServer4.AccessTokenValidation": {
- "type": "Transitive",
- "resolved": "3.0.1",
- "contentHash": "qu/M6UyN4o9NVep7q545Ms7hYAnsQqSdLbN1Fjjrn4m35lyBfeQPSSNzDryAKHbodyWOQfHaOqKEyMEJQ5Rpgw==",
- "dependencies": {
- "IdentityModel.AspNetCore.OAuth2Introspection": "4.0.1",
- "Microsoft.AspNetCore.Authentication.JwtBearer": "3.0.0"
- }
- },
- "IdentityServer4.Storage": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "KoSffyZyyeCNTIyJiZnCuPakJ1QbCHlpty6gbWUj/7yl+w0PXIchgmmJnJSvddzBb8iZ2xew/vGlxWUIP17P2g==",
- "dependencies": {
- "IdentityModel": "4.4.0"
- }
+ "resolved": "6.0.0",
+ "contentHash": "eVHCR7a6m/dm5RFcBzE3qs/Jg5j9R5Rjpu8aTOv9e4AFvaQtBXb5ah7kmwU+YwA0ufRwz4wf1hnIvsD2hSnI4g=="
},
"LaunchDarkly.Cache": {
"type": "Transitive",
@@ -280,26 +257,27 @@
},
"LaunchDarkly.CommonSdk": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "YYYq+41gZRMQ8dIoMC6HOq/dI+4RY3HsexLLAaE9T1+1tVMeQkbCqak7sVeKX4QcE7xlXx23lWgipYUkRoRUyw==",
+ "resolved": "6.2.0",
+ "contentHash": "eLeb+tTNLwOxlUIsZWzJlcPmG9Wyf20NYyucP6MW6aqKW6doKFeSO+aJe0z+WyijbvfX1Dp1U1HQatOu6fa1Gg==",
"dependencies": {
+ "LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
},
"LaunchDarkly.EventSource": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "DN44Ry5M4lyrjiF7LEu0Ijco7Wm8R7mJopN+giYsYjkQlszsXdFvm3POoehIDAOtL1HHl5bZvF9k9xK034u3IA==",
+ "resolved": "5.1.0",
+ "contentHash": "PztDWiMvPWODx+kfBnCroZ8Lpya4nPc7ZO4TZysOogODbVXDDPDYrdcgVivCMgf4davhGrp61ekvZc+Uy1NYMA==",
"dependencies": {
- "LaunchDarkly.Logging": "[1.0.1, 3.0.0)"
+ "LaunchDarkly.Logging": "[2.0.0, 3.0.0)"
}
},
"LaunchDarkly.InternalSdk": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "jW8VEfFciuCcJUEuvSzmrbMVYYXwGL/ZWHUZLiA4aDOQ1LcEXp32uK405NQW/izEypUfWB+9TaSjPpFIC+5Wzw==",
+ "resolved": "3.3.0",
+ "contentHash": "TBvs/B6iyXp9MqRKjIoBZ/T0+/xgp5xg+MuHqr5U+N5+7DghtI2FnsmgeBedTIeQdA3Tk8Z4Bj4hlqU9FBiEnw==",
"dependencies": {
- "LaunchDarkly.CommonSdk": "6.0.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
"LaunchDarkly.Logging": "[2.0.0, 3.0.0)",
"System.Collections.Immutable": "1.7.1"
}
@@ -314,13 +292,13 @@
},
"LaunchDarkly.ServerSdk": {
"type": "Transitive",
- "resolved": "7.0.0",
- "contentHash": "gkTWb+f5QlsXIqFAciBef3qKZU2y0Hy3Fpt4pvZoxNcnBKg2PNTDSnbpbYEKPeQ1yk1avNaI/tKprnahfrmJFg==",
+ "resolved": "8.0.0",
+ "contentHash": "vosFEXYJABuIDIA0+6sncalTmrKXEkBKeqzuP9/vvcCVlFSXUl/ZnrkrAVg3ViDWDi7kjpJSk2W3h5D0TUfCGA==",
"dependencies": {
"LaunchDarkly.Cache": "1.0.2",
- "LaunchDarkly.CommonSdk": "6.0.0",
- "LaunchDarkly.EventSource": "5.0.1",
- "LaunchDarkly.InternalSdk": "3.1.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
+ "LaunchDarkly.EventSource": "5.1.0",
+ "LaunchDarkly.InternalSdk": "3.3.0",
"LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
@@ -332,16 +310,16 @@
},
"linq2db": {
"type": "Transitive",
- "resolved": "5.2.1",
- "contentHash": "OOBM8s39zhbZAgqFnl2KGxT5RqBDw21X69U528qV2PgQispaA3f+or0ILrLEgnNIJuB4EBgaw8gC6ttSHn4X0Q=="
+ "resolved": "5.3.1",
+ "contentHash": "707mIbEmtptvKeUW940UwoNwq05I7OUu0VWtclLtyYaASp+ugX4I/Er1UVpeldsDawqlVMXB5EQ5/Oar6AkUGQ=="
},
"linq2db.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.5.0",
- "contentHash": "ePHzO99xbObgMLlAFh08of1SnVhg6j4Su9327DrIB7RZWCgtQIX6k+nbl+HRVOooAndZSs7b+DduSgdnJjaJGw==",
+ "resolved": "7.6.0",
+ "contentHash": "T1W9o8wVzApsUwu7SRg/L7487kaiLQYt2AqRVnXVGfobD+ZKy2oRsUMws0PICtciaz4qbfLp/r/+NksfuYsFlw==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Relational": "7.0.0",
- "linq2db": "5.2.1"
+ "linq2db": "5.3.1"
}
},
"MailKit": {
@@ -362,10 +340,10 @@
},
"Microsoft.AspNetCore.Authentication.OpenIdConnect": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "O1cAQYUTU8EfRqwc5/rfTns4E4hKlFlg59fuKRrST+PzsxI6H07KqRN/JjdYhAuVYxF8jPnIGbj+zuc5paOWUw==",
+ "resolved": "6.0.0",
+ "contentHash": "cJxdro36spFzk/K2OFCddM6vZ+yoj6ug8mTFRH3Gdv1Pul/buSuCtfb/FSCp31UmS5S4C1315dU7wX3ErLFuDg==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.5.0"
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.10.0"
}
},
"Microsoft.AspNetCore.Cryptography.Internal": {
@@ -398,8 +376,8 @@
},
"Microsoft.AspNetCore.DataProtection.Abstractions": {
"type": "Transitive",
- "resolved": "3.1.32",
- "contentHash": "MPL4iVyiaRxnOUY5VATHjvhDWaAEFb77KFiUxVRklv3Z3v+STofUr1UG/aCt1O9cgN7FVTDaC5A7U+zsLub8Xg=="
+ "resolved": "6.0.0",
+ "contentHash": "Z/UU4NEBm5UgNufJmw+j5baW26ytCOIZ0G7sZocPaOzsUeBon1bkM3lSMNZQG2GmDjAIVP2XMSODf2jzSGbibw=="
},
"Microsoft.Azure.Amqp": {
"type": "Transitive",
@@ -484,48 +462,44 @@
},
"Microsoft.Data.SqlClient": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "uu8dfrsx081cSbEevWuZAvqdmANDGJkbLBL2G3j0LAZxX1Oy8RCVAaC4Lcuak6jNicWP6CWvHqBTIEmQNSxQlw==",
+ "resolved": "5.1.1",
+ "contentHash": "MW5E9HFvCaV069o8b6YpuRDPBux8s96qDnOJ+4N9QNUCs7c5W3KxwQ+ftpAjbMUlImL+c9WR+l+f5hzjkqhu2g==",
"dependencies": {
- "Azure.Identity": "1.6.0",
- "Microsoft.Data.SqlClient.SNI.runtime": "5.0.1",
- "Microsoft.Identity.Client": "4.45.0",
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.21.0",
+ "Azure.Identity": "1.7.0",
+ "Microsoft.Data.SqlClient.SNI.runtime": "5.1.0",
+ "Microsoft.Identity.Client": "4.47.2",
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.24.0",
"Microsoft.SqlServer.Server": "1.0.0",
- "Microsoft.Win32.Registry": "5.0.0",
- "System.Buffers": "4.5.1",
- "System.Configuration.ConfigurationManager": "5.0.0",
- "System.Diagnostics.DiagnosticSource": "5.0.0",
- "System.IO": "4.3.0",
- "System.Resources.ResourceManager": "4.3.0",
- "System.Runtime.Caching": "5.0.0",
+ "System.Configuration.ConfigurationManager": "6.0.1",
+ "System.Diagnostics.DiagnosticSource": "6.0.0",
+ "System.Runtime.Caching": "6.0.0",
"System.Security.Cryptography.Cng": "5.0.0",
"System.Security.Principal.Windows": "5.0.0",
- "System.Text.Encoding.CodePages": "5.0.0",
- "System.Text.Encodings.Web": "4.7.2"
+ "System.Text.Encoding.CodePages": "6.0.0",
+ "System.Text.Encodings.Web": "6.0.0"
}
},
"Microsoft.Data.SqlClient.SNI.runtime": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "y0X5MxiNdbITJYoafJ2ruaX6hqO0twpCGR/ipiDOe85JKLU8WL4TuAQfDe5qtt3bND5Je26HnrarLSAMMnVTNg=="
+ "resolved": "5.1.0",
+ "contentHash": "jVsElisM5sfBzaaV9kdq2NXZLwIbytetnsOIlJ0cQGgQP4zFNBmkfHBnpwtmKrtBJBEV9+9PVQPVrcCVhDgcIg=="
},
"Microsoft.Data.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "FTerRmQPqHrCrnoUzhBu+E+1DNGwyrAMLqHkAqOOOu5pGfyMOj8qQUBxI/gDtWtG11p49UxSfWmBzRNlwZqfUg==",
+ "resolved": "7.0.14",
+ "contentHash": "qvYae3/v9Fvqsjp/7OKQBuJK+Uc3m/WctfpIUMmGMDot2Bd8UWBKiMSlh26UtfQa9x4N+k7NxCT+AbZVoNrCdg==",
"dependencies": {
"SQLitePCLRaw.core": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "RXbRLHHWP2Z3pq8qcL5nQ6LPeoOyp8hasM5bd0Te8PiQi3RjWQR4tcbdY5XMqQ+oTO9wA8/RLhZRn/hnxlTDnQ==",
+ "resolved": "7.0.14",
+ "contentHash": "0KYkAemPygW6yzifciFlmMzkO4sI4Dw69xLgwg3ui5rXJS5XvzuAWVvfdrKJciqeCbCnVS/ZbOWpcwWgqce5bQ==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Abstractions": "7.0.5",
- "Microsoft.EntityFrameworkCore.Analyzers": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Abstractions": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Analyzers": "7.0.14",
"Microsoft.Extensions.Caching.Memory": "7.0.0",
"Microsoft.Extensions.DependencyInjection": "7.0.0",
"Microsoft.Extensions.Logging": "7.0.0"
@@ -533,49 +507,49 @@
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "iwQso+hFRsEWjhH2WsEQj1D2QE5BlEXiXEt6A3SlYTPRPdZsyTNDeDDEdtxL+H/UJPQgQYY+9SMMRcEiXBmCAA=="
+ "resolved": "7.0.14",
+ "contentHash": "aEcXDSYpDdD5wdIRKTqcS44f3W4capqQ1BWVRPJgacATfHkO62RX9Nnh0hUFg+rei9OLuJp0Y4zsy1fNeOXv5g=="
},
"Microsoft.EntityFrameworkCore.Analyzers": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "yMLM/aK1MikVqpjxd7PJ1Pjgztd3VAd26ZHxyjxG3RPeM9cHjvS5tCg9kAAayR6eHmBg0ffZsHdT28WfA5tTlA=="
+ "resolved": "7.0.14",
+ "contentHash": "esI4RF6mix4DDFBhWB9k1vJxAL8GouSf5ZV8oFJoVsIQ9d2J3MPgC1VL2qM9Vw5cH7Vg7TzRyKNpCRXFVkWs9w=="
},
"Microsoft.EntityFrameworkCore.Relational": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "u/33DC4S6g2hpMPgBc5Kdnlz//nqHR5c/ovgjtiP/wQ7sOd0EOdygVzUJAAOxCwbtAHDsJXS9Vc3jLFYq0yu8Q==",
+ "resolved": "7.0.14",
+ "contentHash": "MrVBnWOFYwfLMGQfrcIuqEM9Xvokv1vJeYxqNH3K3xOtAdHwHQTrKnpDP97tU+LBlvcnyXAtAtryYcpLXWtRNA==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "7.0.5",
+ "Microsoft.EntityFrameworkCore": "7.0.14",
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.Sqlite": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "2XPZB9OLF5/m13HgZp7/Dv0u8FWEJzcaBsMYR9Kp3R6aygkb3RnOijofPDTsmdhAqG9YTysCmh2bFaGs0TCc7A==",
+ "resolved": "7.0.14",
+ "contentHash": "8c8Hw2tmfy5YEsi9RL2/u2Qi9IwVbmj/yDlJy4iJPadeE3/AssLrgtobOBz4ftg2y5PVjFL59Gq7YzGLQH5q1A==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.14",
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "4C+9ct6A/Bq61Ta9Uh2td4/XwNpRCiPI03SWTa3hPJjA/g8wCw2hetbh3DDe5HcydzgDq/lRRjU/eRy3UODklQ==",
+ "resolved": "7.0.14",
+ "contentHash": "JNUkZVff1V/A/P3JiBbgt+Y2oCQSuzORxE3jOqFDbFjSFu7jHDEetJ/afSF/taa0lbyN9OpvaKjsbKk3Iis29Q==",
"dependencies": {
- "Microsoft.Data.Sqlite.Core": "7.0.5",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5",
+ "Microsoft.Data.Sqlite.Core": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14",
"Microsoft.Extensions.DependencyModel": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.SqlServer": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "cUJqCiamT0EvpKNgZEV5fqNv2MyVfKNgOPQfFINqHiIKHOYrS0nTCUJP97+UuG0JIIrP792/PwnuNjbekImtBg==",
+ "resolved": "7.0.14",
+ "contentHash": "d9hqEw4W/TdQ1WDm03uyFuDoehL6GNq/NMChFaC4dcV60I42vKdUC0fYTuE2QPunVUpf5XUTCkJ6fYGjMos2AA==",
"dependencies": {
- "Microsoft.Data.SqlClient": "5.0.1",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5"
+ "Microsoft.Data.SqlClient": "5.1.1",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14"
}
},
"Microsoft.Extensions.Caching.Abstractions": {
@@ -828,50 +802,52 @@
},
"Microsoft.IdentityModel.Abstractions": {
"type": "Transitive",
- "resolved": "6.22.0",
- "contentHash": "iI+9V+2ciCrbheeLjpmjcqCnhy+r6yCoEcid3nkoFWerHgjVuT6CPM4HODUTtUPe1uwks4wcnAujJ8u+IKogHQ=="
+ "resolved": "6.24.0",
+ "contentHash": "X6aBK56Ot15qKyG7X37KsPnrwah+Ka55NJWPppWVTDi8xWq7CJgeNw2XyaeHgE1o/mW4THwoabZkBbeG2TPBiw=="
},
"Microsoft.IdentityModel.JsonWebTokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "d3h1/BaMeylKTkdP6XwRCxuOoDJZ44V9xaXr6gl5QxmpnZGdoK3bySo3OQN8ehRLJHShb94ElLUvoXyglQtgAw==",
+ "resolved": "6.24.0",
+ "contentHash": "XDWrkThcxfuWp79AvAtg5f+uRS1BxkIbJnsG/e8VPzOWkYYuDg33emLjp5EWcwXYYIDsHnVZD/00kM/PYFQc/g==",
"dependencies": {
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Tokens": "6.24.0",
+ "System.Text.Encoding": "4.3.0",
+ "System.Text.Json": "4.7.2"
}
},
"Microsoft.IdentityModel.Logging": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "tuEhHIQwvBEhMf8I50hy8FHmRSUkffDFP5EdLsSDV4qRcl2wvOPkQxYqEzWkh+ytW6sbdJGEXElGhmhDfAxAKg==",
+ "resolved": "6.24.0",
+ "contentHash": "qLYWDOowM/zghmYKXw1yfYKlHOdS41i8t4hVXr9bSI90zHqhyhQh9GwVy8pENzs5wHeytU23DymluC9NtgYv7w==",
"dependencies": {
- "Microsoft.IdentityModel.Abstractions": "6.21.0"
+ "Microsoft.IdentityModel.Abstractions": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "0FqY5cTLQKtHrClzHEI+QxJl8OBT2vUiEQQB7UKk832JDiJJmetzYZ3AdSrPjN/3l3nkhByeWzXnhrX0JbifKg==",
+ "resolved": "6.24.0",
+ "contentHash": "+NzKCkvsQ8X1r/Ff74V7CFr9OsdMRaB6DsV+qpH7NNLdYJ8O4qHbmTnNEsjFcDmk/gVNDwhoL2gN5pkPVq0lwQ==",
"dependencies": {
- "Microsoft.IdentityModel.Logging": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Logging": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols.OpenIdConnect": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "vtSKL7n6EnAsLyxmiviusm6LKrblT2ndnNqN6rvVq6iIHAnPCK9E2DkDx6h1Jrpy1cvbp40r0cnTg23nhEAGTA==",
+ "resolved": "6.24.0",
+ "contentHash": "a/2RRrc8C9qaw8qdD9hv1ES9YKFgxaqr/SnwMSLbwQZJSUQDd4qx1K4EYgWaQWs73R+VXLyKSxN0f/uE9CsBiQ==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols": "6.21.0",
- "System.IdentityModel.Tokens.Jwt": "6.21.0"
+ "Microsoft.IdentityModel.Protocols": "6.24.0",
+ "System.IdentityModel.Tokens.Jwt": "6.24.0"
}
},
"Microsoft.IdentityModel.Tokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "AAEHZvZyb597a+QJSmtxH3n2P1nIJGpZ4Q89GTenknRx6T6zyfzf592yW/jA5e8EHN4tNMjjXHQaYWEq5+L05w==",
+ "resolved": "6.24.0",
+ "contentHash": "ZPqHi86UYuqJXJ7bLnlEctHKkPKT4lGUFbotoCNiXNCSL02emYlcxzGYsRGWWmbFEcYDMi2dcTLLYNzHqWOTsw==",
"dependencies": {
"Microsoft.CSharp": "4.5.0",
- "Microsoft.IdentityModel.Logging": "6.21.0",
+ "Microsoft.IdentityModel.Logging": "6.24.0",
"System.Security.Cryptography.Cng": "4.5.0"
}
},
@@ -1002,13 +978,13 @@
},
"Newtonsoft.Json": {
"type": "Transitive",
- "resolved": "13.0.1",
- "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
+ "resolved": "13.0.3",
+ "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ=="
},
"Npgsql": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "7UVPYy2RP0ci04PED1tc9ZCaTw/DfSdSkLiGEFCAvwMwsgA/bAluj1liNzP1IpN0MFofnOF0cm1zJfmbEuCehg==",
+ "resolved": "7.0.6",
+ "contentHash": "TAqvwRnm3NJ0QvN7cvu6geJkbI0XPzGVRElVY5hF4gsgA+BnE12x6GM1TLhdeq+7ZKvvo3BD8jXKnXmr3tvdEw==",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "6.0.0",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
@@ -1016,13 +992,13 @@
},
"Npgsql.EntityFrameworkCore.PostgreSQL": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "ZYMtyG6pmLtUsFAx0/XaIlVkJM+1gArWEKD55cLLxiVlGScAphjiGj+G7Gk16yg5lhhdWx+bgXWpIUISXuS33g==",
+ "resolved": "7.0.11",
+ "contentHash": "cHEgEz0ldXc9wVANs8sJqC+3eilqefrkasCBgaVT0tyj8tb1p3/pwy2ngjboNkDG3M0z+xJsJ4jC5p8wySAM3w==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, 8.0.0)",
- "Npgsql": "7.0.4"
+ "Microsoft.EntityFrameworkCore": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.11, 8.0.0)",
+ "Npgsql": "7.0.6"
}
},
"NSec.Cryptography": {
@@ -1345,8 +1321,8 @@
},
"Serilog.Sinks.SyslogMessages": {
"type": "Transitive",
- "resolved": "2.0.6",
- "contentHash": "V2Yq2GEbk7taEPbpBLFzLXhrHrUzKf4sQu/zLrANU8XIoUn/Mr08M2E8PrcrWVXCj0R4xLMWYe0Z1sxOrMF3IA==",
+ "resolved": "2.0.9",
+ "contentHash": "y7J+/h/Nf5EAtbpa6lC1nDhK/F9kC5oxuVYmQivv242Oh4hAVMeoAk5Gv6bgb/KbmqufGPXUFkX/AlcrvZ8Ywg==",
"dependencies": {
"Serilog": "2.5.0",
"Serilog.Sinks.PeriodicBatching": "2.3.0"
@@ -1479,8 +1455,8 @@
},
"System.Configuration.ConfigurationManager": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "7T+m0kDSlIPTHIkPMIu6m6tV6qsMqJpvQWW2jIc2qi7sn40qxFo0q+7mEQAhMPXZHMKnWrnv47ntGlM/ejvw3g==",
+ "resolved": "6.0.1",
+ "contentHash": "jXw9MlUu/kRfEU0WyTptAVueupqIeE3/rl0EZDMlf8pcvJnitQ8HeVEp69rZdaStXwTV72boi/Bhw8lOeO+U2w==",
"dependencies": {
"System.Security.Cryptography.ProtectedData": "6.0.0",
"System.Security.Permissions": "6.0.0"
@@ -1639,11 +1615,11 @@
},
"System.IdentityModel.Tokens.Jwt": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "JRD8AuypBE+2zYxT3dMJomQVsPYsCqlyZhWel3J1d5nzQokSRyTueF+Q4ID3Jcu6zSZKuzOdJ1MLTkbQsDqcvQ==",
+ "resolved": "6.24.0",
+ "contentHash": "Qibsj9MPWq8S/C0FgvmsLfIlHLE7ay0MJIaAmK94ivN3VyDdglqReed5qMvdQhSL0BzK6v0Z1wB/sD88zVu6Jw==",
"dependencies": {
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"System.IO": {
@@ -2092,10 +2068,10 @@
},
"System.Runtime.Caching": {
"type": "Transitive",
- "resolved": "5.0.0",
- "contentHash": "30D6MkO8WF9jVGWZIP0hmCN8l9BTY4LCsAzLIe4xFSXzs+AjDotR7DpSmj27pFskDURzUvqYYY0ikModgBTxWw==",
+ "resolved": "6.0.0",
+ "contentHash": "E0e03kUp5X2k+UAoVl6efmI7uU7JRBWi5EIdlQ7cr0NpBGjHG4fWII35PgsBY9T4fJQ8E4QPsL0rKksU9gcL5A==",
"dependencies": {
- "System.Configuration.ConfigurationManager": "5.0.0"
+ "System.Configuration.ConfigurationManager": "6.0.0"
}
},
"System.Runtime.CompilerServices.Unsafe": {
@@ -2625,11 +2601,10 @@
"BitPay.Light": "[1.0.1907, )",
"Braintree": "[5.19.0, )",
"DnsClient": "[1.7.0, )",
+ "Duende.IdentityServer": "[6.0.4, )",
"Fido2.AspNet": "[3.0.1, )",
- "Handlebars.Net": "[2.1.2, )",
- "IdentityServer4": "[4.1.2, )",
- "IdentityServer4.AccessTokenValidation": "[3.0.1, )",
- "LaunchDarkly.ServerSdk": "[7.0.0, )",
+ "Handlebars.Net": "[2.1.4, )",
+ "LaunchDarkly.ServerSdk": "[8.0.0, )",
"MailKit": "[4.2.0, )",
"Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )",
"Microsoft.Azure.Cosmos.Table": "[1.0.8, )",
@@ -2639,7 +2614,7 @@
"Microsoft.Extensions.Configuration.EnvironmentVariables": "[6.0.1, )",
"Microsoft.Extensions.Configuration.UserSecrets": "[6.0.1, )",
"Microsoft.Extensions.Identity.Stores": "[6.0.4, )",
- "Newtonsoft.Json": "[13.0.1, )",
+ "Newtonsoft.Json": "[13.0.3, )",
"Otp.NET": "[1.2.2, )",
"Quartz": "[3.4.0, )",
"SendGrid": "[9.27.0, )",
@@ -2648,7 +2623,7 @@
"Serilog.Extensions.Logging": "[3.1.0, )",
"Serilog.Extensions.Logging.File": "[2.0.0, )",
"Serilog.Sinks.AzureCosmosDB": "[2.0.0, )",
- "Serilog.Sinks.SyslogMessages": "[2.0.6, )",
+ "Serilog.Sinks.SyslogMessages": "[2.0.9, )",
"Stripe.net": "[40.0.0, )",
"YubicoDotNetClient": "[1.2.0, )"
}
@@ -2656,29 +2631,29 @@
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "Dapper": "[2.0.123, )"
+ "Core": "[2023.12.0, )",
+ "Dapper": "[2.1.24, )"
}
},
"infrastructure.entityframework": {
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )",
- "Core": "[2023.10.2, )",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )",
- "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )",
- "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )",
- "Npgsql.EntityFrameworkCore.PostgreSQL": "[7.0.4, )",
+ "Core": "[2023.12.0, )",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.14, )",
+ "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.14, )",
+ "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.14, )",
+ "Npgsql.EntityFrameworkCore.PostgreSQL": "[7.0.11, )",
"Pomelo.EntityFrameworkCore.MySql": "[7.0.0, )",
- "linq2db.EntityFrameworkCore": "[7.5.0, )"
+ "linq2db.EntityFrameworkCore": "[7.6.0, )"
}
},
"sharedweb": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "Infrastructure.Dapper": "[2023.10.2, )",
- "Infrastructure.EntityFramework": "[2023.10.2, )"
+ "Core": "[2023.12.0, )",
+ "Infrastructure.Dapper": "[2023.12.0, )",
+ "Infrastructure.EntityFramework": "[2023.12.0, )"
}
}
}
diff --git a/src/Identity/Controllers/AccountsController.cs b/src/Identity/Controllers/AccountsController.cs
index 9073884d8c..9469673e1a 100644
--- a/src/Identity/Controllers/AccountsController.cs
+++ b/src/Identity/Controllers/AccountsController.cs
@@ -1,6 +1,8 @@
using Bit.Core;
+using Bit.Core.Auth.Enums;
using Bit.Core.Auth.Models.Api.Request.Accounts;
using Bit.Core.Auth.Models.Api.Response.Accounts;
+using Bit.Core.Auth.Models.Business.Tokenables;
using Bit.Core.Auth.Services;
using Bit.Core.Auth.Utilities;
using Bit.Core.Enums;
@@ -8,9 +10,9 @@ using Bit.Core.Exceptions;
using Bit.Core.Models.Data;
using Bit.Core.Repositories;
using Bit.Core.Services;
+using Bit.Core.Tokens;
using Bit.Core.Utilities;
using Bit.SharedWeb.Utilities;
-using Fido2NetLib;
using Microsoft.AspNetCore.Mvc;
namespace Bit.Identity.Controllers;
@@ -23,17 +25,21 @@ public class AccountsController : Controller
private readonly IUserRepository _userRepository;
private readonly IUserService _userService;
private readonly ICaptchaValidationService _captchaValidationService;
+ private readonly IDataProtectorTokenFactory _assertionOptionsDataProtector;
+
public AccountsController(
ILogger logger,
IUserRepository userRepository,
IUserService userService,
- ICaptchaValidationService captchaValidationService)
+ ICaptchaValidationService captchaValidationService,
+ IDataProtectorTokenFactory assertionOptionsDataProtector)
{
_logger = logger;
_userRepository = userRepository;
_userService = userService;
_captchaValidationService = captchaValidationService;
+ _assertionOptionsDataProtector = assertionOptionsDataProtector;
}
// Moved from API, If you modify this endpoint, please update API as well. Self hosted installs still use the API endpoints.
@@ -69,42 +75,25 @@ public class AccountsController : Controller
kdfInformation = new UserKdfInformation
{
Kdf = KdfType.PBKDF2_SHA256,
- KdfIterations = 100000,
+ KdfIterations = AuthConstants.PBKDF2_ITERATIONS.Default,
};
}
return new PreloginResponseModel(kdfInformation);
}
- [HttpPost("webauthn-assertion-options")]
- [ApiExplorerSettings(IgnoreApi = true)] // Disable Swagger due to CredentialCreateOptions not converting properly
+ [HttpGet("webauthn/assertion-options")]
[RequireFeature(FeatureFlagKeys.PasswordlessLogin)]
- // TODO: Create proper models for this call
- public async Task PostWebAuthnAssertionOptions([FromBody] PreloginRequestModel model)
+ public WebAuthnLoginAssertionOptionsResponseModel GetWebAuthnLoginAssertionOptions()
{
- var user = await _userRepository.GetByEmailAsync(model.Email);
- if (user == null)
+ var options = _userService.StartWebAuthnLoginAssertion();
+
+ var tokenable = new WebAuthnLoginAssertionOptionsTokenable(WebAuthnLoginAssertionOptionsScope.Authentication, options);
+ var token = _assertionOptionsDataProtector.Protect(tokenable);
+
+ return new WebAuthnLoginAssertionOptionsResponseModel
{
- // TODO: return something? possible enumeration attacks with this response
- return new AssertionOptions();
- }
-
- var options = await _userService.StartWebAuthnLoginAssertionAsync(user);
- return options;
- }
-
- [HttpPost("webauthn-assertion")]
- [RequireFeature(FeatureFlagKeys.PasswordlessLogin)]
- // TODO: Create proper models for this call
- public async Task PostWebAuthnAssertion([FromBody] PreloginRequestModel model)
- {
- var user = await _userRepository.GetByEmailAsync(model.Email);
- if (user == null)
- {
- // TODO: proper response here?
- throw new BadRequestException();
- }
-
- var token = await _userService.CompleteWebAuthLoginAssertionAsync(null, user);
- return token;
+ Options = options,
+ Token = token
+ };
}
}
diff --git a/src/Identity/Controllers/SsoController.cs b/src/Identity/Controllers/SsoController.cs
index e5fc6a0eb4..e5dfc0ac60 100644
--- a/src/Identity/Controllers/SsoController.cs
+++ b/src/Identity/Controllers/SsoController.cs
@@ -5,9 +5,9 @@ using Bit.Core.Entities;
using Bit.Core.Models.Api;
using Bit.Core.Repositories;
using Bit.Identity.Models;
+using Duende.IdentityServer;
+using Duende.IdentityServer.Services;
using IdentityModel;
-using IdentityServer4;
-using IdentityServer4.Services;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Localization;
using Microsoft.AspNetCore.Mvc;
@@ -267,7 +267,7 @@ public class SsoController : Controller
}
}
- private bool IsNativeClient(IdentityServer4.Models.AuthorizationRequest context)
+ private bool IsNativeClient(Duende.IdentityServer.Models.AuthorizationRequest context)
{
return !context.RedirectUri.StartsWith("https", StringComparison.Ordinal)
&& !context.RedirectUri.StartsWith("http", StringComparison.Ordinal);
diff --git a/src/Identity/IdentityServer/ApiClient.cs b/src/Identity/IdentityServer/ApiClient.cs
index 8d2a294bec..d4eafe1d48 100644
--- a/src/Identity/IdentityServer/ApiClient.cs
+++ b/src/Identity/IdentityServer/ApiClient.cs
@@ -1,5 +1,5 @@
using Bit.Core.Settings;
-using IdentityServer4.Models;
+using Duende.IdentityServer.Models;
namespace Bit.Identity.IdentityServer;
@@ -13,7 +13,7 @@ public class ApiClient : Client
string[] scopes = null)
{
ClientId = id;
- AllowedGrantTypes = new[] { GrantType.ResourceOwnerPassword, GrantType.AuthorizationCode };
+ AllowedGrantTypes = new[] { GrantType.ResourceOwnerPassword, GrantType.AuthorizationCode, WebAuthnGrantValidator.GrantType };
RefreshTokenExpiration = TokenExpiration.Sliding;
RefreshTokenUsage = TokenUsage.ReUse;
SlidingRefreshTokenLifetime = 86400 * refreshTokenSlidingDays;
diff --git a/src/Identity/IdentityServer/ApiResources.cs b/src/Identity/IdentityServer/ApiResources.cs
index d23c06d7db..aa4104127c 100644
--- a/src/Identity/IdentityServer/ApiResources.cs
+++ b/src/Identity/IdentityServer/ApiResources.cs
@@ -1,7 +1,7 @@
using Bit.Core.Identity;
using Bit.Core.IdentityServer;
+using Duende.IdentityServer.Models;
using IdentityModel;
-using IdentityServer4.Models;
namespace Bit.Identity.IdentityServer;
diff --git a/src/Identity/IdentityServer/AuthorizationCodeStore.cs b/src/Identity/IdentityServer/AuthorizationCodeStore.cs
index da63d9c4ad..8215532ba8 100644
--- a/src/Identity/IdentityServer/AuthorizationCodeStore.cs
+++ b/src/Identity/IdentityServer/AuthorizationCodeStore.cs
@@ -1,13 +1,12 @@
-using IdentityServer4;
-using IdentityServer4.Extensions;
-using IdentityServer4.Models;
-using IdentityServer4.Services;
-using IdentityServer4.Stores;
-using IdentityServer4.Stores.Serialization;
+using Duende.IdentityServer;
+using Duende.IdentityServer.Extensions;
+using Duende.IdentityServer.Models;
+using Duende.IdentityServer.Services;
+using Duende.IdentityServer.Stores;
+using Duende.IdentityServer.Stores.Serialization;
namespace Bit.Identity.IdentityServer;
-// ref: https://raw.githubusercontent.com/IdentityServer/IdentityServer4/3.1.3/src/IdentityServer4/src/Stores/Default/DefaultAuthorizationCodeStore.cs
public class AuthorizationCodeStore : DefaultGrantStore, IAuthorizationCodeStore
{
public AuthorizationCodeStore(
diff --git a/src/Identity/IdentityServer/BaseRequestValidator.cs b/src/Identity/IdentityServer/BaseRequestValidator.cs
index d52d3064a6..f638783a56 100644
--- a/src/Identity/IdentityServer/BaseRequestValidator.cs
+++ b/src/Identity/IdentityServer/BaseRequestValidator.cs
@@ -3,6 +3,9 @@ using System.Reflection;
using System.Security.Claims;
using System.Text.Json;
using Bit.Core;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.AdminConsole.Enums;
+using Bit.Core.AdminConsole.Services;
using Bit.Core.Auth.Entities;
using Bit.Core.Auth.Enums;
using Bit.Core.Auth.Identity;
@@ -10,7 +13,6 @@ using Bit.Core.Auth.Models;
using Bit.Core.Auth.Models.Api.Response;
using Bit.Core.Auth.Models.Business.Tokenables;
using Bit.Core.Auth.Repositories;
-using Bit.Core.Auth.Utilities;
using Bit.Core.Context;
using Bit.Core.Entities;
using Bit.Core.Enums;
@@ -23,8 +25,7 @@ using Bit.Core.Services;
using Bit.Core.Settings;
using Bit.Core.Tokens;
using Bit.Core.Utilities;
-using Bit.Identity.Utilities;
-using IdentityServer4.Validation;
+using Duende.IdentityServer.Validation;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Caching.Distributed;
@@ -35,7 +36,6 @@ public abstract class BaseRequestValidator where T : class
private UserManager _userManager;
private readonly IDeviceRepository _deviceRepository;
private readonly IDeviceService _deviceService;
- private readonly IUserService _userService;
private readonly IEventService _eventService;
private readonly IOrganizationDuoWebTokenProvider _organizationDuoWebTokenProvider;
private readonly IOrganizationRepository _organizationRepository;
@@ -53,6 +53,8 @@ public abstract class BaseRequestValidator where T : class
protected IPolicyService PolicyService { get; }
protected IFeatureService FeatureService { get; }
protected ISsoConfigRepository SsoConfigRepository { get; }
+ protected IUserService _userService { get; }
+ protected IUserDecryptionOptionsBuilder UserDecryptionOptionsBuilder { get; }
public BaseRequestValidator(
UserManager userManager,
@@ -73,7 +75,8 @@ public abstract class BaseRequestValidator where T : class
IDataProtectorTokenFactory tokenDataFactory,
IFeatureService featureService,
ISsoConfigRepository ssoConfigRepository,
- IDistributedCache distributedCache)
+ IDistributedCache distributedCache,
+ IUserDecryptionOptionsBuilder userDecryptionOptionsBuilder)
{
_userManager = userManager;
_deviceRepository = deviceRepository;
@@ -96,11 +99,12 @@ public abstract class BaseRequestValidator where T : class
_distributedCache = distributedCache;
_cacheEntryOptions = new DistributedCacheEntryOptions
{
- // This sets the time an item is cached to 15 minutes. This value is hard coded
- // to 15 because to it covers all time-out windows for both Authenticators and
+ // This sets the time an item is cached to 17 minutes. This value is hard coded
+ // to 17 because to it covers all time-out windows for both Authenticators and
// Email TOTP.
- AbsoluteExpirationRelativeToNow = new TimeSpan(0, 15, 0)
+ AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(17)
};
+ UserDecryptionOptionsBuilder = userDecryptionOptionsBuilder;
}
protected async Task ValidateAsync(T context, ValidatedTokenRequest request,
@@ -333,7 +337,7 @@ public abstract class BaseRequestValidator where T : class
protected abstract void SetErrorResult(T context, Dictionary customResponse);
protected abstract ClaimsPrincipal GetSubject(T context);
- private async Task> RequiresTwoFactorAsync(User user, ValidatedTokenRequest request)
+ protected virtual async Task> RequiresTwoFactorAsync(User user, ValidatedTokenRequest request)
{
if (request.GrantType == "client_credentials")
{
@@ -612,67 +616,12 @@ public abstract class BaseRequestValidator where T : class
///
private async Task CreateUserDecryptionOptionsAsync(User user, Device device, ClaimsPrincipal subject)
{
- var ssoConfiguration = await GetSsoConfigurationDataAsync(subject);
-
- var userDecryptionOption = new UserDecryptionOptions
- {
- HasMasterPassword = !string.IsNullOrEmpty(user.MasterPassword)
- };
-
- var ssoConfigurationData = ssoConfiguration?.GetData();
-
- if (ssoConfigurationData is { MemberDecryptionType: MemberDecryptionType.KeyConnector } && !string.IsNullOrEmpty(ssoConfigurationData.KeyConnectorUrl))
- {
- // KeyConnector makes it mutually exclusive
- userDecryptionOption.KeyConnectorOption = new KeyConnectorUserDecryptionOption(ssoConfigurationData.KeyConnectorUrl);
- return userDecryptionOption;
- }
-
- // Only add the trusted device specific option when the flag is turned on
- if (FeatureService.IsEnabled(FeatureFlagKeys.TrustedDeviceEncryption, CurrentContext) && ssoConfigurationData is { MemberDecryptionType: MemberDecryptionType.TrustedDeviceEncryption })
- {
- string? encryptedPrivateKey = null;
- string? encryptedUserKey = null;
- if (device.IsTrusted())
- {
- encryptedPrivateKey = device.EncryptedPrivateKey;
- encryptedUserKey = device.EncryptedUserKey;
- }
-
- var allDevices = await _deviceRepository.GetManyByUserIdAsync(user.Id);
- // Checks if the current user has any devices that are capable of approving login with device requests except for
- // their current device.
- // NOTE: this doesn't check for if the users have configured the devices to be capable of approving requests as that is a client side setting.
- var hasLoginApprovingDevice = allDevices
- .Where(d => d.Identifier != device.Identifier && LoginApprovingDeviceTypes.Types.Contains(d.Type))
- .Any();
-
- // Determine if user has manage reset password permission as post sso logic requires it for forcing users with this permission to set a MP
- var hasManageResetPasswordPermission = false;
-
- // when a user is being created via JIT provisioning, they will not have any orgs so we can't assume we will have orgs here
- if (CurrentContext.Organizations.Any(o => o.Id == ssoConfiguration!.OrganizationId))
- {
- // TDE requires single org so grabbing first org & id is fine.
- hasManageResetPasswordPermission = await CurrentContext.ManageResetPassword(ssoConfiguration!.OrganizationId);
- }
-
- // If sso configuration data is not null then I know for sure that ssoConfiguration isn't null
- var organizationUser = await _organizationUserRepository.GetByOrganizationAsync(ssoConfiguration!.OrganizationId, user.Id);
-
- // They are only able to be approved by an admin if they have enrolled is reset password
- var hasAdminApproval = !string.IsNullOrEmpty(organizationUser.ResetPasswordKey);
-
- // TrustedDeviceEncryption only exists for SSO, but if that ever changes this value won't always be true
- userDecryptionOption.TrustedDeviceOption = new TrustedDeviceUserDecryptionOption(
- hasAdminApproval,
- hasLoginApprovingDevice,
- hasManageResetPasswordPermission,
- encryptedPrivateKey,
- encryptedUserKey);
- }
-
- return userDecryptionOption;
+ var ssoConfig = await GetSsoConfigurationDataAsync(subject);
+ return await UserDecryptionOptionsBuilder
+ .ForUser(user)
+ .WithDevice(device)
+ .WithSso(ssoConfig)
+ .BuildAsync();
}
private async Task GetSsoConfigurationDataAsync(ClaimsPrincipal subject)
diff --git a/src/Identity/IdentityServer/ClientStore.cs b/src/Identity/IdentityServer/ClientStore.cs
index 259898f209..19a4f8ffa8 100644
--- a/src/Identity/IdentityServer/ClientStore.cs
+++ b/src/Identity/IdentityServer/ClientStore.cs
@@ -11,9 +11,9 @@ using Bit.Core.SecretsManager.Repositories;
using Bit.Core.Services;
using Bit.Core.Settings;
using Bit.Core.Utilities;
+using Duende.IdentityServer.Models;
+using Duende.IdentityServer.Stores;
using IdentityModel;
-using IdentityServer4.Models;
-using IdentityServer4.Stores;
namespace Bit.Identity.IdentityServer;
diff --git a/src/Identity/IdentityServer/CustomTokenRequestValidator.cs b/src/Identity/IdentityServer/CustomTokenRequestValidator.cs
index a15a738372..4710184f78 100644
--- a/src/Identity/IdentityServer/CustomTokenRequestValidator.cs
+++ b/src/Identity/IdentityServer/CustomTokenRequestValidator.cs
@@ -1,4 +1,5 @@
using System.Security.Claims;
+using Bit.Core.AdminConsole.Services;
using Bit.Core.Auth.Identity;
using Bit.Core.Auth.Models.Api.Response;
using Bit.Core.Auth.Models.Business.Tokenables;
@@ -10,9 +11,9 @@ using Bit.Core.Repositories;
using Bit.Core.Services;
using Bit.Core.Settings;
using Bit.Core.Tokens;
+using Duende.IdentityServer.Extensions;
+using Duende.IdentityServer.Validation;
using IdentityModel;
-using IdentityServer4.Extensions;
-using IdentityServer4.Validation;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Caching.Distributed;
@@ -44,12 +45,13 @@ public class CustomTokenRequestValidator : BaseRequestValidator tokenDataFactory,
IFeatureService featureService,
- IDistributedCache distributedCache)
+ IDistributedCache distributedCache,
+ IUserDecryptionOptionsBuilder userDecryptionOptionsBuilder)
: base(userManager, deviceRepository, deviceService, userService, eventService,
organizationDuoWebTokenProvider, organizationRepository, organizationUserRepository,
applicationCacheService, mailService, logger, currentContext, globalSettings,
userRepository, policyService, tokenDataFactory, featureService, ssoConfigRepository,
- distributedCache)
+ distributedCache, userDecryptionOptionsBuilder)
{
_userManager = userManager;
}
diff --git a/src/Identity/IdentityServer/IUserDecryptionOptionsBuilder.cs b/src/Identity/IdentityServer/IUserDecryptionOptionsBuilder.cs
new file mode 100644
index 0000000000..dad9d8e27d
--- /dev/null
+++ b/src/Identity/IdentityServer/IUserDecryptionOptionsBuilder.cs
@@ -0,0 +1,13 @@
+using Bit.Core.Auth.Entities;
+using Bit.Core.Auth.Models.Api.Response;
+using Bit.Core.Entities;
+
+namespace Bit.Identity.IdentityServer;
+public interface IUserDecryptionOptionsBuilder
+{
+ IUserDecryptionOptionsBuilder ForUser(User user);
+ IUserDecryptionOptionsBuilder WithDevice(Device device);
+ IUserDecryptionOptionsBuilder WithSso(SsoConfig ssoConfig);
+ IUserDecryptionOptionsBuilder WithWebAuthnLoginCredential(WebAuthnCredential credential);
+ Task BuildAsync();
+}
diff --git a/src/Identity/IdentityServer/PersistedGrantStore.cs b/src/Identity/IdentityServer/PersistedGrantStore.cs
index 5a3b15f627..9d8ebffd0d 100644
--- a/src/Identity/IdentityServer/PersistedGrantStore.cs
+++ b/src/Identity/IdentityServer/PersistedGrantStore.cs
@@ -1,6 +1,6 @@
using Bit.Core.Auth.Repositories;
-using IdentityServer4.Models;
-using IdentityServer4.Stores;
+using Duende.IdentityServer.Models;
+using Duende.IdentityServer.Stores;
using Grant = Bit.Core.Auth.Entities.Grant;
namespace Bit.Identity.IdentityServer;
diff --git a/src/Identity/IdentityServer/ProfileService.cs b/src/Identity/IdentityServer/ProfileService.cs
index bbec6739ba..09866c6b57 100644
--- a/src/Identity/IdentityServer/ProfileService.cs
+++ b/src/Identity/IdentityServer/ProfileService.cs
@@ -5,8 +5,8 @@ using Bit.Core.Identity;
using Bit.Core.Repositories;
using Bit.Core.Services;
using Bit.Core.Utilities;
-using IdentityServer4.Models;
-using IdentityServer4.Services;
+using Duende.IdentityServer.Models;
+using Duende.IdentityServer.Services;
namespace Bit.Identity.IdentityServer;
diff --git a/src/Identity/IdentityServer/ResourceOwnerPasswordValidator.cs b/src/Identity/IdentityServer/ResourceOwnerPasswordValidator.cs
index 8b8b0be52d..1d71508519 100644
--- a/src/Identity/IdentityServer/ResourceOwnerPasswordValidator.cs
+++ b/src/Identity/IdentityServer/ResourceOwnerPasswordValidator.cs
@@ -1,4 +1,6 @@
using System.Security.Claims;
+using Bit.Core;
+using Bit.Core.AdminConsole.Services;
using Bit.Core.Auth.Identity;
using Bit.Core.Auth.Models.Business.Tokenables;
using Bit.Core.Auth.Repositories;
@@ -10,8 +12,8 @@ using Bit.Core.Services;
using Bit.Core.Settings;
using Bit.Core.Tokens;
using Bit.Core.Utilities;
-using IdentityServer4.Models;
-using IdentityServer4.Validation;
+using Duende.IdentityServer.Models;
+using Duende.IdentityServer.Validation;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Caching.Distributed;
@@ -46,11 +48,12 @@ public class ResourceOwnerPasswordValidator : BaseRequestValidator tokenDataFactory,
IFeatureService featureService,
ISsoConfigRepository ssoConfigRepository,
- IDistributedCache distributedCache)
+ IDistributedCache distributedCache,
+ IUserDecryptionOptionsBuilder userDecryptionOptionsBuilder)
: base(userManager, deviceRepository, deviceService, userService, eventService,
organizationDuoWebTokenProvider, organizationRepository, organizationUserRepository,
applicationCacheService, mailService, logger, currentContext, globalSettings, userRepository, policyService,
- tokenDataFactory, featureService, ssoConfigRepository, distributedCache)
+ tokenDataFactory, featureService, ssoConfigRepository, distributedCache, userDecryptionOptionsBuilder)
{
_userManager = userManager;
_userService = userService;
@@ -144,7 +147,7 @@ public class ResourceOwnerPasswordValidator : BaseRequestValidator claims, Dictionary customResponse)
{
context.Result = new GrantValidationResult(user.Id.ToString(), "Application",
- identityProvider: "bitwarden",
+ identityProvider: Constants.IdentityProvider,
claims: claims.Count > 0 ? claims : null,
customResponse: customResponse);
return Task.CompletedTask;
diff --git a/src/Identity/IdentityServer/StaticClientStore.cs b/src/Identity/IdentityServer/StaticClientStore.cs
index 537f389925..811880dde2 100644
--- a/src/Identity/IdentityServer/StaticClientStore.cs
+++ b/src/Identity/IdentityServer/StaticClientStore.cs
@@ -1,6 +1,6 @@
using Bit.Core.Enums;
using Bit.Core.Settings;
-using IdentityServer4.Models;
+using Duende.IdentityServer.Models;
namespace Bit.Identity.IdentityServer;
diff --git a/src/Identity/IdentityServer/UserDecryptionOptionsBuilder.cs b/src/Identity/IdentityServer/UserDecryptionOptionsBuilder.cs
new file mode 100644
index 0000000000..4366ddbda3
--- /dev/null
+++ b/src/Identity/IdentityServer/UserDecryptionOptionsBuilder.cs
@@ -0,0 +1,155 @@
+using Bit.Core;
+using Bit.Core.Auth.Entities;
+using Bit.Core.Auth.Enums;
+using Bit.Core.Auth.Models.Api.Response;
+using Bit.Core.Auth.Utilities;
+using Bit.Core.Context;
+using Bit.Core.Entities;
+using Bit.Core.Repositories;
+using Bit.Core.Services;
+using Bit.Identity.Utilities;
+
+namespace Bit.Identity.IdentityServer;
+
+#nullable enable
+///
+/// Used to create a list of all possible ways the newly authenticated user can decrypt their vault contents
+///
+/// Note: Do not use this as an injected service if you intend to build multiple independent UserDecryptionOptions
+///
+public class UserDecryptionOptionsBuilder : IUserDecryptionOptionsBuilder
+{
+ private readonly ICurrentContext _currentContext;
+ private readonly IFeatureService _featureService;
+ private readonly IDeviceRepository _deviceRepository;
+ private readonly IOrganizationUserRepository _organizationUserRepository;
+
+ private UserDecryptionOptions _options = new UserDecryptionOptions();
+ private User? _user;
+ private Core.Auth.Entities.SsoConfig? _ssoConfig;
+ private Device? _device;
+
+ public UserDecryptionOptionsBuilder(
+ ICurrentContext currentContext,
+ IFeatureService featureService,
+ IDeviceRepository deviceRepository,
+ IOrganizationUserRepository organizationUserRepository
+ )
+ {
+ _currentContext = currentContext;
+ _featureService = featureService;
+ _deviceRepository = deviceRepository;
+ _organizationUserRepository = organizationUserRepository;
+ }
+
+ public IUserDecryptionOptionsBuilder ForUser(User user)
+ {
+ _options.HasMasterPassword = user.HasMasterPassword();
+ _user = user;
+ return this;
+ }
+
+ public IUserDecryptionOptionsBuilder WithSso(Core.Auth.Entities.SsoConfig ssoConfig)
+ {
+ _ssoConfig = ssoConfig;
+ return this;
+ }
+
+ public IUserDecryptionOptionsBuilder WithDevice(Device device)
+ {
+ _device = device;
+ return this;
+ }
+
+ public IUserDecryptionOptionsBuilder WithWebAuthnLoginCredential(WebAuthnCredential credential)
+ {
+ if (credential.GetPrfStatus() == WebAuthnPrfStatus.Enabled)
+ {
+ _options.WebAuthnPrfOption = new WebAuthnPrfDecryptionOption(credential.EncryptedPrivateKey, credential.EncryptedUserKey);
+ }
+ return this;
+ }
+
+ public async Task BuildAsync()
+ {
+ BuildKeyConnectorOptions();
+ await BuildTrustedDeviceOptions();
+
+ return _options;
+ }
+
+ private void BuildKeyConnectorOptions()
+ {
+ if (_ssoConfig == null)
+ {
+ return;
+ }
+
+ var ssoConfigurationData = _ssoConfig.GetData();
+ if (ssoConfigurationData is { MemberDecryptionType: MemberDecryptionType.KeyConnector } && !string.IsNullOrEmpty(ssoConfigurationData.KeyConnectorUrl))
+ {
+ _options.KeyConnectorOption = new KeyConnectorUserDecryptionOption(ssoConfigurationData.KeyConnectorUrl);
+ }
+ }
+
+ private async Task BuildTrustedDeviceOptions()
+ {
+ // TrustedDeviceEncryption only exists for SSO, if that changes then these guards should change
+ if (_ssoConfig == null || !_featureService.IsEnabled(FeatureFlagKeys.TrustedDeviceEncryption, _currentContext))
+ {
+ return;
+ }
+
+ var ssoConfigurationData = _ssoConfig.GetData();
+ if (ssoConfigurationData is not { MemberDecryptionType: MemberDecryptionType.TrustedDeviceEncryption })
+ {
+ return;
+ }
+
+ string? encryptedPrivateKey = null;
+ string? encryptedUserKey = null;
+ if (_device != null && _device.IsTrusted())
+ {
+ encryptedPrivateKey = _device.EncryptedPrivateKey;
+ encryptedUserKey = _device.EncryptedUserKey;
+ }
+
+ var hasLoginApprovingDevice = false;
+ if (_device != null && _user != null)
+ {
+ var allDevices = await _deviceRepository.GetManyByUserIdAsync(_user.Id);
+ // Checks if the current user has any devices that are capable of approving login with device requests except for
+ // their current device.
+ // NOTE: this doesn't check for if the users have configured the devices to be capable of approving requests as that is a client side setting.
+ hasLoginApprovingDevice = allDevices
+ .Where(d => d.Identifier != _device.Identifier && LoginApprovingDeviceTypes.Types.Contains(d.Type))
+ .Any();
+ }
+
+ // Determine if user has manage reset password permission as post sso logic requires it for forcing users with this permission to set a MP
+ var hasManageResetPasswordPermission = false;
+ // when a user is being created via JIT provisioning, they will not have any orgs so we can't assume we will have orgs here
+ if (_currentContext.Organizations != null && _currentContext.Organizations.Any(o => o.Id == _ssoConfig.OrganizationId))
+ {
+ // TDE requires single org so grabbing first org & id is fine.
+ hasManageResetPasswordPermission = await _currentContext.ManageResetPassword(_ssoConfig!.OrganizationId);
+ }
+
+ var hasAdminApproval = false;
+ if (_user != null)
+ {
+ // If sso configuration data is not null then I know for sure that ssoConfiguration isn't null
+ var organizationUser = await _organizationUserRepository.GetByOrganizationAsync(_ssoConfig.OrganizationId, _user.Id);
+
+ // They are only able to be approved by an admin if they have enrolled is reset password
+ hasAdminApproval = organizationUser != null && !string.IsNullOrEmpty(organizationUser.ResetPasswordKey);
+ }
+
+ _options.TrustedDeviceOption = new TrustedDeviceUserDecryptionOption(
+ hasAdminApproval,
+ hasLoginApprovingDevice,
+ hasManageResetPasswordPermission,
+ encryptedPrivateKey,
+ encryptedUserKey);
+ }
+}
diff --git a/src/Identity/IdentityServer/VaultCorsPolicyService.cs b/src/Identity/IdentityServer/VaultCorsPolicyService.cs
index 867644c54b..f8e76dd527 100644
--- a/src/Identity/IdentityServer/VaultCorsPolicyService.cs
+++ b/src/Identity/IdentityServer/VaultCorsPolicyService.cs
@@ -1,6 +1,6 @@
using Bit.Core.Settings;
using Bit.Core.Utilities;
-using IdentityServer4.Services;
+using Duende.IdentityServer.Services;
namespace Bit.Identity.IdentityServer;
diff --git a/src/Identity/IdentityServer/WebAuthnGrantValidator.cs b/src/Identity/IdentityServer/WebAuthnGrantValidator.cs
new file mode 100644
index 0000000000..6168ac22b1
--- /dev/null
+++ b/src/Identity/IdentityServer/WebAuthnGrantValidator.cs
@@ -0,0 +1,152 @@
+using System.Security.Claims;
+using System.Text.Json;
+using Bit.Core;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.AdminConsole.Services;
+using Bit.Core.Auth.Enums;
+using Bit.Core.Auth.Identity;
+using Bit.Core.Auth.Models.Business.Tokenables;
+using Bit.Core.Auth.Repositories;
+using Bit.Core.Context;
+using Bit.Core.Entities;
+using Bit.Core.Repositories;
+using Bit.Core.Services;
+using Bit.Core.Settings;
+using Bit.Core.Tokens;
+using Duende.IdentityServer.Models;
+using Duende.IdentityServer.Validation;
+using Fido2NetLib;
+using Microsoft.AspNetCore.Identity;
+using Microsoft.Extensions.Caching.Distributed;
+
+namespace Bit.Identity.IdentityServer;
+
+public class WebAuthnGrantValidator : BaseRequestValidator, IExtensionGrantValidator
+{
+ public const string GrantType = "webauthn";
+
+ private readonly IDataProtectorTokenFactory _assertionOptionsDataProtector;
+
+ public WebAuthnGrantValidator(
+ UserManager userManager,
+ IDeviceRepository deviceRepository,
+ IDeviceService deviceService,
+ IUserService userService,
+ IEventService eventService,
+ IOrganizationDuoWebTokenProvider organizationDuoWebTokenProvider,
+ IOrganizationRepository organizationRepository,
+ IOrganizationUserRepository organizationUserRepository,
+ IApplicationCacheService applicationCacheService,
+ IMailService mailService,
+ ILogger logger,
+ ICurrentContext currentContext,
+ GlobalSettings globalSettings,
+ ISsoConfigRepository ssoConfigRepository,
+ IUserRepository userRepository,
+ IPolicyService policyService,
+ IDataProtectorTokenFactory tokenDataFactory,
+ IDataProtectorTokenFactory assertionOptionsDataProtector,
+ IFeatureService featureService,
+ IDistributedCache distributedCache,
+ IUserDecryptionOptionsBuilder userDecryptionOptionsBuilder
+ )
+ : base(userManager, deviceRepository, deviceService, userService, eventService,
+ organizationDuoWebTokenProvider, organizationRepository, organizationUserRepository,
+ applicationCacheService, mailService, logger, currentContext, globalSettings,
+ userRepository, policyService, tokenDataFactory, featureService, ssoConfigRepository, distributedCache, userDecryptionOptionsBuilder)
+ {
+ _assertionOptionsDataProtector = assertionOptionsDataProtector;
+ }
+
+ string IExtensionGrantValidator.GrantType => "webauthn";
+
+ public async Task ValidateAsync(ExtensionGrantValidationContext context)
+ {
+ if (!FeatureService.IsEnabled(FeatureFlagKeys.PasswordlessLogin, CurrentContext))
+ {
+ context.Result = new GrantValidationResult(TokenRequestErrors.InvalidGrant);
+ return;
+ }
+
+ var rawToken = context.Request.Raw.Get("token");
+ var rawDeviceResponse = context.Request.Raw.Get("deviceResponse");
+ if (string.IsNullOrWhiteSpace(rawToken) || string.IsNullOrWhiteSpace(rawDeviceResponse))
+ {
+ context.Result = new GrantValidationResult(TokenRequestErrors.InvalidGrant);
+ return;
+ }
+
+ var verified = _assertionOptionsDataProtector.TryUnprotect(rawToken, out var token) &&
+ token.TokenIsValid(WebAuthnLoginAssertionOptionsScope.Authentication);
+ var deviceResponse = JsonSerializer.Deserialize(rawDeviceResponse);
+
+ if (!verified)
+ {
+ context.Result = new GrantValidationResult(TokenRequestErrors.InvalidRequest);
+ return;
+ }
+
+ var (user, credential) = await _userService.CompleteWebAuthLoginAssertionAsync(token.Options, deviceResponse);
+ var validatorContext = new CustomValidatorRequestContext
+ {
+ User = user,
+ KnownDevice = await KnownDeviceAsync(user, context.Request)
+ };
+
+ UserDecryptionOptionsBuilder.WithWebAuthnLoginCredential(credential);
+
+ await ValidateAsync(context, context.Request, validatorContext);
+ }
+
+ protected override Task ValidateContextAsync(ExtensionGrantValidationContext context,
+ CustomValidatorRequestContext validatorContext)
+ {
+ if (validatorContext.User == null)
+ {
+ return Task.FromResult(false);
+ }
+
+ return Task.FromResult(true);
+ }
+
+ protected override Task SetSuccessResult(ExtensionGrantValidationContext context, User user,
+ List claims, Dictionary customResponse)
+ {
+ context.Result = new GrantValidationResult(user.Id.ToString(), "Application",
+ identityProvider: Constants.IdentityProvider,
+ claims: claims.Count > 0 ? claims : null,
+ customResponse: customResponse);
+ return Task.CompletedTask;
+ }
+
+ protected override ClaimsPrincipal GetSubject(ExtensionGrantValidationContext context)
+ {
+ return context.Result.Subject;
+ }
+
+ protected override Task> RequiresTwoFactorAsync(User user, ValidatedTokenRequest request)
+ {
+ // We consider Fido2 userVerification a second factor, so we don't require a second factor here.
+ return Task.FromResult(new Tuple(false, null));
+ }
+
+ protected override void SetTwoFactorResult(ExtensionGrantValidationContext context,
+ Dictionary customResponse)
+ {
+ context.Result = new GrantValidationResult(TokenRequestErrors.InvalidGrant, "Two factor required.",
+ customResponse);
+ }
+
+ protected override void SetSsoResult(ExtensionGrantValidationContext context,
+ Dictionary customResponse)
+ {
+ context.Result = new GrantValidationResult(TokenRequestErrors.InvalidGrant, "Sso authentication required.",
+ customResponse);
+ }
+
+ protected override void SetErrorResult(ExtensionGrantValidationContext context,
+ Dictionary customResponse)
+ {
+ context.Result = new GrantValidationResult(TokenRequestErrors.InvalidGrant, customResponse: customResponse);
+ }
+}
diff --git a/src/Identity/Program.cs b/src/Identity/Program.cs
index 2ca52bffe7..31a69975ad 100644
--- a/src/Identity/Program.cs
+++ b/src/Identity/Program.cs
@@ -29,8 +29,8 @@ public class Program
return e.Level >= globalSettings.MinLogLevel.IdentitySettings.IpRateLimit;
}
- if (context.Contains("IdentityServer4.Validation.TokenValidator") ||
- context.Contains("IdentityServer4.Validation.TokenRequestValidator"))
+ if (context.Contains("Duende.IdentityServer.Validation.TokenValidator") ||
+ context.Contains("Duende.IdentityServer.Validation.TokenRequestValidator"))
{
return e.Level >= globalSettings.MinLogLevel.IdentitySettings.IdentityToken;
}
diff --git a/src/Identity/Startup.cs b/src/Identity/Startup.cs
index 472dad809f..9a7874820d 100644
--- a/src/Identity/Startup.cs
+++ b/src/Identity/Startup.cs
@@ -10,7 +10,7 @@ using Bit.Core.Settings;
using Bit.Core.Utilities;
using Bit.Identity.Utilities;
using Bit.SharedWeb.Utilities;
-using IdentityServer4.Extensions;
+using Duende.IdentityServer.Extensions;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.IdentityModel.Logging;
using Microsoft.OpenApi.Models;
diff --git a/src/Identity/Utilities/DiscoveryResponseGenerator.cs b/src/Identity/Utilities/DiscoveryResponseGenerator.cs
index da06180989..58d9252f2d 100644
--- a/src/Identity/Utilities/DiscoveryResponseGenerator.cs
+++ b/src/Identity/Utilities/DiscoveryResponseGenerator.cs
@@ -1,13 +1,13 @@
using Bit.Core.Settings;
using Bit.Core.Utilities;
-using IdentityServer4.Configuration;
-using IdentityServer4.Services;
-using IdentityServer4.Stores;
-using IdentityServer4.Validation;
+using Duende.IdentityServer.Configuration;
+using Duende.IdentityServer.Services;
+using Duende.IdentityServer.Stores;
+using Duende.IdentityServer.Validation;
namespace Bit.Identity.Utilities;
-public class DiscoveryResponseGenerator : IdentityServer4.ResponseHandling.DiscoveryResponseGenerator
+public class DiscoveryResponseGenerator : Duende.IdentityServer.ResponseHandling.DiscoveryResponseGenerator
{
private readonly GlobalSettings _globalSettings;
diff --git a/src/Identity/Utilities/ServiceCollectionExtensions.cs b/src/Identity/Utilities/ServiceCollectionExtensions.cs
index 068e12bd40..e1dd510ecc 100644
--- a/src/Identity/Utilities/ServiceCollectionExtensions.cs
+++ b/src/Identity/Utilities/ServiceCollectionExtensions.cs
@@ -2,9 +2,9 @@
using Bit.Core.Settings;
using Bit.Identity.IdentityServer;
using Bit.SharedWeb.Utilities;
-using IdentityServer4.ResponseHandling;
-using IdentityServer4.Services;
-using IdentityServer4.Stores;
+using Duende.IdentityServer.ResponseHandling;
+using Duende.IdentityServer.Services;
+using Duende.IdentityServer.Stores;
namespace Bit.Identity.Utilities;
@@ -17,6 +17,7 @@ public static class ServiceCollectionExtensions
services.AddSingleton();
services.AddTransient();
+ services.AddTransient();
var issuerUri = new Uri(globalSettings.BaseServiceUri.InternalIdentity);
var identityServerBuilder = services
@@ -34,6 +35,7 @@ public static class ServiceCollectionExtensions
options.Authentication.CookieSameSiteMode = Microsoft.AspNetCore.Http.SameSiteMode.Unspecified;
}
options.InputLengthRestrictions.UserName = 256;
+ options.KeyManagement.Enabled = false;
})
.AddInMemoryCaching()
.AddInMemoryApiResources(ApiResources.GetApiResources())
@@ -44,7 +46,8 @@ public static class ServiceCollectionExtensions
.AddResourceOwnerValidator()
.AddPersistedGrantStore()
.AddClientStore()
- .AddIdentityServerCertificate(env, globalSettings);
+ .AddIdentityServerCertificate(env, globalSettings)
+ .AddExtensionGrantValidator();
services.AddTransient();
return identityServerBuilder;
diff --git a/src/Identity/packages.lock.json b/src/Identity/packages.lock.json
index 665ab2c2aa..fcf8099d31 100644
--- a/src/Identity/packages.lock.json
+++ b/src/Identity/packages.lock.json
@@ -182,8 +182,8 @@
},
"Dapper": {
"type": "Transitive",
- "resolved": "2.0.123",
- "contentHash": "RDFF4rBLLmbpi6pwkY7q/M6UXHRJEOerplDGE5jwEkP/JGJnBauAClYavNKJPW1yOTWRPIyfj4is3EaJxQXILQ=="
+ "resolved": "2.1.24",
+ "contentHash": "/2t2vsdJyZRsk13AsWigZpsuFvEwK+o3v862cEULXoww905gyKhJFSuwmZI/4Ui9COX9ZCFCI09UHyH4wVYl3A=="
},
"DnsClient": {
"type": "Transitive",
@@ -193,6 +193,24 @@
"Microsoft.Win32.Registry": "5.0.0"
}
},
+ "Duende.IdentityServer": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "4HVjzx1F8v5J+U7oa8RGAQGj2QzmzNSu87r18Sh+dlh10uyZZL8teAaT/FaVLDObnfItGdPFvN8mwpF/HkI3Xw==",
+ "dependencies": {
+ "Duende.IdentityServer.Storage": "6.0.4",
+ "Microsoft.AspNetCore.Authentication.OpenIdConnect": "6.0.0"
+ }
+ },
+ "Duende.IdentityServer.Storage": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "s5gAjfbpr2IMgI+fU2Nx+2AZdzstmbt9gpo13iX7GwvqSeSaBVqj9ZskAN0R2KF1OemPdZuGnfaTcevdXMUrrw==",
+ "dependencies": {
+ "IdentityModel": "6.0.0",
+ "Microsoft.AspNetCore.DataProtection.Abstractions": "6.0.0"
+ }
+ },
"Fido2": {
"type": "Transitive",
"resolved": "3.0.1",
@@ -221,57 +239,16 @@
},
"Handlebars.Net": {
"type": "Transitive",
- "resolved": "2.1.2",
- "contentHash": "p60QyeBYpZmcZdIXRMqs9XySIBaxJ0lj3+QD0EJVr4ybTigOTCumXMMin5dPwjo9At1UwkDZ3gGwa1lmGjG6DA==",
+ "resolved": "2.1.4",
+ "contentHash": "Od7MWDfGxYKRtxETFMlcvCrY8hAqyuXZDX4EsOfiI/jzh+PVBuVxazHBC1HmVqTKX1JnRtoxIMcH95K9UFlYog==",
"dependencies": {
"Microsoft.CSharp": "4.7.0"
}
},
"IdentityModel": {
"type": "Transitive",
- "resolved": "4.4.0",
- "contentHash": "b18wrIx5wnZlMxAX7oVsE+nDtAJ4hajYlH0xPlaRvo4r/fz08K6pPeZvbiqS9nfNbzfIgLFmNX+FL9qR9ZR5PA==",
- "dependencies": {
- "Newtonsoft.Json": "11.0.2",
- "System.Text.Encodings.Web": "4.7.0"
- }
- },
- "IdentityModel.AspNetCore.OAuth2Introspection": {
- "type": "Transitive",
- "resolved": "4.0.1",
- "contentHash": "ZNdMZMaj9fqR3j50vYsu+1U3QGd6n8+fqwf+a8mCTcmXGor+HgFDfdq0mM34bsmD6uEgAQup7sv2ZW5kR36dbA==",
- "dependencies": {
- "IdentityModel": "4.0.0"
- }
- },
- "IdentityServer4": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "blaxxGuOA7v/w1q+fxn97wZ+x2ecG1ZD4mc/N/ZOXMNeFZZhqv+4LF26Gecyik3nWrJPmbMEtQbLmRsKG8k61w==",
- "dependencies": {
- "IdentityModel": "4.4.0",
- "IdentityServer4.Storage": "4.1.2",
- "Microsoft.AspNetCore.Authentication.OpenIdConnect": "3.1.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.6.0",
- "Newtonsoft.Json": "12.0.2"
- }
- },
- "IdentityServer4.AccessTokenValidation": {
- "type": "Transitive",
- "resolved": "3.0.1",
- "contentHash": "qu/M6UyN4o9NVep7q545Ms7hYAnsQqSdLbN1Fjjrn4m35lyBfeQPSSNzDryAKHbodyWOQfHaOqKEyMEJQ5Rpgw==",
- "dependencies": {
- "IdentityModel.AspNetCore.OAuth2Introspection": "4.0.1",
- "Microsoft.AspNetCore.Authentication.JwtBearer": "3.0.0"
- }
- },
- "IdentityServer4.Storage": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "KoSffyZyyeCNTIyJiZnCuPakJ1QbCHlpty6gbWUj/7yl+w0PXIchgmmJnJSvddzBb8iZ2xew/vGlxWUIP17P2g==",
- "dependencies": {
- "IdentityModel": "4.4.0"
- }
+ "resolved": "6.0.0",
+ "contentHash": "eVHCR7a6m/dm5RFcBzE3qs/Jg5j9R5Rjpu8aTOv9e4AFvaQtBXb5ah7kmwU+YwA0ufRwz4wf1hnIvsD2hSnI4g=="
},
"LaunchDarkly.Cache": {
"type": "Transitive",
@@ -280,26 +257,27 @@
},
"LaunchDarkly.CommonSdk": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "YYYq+41gZRMQ8dIoMC6HOq/dI+4RY3HsexLLAaE9T1+1tVMeQkbCqak7sVeKX4QcE7xlXx23lWgipYUkRoRUyw==",
+ "resolved": "6.2.0",
+ "contentHash": "eLeb+tTNLwOxlUIsZWzJlcPmG9Wyf20NYyucP6MW6aqKW6doKFeSO+aJe0z+WyijbvfX1Dp1U1HQatOu6fa1Gg==",
"dependencies": {
+ "LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
},
"LaunchDarkly.EventSource": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "DN44Ry5M4lyrjiF7LEu0Ijco7Wm8R7mJopN+giYsYjkQlszsXdFvm3POoehIDAOtL1HHl5bZvF9k9xK034u3IA==",
+ "resolved": "5.1.0",
+ "contentHash": "PztDWiMvPWODx+kfBnCroZ8Lpya4nPc7ZO4TZysOogODbVXDDPDYrdcgVivCMgf4davhGrp61ekvZc+Uy1NYMA==",
"dependencies": {
- "LaunchDarkly.Logging": "[1.0.1, 3.0.0)"
+ "LaunchDarkly.Logging": "[2.0.0, 3.0.0)"
}
},
"LaunchDarkly.InternalSdk": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "jW8VEfFciuCcJUEuvSzmrbMVYYXwGL/ZWHUZLiA4aDOQ1LcEXp32uK405NQW/izEypUfWB+9TaSjPpFIC+5Wzw==",
+ "resolved": "3.3.0",
+ "contentHash": "TBvs/B6iyXp9MqRKjIoBZ/T0+/xgp5xg+MuHqr5U+N5+7DghtI2FnsmgeBedTIeQdA3Tk8Z4Bj4hlqU9FBiEnw==",
"dependencies": {
- "LaunchDarkly.CommonSdk": "6.0.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
"LaunchDarkly.Logging": "[2.0.0, 3.0.0)",
"System.Collections.Immutable": "1.7.1"
}
@@ -314,13 +292,13 @@
},
"LaunchDarkly.ServerSdk": {
"type": "Transitive",
- "resolved": "7.0.0",
- "contentHash": "gkTWb+f5QlsXIqFAciBef3qKZU2y0Hy3Fpt4pvZoxNcnBKg2PNTDSnbpbYEKPeQ1yk1avNaI/tKprnahfrmJFg==",
+ "resolved": "8.0.0",
+ "contentHash": "vosFEXYJABuIDIA0+6sncalTmrKXEkBKeqzuP9/vvcCVlFSXUl/ZnrkrAVg3ViDWDi7kjpJSk2W3h5D0TUfCGA==",
"dependencies": {
"LaunchDarkly.Cache": "1.0.2",
- "LaunchDarkly.CommonSdk": "6.0.0",
- "LaunchDarkly.EventSource": "5.0.1",
- "LaunchDarkly.InternalSdk": "3.1.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
+ "LaunchDarkly.EventSource": "5.1.0",
+ "LaunchDarkly.InternalSdk": "3.3.0",
"LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
@@ -332,16 +310,16 @@
},
"linq2db": {
"type": "Transitive",
- "resolved": "5.2.1",
- "contentHash": "OOBM8s39zhbZAgqFnl2KGxT5RqBDw21X69U528qV2PgQispaA3f+or0ILrLEgnNIJuB4EBgaw8gC6ttSHn4X0Q=="
+ "resolved": "5.3.1",
+ "contentHash": "707mIbEmtptvKeUW940UwoNwq05I7OUu0VWtclLtyYaASp+ugX4I/Er1UVpeldsDawqlVMXB5EQ5/Oar6AkUGQ=="
},
"linq2db.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.5.0",
- "contentHash": "ePHzO99xbObgMLlAFh08of1SnVhg6j4Su9327DrIB7RZWCgtQIX6k+nbl+HRVOooAndZSs7b+DduSgdnJjaJGw==",
+ "resolved": "7.6.0",
+ "contentHash": "T1W9o8wVzApsUwu7SRg/L7487kaiLQYt2AqRVnXVGfobD+ZKy2oRsUMws0PICtciaz4qbfLp/r/+NksfuYsFlw==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Relational": "7.0.0",
- "linq2db": "5.2.1"
+ "linq2db": "5.3.1"
}
},
"MailKit": {
@@ -362,10 +340,10 @@
},
"Microsoft.AspNetCore.Authentication.OpenIdConnect": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "O1cAQYUTU8EfRqwc5/rfTns4E4hKlFlg59fuKRrST+PzsxI6H07KqRN/JjdYhAuVYxF8jPnIGbj+zuc5paOWUw==",
+ "resolved": "6.0.0",
+ "contentHash": "cJxdro36spFzk/K2OFCddM6vZ+yoj6ug8mTFRH3Gdv1Pul/buSuCtfb/FSCp31UmS5S4C1315dU7wX3ErLFuDg==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.5.0"
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.10.0"
}
},
"Microsoft.AspNetCore.Cryptography.Internal": {
@@ -398,8 +376,8 @@
},
"Microsoft.AspNetCore.DataProtection.Abstractions": {
"type": "Transitive",
- "resolved": "3.1.32",
- "contentHash": "MPL4iVyiaRxnOUY5VATHjvhDWaAEFb77KFiUxVRklv3Z3v+STofUr1UG/aCt1O9cgN7FVTDaC5A7U+zsLub8Xg=="
+ "resolved": "6.0.0",
+ "contentHash": "Z/UU4NEBm5UgNufJmw+j5baW26ytCOIZ0G7sZocPaOzsUeBon1bkM3lSMNZQG2GmDjAIVP2XMSODf2jzSGbibw=="
},
"Microsoft.Azure.Amqp": {
"type": "Transitive",
@@ -484,48 +462,44 @@
},
"Microsoft.Data.SqlClient": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "uu8dfrsx081cSbEevWuZAvqdmANDGJkbLBL2G3j0LAZxX1Oy8RCVAaC4Lcuak6jNicWP6CWvHqBTIEmQNSxQlw==",
+ "resolved": "5.1.1",
+ "contentHash": "MW5E9HFvCaV069o8b6YpuRDPBux8s96qDnOJ+4N9QNUCs7c5W3KxwQ+ftpAjbMUlImL+c9WR+l+f5hzjkqhu2g==",
"dependencies": {
- "Azure.Identity": "1.6.0",
- "Microsoft.Data.SqlClient.SNI.runtime": "5.0.1",
- "Microsoft.Identity.Client": "4.45.0",
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.21.0",
+ "Azure.Identity": "1.7.0",
+ "Microsoft.Data.SqlClient.SNI.runtime": "5.1.0",
+ "Microsoft.Identity.Client": "4.47.2",
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.24.0",
"Microsoft.SqlServer.Server": "1.0.0",
- "Microsoft.Win32.Registry": "5.0.0",
- "System.Buffers": "4.5.1",
- "System.Configuration.ConfigurationManager": "5.0.0",
- "System.Diagnostics.DiagnosticSource": "5.0.0",
- "System.IO": "4.3.0",
- "System.Resources.ResourceManager": "4.3.0",
- "System.Runtime.Caching": "5.0.0",
+ "System.Configuration.ConfigurationManager": "6.0.1",
+ "System.Diagnostics.DiagnosticSource": "6.0.0",
+ "System.Runtime.Caching": "6.0.0",
"System.Security.Cryptography.Cng": "5.0.0",
"System.Security.Principal.Windows": "5.0.0",
- "System.Text.Encoding.CodePages": "5.0.0",
- "System.Text.Encodings.Web": "4.7.2"
+ "System.Text.Encoding.CodePages": "6.0.0",
+ "System.Text.Encodings.Web": "6.0.0"
}
},
"Microsoft.Data.SqlClient.SNI.runtime": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "y0X5MxiNdbITJYoafJ2ruaX6hqO0twpCGR/ipiDOe85JKLU8WL4TuAQfDe5qtt3bND5Je26HnrarLSAMMnVTNg=="
+ "resolved": "5.1.0",
+ "contentHash": "jVsElisM5sfBzaaV9kdq2NXZLwIbytetnsOIlJ0cQGgQP4zFNBmkfHBnpwtmKrtBJBEV9+9PVQPVrcCVhDgcIg=="
},
"Microsoft.Data.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "FTerRmQPqHrCrnoUzhBu+E+1DNGwyrAMLqHkAqOOOu5pGfyMOj8qQUBxI/gDtWtG11p49UxSfWmBzRNlwZqfUg==",
+ "resolved": "7.0.14",
+ "contentHash": "qvYae3/v9Fvqsjp/7OKQBuJK+Uc3m/WctfpIUMmGMDot2Bd8UWBKiMSlh26UtfQa9x4N+k7NxCT+AbZVoNrCdg==",
"dependencies": {
"SQLitePCLRaw.core": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "RXbRLHHWP2Z3pq8qcL5nQ6LPeoOyp8hasM5bd0Te8PiQi3RjWQR4tcbdY5XMqQ+oTO9wA8/RLhZRn/hnxlTDnQ==",
+ "resolved": "7.0.14",
+ "contentHash": "0KYkAemPygW6yzifciFlmMzkO4sI4Dw69xLgwg3ui5rXJS5XvzuAWVvfdrKJciqeCbCnVS/ZbOWpcwWgqce5bQ==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Abstractions": "7.0.5",
- "Microsoft.EntityFrameworkCore.Analyzers": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Abstractions": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Analyzers": "7.0.14",
"Microsoft.Extensions.Caching.Memory": "7.0.0",
"Microsoft.Extensions.DependencyInjection": "7.0.0",
"Microsoft.Extensions.Logging": "7.0.0"
@@ -533,49 +507,49 @@
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "iwQso+hFRsEWjhH2WsEQj1D2QE5BlEXiXEt6A3SlYTPRPdZsyTNDeDDEdtxL+H/UJPQgQYY+9SMMRcEiXBmCAA=="
+ "resolved": "7.0.14",
+ "contentHash": "aEcXDSYpDdD5wdIRKTqcS44f3W4capqQ1BWVRPJgacATfHkO62RX9Nnh0hUFg+rei9OLuJp0Y4zsy1fNeOXv5g=="
},
"Microsoft.EntityFrameworkCore.Analyzers": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "yMLM/aK1MikVqpjxd7PJ1Pjgztd3VAd26ZHxyjxG3RPeM9cHjvS5tCg9kAAayR6eHmBg0ffZsHdT28WfA5tTlA=="
+ "resolved": "7.0.14",
+ "contentHash": "esI4RF6mix4DDFBhWB9k1vJxAL8GouSf5ZV8oFJoVsIQ9d2J3MPgC1VL2qM9Vw5cH7Vg7TzRyKNpCRXFVkWs9w=="
},
"Microsoft.EntityFrameworkCore.Relational": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "u/33DC4S6g2hpMPgBc5Kdnlz//nqHR5c/ovgjtiP/wQ7sOd0EOdygVzUJAAOxCwbtAHDsJXS9Vc3jLFYq0yu8Q==",
+ "resolved": "7.0.14",
+ "contentHash": "MrVBnWOFYwfLMGQfrcIuqEM9Xvokv1vJeYxqNH3K3xOtAdHwHQTrKnpDP97tU+LBlvcnyXAtAtryYcpLXWtRNA==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "7.0.5",
+ "Microsoft.EntityFrameworkCore": "7.0.14",
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.Sqlite": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "2XPZB9OLF5/m13HgZp7/Dv0u8FWEJzcaBsMYR9Kp3R6aygkb3RnOijofPDTsmdhAqG9YTysCmh2bFaGs0TCc7A==",
+ "resolved": "7.0.14",
+ "contentHash": "8c8Hw2tmfy5YEsi9RL2/u2Qi9IwVbmj/yDlJy4iJPadeE3/AssLrgtobOBz4ftg2y5PVjFL59Gq7YzGLQH5q1A==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.14",
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "4C+9ct6A/Bq61Ta9Uh2td4/XwNpRCiPI03SWTa3hPJjA/g8wCw2hetbh3DDe5HcydzgDq/lRRjU/eRy3UODklQ==",
+ "resolved": "7.0.14",
+ "contentHash": "JNUkZVff1V/A/P3JiBbgt+Y2oCQSuzORxE3jOqFDbFjSFu7jHDEetJ/afSF/taa0lbyN9OpvaKjsbKk3Iis29Q==",
"dependencies": {
- "Microsoft.Data.Sqlite.Core": "7.0.5",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5",
+ "Microsoft.Data.Sqlite.Core": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14",
"Microsoft.Extensions.DependencyModel": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.SqlServer": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "cUJqCiamT0EvpKNgZEV5fqNv2MyVfKNgOPQfFINqHiIKHOYrS0nTCUJP97+UuG0JIIrP792/PwnuNjbekImtBg==",
+ "resolved": "7.0.14",
+ "contentHash": "d9hqEw4W/TdQ1WDm03uyFuDoehL6GNq/NMChFaC4dcV60I42vKdUC0fYTuE2QPunVUpf5XUTCkJ6fYGjMos2AA==",
"dependencies": {
- "Microsoft.Data.SqlClient": "5.0.1",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5"
+ "Microsoft.Data.SqlClient": "5.1.1",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14"
}
},
"Microsoft.Extensions.Caching.Abstractions": {
@@ -828,50 +802,52 @@
},
"Microsoft.IdentityModel.Abstractions": {
"type": "Transitive",
- "resolved": "6.22.0",
- "contentHash": "iI+9V+2ciCrbheeLjpmjcqCnhy+r6yCoEcid3nkoFWerHgjVuT6CPM4HODUTtUPe1uwks4wcnAujJ8u+IKogHQ=="
+ "resolved": "6.24.0",
+ "contentHash": "X6aBK56Ot15qKyG7X37KsPnrwah+Ka55NJWPppWVTDi8xWq7CJgeNw2XyaeHgE1o/mW4THwoabZkBbeG2TPBiw=="
},
"Microsoft.IdentityModel.JsonWebTokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "d3h1/BaMeylKTkdP6XwRCxuOoDJZ44V9xaXr6gl5QxmpnZGdoK3bySo3OQN8ehRLJHShb94ElLUvoXyglQtgAw==",
+ "resolved": "6.24.0",
+ "contentHash": "XDWrkThcxfuWp79AvAtg5f+uRS1BxkIbJnsG/e8VPzOWkYYuDg33emLjp5EWcwXYYIDsHnVZD/00kM/PYFQc/g==",
"dependencies": {
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Tokens": "6.24.0",
+ "System.Text.Encoding": "4.3.0",
+ "System.Text.Json": "4.7.2"
}
},
"Microsoft.IdentityModel.Logging": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "tuEhHIQwvBEhMf8I50hy8FHmRSUkffDFP5EdLsSDV4qRcl2wvOPkQxYqEzWkh+ytW6sbdJGEXElGhmhDfAxAKg==",
+ "resolved": "6.24.0",
+ "contentHash": "qLYWDOowM/zghmYKXw1yfYKlHOdS41i8t4hVXr9bSI90zHqhyhQh9GwVy8pENzs5wHeytU23DymluC9NtgYv7w==",
"dependencies": {
- "Microsoft.IdentityModel.Abstractions": "6.21.0"
+ "Microsoft.IdentityModel.Abstractions": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "0FqY5cTLQKtHrClzHEI+QxJl8OBT2vUiEQQB7UKk832JDiJJmetzYZ3AdSrPjN/3l3nkhByeWzXnhrX0JbifKg==",
+ "resolved": "6.24.0",
+ "contentHash": "+NzKCkvsQ8X1r/Ff74V7CFr9OsdMRaB6DsV+qpH7NNLdYJ8O4qHbmTnNEsjFcDmk/gVNDwhoL2gN5pkPVq0lwQ==",
"dependencies": {
- "Microsoft.IdentityModel.Logging": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Logging": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols.OpenIdConnect": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "vtSKL7n6EnAsLyxmiviusm6LKrblT2ndnNqN6rvVq6iIHAnPCK9E2DkDx6h1Jrpy1cvbp40r0cnTg23nhEAGTA==",
+ "resolved": "6.24.0",
+ "contentHash": "a/2RRrc8C9qaw8qdD9hv1ES9YKFgxaqr/SnwMSLbwQZJSUQDd4qx1K4EYgWaQWs73R+VXLyKSxN0f/uE9CsBiQ==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols": "6.21.0",
- "System.IdentityModel.Tokens.Jwt": "6.21.0"
+ "Microsoft.IdentityModel.Protocols": "6.24.0",
+ "System.IdentityModel.Tokens.Jwt": "6.24.0"
}
},
"Microsoft.IdentityModel.Tokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "AAEHZvZyb597a+QJSmtxH3n2P1nIJGpZ4Q89GTenknRx6T6zyfzf592yW/jA5e8EHN4tNMjjXHQaYWEq5+L05w==",
+ "resolved": "6.24.0",
+ "contentHash": "ZPqHi86UYuqJXJ7bLnlEctHKkPKT4lGUFbotoCNiXNCSL02emYlcxzGYsRGWWmbFEcYDMi2dcTLLYNzHqWOTsw==",
"dependencies": {
"Microsoft.CSharp": "4.5.0",
- "Microsoft.IdentityModel.Logging": "6.21.0",
+ "Microsoft.IdentityModel.Logging": "6.24.0",
"System.Security.Cryptography.Cng": "4.5.0"
}
},
@@ -1007,13 +983,13 @@
},
"Newtonsoft.Json": {
"type": "Transitive",
- "resolved": "13.0.1",
- "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
+ "resolved": "13.0.3",
+ "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ=="
},
"Npgsql": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "7UVPYy2RP0ci04PED1tc9ZCaTw/DfSdSkLiGEFCAvwMwsgA/bAluj1liNzP1IpN0MFofnOF0cm1zJfmbEuCehg==",
+ "resolved": "7.0.6",
+ "contentHash": "TAqvwRnm3NJ0QvN7cvu6geJkbI0XPzGVRElVY5hF4gsgA+BnE12x6GM1TLhdeq+7ZKvvo3BD8jXKnXmr3tvdEw==",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "6.0.0",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
@@ -1021,13 +997,13 @@
},
"Npgsql.EntityFrameworkCore.PostgreSQL": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "ZYMtyG6pmLtUsFAx0/XaIlVkJM+1gArWEKD55cLLxiVlGScAphjiGj+G7Gk16yg5lhhdWx+bgXWpIUISXuS33g==",
+ "resolved": "7.0.11",
+ "contentHash": "cHEgEz0ldXc9wVANs8sJqC+3eilqefrkasCBgaVT0tyj8tb1p3/pwy2ngjboNkDG3M0z+xJsJ4jC5p8wySAM3w==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, 8.0.0)",
- "Npgsql": "7.0.4"
+ "Microsoft.EntityFrameworkCore": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.11, 8.0.0)",
+ "Npgsql": "7.0.6"
}
},
"NSec.Cryptography": {
@@ -1350,8 +1326,8 @@
},
"Serilog.Sinks.SyslogMessages": {
"type": "Transitive",
- "resolved": "2.0.6",
- "contentHash": "V2Yq2GEbk7taEPbpBLFzLXhrHrUzKf4sQu/zLrANU8XIoUn/Mr08M2E8PrcrWVXCj0R4xLMWYe0Z1sxOrMF3IA==",
+ "resolved": "2.0.9",
+ "contentHash": "y7J+/h/Nf5EAtbpa6lC1nDhK/F9kC5oxuVYmQivv242Oh4hAVMeoAk5Gv6bgb/KbmqufGPXUFkX/AlcrvZ8Ywg==",
"dependencies": {
"Serilog": "2.5.0",
"Serilog.Sinks.PeriodicBatching": "2.3.0"
@@ -1492,8 +1468,8 @@
},
"System.Configuration.ConfigurationManager": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "7T+m0kDSlIPTHIkPMIu6m6tV6qsMqJpvQWW2jIc2qi7sn40qxFo0q+7mEQAhMPXZHMKnWrnv47ntGlM/ejvw3g==",
+ "resolved": "6.0.1",
+ "contentHash": "jXw9MlUu/kRfEU0WyTptAVueupqIeE3/rl0EZDMlf8pcvJnitQ8HeVEp69rZdaStXwTV72boi/Bhw8lOeO+U2w==",
"dependencies": {
"System.Security.Cryptography.ProtectedData": "6.0.0",
"System.Security.Permissions": "6.0.0"
@@ -1652,11 +1628,11 @@
},
"System.IdentityModel.Tokens.Jwt": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "JRD8AuypBE+2zYxT3dMJomQVsPYsCqlyZhWel3J1d5nzQokSRyTueF+Q4ID3Jcu6zSZKuzOdJ1MLTkbQsDqcvQ==",
+ "resolved": "6.24.0",
+ "contentHash": "Qibsj9MPWq8S/C0FgvmsLfIlHLE7ay0MJIaAmK94ivN3VyDdglqReed5qMvdQhSL0BzK6v0Z1wB/sD88zVu6Jw==",
"dependencies": {
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"System.IO": {
@@ -2105,10 +2081,10 @@
},
"System.Runtime.Caching": {
"type": "Transitive",
- "resolved": "5.0.0",
- "contentHash": "30D6MkO8WF9jVGWZIP0hmCN8l9BTY4LCsAzLIe4xFSXzs+AjDotR7DpSmj27pFskDURzUvqYYY0ikModgBTxWw==",
+ "resolved": "6.0.0",
+ "contentHash": "E0e03kUp5X2k+UAoVl6efmI7uU7JRBWi5EIdlQ7cr0NpBGjHG4fWII35PgsBY9T4fJQ8E4QPsL0rKksU9gcL5A==",
"dependencies": {
- "System.Configuration.ConfigurationManager": "5.0.0"
+ "System.Configuration.ConfigurationManager": "6.0.0"
}
},
"System.Runtime.CompilerServices.Unsafe": {
@@ -2638,11 +2614,10 @@
"BitPay.Light": "[1.0.1907, )",
"Braintree": "[5.19.0, )",
"DnsClient": "[1.7.0, )",
+ "Duende.IdentityServer": "[6.0.4, )",
"Fido2.AspNet": "[3.0.1, )",
- "Handlebars.Net": "[2.1.2, )",
- "IdentityServer4": "[4.1.2, )",
- "IdentityServer4.AccessTokenValidation": "[3.0.1, )",
- "LaunchDarkly.ServerSdk": "[7.0.0, )",
+ "Handlebars.Net": "[2.1.4, )",
+ "LaunchDarkly.ServerSdk": "[8.0.0, )",
"MailKit": "[4.2.0, )",
"Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )",
"Microsoft.Azure.Cosmos.Table": "[1.0.8, )",
@@ -2652,7 +2627,7 @@
"Microsoft.Extensions.Configuration.EnvironmentVariables": "[6.0.1, )",
"Microsoft.Extensions.Configuration.UserSecrets": "[6.0.1, )",
"Microsoft.Extensions.Identity.Stores": "[6.0.4, )",
- "Newtonsoft.Json": "[13.0.1, )",
+ "Newtonsoft.Json": "[13.0.3, )",
"Otp.NET": "[1.2.2, )",
"Quartz": "[3.4.0, )",
"SendGrid": "[9.27.0, )",
@@ -2661,7 +2636,7 @@
"Serilog.Extensions.Logging": "[3.1.0, )",
"Serilog.Extensions.Logging.File": "[2.0.0, )",
"Serilog.Sinks.AzureCosmosDB": "[2.0.0, )",
- "Serilog.Sinks.SyslogMessages": "[2.0.6, )",
+ "Serilog.Sinks.SyslogMessages": "[2.0.9, )",
"Stripe.net": "[40.0.0, )",
"YubicoDotNetClient": "[1.2.0, )"
}
@@ -2669,29 +2644,29 @@
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "Dapper": "[2.0.123, )"
+ "Core": "[2023.12.0, )",
+ "Dapper": "[2.1.24, )"
}
},
"infrastructure.entityframework": {
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )",
- "Core": "[2023.10.2, )",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )",
- "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )",
- "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )",
- "Npgsql.EntityFrameworkCore.PostgreSQL": "[7.0.4, )",
+ "Core": "[2023.12.0, )",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.14, )",
+ "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.14, )",
+ "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.14, )",
+ "Npgsql.EntityFrameworkCore.PostgreSQL": "[7.0.11, )",
"Pomelo.EntityFrameworkCore.MySql": "[7.0.0, )",
- "linq2db.EntityFrameworkCore": "[7.5.0, )"
+ "linq2db.EntityFrameworkCore": "[7.6.0, )"
}
},
"sharedweb": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "Infrastructure.Dapper": "[2023.10.2, )",
- "Infrastructure.EntityFramework": "[2023.10.2, )"
+ "Core": "[2023.12.0, )",
+ "Infrastructure.Dapper": "[2023.12.0, )",
+ "Infrastructure.EntityFramework": "[2023.12.0, )"
}
}
}
diff --git a/src/Infrastructure.Dapper/Repositories/OrganizationRepository.cs b/src/Infrastructure.Dapper/AdminConsole/Repositories/OrganizationRepository.cs
similarity index 99%
rename from src/Infrastructure.Dapper/Repositories/OrganizationRepository.cs
rename to src/Infrastructure.Dapper/AdminConsole/Repositories/OrganizationRepository.cs
index 9329e23790..467fb8f8a8 100644
--- a/src/Infrastructure.Dapper/Repositories/OrganizationRepository.cs
+++ b/src/Infrastructure.Dapper/AdminConsole/Repositories/OrganizationRepository.cs
@@ -1,4 +1,5 @@
using System.Data;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.Auth.Entities;
using Bit.Core.Entities;
using Bit.Core.Models.Data.Organizations;
diff --git a/src/Infrastructure.Dapper/Repositories/OrganizationUserRepository.cs b/src/Infrastructure.Dapper/AdminConsole/Repositories/OrganizationUserRepository.cs
similarity index 99%
rename from src/Infrastructure.Dapper/Repositories/OrganizationUserRepository.cs
rename to src/Infrastructure.Dapper/AdminConsole/Repositories/OrganizationUserRepository.cs
index 2a2f0e340a..517b737ee3 100644
--- a/src/Infrastructure.Dapper/Repositories/OrganizationUserRepository.cs
+++ b/src/Infrastructure.Dapper/AdminConsole/Repositories/OrganizationUserRepository.cs
@@ -1,6 +1,7 @@
using System.Data;
using System.Text.Json;
using Bit.Core.AdminConsole.Entities;
+using Bit.Core.AdminConsole.Enums;
using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Models.Data;
diff --git a/src/Infrastructure.Dapper/Repositories/PolicyRepository.cs b/src/Infrastructure.Dapper/AdminConsole/Repositories/PolicyRepository.cs
similarity index 89%
rename from src/Infrastructure.Dapper/Repositories/PolicyRepository.cs
rename to src/Infrastructure.Dapper/AdminConsole/Repositories/PolicyRepository.cs
index 8329a8a82b..1a59c501af 100644
--- a/src/Infrastructure.Dapper/Repositories/PolicyRepository.cs
+++ b/src/Infrastructure.Dapper/AdminConsole/Repositories/PolicyRepository.cs
@@ -1,12 +1,13 @@
using System.Data;
-using Bit.Core.Entities;
-using Bit.Core.Enums;
-using Bit.Core.Repositories;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.AdminConsole.Enums;
+using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Settings;
+using Bit.Infrastructure.Dapper.Repositories;
using Dapper;
using Microsoft.Data.SqlClient;
-namespace Bit.Infrastructure.Dapper.Repositories;
+namespace Bit.Infrastructure.Dapper.AdminConsole.Repositories;
public class PolicyRepository : Repository, IPolicyRepository
{
diff --git a/src/Infrastructure.Dapper/Auth/Helpers/EmergencyAccessHelpers.cs b/src/Infrastructure.Dapper/Auth/Helpers/EmergencyAccessHelpers.cs
new file mode 100644
index 0000000000..34e4fcda69
--- /dev/null
+++ b/src/Infrastructure.Dapper/Auth/Helpers/EmergencyAccessHelpers.cs
@@ -0,0 +1,30 @@
+using System.Data;
+using Bit.Core.Auth.Entities;
+
+namespace Bit.Infrastructure.Dapper.Auth.Helpers;
+
+public static class EmergencyAccessHelpers
+{
+ public static DataTable ToDataTable(this IEnumerable emergencyAccesses)
+ {
+ var emergencyAccessTable = new DataTable();
+
+ var columnData = new List<(string name, Type type, Func getter)>
+ {
+ (nameof(EmergencyAccess.Id), typeof(Guid), c => c.Id),
+ (nameof(EmergencyAccess.GrantorId), typeof(Guid), c => c.GrantorId),
+ (nameof(EmergencyAccess.GranteeId), typeof(Guid), c => c.GranteeId),
+ (nameof(EmergencyAccess.Email), typeof(string), c => c.Email),
+ (nameof(EmergencyAccess.KeyEncrypted), typeof(string), c => c.KeyEncrypted),
+ (nameof(EmergencyAccess.WaitTimeDays), typeof(int), c => c.WaitTimeDays),
+ (nameof(EmergencyAccess.Type), typeof(short), c => c.Type),
+ (nameof(EmergencyAccess.Status), typeof(short), c => c.Status),
+ (nameof(EmergencyAccess.RecoveryInitiatedDate), typeof(DateTime), c => c.RecoveryInitiatedDate),
+ (nameof(EmergencyAccess.LastNotificationDate), typeof(DateTime), c => c.LastNotificationDate),
+ (nameof(EmergencyAccess.CreationDate), typeof(DateTime), c => c.CreationDate),
+ (nameof(EmergencyAccess.RevisionDate), typeof(DateTime), c => c.RevisionDate),
+ };
+
+ return emergencyAccesses.BuildTable(emergencyAccessTable, columnData);
+ }
+}
diff --git a/src/Infrastructure.Dapper/Auth/Repositories/EmergencyAccessRepository.cs b/src/Infrastructure.Dapper/Auth/Repositories/EmergencyAccessRepository.cs
index 00c9cf67ff..195ebfadae 100644
--- a/src/Infrastructure.Dapper/Auth/Repositories/EmergencyAccessRepository.cs
+++ b/src/Infrastructure.Dapper/Auth/Repositories/EmergencyAccessRepository.cs
@@ -1,8 +1,10 @@
using System.Data;
using Bit.Core.Auth.Entities;
using Bit.Core.Auth.Models.Data;
+using Bit.Core.Auth.UserFeatures.UserKey;
using Bit.Core.Repositories;
using Bit.Core.Settings;
+using Bit.Infrastructure.Dapper.Auth.Helpers;
using Bit.Infrastructure.Dapper.Repositories;
using Dapper;
using Microsoft.Data.SqlClient;
@@ -94,4 +96,58 @@ public class EmergencyAccessRepository : Repository, IEme
return results.ToList();
}
}
+
+ ///
+ public UpdateEncryptedDataForKeyRotation UpdateForKeyRotation(
+ Guid grantorId, IEnumerable emergencyAccessKeys)
+ {
+ return async (SqlConnection connection, SqlTransaction transaction) =>
+ {
+ // Create temp table
+ var sqlCreateTemp = @"
+ SELECT TOP 0 *
+ INTO #TempEmergencyAccess
+ FROM [dbo].[EmergencyAccess]";
+
+ await using (var cmd = new SqlCommand(sqlCreateTemp, connection, transaction))
+ {
+ cmd.ExecuteNonQuery();
+ }
+
+ // Bulk copy data into temp table
+ using (var bulkCopy = new SqlBulkCopy(connection, SqlBulkCopyOptions.KeepIdentity, transaction))
+ {
+ bulkCopy.DestinationTableName = "#TempEmergencyAccess";
+ var emergencyAccessTable = emergencyAccessKeys.ToDataTable();
+ foreach (DataColumn col in emergencyAccessTable.Columns)
+ {
+ bulkCopy.ColumnMappings.Add(col.ColumnName, col.ColumnName);
+ }
+
+ emergencyAccessTable.PrimaryKey = new DataColumn[] { emergencyAccessTable.Columns[0] };
+ await bulkCopy.WriteToServerAsync(emergencyAccessTable);
+ }
+
+ // Update emergency access table from temp table
+ var sql = @"
+ UPDATE
+ [dbo].[EmergencyAccess]
+ SET
+ [KeyEncrypted] = TE.[KeyEncrypted]
+ FROM
+ [dbo].[EmergencyAccess] E
+ INNER JOIN
+ #TempEmergencyAccess TE ON E.Id = TE.Id
+ WHERE
+ E.[GrantorId] = @GrantorId
+
+ DROP TABLE #TempEmergencyAccess";
+
+ await using (var cmd = new SqlCommand(sql, connection, transaction))
+ {
+ cmd.Parameters.Add("@GrantorId", SqlDbType.UniqueIdentifier).Value = grantorId;
+ cmd.ExecuteNonQuery();
+ }
+ };
+ }
}
diff --git a/src/Infrastructure.Dapper/DapperHelpers.cs b/src/Infrastructure.Dapper/DapperHelpers.cs
index b5e4dc6e5d..4156c1691b 100644
--- a/src/Infrastructure.Dapper/DapperHelpers.cs
+++ b/src/Infrastructure.Dapper/DapperHelpers.cs
@@ -107,7 +107,8 @@ public static class DapperHelpers
return organizationSponsorships.BuildTable(table, columnData);
}
- private static DataTable BuildTable(this IEnumerable entities, DataTable table, List<(string name, Type type, Func getter)> columnData)
+ public static DataTable BuildTable(this IEnumerable entities, DataTable table,
+ List<(string name, Type type, Func getter)> columnData)
{
foreach (var (name, type, getter) in columnData)
{
diff --git a/src/Infrastructure.Dapper/Infrastructure.Dapper.csproj b/src/Infrastructure.Dapper/Infrastructure.Dapper.csproj
index 002f98b475..d8a57b3303 100644
--- a/src/Infrastructure.Dapper/Infrastructure.Dapper.csproj
+++ b/src/Infrastructure.Dapper/Infrastructure.Dapper.csproj
@@ -5,7 +5,7 @@
-
+
diff --git a/src/Infrastructure.Dapper/Repositories/CollectionCipherRepository.cs b/src/Infrastructure.Dapper/Repositories/CollectionCipherRepository.cs
index 96ee52bed5..7d80ee1294 100644
--- a/src/Infrastructure.Dapper/Repositories/CollectionCipherRepository.cs
+++ b/src/Infrastructure.Dapper/Repositories/CollectionCipherRepository.cs
@@ -17,12 +17,16 @@ public class CollectionCipherRepository : BaseRepository, ICollectionCipherRepos
: base(connectionString, readOnlyConnectionString)
{ }
- public async Task> GetManyByUserIdAsync(Guid userId)
+ public async Task> GetManyByUserIdAsync(Guid userId, bool useFlexibleCollections)
{
+ var sprocName = useFlexibleCollections
+ ? "[dbo].[CollectionCipher_ReadByUserId_V2]"
+ : "[dbo].[CollectionCipher_ReadByUserId]";
+
using (var connection = new SqlConnection(ConnectionString))
{
var results = await connection.QueryAsync(
- "[dbo].[CollectionCipher_ReadByUserId]",
+ sprocName,
new { UserId = userId },
commandType: CommandType.StoredProcedure);
@@ -43,12 +47,16 @@ public class CollectionCipherRepository : BaseRepository, ICollectionCipherRepos
}
}
- public async Task> GetManyByUserIdCipherIdAsync(Guid userId, Guid cipherId)
+ public async Task> GetManyByUserIdCipherIdAsync(Guid userId, Guid cipherId, bool useFlexibleCollections)
{
+ var sprocName = useFlexibleCollections
+ ? "[dbo].[CollectionCipher_ReadByUserIdCipherId_V2]"
+ : "[dbo].[CollectionCipher_ReadByUserIdCipherId]";
+
using (var connection = new SqlConnection(ConnectionString))
{
var results = await connection.QueryAsync(
- "[dbo].[CollectionCipher_ReadByUserIdCipherId]",
+ sprocName,
new { UserId = userId, CipherId = cipherId },
commandType: CommandType.StoredProcedure);
@@ -56,12 +64,16 @@ public class CollectionCipherRepository : BaseRepository, ICollectionCipherRepos
}
}
- public async Task UpdateCollectionsAsync(Guid cipherId, Guid userId, IEnumerable collectionIds)
+ public async Task UpdateCollectionsAsync(Guid cipherId, Guid userId, IEnumerable collectionIds, bool useFlexibleCollections)
{
+ var sprocName = useFlexibleCollections
+ ? "[dbo].[CollectionCipher_UpdateCollections_V2]"
+ : "[dbo].[CollectionCipher_UpdateCollections]";
+
using (var connection = new SqlConnection(ConnectionString))
{
var results = await connection.ExecuteAsync(
- "[dbo].[CollectionCipher_UpdateCollections]",
+ sprocName,
new { CipherId = cipherId, UserId = userId, CollectionIds = collectionIds.ToGuidIdArrayTVP() },
commandType: CommandType.StoredProcedure);
}
@@ -79,12 +91,16 @@ public class CollectionCipherRepository : BaseRepository, ICollectionCipherRepos
}
public async Task UpdateCollectionsForCiphersAsync(IEnumerable cipherIds, Guid userId,
- Guid organizationId, IEnumerable collectionIds)
+ Guid organizationId, IEnumerable collectionIds, bool useFlexibleCollections)
{
+ var sprocName = useFlexibleCollections
+ ? "[dbo].[CollectionCipher_UpdateCollectionsForCiphers_V2]"
+ : "[dbo].[CollectionCipher_UpdateCollectionsForCiphers]";
+
using (var connection = new SqlConnection(ConnectionString))
{
var results = await connection.ExecuteAsync(
- "[dbo].[CollectionCipher_UpdateCollectionsForCiphers]",
+ sprocName,
new
{
CipherIds = cipherIds.ToGuidIdArrayTVP(),
diff --git a/src/Infrastructure.Dapper/Repositories/UserRepository.cs b/src/Infrastructure.Dapper/Repositories/UserRepository.cs
index 675b8e6b82..e827d261f9 100644
--- a/src/Infrastructure.Dapper/Repositories/UserRepository.cs
+++ b/src/Infrastructure.Dapper/Repositories/UserRepository.cs
@@ -209,7 +209,7 @@ public class UserRepository : Repository, IUserRepository
// Update re-encrypted data
foreach (var action in updateDataActions)
{
- await action(transaction);
+ await action(connection, transaction);
}
transaction.Commit();
diff --git a/src/Infrastructure.Dapper/Tools/Repositories/SendRepository.cs b/src/Infrastructure.Dapper/Tools/Repositories/SendRepository.cs
index 24cdcbf77b..0522cee672 100644
--- a/src/Infrastructure.Dapper/Tools/Repositories/SendRepository.cs
+++ b/src/Infrastructure.Dapper/Tools/Repositories/SendRepository.cs
@@ -1,4 +1,6 @@
-using System.Data;
+#nullable enable
+
+using System.Data;
using Bit.Core.Settings;
using Bit.Core.Tools.Entities;
using Bit.Core.Tools.Repositories;
@@ -8,6 +10,7 @@ using Microsoft.Data.SqlClient;
namespace Bit.Infrastructure.Dapper.Tools.Repositories;
+///
public class SendRepository : Repository, ISendRepository
{
public SendRepository(GlobalSettings globalSettings)
@@ -18,6 +21,7 @@ public class SendRepository : Repository, ISendRepository
: base(connectionString, readOnlyConnectionString)
{ }
+ ///
public async Task> GetManyByUserIdAsync(Guid userId)
{
using (var connection = new SqlConnection(ConnectionString))
@@ -31,6 +35,7 @@ public class SendRepository : Repository, ISendRepository
}
}
+ ///
public async Task> GetManyByDeletionDateAsync(DateTime deletionDateBefore)
{
using (var connection = new SqlConnection(ConnectionString))
diff --git a/src/Infrastructure.Dapper/Vault/Helpers/CipherHelpers.cs b/src/Infrastructure.Dapper/Vault/Helpers/CipherHelpers.cs
new file mode 100644
index 0000000000..8f60d81d90
--- /dev/null
+++ b/src/Infrastructure.Dapper/Vault/Helpers/CipherHelpers.cs
@@ -0,0 +1,33 @@
+using System.Data;
+using Bit.Core.Vault.Entities;
+using Dapper;
+
+namespace Bit.Infrastructure.Dapper.Vault.Helpers;
+
+public static class CipherHelpers
+{
+ public static DataTable ToDataTable(this IEnumerable ciphers)
+ {
+ var ciphersTable = new DataTable();
+ ciphersTable.SetTypeName("[dbo].[Cipher]");
+
+ var columnData = new List<(string name, Type type, Func getter)>
+ {
+ (nameof(Cipher.Id), typeof(Guid), c => c.Id),
+ (nameof(Cipher.UserId), typeof(Guid), c => c.UserId),
+ (nameof(Cipher.OrganizationId), typeof(Guid), c => c.OrganizationId),
+ (nameof(Cipher.Type), typeof(short), c => c.Type),
+ (nameof(Cipher.Data), typeof(string), c => c.Data),
+ (nameof(Cipher.Favorites), typeof(string), c => c.Favorites),
+ (nameof(Cipher.Folders), typeof(string), c => c.Folders),
+ (nameof(Cipher.Attachments), typeof(string), c => c.Attachments),
+ (nameof(Cipher.CreationDate), typeof(DateTime), c => c.CreationDate),
+ (nameof(Cipher.RevisionDate), typeof(DateTime), c => c.RevisionDate),
+ (nameof(Cipher.DeletedDate), typeof(DateTime), c => c.DeletedDate),
+ (nameof(Cipher.Reprompt), typeof(short), c => c.Reprompt),
+ (nameof(Cipher.Key), typeof(string), c => c.Key),
+ };
+
+ return ciphers.BuildTable(ciphersTable, columnData);
+ }
+}
diff --git a/src/Infrastructure.Dapper/Vault/Helpers/FolderHelpers.cs b/src/Infrastructure.Dapper/Vault/Helpers/FolderHelpers.cs
new file mode 100644
index 0000000000..4428316de2
--- /dev/null
+++ b/src/Infrastructure.Dapper/Vault/Helpers/FolderHelpers.cs
@@ -0,0 +1,25 @@
+using System.Data;
+using Bit.Core.Vault.Entities;
+using Dapper;
+
+namespace Bit.Infrastructure.Dapper.Vault.Helpers;
+
+public static class FolderHelpers
+{
+ public static DataTable ToDataTable(this IEnumerable folders)
+ {
+ var foldersTable = new DataTable();
+ foldersTable.SetTypeName("[dbo].[Folder]");
+
+ var columnData = new List<(string name, Type type, Func getter)>
+ {
+ (nameof(Folder.Id), typeof(Guid), c => c.Id),
+ (nameof(Folder.UserId), typeof(Guid), c => c.UserId),
+ (nameof(Folder.Name), typeof(string), c => c.Name),
+ (nameof(Folder.CreationDate), typeof(DateTime), c => c.CreationDate),
+ (nameof(Folder.RevisionDate), typeof(DateTime), c => c.RevisionDate),
+ };
+
+ return folders.BuildTable(foldersTable, columnData);
+ }
+}
diff --git a/src/Infrastructure.Dapper/Vault/Repositories/CipherRepository.cs b/src/Infrastructure.Dapper/Vault/Repositories/CipherRepository.cs
index dfc62f3049..f0bc4c1760 100644
--- a/src/Infrastructure.Dapper/Vault/Repositories/CipherRepository.cs
+++ b/src/Infrastructure.Dapper/Vault/Repositories/CipherRepository.cs
@@ -1,5 +1,6 @@
using System.Data;
using System.Text.Json;
+using Bit.Core.Auth.UserFeatures.UserKey;
using Bit.Core.Entities;
using Bit.Core.Settings;
using Bit.Core.Tools.Entities;
@@ -7,6 +8,7 @@ using Bit.Core.Vault.Entities;
using Bit.Core.Vault.Models.Data;
using Bit.Core.Vault.Repositories;
using Bit.Infrastructure.Dapper.Repositories;
+using Bit.Infrastructure.Dapper.Vault.Helpers;
using Dapper;
using Microsoft.Data.SqlClient;
@@ -22,12 +24,16 @@ public class CipherRepository : Repository, ICipherRepository
: base(connectionString, readOnlyConnectionString)
{ }
- public async Task GetByIdAsync(Guid id, Guid userId)
+ public async Task GetByIdAsync(Guid id, Guid userId, bool useFlexibleCollections)
{
+ var sprocName = useFlexibleCollections
+ ? $"[{Schema}].[CipherDetails_ReadByIdUserId_V2]"
+ : $"[{Schema}].[CipherDetails_ReadByIdUserId]";
+
using (var connection = new SqlConnection(ConnectionString))
{
var results = await connection.QueryAsync(
- $"[{Schema}].[CipherDetails_ReadByIdUserId]",
+ sprocName,
new { Id = id, UserId = userId },
commandType: CommandType.StoredProcedure);
@@ -75,12 +81,14 @@ public class CipherRepository : Repository, ICipherRepository
}
}
- public async Task> GetManyByUserIdAsync(Guid userId, bool withOrganizations = true)
+ public async Task> GetManyByUserIdAsync(Guid userId, bool useFlexibleCollections, bool withOrganizations = true)
{
string sprocName = null;
if (withOrganizations)
{
- sprocName = $"[{Schema}].[CipherDetails_ReadByUserId]";
+ sprocName = useFlexibleCollections
+ ? $"[{Schema}].[CipherDetails_ReadByUserId_V2]"
+ : $"[{Schema}].[CipherDetails_ReadByUserId]";
}
else
{
@@ -228,12 +236,16 @@ public class CipherRepository : Repository, ICipherRepository
}
}
- public async Task DeleteAsync(IEnumerable ids, Guid userId)
+ public async Task DeleteAsync(IEnumerable ids, Guid userId, bool useFlexibleCollections)
{
+ var sprocName = useFlexibleCollections
+ ? $"[{Schema}].[Cipher_Delete_V2]"
+ : $"[{Schema}].[Cipher_Delete]";
+
using (var connection = new SqlConnection(ConnectionString))
{
var results = await connection.ExecuteAsync(
- $"[{Schema}].[Cipher_Delete]",
+ sprocName,
new { Ids = ids.ToGuidIdArrayTVP(), UserId = userId },
commandType: CommandType.StoredProcedure);
}
@@ -261,12 +273,16 @@ public class CipherRepository : Repository, ICipherRepository
}
}
- public async Task MoveAsync(IEnumerable ids, Guid? folderId, Guid userId)
+ public async Task MoveAsync(IEnumerable ids, Guid? folderId, Guid userId, bool useFlexibleCollections)
{
+ var sprocName = useFlexibleCollections
+ ? $"[{Schema}].[Cipher_Move_V2]"
+ : $"[{Schema}].[Cipher_Move]";
+
using (var connection = new SqlConnection(ConnectionString))
{
var results = await connection.ExecuteAsync(
- $"[{Schema}].[Cipher_Move]",
+ sprocName,
new { Ids = ids.ToGuidIdArrayTVP(), FolderId = folderId, UserId = userId },
commandType: CommandType.StoredProcedure);
}
@@ -294,6 +310,63 @@ public class CipherRepository : Repository, ICipherRepository
}
}
+ ///
+ public UpdateEncryptedDataForKeyRotation UpdateForKeyRotation(
+ Guid userId, IEnumerable ciphers)
+ {
+ return async (SqlConnection connection, SqlTransaction transaction) =>
+ {
+ // Create temp table
+ var sqlCreateTemp = @"
+ SELECT TOP 0 *
+ INTO #TempCipher
+ FROM [dbo].[Cipher]";
+
+ await using (var cmd = new SqlCommand(sqlCreateTemp, connection, transaction))
+ {
+ cmd.ExecuteNonQuery();
+ }
+
+ // Bulk copy data into temp table
+ using (var bulkCopy = new SqlBulkCopy(connection, SqlBulkCopyOptions.KeepIdentity, transaction))
+ {
+ bulkCopy.DestinationTableName = "#TempCipher";
+ var ciphersTable = ciphers.ToDataTable();
+ foreach (DataColumn col in ciphersTable.Columns)
+ {
+ bulkCopy.ColumnMappings.Add(col.ColumnName, col.ColumnName);
+ }
+
+ ciphersTable.PrimaryKey = new DataColumn[] { ciphersTable.Columns[0] };
+ await bulkCopy.WriteToServerAsync(ciphersTable);
+ }
+
+ // Update cipher table from temp table
+ var sql = @"
+ UPDATE
+ [dbo].[Cipher]
+ SET
+ [Data] = TC.[Data],
+ [Attachments] = TC.[Attachments],
+ [RevisionDate] = TC.[RevisionDate],
+ [Key] = TC.[Key]
+ FROM
+ [dbo].[Cipher] C
+ INNER JOIN
+ #TempCipher TC ON C.Id = TC.Id
+ WHERE
+ C.[UserId] = @UserId
+
+ DROP TABLE #TempCipher";
+
+ await using (var cmd = new SqlCommand(sql, connection, transaction))
+ {
+ cmd.Parameters.Add("@UserId", SqlDbType.UniqueIdentifier).Value = userId;
+ cmd.ExecuteNonQuery();
+ }
+ };
+ }
+
public Task UpdateUserKeysAndCiphersAsync(User user, IEnumerable ciphers, IEnumerable folders, IEnumerable sends)
{
using (var connection = new SqlConnection(ConnectionString))
@@ -589,7 +662,7 @@ public class CipherRepository : Repository, ICipherRepository
}
public async Task CreateAsync(IEnumerable ciphers, IEnumerable collections,
- IEnumerable collectionCiphers)
+ IEnumerable collectionCiphers, IEnumerable collectionUsers)
{
if (!ciphers.Any())
{
@@ -631,6 +704,16 @@ public class CipherRepository : Repository, ICipherRepository
}
}
+ if (collectionUsers.Any())
+ {
+ using (var bulkCopy = new SqlBulkCopy(connection, SqlBulkCopyOptions.KeepIdentity, transaction))
+ {
+ bulkCopy.DestinationTableName = "[dbo].[CollectionUser]";
+ var dataTable = BuildCollectionUsersTable(bulkCopy, collectionUsers);
+ bulkCopy.WriteToServer(dataTable);
+ }
+ }
+
await connection.ExecuteAsync(
$"[{Schema}].[User_BumpAccountRevisionDateByOrganizationId]",
new { OrganizationId = ciphers.First().OrganizationId },
@@ -647,23 +730,31 @@ public class CipherRepository : Repository, ICipherRepository
}
}
- public async Task SoftDeleteAsync(IEnumerable ids, Guid userId)
+ public async Task SoftDeleteAsync(IEnumerable ids, Guid userId, bool useFlexibleCollections)
{
+ var sprocName = useFlexibleCollections
+ ? $"[{Schema}].[Cipher_SoftDelete_V2]"
+ : $"[{Schema}].[Cipher_SoftDelete]";
+
using (var connection = new SqlConnection(ConnectionString))
{
var results = await connection.ExecuteAsync(
- $"[{Schema}].[Cipher_SoftDelete]",
+ sprocName,
new { Ids = ids.ToGuidIdArrayTVP(), UserId = userId },
commandType: CommandType.StoredProcedure);
}
}
- public async Task RestoreAsync(IEnumerable ids, Guid userId)
+ public async Task RestoreAsync(IEnumerable ids, Guid userId, bool useFlexibleCollections)
{
+ var sprocName = useFlexibleCollections
+ ? $"[{Schema}].[Cipher_Restore_V2]"
+ : $"[{Schema}].[Cipher_Restore]";
+
using (var connection = new SqlConnection(ConnectionString))
{
var results = await connection.ExecuteScalarAsync(
- $"[{Schema}].[Cipher_Restore]",
+ sprocName,
new { Ids = ids.ToGuidIdArrayTVP(), UserId = userId },
commandType: CommandType.StoredProcedure);
@@ -896,6 +987,53 @@ public class CipherRepository : Repository, ICipherRepository
return collectionCiphersTable;
}
+ private DataTable BuildCollectionUsersTable(SqlBulkCopy bulkCopy, IEnumerable collectionUsers)
+ {
+ var cu = collectionUsers.FirstOrDefault();
+ if (cu == null)
+ {
+ throw new ApplicationException("Must have some collectionUsers to bulk import.");
+ }
+
+ var collectionUsersTable = new DataTable("CollectionUserDataTable");
+
+ var collectionIdColumn = new DataColumn(nameof(cu.CollectionId), cu.CollectionId.GetType());
+ collectionUsersTable.Columns.Add(collectionIdColumn);
+ var organizationUserIdColumn = new DataColumn(nameof(cu.OrganizationUserId), cu.OrganizationUserId.GetType());
+ collectionUsersTable.Columns.Add(organizationUserIdColumn);
+ var readOnlyColumn = new DataColumn(nameof(cu.ReadOnly), cu.ReadOnly.GetType());
+ collectionUsersTable.Columns.Add(readOnlyColumn);
+ var hidePasswordsColumn = new DataColumn(nameof(cu.HidePasswords), cu.HidePasswords.GetType());
+ collectionUsersTable.Columns.Add(hidePasswordsColumn);
+ var manageColumn = new DataColumn(nameof(cu.Manage), cu.Manage.GetType());
+ collectionUsersTable.Columns.Add(manageColumn);
+
+ foreach (DataColumn col in collectionUsersTable.Columns)
+ {
+ bulkCopy.ColumnMappings.Add(col.ColumnName, col.ColumnName);
+ }
+
+ var keys = new DataColumn[2];
+ keys[0] = collectionIdColumn;
+ keys[1] = organizationUserIdColumn;
+ collectionUsersTable.PrimaryKey = keys;
+
+ foreach (var collectionUser in collectionUsers)
+ {
+ var row = collectionUsersTable.NewRow();
+
+ row[collectionIdColumn] = collectionUser.CollectionId;
+ row[organizationUserIdColumn] = collectionUser.OrganizationUserId;
+ row[readOnlyColumn] = collectionUser.ReadOnly;
+ row[hidePasswordsColumn] = collectionUser.HidePasswords;
+ row[manageColumn] = collectionUser.Manage;
+
+ collectionUsersTable.Rows.Add(row);
+ }
+
+ return collectionUsersTable;
+ }
+
private DataTable BuildSendsTable(SqlBulkCopy bulkCopy, IEnumerable sends)
{
var s = sends.FirstOrDefault();
diff --git a/src/Infrastructure.Dapper/Vault/Repositories/FolderRepository.cs b/src/Infrastructure.Dapper/Vault/Repositories/FolderRepository.cs
index 1703b969a1..bf1548b24c 100644
--- a/src/Infrastructure.Dapper/Vault/Repositories/FolderRepository.cs
+++ b/src/Infrastructure.Dapper/Vault/Repositories/FolderRepository.cs
@@ -1,8 +1,10 @@
using System.Data;
+using Bit.Core.Auth.UserFeatures.UserKey;
using Bit.Core.Settings;
using Bit.Core.Vault.Entities;
using Bit.Core.Vault.Repositories;
using Bit.Infrastructure.Dapper.Repositories;
+using Bit.Infrastructure.Dapper.Vault.Helpers;
using Dapper;
using Microsoft.Data.SqlClient;
@@ -41,4 +43,60 @@ public class FolderRepository : Repository, IFolderRepository
return results.ToList();
}
}
+
+ ///
+ public UpdateEncryptedDataForKeyRotation UpdateForKeyRotation(
+ Guid userId, IEnumerable folders)
+ {
+ return async (SqlConnection connection, SqlTransaction transaction) =>
+ {
+ // Create temp table
+ var sqlCreateTemp = @"
+ SELECT TOP 0 *
+ INTO #TempFolder
+ FROM [dbo].[Folder]";
+
+ await using (var cmd = new SqlCommand(sqlCreateTemp, connection, transaction))
+ {
+ cmd.ExecuteNonQuery();
+ }
+
+ // Bulk copy data into temp table
+ using (var bulkCopy = new SqlBulkCopy(connection, SqlBulkCopyOptions.KeepIdentity, transaction))
+ {
+ bulkCopy.DestinationTableName = "#TempFolder";
+ var foldersTable = folders.ToDataTable();
+ foreach (DataColumn col in foldersTable.Columns)
+ {
+ bulkCopy.ColumnMappings.Add(col.ColumnName, col.ColumnName);
+ }
+
+ foldersTable.PrimaryKey = new DataColumn[] { foldersTable.Columns[0] };
+ await bulkCopy.WriteToServerAsync(foldersTable);
+ }
+
+ // Update folder table from temp table
+ var sql = @"
+ UPDATE
+ [dbo].[Folder]
+ SET
+ [Name] = TF.[Name],
+ [RevisionDate] = TF.[RevisionDate]
+ FROM
+ [dbo].[Folder] F
+ INNER JOIN
+ #TempFolder TF ON F.Id = TF.Id
+ WHERE
+ F.[UserId] = @UserId;
+
+ DROP TABLE #TempFolder";
+
+ await using (var cmd = new SqlCommand(sql, connection, transaction))
+ {
+ cmd.Parameters.Add("@UserId", SqlDbType.UniqueIdentifier).Value = userId;
+ cmd.ExecuteNonQuery();
+ }
+ };
+ }
+
}
diff --git a/src/Infrastructure.Dapper/packages.lock.json b/src/Infrastructure.Dapper/packages.lock.json
index 60adeb09af..66339c6c05 100644
--- a/src/Infrastructure.Dapper/packages.lock.json
+++ b/src/Infrastructure.Dapper/packages.lock.json
@@ -4,9 +4,9 @@
"net6.0": {
"Dapper": {
"type": "Direct",
- "requested": "[2.0.123, )",
- "resolved": "2.0.123",
- "contentHash": "RDFF4rBLLmbpi6pwkY7q/M6UXHRJEOerplDGE5jwEkP/JGJnBauAClYavNKJPW1yOTWRPIyfj4is3EaJxQXILQ=="
+ "requested": "[2.1.24, )",
+ "resolved": "2.1.24",
+ "contentHash": "/2t2vsdJyZRsk13AsWigZpsuFvEwK+o3v862cEULXoww905gyKhJFSuwmZI/4Ui9COX9ZCFCI09UHyH4wVYl3A=="
},
"AspNetCoreRateLimit": {
"type": "Transitive",
@@ -168,6 +168,24 @@
"Microsoft.Win32.Registry": "5.0.0"
}
},
+ "Duende.IdentityServer": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "4HVjzx1F8v5J+U7oa8RGAQGj2QzmzNSu87r18Sh+dlh10uyZZL8teAaT/FaVLDObnfItGdPFvN8mwpF/HkI3Xw==",
+ "dependencies": {
+ "Duende.IdentityServer.Storage": "6.0.4",
+ "Microsoft.AspNetCore.Authentication.OpenIdConnect": "6.0.0"
+ }
+ },
+ "Duende.IdentityServer.Storage": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "s5gAjfbpr2IMgI+fU2Nx+2AZdzstmbt9gpo13iX7GwvqSeSaBVqj9ZskAN0R2KF1OemPdZuGnfaTcevdXMUrrw==",
+ "dependencies": {
+ "IdentityModel": "6.0.0",
+ "Microsoft.AspNetCore.DataProtection.Abstractions": "6.0.0"
+ }
+ },
"Fido2": {
"type": "Transitive",
"resolved": "3.0.1",
@@ -196,57 +214,16 @@
},
"Handlebars.Net": {
"type": "Transitive",
- "resolved": "2.1.2",
- "contentHash": "p60QyeBYpZmcZdIXRMqs9XySIBaxJ0lj3+QD0EJVr4ybTigOTCumXMMin5dPwjo9At1UwkDZ3gGwa1lmGjG6DA==",
+ "resolved": "2.1.4",
+ "contentHash": "Od7MWDfGxYKRtxETFMlcvCrY8hAqyuXZDX4EsOfiI/jzh+PVBuVxazHBC1HmVqTKX1JnRtoxIMcH95K9UFlYog==",
"dependencies": {
"Microsoft.CSharp": "4.7.0"
}
},
"IdentityModel": {
"type": "Transitive",
- "resolved": "4.4.0",
- "contentHash": "b18wrIx5wnZlMxAX7oVsE+nDtAJ4hajYlH0xPlaRvo4r/fz08K6pPeZvbiqS9nfNbzfIgLFmNX+FL9qR9ZR5PA==",
- "dependencies": {
- "Newtonsoft.Json": "11.0.2",
- "System.Text.Encodings.Web": "4.7.0"
- }
- },
- "IdentityModel.AspNetCore.OAuth2Introspection": {
- "type": "Transitive",
- "resolved": "4.0.1",
- "contentHash": "ZNdMZMaj9fqR3j50vYsu+1U3QGd6n8+fqwf+a8mCTcmXGor+HgFDfdq0mM34bsmD6uEgAQup7sv2ZW5kR36dbA==",
- "dependencies": {
- "IdentityModel": "4.0.0"
- }
- },
- "IdentityServer4": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "blaxxGuOA7v/w1q+fxn97wZ+x2ecG1ZD4mc/N/ZOXMNeFZZhqv+4LF26Gecyik3nWrJPmbMEtQbLmRsKG8k61w==",
- "dependencies": {
- "IdentityModel": "4.4.0",
- "IdentityServer4.Storage": "4.1.2",
- "Microsoft.AspNetCore.Authentication.OpenIdConnect": "3.1.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.6.0",
- "Newtonsoft.Json": "12.0.2"
- }
- },
- "IdentityServer4.AccessTokenValidation": {
- "type": "Transitive",
- "resolved": "3.0.1",
- "contentHash": "qu/M6UyN4o9NVep7q545Ms7hYAnsQqSdLbN1Fjjrn4m35lyBfeQPSSNzDryAKHbodyWOQfHaOqKEyMEJQ5Rpgw==",
- "dependencies": {
- "IdentityModel.AspNetCore.OAuth2Introspection": "4.0.1",
- "Microsoft.AspNetCore.Authentication.JwtBearer": "3.0.0"
- }
- },
- "IdentityServer4.Storage": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "KoSffyZyyeCNTIyJiZnCuPakJ1QbCHlpty6gbWUj/7yl+w0PXIchgmmJnJSvddzBb8iZ2xew/vGlxWUIP17P2g==",
- "dependencies": {
- "IdentityModel": "4.4.0"
- }
+ "resolved": "6.0.0",
+ "contentHash": "eVHCR7a6m/dm5RFcBzE3qs/Jg5j9R5Rjpu8aTOv9e4AFvaQtBXb5ah7kmwU+YwA0ufRwz4wf1hnIvsD2hSnI4g=="
},
"LaunchDarkly.Cache": {
"type": "Transitive",
@@ -255,26 +232,27 @@
},
"LaunchDarkly.CommonSdk": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "YYYq+41gZRMQ8dIoMC6HOq/dI+4RY3HsexLLAaE9T1+1tVMeQkbCqak7sVeKX4QcE7xlXx23lWgipYUkRoRUyw==",
+ "resolved": "6.2.0",
+ "contentHash": "eLeb+tTNLwOxlUIsZWzJlcPmG9Wyf20NYyucP6MW6aqKW6doKFeSO+aJe0z+WyijbvfX1Dp1U1HQatOu6fa1Gg==",
"dependencies": {
+ "LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
},
"LaunchDarkly.EventSource": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "DN44Ry5M4lyrjiF7LEu0Ijco7Wm8R7mJopN+giYsYjkQlszsXdFvm3POoehIDAOtL1HHl5bZvF9k9xK034u3IA==",
+ "resolved": "5.1.0",
+ "contentHash": "PztDWiMvPWODx+kfBnCroZ8Lpya4nPc7ZO4TZysOogODbVXDDPDYrdcgVivCMgf4davhGrp61ekvZc+Uy1NYMA==",
"dependencies": {
- "LaunchDarkly.Logging": "[1.0.1, 3.0.0)"
+ "LaunchDarkly.Logging": "[2.0.0, 3.0.0)"
}
},
"LaunchDarkly.InternalSdk": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "jW8VEfFciuCcJUEuvSzmrbMVYYXwGL/ZWHUZLiA4aDOQ1LcEXp32uK405NQW/izEypUfWB+9TaSjPpFIC+5Wzw==",
+ "resolved": "3.3.0",
+ "contentHash": "TBvs/B6iyXp9MqRKjIoBZ/T0+/xgp5xg+MuHqr5U+N5+7DghtI2FnsmgeBedTIeQdA3Tk8Z4Bj4hlqU9FBiEnw==",
"dependencies": {
- "LaunchDarkly.CommonSdk": "6.0.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
"LaunchDarkly.Logging": "[2.0.0, 3.0.0)",
"System.Collections.Immutable": "1.7.1"
}
@@ -289,13 +267,13 @@
},
"LaunchDarkly.ServerSdk": {
"type": "Transitive",
- "resolved": "7.0.0",
- "contentHash": "gkTWb+f5QlsXIqFAciBef3qKZU2y0Hy3Fpt4pvZoxNcnBKg2PNTDSnbpbYEKPeQ1yk1avNaI/tKprnahfrmJFg==",
+ "resolved": "8.0.0",
+ "contentHash": "vosFEXYJABuIDIA0+6sncalTmrKXEkBKeqzuP9/vvcCVlFSXUl/ZnrkrAVg3ViDWDi7kjpJSk2W3h5D0TUfCGA==",
"dependencies": {
"LaunchDarkly.Cache": "1.0.2",
- "LaunchDarkly.CommonSdk": "6.0.0",
- "LaunchDarkly.EventSource": "5.0.1",
- "LaunchDarkly.InternalSdk": "3.1.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
+ "LaunchDarkly.EventSource": "5.1.0",
+ "LaunchDarkly.InternalSdk": "3.3.0",
"LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
@@ -323,10 +301,10 @@
},
"Microsoft.AspNetCore.Authentication.OpenIdConnect": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "O1cAQYUTU8EfRqwc5/rfTns4E4hKlFlg59fuKRrST+PzsxI6H07KqRN/JjdYhAuVYxF8jPnIGbj+zuc5paOWUw==",
+ "resolved": "6.0.0",
+ "contentHash": "cJxdro36spFzk/K2OFCddM6vZ+yoj6ug8mTFRH3Gdv1Pul/buSuCtfb/FSCp31UmS5S4C1315dU7wX3ErLFuDg==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.5.0"
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.10.0"
}
},
"Microsoft.AspNetCore.Cryptography.Internal": {
@@ -359,8 +337,8 @@
},
"Microsoft.AspNetCore.DataProtection.Abstractions": {
"type": "Transitive",
- "resolved": "3.1.32",
- "contentHash": "MPL4iVyiaRxnOUY5VATHjvhDWaAEFb77KFiUxVRklv3Z3v+STofUr1UG/aCt1O9cgN7FVTDaC5A7U+zsLub8Xg=="
+ "resolved": "6.0.0",
+ "contentHash": "Z/UU4NEBm5UgNufJmw+j5baW26ytCOIZ0G7sZocPaOzsUeBon1bkM3lSMNZQG2GmDjAIVP2XMSODf2jzSGbibw=="
},
"Microsoft.Azure.Amqp": {
"type": "Transitive",
@@ -891,8 +869,8 @@
},
"Newtonsoft.Json": {
"type": "Transitive",
- "resolved": "13.0.1",
- "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
+ "resolved": "13.0.3",
+ "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ=="
},
"NSec.Cryptography": {
"type": "Transitive",
@@ -1205,8 +1183,8 @@
},
"Serilog.Sinks.SyslogMessages": {
"type": "Transitive",
- "resolved": "2.0.6",
- "contentHash": "V2Yq2GEbk7taEPbpBLFzLXhrHrUzKf4sQu/zLrANU8XIoUn/Mr08M2E8PrcrWVXCj0R4xLMWYe0Z1sxOrMF3IA==",
+ "resolved": "2.0.9",
+ "contentHash": "y7J+/h/Nf5EAtbpa6lC1nDhK/F9kC5oxuVYmQivv242Oh4hAVMeoAk5Gv6bgb/KbmqufGPXUFkX/AlcrvZ8Ywg==",
"dependencies": {
"Serilog": "2.5.0",
"Serilog.Sinks.PeriodicBatching": "2.3.0"
@@ -2455,11 +2433,10 @@
"BitPay.Light": "[1.0.1907, )",
"Braintree": "[5.19.0, )",
"DnsClient": "[1.7.0, )",
+ "Duende.IdentityServer": "[6.0.4, )",
"Fido2.AspNet": "[3.0.1, )",
- "Handlebars.Net": "[2.1.2, )",
- "IdentityServer4": "[4.1.2, )",
- "IdentityServer4.AccessTokenValidation": "[3.0.1, )",
- "LaunchDarkly.ServerSdk": "[7.0.0, )",
+ "Handlebars.Net": "[2.1.4, )",
+ "LaunchDarkly.ServerSdk": "[8.0.0, )",
"MailKit": "[4.2.0, )",
"Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )",
"Microsoft.Azure.Cosmos.Table": "[1.0.8, )",
@@ -2469,7 +2446,7 @@
"Microsoft.Extensions.Configuration.EnvironmentVariables": "[6.0.1, )",
"Microsoft.Extensions.Configuration.UserSecrets": "[6.0.1, )",
"Microsoft.Extensions.Identity.Stores": "[6.0.4, )",
- "Newtonsoft.Json": "[13.0.1, )",
+ "Newtonsoft.Json": "[13.0.3, )",
"Otp.NET": "[1.2.2, )",
"Quartz": "[3.4.0, )",
"SendGrid": "[9.27.0, )",
@@ -2478,7 +2455,7 @@
"Serilog.Extensions.Logging": "[3.1.0, )",
"Serilog.Extensions.Logging.File": "[2.0.0, )",
"Serilog.Sinks.AzureCosmosDB": "[2.0.0, )",
- "Serilog.Sinks.SyslogMessages": "[2.0.6, )",
+ "Serilog.Sinks.SyslogMessages": "[2.0.9, )",
"Stripe.net": "[40.0.0, )",
"YubicoDotNetClient": "[1.2.0, )"
}
diff --git a/src/Infrastructure.EntityFramework/Models/Organization.cs b/src/Infrastructure.EntityFramework/AdminConsole/Models/Organization.cs
similarity index 86%
rename from src/Infrastructure.EntityFramework/Models/Organization.cs
rename to src/Infrastructure.EntityFramework/AdminConsole/Models/Organization.cs
index d7410cf4a7..3da462a09b 100644
--- a/src/Infrastructure.EntityFramework/Models/Organization.cs
+++ b/src/Infrastructure.EntityFramework/AdminConsole/Models/Organization.cs
@@ -2,11 +2,12 @@
using Bit.Core.Enums;
using Bit.Core.Models.Data.Organizations;
using Bit.Infrastructure.EntityFramework.Auth.Models;
+using Bit.Infrastructure.EntityFramework.Models;
using Bit.Infrastructure.EntityFramework.Vault.Models;
-namespace Bit.Infrastructure.EntityFramework.Models;
+namespace Bit.Infrastructure.EntityFramework.AdminConsole.Models;
-public class Organization : Core.Entities.Organization
+public class Organization : Core.AdminConsole.Entities.Organization
{
public virtual ICollection Ciphers { get; set; }
public virtual ICollection OrganizationUsers { get; set; }
@@ -25,7 +26,7 @@ public class OrganizationMapperProfile : Profile
{
public OrganizationMapperProfile()
{
- CreateMap().ReverseMap();
+ CreateMap().ReverseMap();
CreateProjection()
.ForMember(sd => sd.CollectionCount, opt => opt.MapFrom(o => o.Collections.Count))
.ForMember(sd => sd.GroupCount, opt => opt.MapFrom(o => o.Groups.Count))
diff --git a/src/Infrastructure.EntityFramework/AdminConsole/Models/Policy.cs b/src/Infrastructure.EntityFramework/AdminConsole/Models/Policy.cs
new file mode 100644
index 0000000000..0685789e2b
--- /dev/null
+++ b/src/Infrastructure.EntityFramework/AdminConsole/Models/Policy.cs
@@ -0,0 +1,16 @@
+using AutoMapper;
+
+namespace Bit.Infrastructure.EntityFramework.AdminConsole.Models;
+
+public class Policy : Core.AdminConsole.Entities.Policy
+{
+ public virtual Organization Organization { get; set; }
+}
+
+public class PolicyMapperProfile : Profile
+{
+ public PolicyMapperProfile()
+ {
+ CreateMap().ReverseMap();
+ }
+}
diff --git a/src/Infrastructure.EntityFramework/AdminConsole/Models/Provider/ProviderOrganization.cs b/src/Infrastructure.EntityFramework/AdminConsole/Models/Provider/ProviderOrganization.cs
index 82bc26c5d5..e02dfbefec 100644
--- a/src/Infrastructure.EntityFramework/AdminConsole/Models/Provider/ProviderOrganization.cs
+++ b/src/Infrastructure.EntityFramework/AdminConsole/Models/Provider/ProviderOrganization.cs
@@ -1,5 +1,4 @@
using AutoMapper;
-using Bit.Infrastructure.EntityFramework.Models;
namespace Bit.Infrastructure.EntityFramework.AdminConsole.Models.Provider;
diff --git a/src/Infrastructure.EntityFramework/Repositories/OrganizationRepository.cs b/src/Infrastructure.EntityFramework/AdminConsole/Repositories/OrganizationRepository.cs
similarity index 84%
rename from src/Infrastructure.EntityFramework/Repositories/OrganizationRepository.cs
rename to src/Infrastructure.EntityFramework/AdminConsole/Repositories/OrganizationRepository.cs
index b20026a6b7..000d3d0659 100644
--- a/src/Infrastructure.EntityFramework/Repositories/OrganizationRepository.cs
+++ b/src/Infrastructure.EntityFramework/AdminConsole/Repositories/OrganizationRepository.cs
@@ -5,17 +5,17 @@ using Bit.Core.Models.Data.Organizations;
using Bit.Core.Repositories;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
-using Organization = Bit.Infrastructure.EntityFramework.Models.Organization;
+using Organization = Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization;
namespace Bit.Infrastructure.EntityFramework.Repositories;
-public class OrganizationRepository : Repository, IOrganizationRepository
+public class OrganizationRepository : Repository, IOrganizationRepository
{
public OrganizationRepository(IServiceScopeFactory serviceScopeFactory, IMapper mapper)
: base(serviceScopeFactory, mapper, (DatabaseContext context) => context.Organizations)
{ }
- public async Task GetByIdentifierAsync(string identifier)
+ public async Task GetByIdentifierAsync(string identifier)
{
using (var scope = ServiceScopeFactory.CreateScope())
{
@@ -26,17 +26,17 @@ public class OrganizationRepository : Repository> GetManyByEnabledAsync()
+ public async Task> GetManyByEnabledAsync()
{
using (var scope = ServiceScopeFactory.CreateScope())
{
var dbContext = GetDatabaseContext(scope);
var organizations = await GetDbSet(dbContext).Where(e => e.Enabled).ToListAsync();
- return Mapper.Map>(organizations);
+ return Mapper.Map>(organizations);
}
}
- public async Task> GetManyByUserIdAsync(Guid userId)
+ public async Task> GetManyByUserIdAsync(Guid userId)
{
using (var scope = ServiceScopeFactory.CreateScope())
{
@@ -46,11 +46,11 @@ public class OrganizationRepository : Repository ou.UserId == userId)
.Select(ou => ou.Organization))
.ToListAsync();
- return Mapper.Map>(organizations);
+ return Mapper.Map>(organizations);
}
}
- public async Task> SearchAsync(string name, string userEmail,
+ public async Task> SearchAsync(string name, string userEmail,
bool? paid, int skip, int take)
{
using (var scope = ServiceScopeFactory.CreateScope())
@@ -65,7 +65,7 @@ public class OrganizationRepository : Repository e.CreationDate)
.Skip(skip).Take(take)
.ToListAsync();
- return Mapper.Map>(organizations);
+ return Mapper.Map>(organizations);
}
}
@@ -93,15 +93,20 @@ public class OrganizationRepository : Repository> SearchUnassignedToProviderAsync(string name, string ownerEmail, int skip, int take)
+ public async Task> SearchUnassignedToProviderAsync(string name, string ownerEmail, int skip, int take)
{
using var scope = ServiceScopeFactory.CreateScope();
+
var dbContext = GetDatabaseContext(scope);
- var query = from o in dbContext.Organizations
- where o.PlanType >= PlanType.TeamsMonthly2020 && o.PlanType <= PlanType.EnterpriseAnnually &&
- !dbContext.ProviderOrganizations.Any(po => po.OrganizationId == o.Id) &&
- (string.IsNullOrWhiteSpace(name) || EF.Functions.Like(o.Name, $"%{name}%"))
- select o;
+
+ var query =
+ from o in dbContext.Organizations
+ where
+ ((o.PlanType >= PlanType.TeamsMonthly2019 && o.PlanType <= PlanType.EnterpriseAnnually2019) ||
+ (o.PlanType >= PlanType.TeamsMonthly2020 && o.PlanType <= PlanType.EnterpriseAnnually)) &&
+ !dbContext.ProviderOrganizations.Any(po => po.OrganizationId == o.Id) &&
+ (string.IsNullOrWhiteSpace(name) || EF.Functions.Like(o.Name, $"%{name}%"))
+ select o;
if (string.IsNullOrWhiteSpace(ownerEmail))
{
@@ -140,7 +145,7 @@ public class OrganizationRepository : Repository GetByLicenseKeyAsync(string licenseKey)
+ public async Task GetByLicenseKeyAsync(string licenseKey)
{
using (var scope = ServiceScopeFactory.CreateScope())
{
diff --git a/src/Infrastructure.EntityFramework/Repositories/OrganizationUserRepository.cs b/src/Infrastructure.EntityFramework/AdminConsole/Repositories/OrganizationUserRepository.cs
similarity index 99%
rename from src/Infrastructure.EntityFramework/Repositories/OrganizationUserRepository.cs
rename to src/Infrastructure.EntityFramework/AdminConsole/Repositories/OrganizationUserRepository.cs
index 5e005a5593..ed86bae040 100644
--- a/src/Infrastructure.EntityFramework/Repositories/OrganizationUserRepository.cs
+++ b/src/Infrastructure.EntityFramework/AdminConsole/Repositories/OrganizationUserRepository.cs
@@ -1,4 +1,5 @@
using AutoMapper;
+using Bit.Core.AdminConsole.Enums;
using Bit.Core.Enums;
using Bit.Core.Models.Data;
using Bit.Core.Models.Data.Organizations.OrganizationUsers;
diff --git a/src/Infrastructure.EntityFramework/Repositories/PolicyRepository.cs b/src/Infrastructure.EntityFramework/AdminConsole/Repositories/PolicyRepository.cs
similarity index 52%
rename from src/Infrastructure.EntityFramework/Repositories/PolicyRepository.cs
rename to src/Infrastructure.EntityFramework/AdminConsole/Repositories/PolicyRepository.cs
index 5dfe2b3bbb..3eb4ac934b 100644
--- a/src/Infrastructure.EntityFramework/Repositories/PolicyRepository.cs
+++ b/src/Infrastructure.EntityFramework/AdminConsole/Repositories/PolicyRepository.cs
@@ -1,31 +1,33 @@
using AutoMapper;
-using Bit.Core.Enums;
-using Bit.Core.Repositories;
-using Bit.Infrastructure.EntityFramework.Models;
-using Bit.Infrastructure.EntityFramework.Repositories.Queries;
+using Bit.Core.AdminConsole.Enums;
+using Bit.Core.AdminConsole.Repositories;
+using Bit.Infrastructure.EntityFramework.AdminConsole.Models;
+using Bit.Infrastructure.EntityFramework.AdminConsole.Repositories.Queries;
+using Bit.Infrastructure.EntityFramework.Repositories;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
+using AdminConsoleEntities = Bit.Core.AdminConsole.Entities;
-namespace Bit.Infrastructure.EntityFramework.Repositories;
+namespace Bit.Infrastructure.EntityFramework.AdminConsole.Repositories;
-public class PolicyRepository : Repository, IPolicyRepository
+public class PolicyRepository : Repository, IPolicyRepository
{
public PolicyRepository(IServiceScopeFactory serviceScopeFactory, IMapper mapper)
: base(serviceScopeFactory, mapper, (DatabaseContext context) => context.Policies)
{ }
- public async Task GetByOrganizationIdTypeAsync(Guid organizationId, PolicyType type)
+ public async Task GetByOrganizationIdTypeAsync(Guid organizationId, PolicyType type)
{
using (var scope = ServiceScopeFactory.CreateScope())
{
var dbContext = GetDatabaseContext(scope);
var results = await dbContext.Policies
.FirstOrDefaultAsync(p => p.OrganizationId == organizationId && p.Type == type);
- return Mapper.Map(results);
+ return Mapper.Map(results);
}
}
- public async Task> GetManyByOrganizationIdAsync(Guid organizationId)
+ public async Task> GetManyByOrganizationIdAsync(Guid organizationId)
{
using (var scope = ServiceScopeFactory.CreateScope())
{
@@ -33,11 +35,11 @@ public class PolicyRepository : Repository,
var results = await dbContext.Policies
.Where(p => p.OrganizationId == organizationId)
.ToListAsync();
- return Mapper.Map>(results);
+ return Mapper.Map>(results);
}
}
- public async Task> GetManyByUserIdAsync(Guid userId)
+ public async Task> GetManyByUserIdAsync(Guid userId)
{
using (var scope = ServiceScopeFactory.CreateScope())
{
@@ -45,7 +47,7 @@ public class PolicyRepository : Repository,
var query = new PolicyReadByUserIdQuery(userId);
var results = await query.Run(dbContext).ToListAsync();
- return Mapper.Map>(results);
+ return Mapper.Map>(results);
}
}
}
diff --git a/src/Infrastructure.EntityFramework/Repositories/Queries/OrganizationUserOrganizationDetailsViewQuery.cs b/src/Infrastructure.EntityFramework/AdminConsole/Repositories/Queries/OrganizationUserOrganizationDetailsViewQuery.cs
similarity index 100%
rename from src/Infrastructure.EntityFramework/Repositories/Queries/OrganizationUserOrganizationDetailsViewQuery.cs
rename to src/Infrastructure.EntityFramework/AdminConsole/Repositories/Queries/OrganizationUserOrganizationDetailsViewQuery.cs
diff --git a/src/Infrastructure.EntityFramework/Repositories/Queries/OrganizationUserReadCountByFreeOrganizationAdminUserQuery.cs b/src/Infrastructure.EntityFramework/AdminConsole/Repositories/Queries/OrganizationUserReadCountByFreeOrganizationAdminUserQuery.cs
similarity index 100%
rename from src/Infrastructure.EntityFramework/Repositories/Queries/OrganizationUserReadCountByFreeOrganizationAdminUserQuery.cs
rename to src/Infrastructure.EntityFramework/AdminConsole/Repositories/Queries/OrganizationUserReadCountByFreeOrganizationAdminUserQuery.cs
diff --git a/src/Infrastructure.EntityFramework/Repositories/Queries/OrganizationUserReadCountByOrganizationIdEmailQuery.cs b/src/Infrastructure.EntityFramework/AdminConsole/Repositories/Queries/OrganizationUserReadCountByOrganizationIdEmailQuery.cs
similarity index 100%
rename from src/Infrastructure.EntityFramework/Repositories/Queries/OrganizationUserReadCountByOrganizationIdEmailQuery.cs
rename to src/Infrastructure.EntityFramework/AdminConsole/Repositories/Queries/OrganizationUserReadCountByOrganizationIdEmailQuery.cs
diff --git a/src/Infrastructure.EntityFramework/Repositories/Queries/OrganizationUserReadCountByOrganizationIdQuery.cs b/src/Infrastructure.EntityFramework/AdminConsole/Repositories/Queries/OrganizationUserReadCountByOrganizationIdQuery.cs
similarity index 100%
rename from src/Infrastructure.EntityFramework/Repositories/Queries/OrganizationUserReadCountByOrganizationIdQuery.cs
rename to src/Infrastructure.EntityFramework/AdminConsole/Repositories/Queries/OrganizationUserReadCountByOrganizationIdQuery.cs
diff --git a/src/Infrastructure.EntityFramework/Repositories/Queries/OrganizationUserReadOccupiedSeatCountByOrganizationIdQuery.cs b/src/Infrastructure.EntityFramework/AdminConsole/Repositories/Queries/OrganizationUserReadOccupiedSeatCountByOrganizationIdQuery.cs
similarity index 100%
rename from src/Infrastructure.EntityFramework/Repositories/Queries/OrganizationUserReadOccupiedSeatCountByOrganizationIdQuery.cs
rename to src/Infrastructure.EntityFramework/AdminConsole/Repositories/Queries/OrganizationUserReadOccupiedSeatCountByOrganizationIdQuery.cs
diff --git a/src/Infrastructure.EntityFramework/Repositories/Queries/OrganizationUserReadOccupiedSmSeatCountByOrganizationIdQuery.cs b/src/Infrastructure.EntityFramework/AdminConsole/Repositories/Queries/OrganizationUserReadOccupiedSmSeatCountByOrganizationIdQuery.cs
similarity index 100%
rename from src/Infrastructure.EntityFramework/Repositories/Queries/OrganizationUserReadOccupiedSmSeatCountByOrganizationIdQuery.cs
rename to src/Infrastructure.EntityFramework/AdminConsole/Repositories/Queries/OrganizationUserReadOccupiedSmSeatCountByOrganizationIdQuery.cs
diff --git a/src/Infrastructure.EntityFramework/Repositories/Queries/OrganizationUserUpdateWithCollectionsQuery.cs b/src/Infrastructure.EntityFramework/AdminConsole/Repositories/Queries/OrganizationUserUpdateWithCollectionsQuery.cs
similarity index 100%
rename from src/Infrastructure.EntityFramework/Repositories/Queries/OrganizationUserUpdateWithCollectionsQuery.cs
rename to src/Infrastructure.EntityFramework/AdminConsole/Repositories/Queries/OrganizationUserUpdateWithCollectionsQuery.cs
diff --git a/src/Infrastructure.EntityFramework/Repositories/Queries/OrganizationUserUserViewQuery.cs b/src/Infrastructure.EntityFramework/AdminConsole/Repositories/Queries/OrganizationUserUserViewQuery.cs
similarity index 100%
rename from src/Infrastructure.EntityFramework/Repositories/Queries/OrganizationUserUserViewQuery.cs
rename to src/Infrastructure.EntityFramework/AdminConsole/Repositories/Queries/OrganizationUserUserViewQuery.cs
diff --git a/src/Infrastructure.EntityFramework/Repositories/Queries/PolicyReadByUserIdQuery.cs b/src/Infrastructure.EntityFramework/AdminConsole/Repositories/Queries/PolicyReadByUserIdQuery.cs
similarity index 74%
rename from src/Infrastructure.EntityFramework/Repositories/Queries/PolicyReadByUserIdQuery.cs
rename to src/Infrastructure.EntityFramework/AdminConsole/Repositories/Queries/PolicyReadByUserIdQuery.cs
index 9da530b01b..d81e38426a 100644
--- a/src/Infrastructure.EntityFramework/Repositories/Queries/PolicyReadByUserIdQuery.cs
+++ b/src/Infrastructure.EntityFramework/AdminConsole/Repositories/Queries/PolicyReadByUserIdQuery.cs
@@ -1,7 +1,9 @@
using Bit.Core.Enums;
-using Bit.Infrastructure.EntityFramework.Models;
+using Bit.Infrastructure.EntityFramework.AdminConsole.Models;
+using Bit.Infrastructure.EntityFramework.Repositories;
+using Bit.Infrastructure.EntityFramework.Repositories.Queries;
-namespace Bit.Infrastructure.EntityFramework.Repositories.Queries;
+namespace Bit.Infrastructure.EntityFramework.AdminConsole.Repositories.Queries;
public class PolicyReadByUserIdQuery : IQuery
{
diff --git a/src/Infrastructure.EntityFramework/Auth/Models/AuthRequest.cs b/src/Infrastructure.EntityFramework/Auth/Models/AuthRequest.cs
index ecb9dc126f..0ceccd9f38 100644
--- a/src/Infrastructure.EntityFramework/Auth/Models/AuthRequest.cs
+++ b/src/Infrastructure.EntityFramework/Auth/Models/AuthRequest.cs
@@ -1,5 +1,6 @@
using AutoMapper;
using Bit.Core.Auth.Models.Data;
+using Bit.Infrastructure.EntityFramework.AdminConsole.Models;
using Bit.Infrastructure.EntityFramework.Models;
namespace Bit.Infrastructure.EntityFramework.Auth.Models;
diff --git a/src/Infrastructure.EntityFramework/Auth/Models/SsoConfig.cs b/src/Infrastructure.EntityFramework/Auth/Models/SsoConfig.cs
index bba641d510..d4fd0c8d36 100644
--- a/src/Infrastructure.EntityFramework/Auth/Models/SsoConfig.cs
+++ b/src/Infrastructure.EntityFramework/Auth/Models/SsoConfig.cs
@@ -1,5 +1,5 @@
using AutoMapper;
-using Bit.Infrastructure.EntityFramework.Models;
+using Bit.Infrastructure.EntityFramework.AdminConsole.Models;
namespace Bit.Infrastructure.EntityFramework.Auth.Models;
diff --git a/src/Infrastructure.EntityFramework/Auth/Models/SsoUser.cs b/src/Infrastructure.EntityFramework/Auth/Models/SsoUser.cs
index 8d8dd8cafe..f8251e9db9 100644
--- a/src/Infrastructure.EntityFramework/Auth/Models/SsoUser.cs
+++ b/src/Infrastructure.EntityFramework/Auth/Models/SsoUser.cs
@@ -1,4 +1,5 @@
using AutoMapper;
+using Bit.Infrastructure.EntityFramework.AdminConsole.Models;
using Bit.Infrastructure.EntityFramework.Models;
namespace Bit.Infrastructure.EntityFramework.Auth.Models;
diff --git a/src/Infrastructure.EntityFramework/Auth/Repositories/EmergencyAccessRepository.cs b/src/Infrastructure.EntityFramework/Auth/Repositories/EmergencyAccessRepository.cs
index f00ff2eecf..e6a32542fb 100644
--- a/src/Infrastructure.EntityFramework/Auth/Repositories/EmergencyAccessRepository.cs
+++ b/src/Infrastructure.EntityFramework/Auth/Repositories/EmergencyAccessRepository.cs
@@ -1,10 +1,12 @@
using AutoMapper;
using Bit.Core.Auth.Enums;
using Bit.Core.Auth.Models.Data;
+using Bit.Core.Auth.UserFeatures.UserKey;
using Bit.Core.Repositories;
using Bit.Infrastructure.EntityFramework.Auth.Models;
using Bit.Infrastructure.EntityFramework.Auth.Repositories.Queries;
using Bit.Infrastructure.EntityFramework.Repositories;
+using Microsoft.Data.SqlClient;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
@@ -116,4 +118,30 @@ public class EmergencyAccessRepository : Repository
+ public UpdateEncryptedDataForKeyRotation UpdateForKeyRotation(
+ Guid grantorId, IEnumerable emergencyAccessKeys)
+ {
+ return async (SqlConnection connection, SqlTransaction transaction) =>
+ {
+ var newKeys = emergencyAccessKeys.ToList();
+ using var scope = ServiceScopeFactory.CreateScope();
+ var dbContext = GetDatabaseContext(scope);
+ var userEmergencyAccess = await GetDbSet(dbContext)
+ .Where(ea => ea.GrantorId == grantorId)
+ .ToListAsync();
+ var validEmergencyAccess = userEmergencyAccess
+ .Where(ea => newKeys.Any(eak => eak.Id == ea.Id));
+
+ foreach (var ea in validEmergencyAccess)
+ {
+ var eak = newKeys.First(eak => eak.Id == ea.Id);
+ ea.KeyEncrypted = eak.KeyEncrypted;
+ }
+
+ await dbContext.SaveChangesAsync();
+ };
+ }
+
}
diff --git a/src/Infrastructure.EntityFramework/Infrastructure.EntityFramework.csproj b/src/Infrastructure.EntityFramework/Infrastructure.EntityFramework.csproj
index 8a51fe9e37..aaa779e362 100644
--- a/src/Infrastructure.EntityFramework/Infrastructure.EntityFramework.csproj
+++ b/src/Infrastructure.EntityFramework/Infrastructure.EntityFramework.csproj
@@ -2,12 +2,12 @@
-
-
-
-
+
+
+
+
-
+
diff --git a/src/Infrastructure.EntityFramework/Models/Collection.cs b/src/Infrastructure.EntityFramework/Models/Collection.cs
index 29495081d4..8418c33703 100644
--- a/src/Infrastructure.EntityFramework/Models/Collection.cs
+++ b/src/Infrastructure.EntityFramework/Models/Collection.cs
@@ -1,4 +1,5 @@
using AutoMapper;
+using Bit.Infrastructure.EntityFramework.AdminConsole.Models;
namespace Bit.Infrastructure.EntityFramework.Models;
diff --git a/src/Infrastructure.EntityFramework/Models/Group.cs b/src/Infrastructure.EntityFramework/Models/Group.cs
index 8df9dbd7b5..7a537cfcf4 100644
--- a/src/Infrastructure.EntityFramework/Models/Group.cs
+++ b/src/Infrastructure.EntityFramework/Models/Group.cs
@@ -1,4 +1,5 @@
using AutoMapper;
+using Bit.Infrastructure.EntityFramework.AdminConsole.Models;
namespace Bit.Infrastructure.EntityFramework.Models;
diff --git a/src/Infrastructure.EntityFramework/Models/OrganizationApiKey.cs b/src/Infrastructure.EntityFramework/Models/OrganizationApiKey.cs
index b8a4f4e746..e13bde5fb3 100644
--- a/src/Infrastructure.EntityFramework/Models/OrganizationApiKey.cs
+++ b/src/Infrastructure.EntityFramework/Models/OrganizationApiKey.cs
@@ -1,4 +1,5 @@
using AutoMapper;
+using Bit.Infrastructure.EntityFramework.AdminConsole.Models;
namespace Bit.Infrastructure.EntityFramework.Models;
diff --git a/src/Infrastructure.EntityFramework/Models/OrganizationConnection.cs b/src/Infrastructure.EntityFramework/Models/OrganizationConnection.cs
index 5c41d5f6c1..5635bbba7e 100644
--- a/src/Infrastructure.EntityFramework/Models/OrganizationConnection.cs
+++ b/src/Infrastructure.EntityFramework/Models/OrganizationConnection.cs
@@ -1,4 +1,5 @@
using AutoMapper;
+using Bit.Infrastructure.EntityFramework.AdminConsole.Models;
namespace Bit.Infrastructure.EntityFramework.Models;
diff --git a/src/Infrastructure.EntityFramework/Models/OrganizationDomain.cs b/src/Infrastructure.EntityFramework/Models/OrganizationDomain.cs
index bef7ba2af6..0d9ccefca0 100644
--- a/src/Infrastructure.EntityFramework/Models/OrganizationDomain.cs
+++ b/src/Infrastructure.EntityFramework/Models/OrganizationDomain.cs
@@ -1,4 +1,5 @@
using AutoMapper;
+using Bit.Infrastructure.EntityFramework.AdminConsole.Models;
namespace Bit.Infrastructure.EntityFramework.Models;
diff --git a/src/Infrastructure.EntityFramework/Models/OrganizationSponsorship.cs b/src/Infrastructure.EntityFramework/Models/OrganizationSponsorship.cs
index 3d8b8acf77..4780346a1f 100644
--- a/src/Infrastructure.EntityFramework/Models/OrganizationSponsorship.cs
+++ b/src/Infrastructure.EntityFramework/Models/OrganizationSponsorship.cs
@@ -1,4 +1,5 @@
using AutoMapper;
+using Bit.Infrastructure.EntityFramework.AdminConsole.Models;
namespace Bit.Infrastructure.EntityFramework.Models;
diff --git a/src/Infrastructure.EntityFramework/Models/OrganizationUser.cs b/src/Infrastructure.EntityFramework/Models/OrganizationUser.cs
index f3e11835f0..805dec49f7 100644
--- a/src/Infrastructure.EntityFramework/Models/OrganizationUser.cs
+++ b/src/Infrastructure.EntityFramework/Models/OrganizationUser.cs
@@ -1,4 +1,5 @@
using AutoMapper;
+using Bit.Infrastructure.EntityFramework.AdminConsole.Models;
namespace Bit.Infrastructure.EntityFramework.Models;
diff --git a/src/Infrastructure.EntityFramework/Models/Policy.cs b/src/Infrastructure.EntityFramework/Models/Policy.cs
deleted file mode 100644
index 22b17c6f6d..0000000000
--- a/src/Infrastructure.EntityFramework/Models/Policy.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using AutoMapper;
-
-namespace Bit.Infrastructure.EntityFramework.Models;
-
-public class Policy : Core.Entities.Policy
-{
- public virtual Organization Organization { get; set; }
-}
-
-public class PolicyMapperProfile : Profile
-{
- public PolicyMapperProfile()
- {
- CreateMap().ReverseMap();
- }
-}
diff --git a/src/Infrastructure.EntityFramework/Models/Transaction.cs b/src/Infrastructure.EntityFramework/Models/Transaction.cs
index 4eb63646c3..61bfbaeb59 100644
--- a/src/Infrastructure.EntityFramework/Models/Transaction.cs
+++ b/src/Infrastructure.EntityFramework/Models/Transaction.cs
@@ -1,4 +1,5 @@
using AutoMapper;
+using Bit.Infrastructure.EntityFramework.AdminConsole.Models;
namespace Bit.Infrastructure.EntityFramework.Models;
diff --git a/src/Infrastructure.EntityFramework/Repositories/BaseEntityFrameworkRepository.cs b/src/Infrastructure.EntityFramework/Repositories/BaseEntityFrameworkRepository.cs
index ec3e1f27dc..6cf7cbb46e 100644
--- a/src/Infrastructure.EntityFramework/Repositories/BaseEntityFrameworkRepository.cs
+++ b/src/Infrastructure.EntityFramework/Repositories/BaseEntityFrameworkRepository.cs
@@ -1,6 +1,6 @@
using System.Text.Json;
using AutoMapper;
-using Bit.Infrastructure.EntityFramework.Models;
+using Bit.Infrastructure.EntityFramework.AdminConsole.Models;
using Bit.Infrastructure.EntityFramework.Repositories.Queries;
using LinqToDB.Data;
using Microsoft.EntityFrameworkCore;
diff --git a/src/Infrastructure.EntityFramework/Repositories/CollectionCipherRepository.cs b/src/Infrastructure.EntityFramework/Repositories/CollectionCipherRepository.cs
index f929b8d92b..7ef9b1967b 100644
--- a/src/Infrastructure.EntityFramework/Repositories/CollectionCipherRepository.cs
+++ b/src/Infrastructure.EntityFramework/Repositories/CollectionCipherRepository.cs
@@ -46,31 +46,31 @@ public class CollectionCipherRepository : BaseEntityFrameworkRepository, ICollec
}
}
- public async Task> GetManyByUserIdAsync(Guid userId)
+ public async Task> GetManyByUserIdAsync(Guid userId, bool useFlexibleCollections)
{
using (var scope = ServiceScopeFactory.CreateScope())
{
var dbContext = GetDatabaseContext(scope);
- var data = await new CollectionCipherReadByUserIdQuery(userId)
+ var data = await new CollectionCipherReadByUserIdQuery(userId, useFlexibleCollections)
.Run(dbContext)
.ToArrayAsync();
return data;
}
}
- public async Task> GetManyByUserIdCipherIdAsync(Guid userId, Guid cipherId)
+ public async Task> GetManyByUserIdCipherIdAsync(Guid userId, Guid cipherId, bool useFlexibleCollections)
{
using (var scope = ServiceScopeFactory.CreateScope())
{
var dbContext = GetDatabaseContext(scope);
- var data = await new CollectionCipherReadByUserIdCipherIdQuery(userId, cipherId)
+ var data = await new CollectionCipherReadByUserIdCipherIdQuery(userId, cipherId, useFlexibleCollections)
.Run(dbContext)
.ToArrayAsync();
return data;
}
}
- public async Task UpdateCollectionsAsync(Guid cipherId, Guid userId, IEnumerable collectionIds)
+ public async Task UpdateCollectionsAsync(Guid cipherId, Guid userId, IEnumerable collectionIds, bool useFlexibleCollections)
{
using (var scope = ServiceScopeFactory.CreateScope())
{
@@ -81,7 +81,17 @@ public class CollectionCipherRepository : BaseEntityFrameworkRepository, ICollec
.Select(c => c.OrganizationId)
.FirstAsync();
- var availableCollections = await (from c in dbContext.Collections
+ List availableCollections;
+ if (useFlexibleCollections)
+ {
+ var availableCollectionsQuery = new CollectionsReadByOrganizationIdUserIdQuery(organizationId, userId);
+ availableCollections = await availableCollectionsQuery
+ .Run(dbContext)
+ .Select(c => c.Id).ToListAsync();
+ }
+ else
+ {
+ availableCollections = await (from c in dbContext.Collections
join o in dbContext.Organizations on c.OrganizationId equals o.Id
join ou in dbContext.OrganizationUsers
on new { OrganizationId = o.Id, UserId = (Guid?)userId } equals
@@ -104,6 +114,8 @@ public class CollectionCipherRepository : BaseEntityFrameworkRepository, ICollec
&& (ou.AccessAll || !cu.ReadOnly || g.AccessAll || !cg.ReadOnly)
select c.Id).ToListAsync();
+ }
+
var collectionCiphers = await (from cc in dbContext.CollectionCiphers
where cc.CipherId == cipherId
select cc).ToListAsync();
@@ -176,12 +188,22 @@ public class CollectionCipherRepository : BaseEntityFrameworkRepository, ICollec
}
}
- public async Task UpdateCollectionsForCiphersAsync(IEnumerable cipherIds, Guid userId, Guid organizationId, IEnumerable collectionIds)
+ public async Task UpdateCollectionsForCiphersAsync(IEnumerable cipherIds, Guid userId, Guid organizationId, IEnumerable collectionIds, bool useFlexibleCollections)
{
using (var scope = ServiceScopeFactory.CreateScope())
{
var dbContext = GetDatabaseContext(scope);
- var availableCollections = from c in dbContext.Collections
+
+ IQueryable availableCollections;
+ if (useFlexibleCollections)
+ {
+ var availableCollectionsQuery = new CollectionsReadByOrganizationIdUserIdQuery(organizationId, userId);
+ availableCollections = availableCollectionsQuery
+ .Run(dbContext);
+ }
+ else
+ {
+ availableCollections = from c in dbContext.Collections
join o in dbContext.Organizations
on c.OrganizationId equals o.Id
join ou in dbContext.OrganizationUsers
@@ -204,8 +226,10 @@ public class CollectionCipherRepository : BaseEntityFrameworkRepository, ICollec
where !g.AccessAll && cg.CollectionId == c.Id &&
(o.Id == organizationId && o.Enabled && ou.Status == OrganizationUserStatusType.Confirmed &&
(ou.AccessAll || !cu.ReadOnly || g.AccessAll || !cg.ReadOnly))
- select new { c, o, ou, cu, gu, g, cg };
- var count = await availableCollections.CountAsync();
+ select c;
+
+ }
+
if (await availableCollections.CountAsync() < 1)
{
return;
@@ -213,7 +237,7 @@ public class CollectionCipherRepository : BaseEntityFrameworkRepository, ICollec
var insertData = from collectionId in collectionIds
from cipherId in cipherIds
- where availableCollections.Select(x => x.c.Id).Contains(collectionId)
+ where availableCollections.Select(c => c.Id).Contains(collectionId)
select new Models.CollectionCipher
{
CollectionId = collectionId,
diff --git a/src/Infrastructure.EntityFramework/Repositories/DatabaseContext.cs b/src/Infrastructure.EntityFramework/Repositories/DatabaseContext.cs
index f0275d5760..2a47545179 100644
--- a/src/Infrastructure.EntityFramework/Repositories/DatabaseContext.cs
+++ b/src/Infrastructure.EntityFramework/Repositories/DatabaseContext.cs
@@ -1,4 +1,5 @@
using Bit.Core;
+using Bit.Infrastructure.EntityFramework.AdminConsole.Models;
using Bit.Infrastructure.EntityFramework.AdminConsole.Models.Provider;
using Bit.Infrastructure.EntityFramework.Auth.Models;
using Bit.Infrastructure.EntityFramework.Converters;
@@ -113,6 +114,9 @@ public class DatabaseContext : DbContext
eOrganization.Property(c => c.LimitCollectionCreationDeletion)
.ValueGeneratedNever()
.HasDefaultValue(true);
+ eOrganization.Property(c => c.AllowAdminAccessToAllCollectionItems)
+ .ValueGeneratedNever()
+ .HasDefaultValue(true);
eOrganizationSponsorship.Property(c => c.Id).ValueGeneratedNever();
eOrganizationUser.Property(c => c.Id).ValueGeneratedNever();
ePolicy.Property(c => c.Id).ValueGeneratedNever();
diff --git a/src/Infrastructure.EntityFramework/Repositories/Queries/CollectionCipherReadByUserIdCipherIdQuery.cs b/src/Infrastructure.EntityFramework/Repositories/Queries/CollectionCipherReadByUserIdCipherIdQuery.cs
index e494aec1f3..3ba5594368 100644
--- a/src/Infrastructure.EntityFramework/Repositories/Queries/CollectionCipherReadByUserIdCipherIdQuery.cs
+++ b/src/Infrastructure.EntityFramework/Repositories/Queries/CollectionCipherReadByUserIdCipherIdQuery.cs
@@ -6,7 +6,7 @@ public class CollectionCipherReadByUserIdCipherIdQuery : CollectionCipherReadByU
{
private readonly Guid _cipherId;
- public CollectionCipherReadByUserIdCipherIdQuery(Guid userId, Guid cipherId) : base(userId)
+ public CollectionCipherReadByUserIdCipherIdQuery(Guid userId, Guid cipherId, bool useFlexibleCollections) : base(userId, useFlexibleCollections)
{
_cipherId = cipherId;
}
diff --git a/src/Infrastructure.EntityFramework/Repositories/Queries/CollectionCipherReadByUserIdQuery.cs b/src/Infrastructure.EntityFramework/Repositories/Queries/CollectionCipherReadByUserIdQuery.cs
index 1347a706f2..3adfe7ffa6 100644
--- a/src/Infrastructure.EntityFramework/Repositories/Queries/CollectionCipherReadByUserIdQuery.cs
+++ b/src/Infrastructure.EntityFramework/Repositories/Queries/CollectionCipherReadByUserIdQuery.cs
@@ -6,13 +6,58 @@ namespace Bit.Infrastructure.EntityFramework.Repositories.Queries;
public class CollectionCipherReadByUserIdQuery : IQuery
{
private readonly Guid _userId;
+ private readonly bool _useFlexibleCollections;
- public CollectionCipherReadByUserIdQuery(Guid userId)
+ public CollectionCipherReadByUserIdQuery(Guid userId, bool useFlexibleCollections)
{
_userId = userId;
+ _useFlexibleCollections = useFlexibleCollections;
}
public virtual IQueryable Run(DatabaseContext dbContext)
+ {
+ return _useFlexibleCollections
+ ? Run_VNext(dbContext)
+ : Run_VCurrent(dbContext);
+ }
+
+ private IQueryable Run_VNext(DatabaseContext dbContext)
+ {
+ var query = from cc in dbContext.CollectionCiphers
+
+ join c in dbContext.Collections
+ on cc.CollectionId equals c.Id
+
+ join ou in dbContext.OrganizationUsers
+ on new { c.OrganizationId, UserId = (Guid?)_userId } equals
+ new { ou.OrganizationId, ou.UserId }
+
+ join cu in dbContext.CollectionUsers
+ on new { CollectionId = c.Id, OrganizationUserId = ou.Id } equals
+ new { cu.CollectionId, cu.OrganizationUserId } into cu_g
+ from cu in cu_g.DefaultIfEmpty()
+
+ join gu in dbContext.GroupUsers
+ on new { CollectionId = (Guid?)cu.CollectionId, OrganizationUserId = ou.Id } equals
+ new { CollectionId = (Guid?)null, gu.OrganizationUserId } into gu_g
+ from gu in gu_g.DefaultIfEmpty()
+
+ join g in dbContext.Groups
+ on gu.GroupId equals g.Id into g_g
+ from g in g_g.DefaultIfEmpty()
+
+ join cg in dbContext.CollectionGroups
+ on new { CollectionId = c.Id, gu.GroupId } equals
+ new { cg.CollectionId, cg.GroupId } into cg_g
+ from cg in cg_g.DefaultIfEmpty()
+
+ where ou.Status == OrganizationUserStatusType.Confirmed &&
+ (cu.CollectionId != null || cg.CollectionId != null)
+ select cc;
+ return query;
+ }
+
+ private IQueryable Run_VCurrent(DatabaseContext dbContext)
{
var query = from cc in dbContext.CollectionCiphers
diff --git a/src/Infrastructure.EntityFramework/Repositories/Queries/CollectionsReadByOrganizationIdUserIdQuery.cs b/src/Infrastructure.EntityFramework/Repositories/Queries/CollectionsReadByOrganizationIdUserIdQuery.cs
new file mode 100644
index 0000000000..d6d94e6e30
--- /dev/null
+++ b/src/Infrastructure.EntityFramework/Repositories/Queries/CollectionsReadByOrganizationIdUserIdQuery.cs
@@ -0,0 +1,44 @@
+using Bit.Core.Enums;
+using Bit.Infrastructure.EntityFramework.Models;
+
+namespace Bit.Infrastructure.EntityFramework.Repositories.Queries;
+
+public class CollectionsReadByOrganizationIdUserIdQuery : IQuery
+{
+ private readonly Guid? _organizationId;
+ private readonly Guid _userId;
+
+ public CollectionsReadByOrganizationIdUserIdQuery(Guid? organizationId, Guid userId)
+ {
+ _organizationId = organizationId;
+ _userId = userId;
+ }
+
+ public virtual IQueryable Run(DatabaseContext dbContext)
+ {
+ var query = from c in dbContext.Collections
+ join o in dbContext.Organizations on c.OrganizationId equals o.Id
+ join ou in dbContext.OrganizationUsers
+ on new { OrganizationId = o.Id, UserId = (Guid?)_userId } equals
+ new { ou.OrganizationId, ou.UserId }
+ join cu in dbContext.CollectionUsers
+ on new { CollectionId = c.Id, OrganizationUserId = ou.Id } equals
+ new { cu.CollectionId, cu.OrganizationUserId } into cu_g
+ from cu in cu_g.DefaultIfEmpty()
+ join gu in dbContext.GroupUsers
+ on new { CollectionId = (Guid?)cu.CollectionId, OrganizationUserId = ou.Id } equals
+ new { CollectionId = (Guid?)null, gu.OrganizationUserId } into gu_g
+ from gu in gu_g.DefaultIfEmpty()
+ join g in dbContext.Groups on gu.GroupId equals g.Id into g_g
+ from g in g_g.DefaultIfEmpty()
+ join cg in dbContext.CollectionGroups
+ on new { CollectionId = c.Id, gu.GroupId } equals
+ new { cg.CollectionId, cg.GroupId } into cg_g
+ from cg in cg_g.DefaultIfEmpty()
+ where o.Id == _organizationId && o.Enabled && ou.Status == OrganizationUserStatusType.Confirmed
+ && (!cu.ReadOnly || !cg.ReadOnly)
+ select c;
+
+ return query;
+ }
+}
diff --git a/src/Infrastructure.EntityFramework/Repositories/Queries/UserCipherDetailsQuery.cs b/src/Infrastructure.EntityFramework/Repositories/Queries/UserCipherDetailsQuery.cs
index d1f8b0adf7..a5f06fb61c 100644
--- a/src/Infrastructure.EntityFramework/Repositories/Queries/UserCipherDetailsQuery.cs
+++ b/src/Infrastructure.EntityFramework/Repositories/Queries/UserCipherDetailsQuery.cs
@@ -8,11 +8,21 @@ namespace Bit.Infrastructure.EntityFramework.Repositories.Queries;
public class UserCipherDetailsQuery : IQuery
{
private readonly Guid? _userId;
- public UserCipherDetailsQuery(Guid? userId)
+ private readonly bool _useFlexibleCollections;
+ public UserCipherDetailsQuery(Guid? userId, bool useFlexibleCollections)
{
_userId = userId;
+ _useFlexibleCollections = useFlexibleCollections;
}
+
public virtual IQueryable Run(DatabaseContext dbContext)
+ {
+ return _useFlexibleCollections
+ ? Run_VNext(dbContext)
+ : Run_VCurrent(dbContext);
+ }
+
+ private IQueryable Run_VCurrent(DatabaseContext dbContext)
{
var query = from c in dbContext.Ciphers
@@ -78,6 +88,71 @@ public class UserCipherDetailsQuery : IQuery
return union;
}
+ private IQueryable Run_VNext(DatabaseContext dbContext)
+ {
+ var query = from c in dbContext.Ciphers
+
+ join ou in dbContext.OrganizationUsers
+ on new { CipherUserId = c.UserId, c.OrganizationId, UserId = _userId, Status = OrganizationUserStatusType.Confirmed } equals
+ new { CipherUserId = (Guid?)null, OrganizationId = (Guid?)ou.OrganizationId, ou.UserId, ou.Status }
+
+ join o in dbContext.Organizations
+ on new { c.OrganizationId, OuOrganizationId = ou.OrganizationId, Enabled = true } equals
+ new { OrganizationId = (Guid?)o.Id, OuOrganizationId = o.Id, o.Enabled }
+
+ join cc in dbContext.CollectionCiphers
+ on c.Id equals cc.CipherId into cc_g
+ from cc in cc_g.DefaultIfEmpty()
+
+ join cu in dbContext.CollectionUsers
+ on new { cc.CollectionId, OrganizationUserId = ou.Id } equals
+ new { cu.CollectionId, cu.OrganizationUserId } into cu_g
+ from cu in cu_g.DefaultIfEmpty()
+
+ join gu in dbContext.GroupUsers
+ on new { CollectionId = (Guid?)cu.CollectionId, OrganizationUserId = ou.Id } equals
+ new { CollectionId = (Guid?)null, gu.OrganizationUserId } into gu_g
+ from gu in gu_g.DefaultIfEmpty()
+
+ join g in dbContext.Groups
+ on gu.GroupId equals g.Id into g_g
+ from g in g_g.DefaultIfEmpty()
+
+ join cg in dbContext.CollectionGroups
+ on new { cc.CollectionId, gu.GroupId } equals
+ new { cg.CollectionId, cg.GroupId } into cg_g
+ from cg in cg_g.DefaultIfEmpty()
+
+ where cu.CollectionId != null || cg.CollectionId != null
+
+ select c;
+
+ var query2 = from c in dbContext.Ciphers
+ where c.UserId == _userId
+ select c;
+
+ var union = query.Union(query2).Select(c => new CipherDetails
+ {
+ Id = c.Id,
+ UserId = c.UserId,
+ OrganizationId = c.OrganizationId,
+ Type = c.Type,
+ Data = c.Data,
+ Attachments = c.Attachments,
+ CreationDate = c.CreationDate,
+ RevisionDate = c.RevisionDate,
+ DeletedDate = c.DeletedDate,
+ Favorite = _userId.HasValue && c.Favorites != null && c.Favorites.ToLowerInvariant().Contains($"\"{_userId}\":true"),
+ FolderId = GetFolderId(_userId, c),
+ Edit = true,
+ Reprompt = c.Reprompt,
+ ViewPassword = true,
+ OrganizationUseTotp = false,
+ Key = c.Key
+ });
+ return union;
+ }
+
private static Guid? GetFolderId(Guid? userId, Cipher cipher)
{
try
diff --git a/src/Infrastructure.EntityFramework/Repositories/UserRepository.cs b/src/Infrastructure.EntityFramework/Repositories/UserRepository.cs
index d91cdcd90f..0e2ecd145d 100644
--- a/src/Infrastructure.EntityFramework/Repositories/UserRepository.cs
+++ b/src/Infrastructure.EntityFramework/Repositories/UserRepository.cs
@@ -161,10 +161,12 @@ public class UserRepository : Repository, IUserR
entity.AccountRevisionDate = user.AccountRevisionDate;
entity.RevisionDate = user.RevisionDate;
+ await dbContext.SaveChangesAsync();
+
// Update re-encrypted data
foreach (var action in updateDataActions)
{
- // TODO (jlf0dev): Check if transaction captures these operations
+ // connection and transaction aren't used in EF
await action();
}
diff --git a/src/Infrastructure.EntityFramework/SecretsManager/Models/Project.cs b/src/Infrastructure.EntityFramework/SecretsManager/Models/Project.cs
index 8dde669428..77ca602841 100644
--- a/src/Infrastructure.EntityFramework/SecretsManager/Models/Project.cs
+++ b/src/Infrastructure.EntityFramework/SecretsManager/Models/Project.cs
@@ -1,5 +1,5 @@
using AutoMapper;
-using Bit.Infrastructure.EntityFramework.Models;
+using Bit.Infrastructure.EntityFramework.AdminConsole.Models;
namespace Bit.Infrastructure.EntityFramework.SecretsManager.Models;
diff --git a/src/Infrastructure.EntityFramework/SecretsManager/Models/Secret.cs b/src/Infrastructure.EntityFramework/SecretsManager/Models/Secret.cs
index abbc3620a0..a414c8864c 100644
--- a/src/Infrastructure.EntityFramework/SecretsManager/Models/Secret.cs
+++ b/src/Infrastructure.EntityFramework/SecretsManager/Models/Secret.cs
@@ -1,5 +1,5 @@
using AutoMapper;
-using Bit.Infrastructure.EntityFramework.Models;
+using Bit.Infrastructure.EntityFramework.AdminConsole.Models;
namespace Bit.Infrastructure.EntityFramework.SecretsManager.Models;
diff --git a/src/Infrastructure.EntityFramework/SecretsManager/Models/ServiceAccount.cs b/src/Infrastructure.EntityFramework/SecretsManager/Models/ServiceAccount.cs
index 87e6892f3d..2587160792 100644
--- a/src/Infrastructure.EntityFramework/SecretsManager/Models/ServiceAccount.cs
+++ b/src/Infrastructure.EntityFramework/SecretsManager/Models/ServiceAccount.cs
@@ -1,5 +1,5 @@
using AutoMapper;
-using Bit.Infrastructure.EntityFramework.Models;
+using Bit.Infrastructure.EntityFramework.AdminConsole.Models;
namespace Bit.Infrastructure.EntityFramework.SecretsManager.Models;
diff --git a/src/Infrastructure.EntityFramework/Tools/Models/Send.cs b/src/Infrastructure.EntityFramework/Tools/Models/Send.cs
index dbb55cd9ca..1d9c8ae181 100644
--- a/src/Infrastructure.EntityFramework/Tools/Models/Send.cs
+++ b/src/Infrastructure.EntityFramework/Tools/Models/Send.cs
@@ -1,4 +1,5 @@
using AutoMapper;
+using Bit.Infrastructure.EntityFramework.AdminConsole.Models;
namespace Bit.Infrastructure.EntityFramework.Models;
diff --git a/src/Infrastructure.EntityFramework/Tools/Repositories/SendRepository.cs b/src/Infrastructure.EntityFramework/Tools/Repositories/SendRepository.cs
index 3207ec9e90..4c0c866606 100644
--- a/src/Infrastructure.EntityFramework/Tools/Repositories/SendRepository.cs
+++ b/src/Infrastructure.EntityFramework/Tools/Repositories/SendRepository.cs
@@ -1,4 +1,6 @@
-using AutoMapper;
+#nullable enable
+
+using AutoMapper;
using Bit.Core.Tools.Repositories;
using Bit.Infrastructure.EntityFramework.Models;
using Bit.Infrastructure.EntityFramework.Repositories;
@@ -7,12 +9,28 @@ using Microsoft.Extensions.DependencyInjection;
namespace Bit.Infrastructure.EntityFramework.Tools.Repositories;
+///
public class SendRepository : Repository, ISendRepository
{
+ ///
+ /// Initializes the
+ ///
+ /// An IoC service locator.
+ /// An automapper service.
public SendRepository(IServiceScopeFactory serviceScopeFactory, IMapper mapper)
: base(serviceScopeFactory, mapper, (DatabaseContext context) => context.Sends)
{ }
+ ///
+ /// Saves a in the database.
+ ///
+ ///
+ /// The send being saved.
+ ///
+ ///
+ /// A task that completes once the save is complete.
+ /// The task result contains the saved .
+ ///
public override async Task CreateAsync(Core.Tools.Entities.Send send)
{
send = await base.CreateAsync(send);
@@ -30,6 +48,7 @@ public class SendRepository : Repository,
return send;
}
+ ///
public async Task> GetManyByDeletionDateAsync(DateTime deletionDateBefore)
{
using (var scope = ServiceScopeFactory.CreateScope())
@@ -40,6 +59,7 @@ public class SendRepository : Repository,
}
}
+ ///
public async Task> GetManyByUserIdAsync(Guid userId)
{
using (var scope = ServiceScopeFactory.CreateScope())
diff --git a/src/Infrastructure.EntityFramework/Vault/Models/Cipher.cs b/src/Infrastructure.EntityFramework/Vault/Models/Cipher.cs
index 6a316911ab..6655f98912 100644
--- a/src/Infrastructure.EntityFramework/Vault/Models/Cipher.cs
+++ b/src/Infrastructure.EntityFramework/Vault/Models/Cipher.cs
@@ -1,4 +1,5 @@
using AutoMapper;
+using Bit.Infrastructure.EntityFramework.AdminConsole.Models;
using Bit.Infrastructure.EntityFramework.Models;
namespace Bit.Infrastructure.EntityFramework.Vault.Models;
diff --git a/src/Infrastructure.EntityFramework/Vault/Repositories/CipherRepository.cs b/src/Infrastructure.EntityFramework/Vault/Repositories/CipherRepository.cs
index c575838362..f24fa29e60 100644
--- a/src/Infrastructure.EntityFramework/Vault/Repositories/CipherRepository.cs
+++ b/src/Infrastructure.EntityFramework/Vault/Repositories/CipherRepository.cs
@@ -1,6 +1,7 @@
using System.Text.Json;
using System.Text.Json.Nodes;
using AutoMapper;
+using Bit.Core.Auth.UserFeatures.UserKey;
using Bit.Core.Enums;
using Bit.Core.Utilities;
using Bit.Core.Vault.Enums;
@@ -13,6 +14,7 @@ using Bit.Infrastructure.EntityFramework.Repositories.Vault.Queries;
using Bit.Infrastructure.EntityFramework.Vault.Models;
using Bit.Infrastructure.EntityFramework.Vault.Repositories.Queries;
using LinqToDB.EntityFrameworkCore;
+using Microsoft.Data.SqlClient;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using NS = Newtonsoft.Json;
@@ -161,7 +163,10 @@ public class CipherRepository : Repository ciphers, IEnumerable collections, IEnumerable collectionCiphers)
+ public async Task CreateAsync(IEnumerable ciphers,
+ IEnumerable collections,
+ IEnumerable collectionCiphers,
+ IEnumerable collectionUsers)
{
if (!ciphers.Any())
{
@@ -184,14 +189,21 @@ public class CipherRepository : Repository>(collectionCiphers);
await dbContext.BulkCopyAsync(base.DefaultBulkCopyOptions, collectionCipherEntities);
}
+
+ if (collectionUsers.Any())
+ {
+ var collectionUserEntities = Mapper.Map>(collectionUsers);
+ await dbContext.BulkCopyAsync(base.DefaultBulkCopyOptions, collectionUserEntities);
+ }
+
await dbContext.UserBumpAccountRevisionDateByOrganizationIdAsync(ciphers.First().OrganizationId.Value);
await dbContext.SaveChangesAsync();
}
}
- public async Task DeleteAsync(IEnumerable ids, Guid userId)
+ public async Task DeleteAsync(IEnumerable ids, Guid userId, bool useFlexibleCollections)
{
- await ToggleCipherStates(ids, userId, CipherStateAction.HardDelete);
+ await ToggleCipherStates(ids, userId, CipherStateAction.HardDelete, useFlexibleCollections);
}
public async Task DeleteAttachmentAsync(Guid cipherId, string attachmentId)
@@ -292,12 +304,12 @@ public class CipherRepository : Repository GetByIdAsync(Guid id, Guid userId)
+ public async Task GetByIdAsync(Guid id, Guid userId, bool useFlexibleCollections)
{
using (var scope = ServiceScopeFactory.CreateScope())
{
var dbContext = GetDatabaseContext(scope);
- var userCipherDetails = new UserCipherDetailsQuery(userId);
+ var userCipherDetails = new UserCipherDetailsQuery(userId, useFlexibleCollections);
var data = await userCipherDetails.Run(dbContext).FirstOrDefaultAsync(c => c.Id == id);
return data;
}
@@ -337,13 +349,13 @@ public class CipherRepository : Repository> GetManyByUserIdAsync(Guid userId, bool withOrganizations = true)
+ public async Task> GetManyByUserIdAsync(Guid userId, bool useFlexibleCollections, bool withOrganizations = true)
{
using (var scope = ServiceScopeFactory.CreateScope())
{
var dbContext = GetDatabaseContext(scope);
IQueryable cipherDetailsView = withOrganizations ?
- new UserCipherDetailsQuery(userId).Run(dbContext) :
+ new UserCipherDetailsQuery(userId, useFlexibleCollections).Run(dbContext) :
new CipherDetailsQuery(userId).Run(dbContext);
if (!withOrganizations)
{
@@ -385,13 +397,13 @@ public class CipherRepository : Repository ids, Guid? folderId, Guid userId)
+ public async Task MoveAsync(IEnumerable ids, Guid? folderId, Guid userId, bool useFlexibleCollections)
{
using (var scope = ServiceScopeFactory.CreateScope())
{
var dbContext = GetDatabaseContext(scope);
var cipherEntities = dbContext.Ciphers.Where(c => ids.Contains(c.Id));
- var userCipherDetails = new UserCipherDetailsQuery(userId).Run(dbContext);
+ var userCipherDetails = new UserCipherDetailsQuery(userId, useFlexibleCollections).Run(dbContext);
var idsToMove = from ucd in userCipherDetails
join c in cipherEntities
on ucd.Id equals c.Id
@@ -622,9 +634,9 @@ public class CipherRepository : Repository RestoreAsync(IEnumerable ids, Guid userId)
+ public async Task RestoreAsync(IEnumerable ids, Guid userId, bool useFlexibleCollections)
{
- return await ToggleCipherStates(ids, userId, CipherStateAction.Restore);
+ return await ToggleCipherStates(ids, userId, CipherStateAction.Restore, useFlexibleCollections);
}
public async Task RestoreByIdsOrganizationIdAsync(IEnumerable ids, Guid organizationId)
@@ -652,12 +664,12 @@ public class CipherRepository : Repository ids, Guid userId)
+ public async Task SoftDeleteAsync(IEnumerable ids, Guid userId, bool useFlexibleCollections)
{
- await ToggleCipherStates(ids, userId, CipherStateAction.SoftDelete);
+ await ToggleCipherStates(ids, userId, CipherStateAction.SoftDelete, useFlexibleCollections);
}
- private async Task ToggleCipherStates(IEnumerable ids, Guid userId, CipherStateAction action)
+ private async Task ToggleCipherStates(IEnumerable ids, Guid userId, CipherStateAction action, bool useFlexibleCollections)
{
static bool FilterDeletedDate(CipherStateAction action, CipherDetails ucd)
{
@@ -672,7 +684,7 @@ public class CipherRepository : Repository ids.Contains(c.Id))).ToListAsync();
var query = from ucd in await (userCipherDetailsQuery.Run(dbContext)).ToListAsync()
join c in cipherEntitiesToCheck
@@ -815,6 +827,34 @@ public class CipherRepository : Repository
+ public UpdateEncryptedDataForKeyRotation UpdateForKeyRotation(
+ Guid userId, IEnumerable ciphers)
+ {
+ return async (SqlConnection _, SqlTransaction _) =>
+ {
+ var newCiphers = ciphers.ToList();
+ using var scope = ServiceScopeFactory.CreateScope();
+ var dbContext = GetDatabaseContext(scope);
+ var userCiphers = await GetDbSet(dbContext)
+ .Where(c => c.UserId == userId)
+ .ToListAsync();
+ var validCiphers = userCiphers
+ .Where(cipher => newCiphers.Any(newCipher => newCipher.Id == cipher.Id));
+ foreach (var cipher in validCiphers)
+ {
+ var updateCipher = newCiphers.First(newCipher => newCipher.Id == cipher.Id);
+ cipher.Data = updateCipher.Data;
+ cipher.Attachments = updateCipher.Attachments;
+ cipher.RevisionDate = updateCipher.RevisionDate;
+ cipher.Key = updateCipher.Key;
+ }
+
+ await dbContext.SaveChangesAsync();
+ };
+ }
+
+
public async Task UpdateUserKeysAndCiphersAsync(User user, IEnumerable ciphers, IEnumerable folders, IEnumerable sends)
{
using (var scope = ServiceScopeFactory.CreateScope())
diff --git a/src/Infrastructure.EntityFramework/Vault/Repositories/FolderRepository.cs b/src/Infrastructure.EntityFramework/Vault/Repositories/FolderRepository.cs
index 42b79a45ed..0bab189de9 100644
--- a/src/Infrastructure.EntityFramework/Vault/Repositories/FolderRepository.cs
+++ b/src/Infrastructure.EntityFramework/Vault/Repositories/FolderRepository.cs
@@ -1,7 +1,9 @@
using AutoMapper;
+using Bit.Core.Auth.UserFeatures.UserKey;
using Bit.Core.Vault.Repositories;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Infrastructure.EntityFramework.Vault.Models;
+using Microsoft.Data.SqlClient;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
@@ -36,4 +38,28 @@ public class FolderRepository : Repository>(folders);
}
}
+
+ ///
+ public UpdateEncryptedDataForKeyRotation UpdateForKeyRotation(
+ Guid userId, IEnumerable folders)
+ {
+ return async (SqlConnection _, SqlTransaction _) =>
+ {
+ var newFolders = folders.ToList();
+ using var scope = ServiceScopeFactory.CreateScope();
+ var dbContext = GetDatabaseContext(scope);
+ var userFolders = await GetDbSet(dbContext)
+ .Where(f => f.UserId == userId)
+ .ToListAsync();
+ var validFolders = userFolders
+ .Where(folder => newFolders.Any(newFolder => newFolder.Id == folder.Id));
+ foreach (var folder in validFolders)
+ {
+ var updateFolder = newFolders.First(newFolder => newFolder.Id == folder.Id);
+ folder.Name = updateFolder.Name;
+ }
+
+ await dbContext.SaveChangesAsync();
+ };
+ }
}
diff --git a/src/Infrastructure.EntityFramework/packages.lock.json b/src/Infrastructure.EntityFramework/packages.lock.json
index ce07f0aba5..41150f3877 100644
--- a/src/Infrastructure.EntityFramework/packages.lock.json
+++ b/src/Infrastructure.EntityFramework/packages.lock.json
@@ -14,54 +14,54 @@
},
"linq2db.EntityFrameworkCore": {
"type": "Direct",
- "requested": "[7.5.0, )",
- "resolved": "7.5.0",
- "contentHash": "ePHzO99xbObgMLlAFh08of1SnVhg6j4Su9327DrIB7RZWCgtQIX6k+nbl+HRVOooAndZSs7b+DduSgdnJjaJGw==",
+ "requested": "[7.6.0, )",
+ "resolved": "7.6.0",
+ "contentHash": "T1W9o8wVzApsUwu7SRg/L7487kaiLQYt2AqRVnXVGfobD+ZKy2oRsUMws0PICtciaz4qbfLp/r/+NksfuYsFlw==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Relational": "7.0.0",
- "linq2db": "5.2.1"
+ "linq2db": "5.3.1"
}
},
"Microsoft.EntityFrameworkCore.Relational": {
"type": "Direct",
- "requested": "[7.0.5, )",
- "resolved": "7.0.5",
- "contentHash": "u/33DC4S6g2hpMPgBc5Kdnlz//nqHR5c/ovgjtiP/wQ7sOd0EOdygVzUJAAOxCwbtAHDsJXS9Vc3jLFYq0yu8Q==",
+ "requested": "[7.0.14, )",
+ "resolved": "7.0.14",
+ "contentHash": "MrVBnWOFYwfLMGQfrcIuqEM9Xvokv1vJeYxqNH3K3xOtAdHwHQTrKnpDP97tU+LBlvcnyXAtAtryYcpLXWtRNA==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "7.0.5",
+ "Microsoft.EntityFrameworkCore": "7.0.14",
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.Sqlite": {
"type": "Direct",
- "requested": "[7.0.5, )",
- "resolved": "7.0.5",
- "contentHash": "2XPZB9OLF5/m13HgZp7/Dv0u8FWEJzcaBsMYR9Kp3R6aygkb3RnOijofPDTsmdhAqG9YTysCmh2bFaGs0TCc7A==",
+ "requested": "[7.0.14, )",
+ "resolved": "7.0.14",
+ "contentHash": "8c8Hw2tmfy5YEsi9RL2/u2Qi9IwVbmj/yDlJy4iJPadeE3/AssLrgtobOBz4ftg2y5PVjFL59Gq7YzGLQH5q1A==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.14",
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore.SqlServer": {
"type": "Direct",
- "requested": "[7.0.5, )",
- "resolved": "7.0.5",
- "contentHash": "cUJqCiamT0EvpKNgZEV5fqNv2MyVfKNgOPQfFINqHiIKHOYrS0nTCUJP97+UuG0JIIrP792/PwnuNjbekImtBg==",
+ "requested": "[7.0.14, )",
+ "resolved": "7.0.14",
+ "contentHash": "d9hqEw4W/TdQ1WDm03uyFuDoehL6GNq/NMChFaC4dcV60I42vKdUC0fYTuE2QPunVUpf5XUTCkJ6fYGjMos2AA==",
"dependencies": {
- "Microsoft.Data.SqlClient": "5.0.1",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5"
+ "Microsoft.Data.SqlClient": "5.1.1",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14"
}
},
"Npgsql.EntityFrameworkCore.PostgreSQL": {
"type": "Direct",
- "requested": "[7.0.4, )",
- "resolved": "7.0.4",
- "contentHash": "ZYMtyG6pmLtUsFAx0/XaIlVkJM+1gArWEKD55cLLxiVlGScAphjiGj+G7Gk16yg5lhhdWx+bgXWpIUISXuS33g==",
+ "requested": "[7.0.11, )",
+ "resolved": "7.0.11",
+ "contentHash": "cHEgEz0ldXc9wVANs8sJqC+3eilqefrkasCBgaVT0tyj8tb1p3/pwy2ngjboNkDG3M0z+xJsJ4jC5p8wySAM3w==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, 8.0.0)",
- "Npgsql": "7.0.4"
+ "Microsoft.EntityFrameworkCore": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.11, 8.0.0)",
+ "Npgsql": "7.0.6"
}
},
"Pomelo.EntityFrameworkCore.MySql": {
@@ -242,6 +242,24 @@
"Microsoft.Win32.Registry": "5.0.0"
}
},
+ "Duende.IdentityServer": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "4HVjzx1F8v5J+U7oa8RGAQGj2QzmzNSu87r18Sh+dlh10uyZZL8teAaT/FaVLDObnfItGdPFvN8mwpF/HkI3Xw==",
+ "dependencies": {
+ "Duende.IdentityServer.Storage": "6.0.4",
+ "Microsoft.AspNetCore.Authentication.OpenIdConnect": "6.0.0"
+ }
+ },
+ "Duende.IdentityServer.Storage": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "s5gAjfbpr2IMgI+fU2Nx+2AZdzstmbt9gpo13iX7GwvqSeSaBVqj9ZskAN0R2KF1OemPdZuGnfaTcevdXMUrrw==",
+ "dependencies": {
+ "IdentityModel": "6.0.0",
+ "Microsoft.AspNetCore.DataProtection.Abstractions": "6.0.0"
+ }
+ },
"Fido2": {
"type": "Transitive",
"resolved": "3.0.1",
@@ -270,57 +288,16 @@
},
"Handlebars.Net": {
"type": "Transitive",
- "resolved": "2.1.2",
- "contentHash": "p60QyeBYpZmcZdIXRMqs9XySIBaxJ0lj3+QD0EJVr4ybTigOTCumXMMin5dPwjo9At1UwkDZ3gGwa1lmGjG6DA==",
+ "resolved": "2.1.4",
+ "contentHash": "Od7MWDfGxYKRtxETFMlcvCrY8hAqyuXZDX4EsOfiI/jzh+PVBuVxazHBC1HmVqTKX1JnRtoxIMcH95K9UFlYog==",
"dependencies": {
"Microsoft.CSharp": "4.7.0"
}
},
"IdentityModel": {
"type": "Transitive",
- "resolved": "4.4.0",
- "contentHash": "b18wrIx5wnZlMxAX7oVsE+nDtAJ4hajYlH0xPlaRvo4r/fz08K6pPeZvbiqS9nfNbzfIgLFmNX+FL9qR9ZR5PA==",
- "dependencies": {
- "Newtonsoft.Json": "11.0.2",
- "System.Text.Encodings.Web": "4.7.0"
- }
- },
- "IdentityModel.AspNetCore.OAuth2Introspection": {
- "type": "Transitive",
- "resolved": "4.0.1",
- "contentHash": "ZNdMZMaj9fqR3j50vYsu+1U3QGd6n8+fqwf+a8mCTcmXGor+HgFDfdq0mM34bsmD6uEgAQup7sv2ZW5kR36dbA==",
- "dependencies": {
- "IdentityModel": "4.0.0"
- }
- },
- "IdentityServer4": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "blaxxGuOA7v/w1q+fxn97wZ+x2ecG1ZD4mc/N/ZOXMNeFZZhqv+4LF26Gecyik3nWrJPmbMEtQbLmRsKG8k61w==",
- "dependencies": {
- "IdentityModel": "4.4.0",
- "IdentityServer4.Storage": "4.1.2",
- "Microsoft.AspNetCore.Authentication.OpenIdConnect": "3.1.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.6.0",
- "Newtonsoft.Json": "12.0.2"
- }
- },
- "IdentityServer4.AccessTokenValidation": {
- "type": "Transitive",
- "resolved": "3.0.1",
- "contentHash": "qu/M6UyN4o9NVep7q545Ms7hYAnsQqSdLbN1Fjjrn4m35lyBfeQPSSNzDryAKHbodyWOQfHaOqKEyMEJQ5Rpgw==",
- "dependencies": {
- "IdentityModel.AspNetCore.OAuth2Introspection": "4.0.1",
- "Microsoft.AspNetCore.Authentication.JwtBearer": "3.0.0"
- }
- },
- "IdentityServer4.Storage": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "KoSffyZyyeCNTIyJiZnCuPakJ1QbCHlpty6gbWUj/7yl+w0PXIchgmmJnJSvddzBb8iZ2xew/vGlxWUIP17P2g==",
- "dependencies": {
- "IdentityModel": "4.4.0"
- }
+ "resolved": "6.0.0",
+ "contentHash": "eVHCR7a6m/dm5RFcBzE3qs/Jg5j9R5Rjpu8aTOv9e4AFvaQtBXb5ah7kmwU+YwA0ufRwz4wf1hnIvsD2hSnI4g=="
},
"LaunchDarkly.Cache": {
"type": "Transitive",
@@ -329,26 +306,27 @@
},
"LaunchDarkly.CommonSdk": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "YYYq+41gZRMQ8dIoMC6HOq/dI+4RY3HsexLLAaE9T1+1tVMeQkbCqak7sVeKX4QcE7xlXx23lWgipYUkRoRUyw==",
+ "resolved": "6.2.0",
+ "contentHash": "eLeb+tTNLwOxlUIsZWzJlcPmG9Wyf20NYyucP6MW6aqKW6doKFeSO+aJe0z+WyijbvfX1Dp1U1HQatOu6fa1Gg==",
"dependencies": {
+ "LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
},
"LaunchDarkly.EventSource": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "DN44Ry5M4lyrjiF7LEu0Ijco7Wm8R7mJopN+giYsYjkQlszsXdFvm3POoehIDAOtL1HHl5bZvF9k9xK034u3IA==",
+ "resolved": "5.1.0",
+ "contentHash": "PztDWiMvPWODx+kfBnCroZ8Lpya4nPc7ZO4TZysOogODbVXDDPDYrdcgVivCMgf4davhGrp61ekvZc+Uy1NYMA==",
"dependencies": {
- "LaunchDarkly.Logging": "[1.0.1, 3.0.0)"
+ "LaunchDarkly.Logging": "[2.0.0, 3.0.0)"
}
},
"LaunchDarkly.InternalSdk": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "jW8VEfFciuCcJUEuvSzmrbMVYYXwGL/ZWHUZLiA4aDOQ1LcEXp32uK405NQW/izEypUfWB+9TaSjPpFIC+5Wzw==",
+ "resolved": "3.3.0",
+ "contentHash": "TBvs/B6iyXp9MqRKjIoBZ/T0+/xgp5xg+MuHqr5U+N5+7DghtI2FnsmgeBedTIeQdA3Tk8Z4Bj4hlqU9FBiEnw==",
"dependencies": {
- "LaunchDarkly.CommonSdk": "6.0.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
"LaunchDarkly.Logging": "[2.0.0, 3.0.0)",
"System.Collections.Immutable": "1.7.1"
}
@@ -363,13 +341,13 @@
},
"LaunchDarkly.ServerSdk": {
"type": "Transitive",
- "resolved": "7.0.0",
- "contentHash": "gkTWb+f5QlsXIqFAciBef3qKZU2y0Hy3Fpt4pvZoxNcnBKg2PNTDSnbpbYEKPeQ1yk1avNaI/tKprnahfrmJFg==",
+ "resolved": "8.0.0",
+ "contentHash": "vosFEXYJABuIDIA0+6sncalTmrKXEkBKeqzuP9/vvcCVlFSXUl/ZnrkrAVg3ViDWDi7kjpJSk2W3h5D0TUfCGA==",
"dependencies": {
"LaunchDarkly.Cache": "1.0.2",
- "LaunchDarkly.CommonSdk": "6.0.0",
- "LaunchDarkly.EventSource": "5.0.1",
- "LaunchDarkly.InternalSdk": "3.1.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
+ "LaunchDarkly.EventSource": "5.1.0",
+ "LaunchDarkly.InternalSdk": "3.3.0",
"LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
@@ -381,8 +359,8 @@
},
"linq2db": {
"type": "Transitive",
- "resolved": "5.2.1",
- "contentHash": "OOBM8s39zhbZAgqFnl2KGxT5RqBDw21X69U528qV2PgQispaA3f+or0ILrLEgnNIJuB4EBgaw8gC6ttSHn4X0Q=="
+ "resolved": "5.3.1",
+ "contentHash": "707mIbEmtptvKeUW940UwoNwq05I7OUu0VWtclLtyYaASp+ugX4I/Er1UVpeldsDawqlVMXB5EQ5/Oar6AkUGQ=="
},
"MailKit": {
"type": "Transitive",
@@ -402,10 +380,10 @@
},
"Microsoft.AspNetCore.Authentication.OpenIdConnect": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "O1cAQYUTU8EfRqwc5/rfTns4E4hKlFlg59fuKRrST+PzsxI6H07KqRN/JjdYhAuVYxF8jPnIGbj+zuc5paOWUw==",
+ "resolved": "6.0.0",
+ "contentHash": "cJxdro36spFzk/K2OFCddM6vZ+yoj6ug8mTFRH3Gdv1Pul/buSuCtfb/FSCp31UmS5S4C1315dU7wX3ErLFuDg==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.5.0"
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.10.0"
}
},
"Microsoft.AspNetCore.Cryptography.Internal": {
@@ -438,8 +416,8 @@
},
"Microsoft.AspNetCore.DataProtection.Abstractions": {
"type": "Transitive",
- "resolved": "3.1.32",
- "contentHash": "MPL4iVyiaRxnOUY5VATHjvhDWaAEFb77KFiUxVRklv3Z3v+STofUr1UG/aCt1O9cgN7FVTDaC5A7U+zsLub8Xg=="
+ "resolved": "6.0.0",
+ "contentHash": "Z/UU4NEBm5UgNufJmw+j5baW26ytCOIZ0G7sZocPaOzsUeBon1bkM3lSMNZQG2GmDjAIVP2XMSODf2jzSGbibw=="
},
"Microsoft.Azure.Amqp": {
"type": "Transitive",
@@ -524,48 +502,44 @@
},
"Microsoft.Data.SqlClient": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "uu8dfrsx081cSbEevWuZAvqdmANDGJkbLBL2G3j0LAZxX1Oy8RCVAaC4Lcuak6jNicWP6CWvHqBTIEmQNSxQlw==",
+ "resolved": "5.1.1",
+ "contentHash": "MW5E9HFvCaV069o8b6YpuRDPBux8s96qDnOJ+4N9QNUCs7c5W3KxwQ+ftpAjbMUlImL+c9WR+l+f5hzjkqhu2g==",
"dependencies": {
- "Azure.Identity": "1.6.0",
- "Microsoft.Data.SqlClient.SNI.runtime": "5.0.1",
- "Microsoft.Identity.Client": "4.45.0",
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.21.0",
+ "Azure.Identity": "1.7.0",
+ "Microsoft.Data.SqlClient.SNI.runtime": "5.1.0",
+ "Microsoft.Identity.Client": "4.47.2",
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.24.0",
"Microsoft.SqlServer.Server": "1.0.0",
- "Microsoft.Win32.Registry": "5.0.0",
- "System.Buffers": "4.5.1",
- "System.Configuration.ConfigurationManager": "5.0.0",
- "System.Diagnostics.DiagnosticSource": "5.0.0",
- "System.IO": "4.3.0",
- "System.Resources.ResourceManager": "4.3.0",
- "System.Runtime.Caching": "5.0.0",
+ "System.Configuration.ConfigurationManager": "6.0.1",
+ "System.Diagnostics.DiagnosticSource": "6.0.0",
+ "System.Runtime.Caching": "6.0.0",
"System.Security.Cryptography.Cng": "5.0.0",
"System.Security.Principal.Windows": "5.0.0",
- "System.Text.Encoding.CodePages": "5.0.0",
- "System.Text.Encodings.Web": "4.7.2"
+ "System.Text.Encoding.CodePages": "6.0.0",
+ "System.Text.Encodings.Web": "6.0.0"
}
},
"Microsoft.Data.SqlClient.SNI.runtime": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "y0X5MxiNdbITJYoafJ2ruaX6hqO0twpCGR/ipiDOe85JKLU8WL4TuAQfDe5qtt3bND5Je26HnrarLSAMMnVTNg=="
+ "resolved": "5.1.0",
+ "contentHash": "jVsElisM5sfBzaaV9kdq2NXZLwIbytetnsOIlJ0cQGgQP4zFNBmkfHBnpwtmKrtBJBEV9+9PVQPVrcCVhDgcIg=="
},
"Microsoft.Data.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "FTerRmQPqHrCrnoUzhBu+E+1DNGwyrAMLqHkAqOOOu5pGfyMOj8qQUBxI/gDtWtG11p49UxSfWmBzRNlwZqfUg==",
+ "resolved": "7.0.14",
+ "contentHash": "qvYae3/v9Fvqsjp/7OKQBuJK+Uc3m/WctfpIUMmGMDot2Bd8UWBKiMSlh26UtfQa9x4N+k7NxCT+AbZVoNrCdg==",
"dependencies": {
"SQLitePCLRaw.core": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "RXbRLHHWP2Z3pq8qcL5nQ6LPeoOyp8hasM5bd0Te8PiQi3RjWQR4tcbdY5XMqQ+oTO9wA8/RLhZRn/hnxlTDnQ==",
+ "resolved": "7.0.14",
+ "contentHash": "0KYkAemPygW6yzifciFlmMzkO4sI4Dw69xLgwg3ui5rXJS5XvzuAWVvfdrKJciqeCbCnVS/ZbOWpcwWgqce5bQ==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Abstractions": "7.0.5",
- "Microsoft.EntityFrameworkCore.Analyzers": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Abstractions": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Analyzers": "7.0.14",
"Microsoft.Extensions.Caching.Memory": "7.0.0",
"Microsoft.Extensions.DependencyInjection": "7.0.0",
"Microsoft.Extensions.Logging": "7.0.0"
@@ -573,21 +547,21 @@
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "iwQso+hFRsEWjhH2WsEQj1D2QE5BlEXiXEt6A3SlYTPRPdZsyTNDeDDEdtxL+H/UJPQgQYY+9SMMRcEiXBmCAA=="
+ "resolved": "7.0.14",
+ "contentHash": "aEcXDSYpDdD5wdIRKTqcS44f3W4capqQ1BWVRPJgacATfHkO62RX9Nnh0hUFg+rei9OLuJp0Y4zsy1fNeOXv5g=="
},
"Microsoft.EntityFrameworkCore.Analyzers": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "yMLM/aK1MikVqpjxd7PJ1Pjgztd3VAd26ZHxyjxG3RPeM9cHjvS5tCg9kAAayR6eHmBg0ffZsHdT28WfA5tTlA=="
+ "resolved": "7.0.14",
+ "contentHash": "esI4RF6mix4DDFBhWB9k1vJxAL8GouSf5ZV8oFJoVsIQ9d2J3MPgC1VL2qM9Vw5cH7Vg7TzRyKNpCRXFVkWs9w=="
},
"Microsoft.EntityFrameworkCore.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "4C+9ct6A/Bq61Ta9Uh2td4/XwNpRCiPI03SWTa3hPJjA/g8wCw2hetbh3DDe5HcydzgDq/lRRjU/eRy3UODklQ==",
+ "resolved": "7.0.14",
+ "contentHash": "JNUkZVff1V/A/P3JiBbgt+Y2oCQSuzORxE3jOqFDbFjSFu7jHDEetJ/afSF/taa0lbyN9OpvaKjsbKk3Iis29Q==",
"dependencies": {
- "Microsoft.Data.Sqlite.Core": "7.0.5",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5",
+ "Microsoft.Data.Sqlite.Core": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14",
"Microsoft.Extensions.DependencyModel": "7.0.0"
}
},
@@ -841,50 +815,52 @@
},
"Microsoft.IdentityModel.Abstractions": {
"type": "Transitive",
- "resolved": "6.22.0",
- "contentHash": "iI+9V+2ciCrbheeLjpmjcqCnhy+r6yCoEcid3nkoFWerHgjVuT6CPM4HODUTtUPe1uwks4wcnAujJ8u+IKogHQ=="
+ "resolved": "6.24.0",
+ "contentHash": "X6aBK56Ot15qKyG7X37KsPnrwah+Ka55NJWPppWVTDi8xWq7CJgeNw2XyaeHgE1o/mW4THwoabZkBbeG2TPBiw=="
},
"Microsoft.IdentityModel.JsonWebTokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "d3h1/BaMeylKTkdP6XwRCxuOoDJZ44V9xaXr6gl5QxmpnZGdoK3bySo3OQN8ehRLJHShb94ElLUvoXyglQtgAw==",
+ "resolved": "6.24.0",
+ "contentHash": "XDWrkThcxfuWp79AvAtg5f+uRS1BxkIbJnsG/e8VPzOWkYYuDg33emLjp5EWcwXYYIDsHnVZD/00kM/PYFQc/g==",
"dependencies": {
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Tokens": "6.24.0",
+ "System.Text.Encoding": "4.3.0",
+ "System.Text.Json": "4.7.2"
}
},
"Microsoft.IdentityModel.Logging": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "tuEhHIQwvBEhMf8I50hy8FHmRSUkffDFP5EdLsSDV4qRcl2wvOPkQxYqEzWkh+ytW6sbdJGEXElGhmhDfAxAKg==",
+ "resolved": "6.24.0",
+ "contentHash": "qLYWDOowM/zghmYKXw1yfYKlHOdS41i8t4hVXr9bSI90zHqhyhQh9GwVy8pENzs5wHeytU23DymluC9NtgYv7w==",
"dependencies": {
- "Microsoft.IdentityModel.Abstractions": "6.21.0"
+ "Microsoft.IdentityModel.Abstractions": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "0FqY5cTLQKtHrClzHEI+QxJl8OBT2vUiEQQB7UKk832JDiJJmetzYZ3AdSrPjN/3l3nkhByeWzXnhrX0JbifKg==",
+ "resolved": "6.24.0",
+ "contentHash": "+NzKCkvsQ8X1r/Ff74V7CFr9OsdMRaB6DsV+qpH7NNLdYJ8O4qHbmTnNEsjFcDmk/gVNDwhoL2gN5pkPVq0lwQ==",
"dependencies": {
- "Microsoft.IdentityModel.Logging": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Logging": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols.OpenIdConnect": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "vtSKL7n6EnAsLyxmiviusm6LKrblT2ndnNqN6rvVq6iIHAnPCK9E2DkDx6h1Jrpy1cvbp40r0cnTg23nhEAGTA==",
+ "resolved": "6.24.0",
+ "contentHash": "a/2RRrc8C9qaw8qdD9hv1ES9YKFgxaqr/SnwMSLbwQZJSUQDd4qx1K4EYgWaQWs73R+VXLyKSxN0f/uE9CsBiQ==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols": "6.21.0",
- "System.IdentityModel.Tokens.Jwt": "6.21.0"
+ "Microsoft.IdentityModel.Protocols": "6.24.0",
+ "System.IdentityModel.Tokens.Jwt": "6.24.0"
}
},
"Microsoft.IdentityModel.Tokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "AAEHZvZyb597a+QJSmtxH3n2P1nIJGpZ4Q89GTenknRx6T6zyfzf592yW/jA5e8EHN4tNMjjXHQaYWEq5+L05w==",
+ "resolved": "6.24.0",
+ "contentHash": "ZPqHi86UYuqJXJ7bLnlEctHKkPKT4lGUFbotoCNiXNCSL02emYlcxzGYsRGWWmbFEcYDMi2dcTLLYNzHqWOTsw==",
"dependencies": {
"Microsoft.CSharp": "4.5.0",
- "Microsoft.IdentityModel.Logging": "6.21.0",
+ "Microsoft.IdentityModel.Logging": "6.24.0",
"System.Security.Cryptography.Cng": "4.5.0"
}
},
@@ -1015,13 +991,13 @@
},
"Newtonsoft.Json": {
"type": "Transitive",
- "resolved": "13.0.1",
- "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
+ "resolved": "13.0.3",
+ "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ=="
},
"Npgsql": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "7UVPYy2RP0ci04PED1tc9ZCaTw/DfSdSkLiGEFCAvwMwsgA/bAluj1liNzP1IpN0MFofnOF0cm1zJfmbEuCehg==",
+ "resolved": "7.0.6",
+ "contentHash": "TAqvwRnm3NJ0QvN7cvu6geJkbI0XPzGVRElVY5hF4gsgA+BnE12x6GM1TLhdeq+7ZKvvo3BD8jXKnXmr3tvdEw==",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "6.0.0",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
@@ -1338,8 +1314,8 @@
},
"Serilog.Sinks.SyslogMessages": {
"type": "Transitive",
- "resolved": "2.0.6",
- "contentHash": "V2Yq2GEbk7taEPbpBLFzLXhrHrUzKf4sQu/zLrANU8XIoUn/Mr08M2E8PrcrWVXCj0R4xLMWYe0Z1sxOrMF3IA==",
+ "resolved": "2.0.9",
+ "contentHash": "y7J+/h/Nf5EAtbpa6lC1nDhK/F9kC5oxuVYmQivv242Oh4hAVMeoAk5Gv6bgb/KbmqufGPXUFkX/AlcrvZ8Ywg==",
"dependencies": {
"Serilog": "2.5.0",
"Serilog.Sinks.PeriodicBatching": "2.3.0"
@@ -1472,8 +1448,8 @@
},
"System.Configuration.ConfigurationManager": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "7T+m0kDSlIPTHIkPMIu6m6tV6qsMqJpvQWW2jIc2qi7sn40qxFo0q+7mEQAhMPXZHMKnWrnv47ntGlM/ejvw3g==",
+ "resolved": "6.0.1",
+ "contentHash": "jXw9MlUu/kRfEU0WyTptAVueupqIeE3/rl0EZDMlf8pcvJnitQ8HeVEp69rZdaStXwTV72boi/Bhw8lOeO+U2w==",
"dependencies": {
"System.Security.Cryptography.ProtectedData": "6.0.0",
"System.Security.Permissions": "6.0.0"
@@ -1632,11 +1608,11 @@
},
"System.IdentityModel.Tokens.Jwt": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "JRD8AuypBE+2zYxT3dMJomQVsPYsCqlyZhWel3J1d5nzQokSRyTueF+Q4ID3Jcu6zSZKuzOdJ1MLTkbQsDqcvQ==",
+ "resolved": "6.24.0",
+ "contentHash": "Qibsj9MPWq8S/C0FgvmsLfIlHLE7ay0MJIaAmK94ivN3VyDdglqReed5qMvdQhSL0BzK6v0Z1wB/sD88zVu6Jw==",
"dependencies": {
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"System.IO": {
@@ -2085,10 +2061,10 @@
},
"System.Runtime.Caching": {
"type": "Transitive",
- "resolved": "5.0.0",
- "contentHash": "30D6MkO8WF9jVGWZIP0hmCN8l9BTY4LCsAzLIe4xFSXzs+AjDotR7DpSmj27pFskDURzUvqYYY0ikModgBTxWw==",
+ "resolved": "6.0.0",
+ "contentHash": "E0e03kUp5X2k+UAoVl6efmI7uU7JRBWi5EIdlQ7cr0NpBGjHG4fWII35PgsBY9T4fJQ8E4QPsL0rKksU9gcL5A==",
"dependencies": {
- "System.Configuration.ConfigurationManager": "5.0.0"
+ "System.Configuration.ConfigurationManager": "6.0.0"
}
},
"System.Runtime.CompilerServices.Unsafe": {
@@ -2618,11 +2594,10 @@
"BitPay.Light": "[1.0.1907, )",
"Braintree": "[5.19.0, )",
"DnsClient": "[1.7.0, )",
+ "Duende.IdentityServer": "[6.0.4, )",
"Fido2.AspNet": "[3.0.1, )",
- "Handlebars.Net": "[2.1.2, )",
- "IdentityServer4": "[4.1.2, )",
- "IdentityServer4.AccessTokenValidation": "[3.0.1, )",
- "LaunchDarkly.ServerSdk": "[7.0.0, )",
+ "Handlebars.Net": "[2.1.4, )",
+ "LaunchDarkly.ServerSdk": "[8.0.0, )",
"MailKit": "[4.2.0, )",
"Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )",
"Microsoft.Azure.Cosmos.Table": "[1.0.8, )",
@@ -2632,7 +2607,7 @@
"Microsoft.Extensions.Configuration.EnvironmentVariables": "[6.0.1, )",
"Microsoft.Extensions.Configuration.UserSecrets": "[6.0.1, )",
"Microsoft.Extensions.Identity.Stores": "[6.0.4, )",
- "Newtonsoft.Json": "[13.0.1, )",
+ "Newtonsoft.Json": "[13.0.3, )",
"Otp.NET": "[1.2.2, )",
"Quartz": "[3.4.0, )",
"SendGrid": "[9.27.0, )",
@@ -2641,7 +2616,7 @@
"Serilog.Extensions.Logging": "[3.1.0, )",
"Serilog.Extensions.Logging.File": "[2.0.0, )",
"Serilog.Sinks.AzureCosmosDB": "[2.0.0, )",
- "Serilog.Sinks.SyslogMessages": "[2.0.6, )",
+ "Serilog.Sinks.SyslogMessages": "[2.0.9, )",
"Stripe.net": "[40.0.0, )",
"YubicoDotNetClient": "[1.2.0, )"
}
diff --git a/src/Notifications/Program.cs b/src/Notifications/Program.cs
index 48221c2c4e..072c2404c4 100644
--- a/src/Notifications/Program.cs
+++ b/src/Notifications/Program.cs
@@ -17,8 +17,8 @@ public class Program
logging.AddSerilog(hostingContext, (e, globalSettings) =>
{
var context = e.Properties["SourceContext"].ToString();
- if (context.Contains("IdentityServer4.Validation.TokenValidator") ||
- context.Contains("IdentityServer4.Validation.TokenRequestValidator"))
+ if (context.Contains("Duende.IdentityServer.Validation.TokenValidator") ||
+ context.Contains("Duende.IdentityServer.Validation.TokenRequestValidator"))
{
return e.Level >= globalSettings.MinLogLevel.NotificationsSettings.IdentityToken;
}
diff --git a/src/Notifications/packages.lock.json b/src/Notifications/packages.lock.json
index 8a64b55395..04483c22cf 100644
--- a/src/Notifications/packages.lock.json
+++ b/src/Notifications/packages.lock.json
@@ -194,8 +194,8 @@
},
"Dapper": {
"type": "Transitive",
- "resolved": "2.0.123",
- "contentHash": "RDFF4rBLLmbpi6pwkY7q/M6UXHRJEOerplDGE5jwEkP/JGJnBauAClYavNKJPW1yOTWRPIyfj4is3EaJxQXILQ=="
+ "resolved": "2.1.24",
+ "contentHash": "/2t2vsdJyZRsk13AsWigZpsuFvEwK+o3v862cEULXoww905gyKhJFSuwmZI/4Ui9COX9ZCFCI09UHyH4wVYl3A=="
},
"DnsClient": {
"type": "Transitive",
@@ -205,6 +205,24 @@
"Microsoft.Win32.Registry": "5.0.0"
}
},
+ "Duende.IdentityServer": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "4HVjzx1F8v5J+U7oa8RGAQGj2QzmzNSu87r18Sh+dlh10uyZZL8teAaT/FaVLDObnfItGdPFvN8mwpF/HkI3Xw==",
+ "dependencies": {
+ "Duende.IdentityServer.Storage": "6.0.4",
+ "Microsoft.AspNetCore.Authentication.OpenIdConnect": "6.0.0"
+ }
+ },
+ "Duende.IdentityServer.Storage": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "s5gAjfbpr2IMgI+fU2Nx+2AZdzstmbt9gpo13iX7GwvqSeSaBVqj9ZskAN0R2KF1OemPdZuGnfaTcevdXMUrrw==",
+ "dependencies": {
+ "IdentityModel": "6.0.0",
+ "Microsoft.AspNetCore.DataProtection.Abstractions": "6.0.0"
+ }
+ },
"Fido2": {
"type": "Transitive",
"resolved": "3.0.1",
@@ -233,57 +251,16 @@
},
"Handlebars.Net": {
"type": "Transitive",
- "resolved": "2.1.2",
- "contentHash": "p60QyeBYpZmcZdIXRMqs9XySIBaxJ0lj3+QD0EJVr4ybTigOTCumXMMin5dPwjo9At1UwkDZ3gGwa1lmGjG6DA==",
+ "resolved": "2.1.4",
+ "contentHash": "Od7MWDfGxYKRtxETFMlcvCrY8hAqyuXZDX4EsOfiI/jzh+PVBuVxazHBC1HmVqTKX1JnRtoxIMcH95K9UFlYog==",
"dependencies": {
"Microsoft.CSharp": "4.7.0"
}
},
"IdentityModel": {
"type": "Transitive",
- "resolved": "4.4.0",
- "contentHash": "b18wrIx5wnZlMxAX7oVsE+nDtAJ4hajYlH0xPlaRvo4r/fz08K6pPeZvbiqS9nfNbzfIgLFmNX+FL9qR9ZR5PA==",
- "dependencies": {
- "Newtonsoft.Json": "11.0.2",
- "System.Text.Encodings.Web": "4.7.0"
- }
- },
- "IdentityModel.AspNetCore.OAuth2Introspection": {
- "type": "Transitive",
- "resolved": "4.0.1",
- "contentHash": "ZNdMZMaj9fqR3j50vYsu+1U3QGd6n8+fqwf+a8mCTcmXGor+HgFDfdq0mM34bsmD6uEgAQup7sv2ZW5kR36dbA==",
- "dependencies": {
- "IdentityModel": "4.0.0"
- }
- },
- "IdentityServer4": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "blaxxGuOA7v/w1q+fxn97wZ+x2ecG1ZD4mc/N/ZOXMNeFZZhqv+4LF26Gecyik3nWrJPmbMEtQbLmRsKG8k61w==",
- "dependencies": {
- "IdentityModel": "4.4.0",
- "IdentityServer4.Storage": "4.1.2",
- "Microsoft.AspNetCore.Authentication.OpenIdConnect": "3.1.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.6.0",
- "Newtonsoft.Json": "12.0.2"
- }
- },
- "IdentityServer4.AccessTokenValidation": {
- "type": "Transitive",
- "resolved": "3.0.1",
- "contentHash": "qu/M6UyN4o9NVep7q545Ms7hYAnsQqSdLbN1Fjjrn4m35lyBfeQPSSNzDryAKHbodyWOQfHaOqKEyMEJQ5Rpgw==",
- "dependencies": {
- "IdentityModel.AspNetCore.OAuth2Introspection": "4.0.1",
- "Microsoft.AspNetCore.Authentication.JwtBearer": "3.0.0"
- }
- },
- "IdentityServer4.Storage": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "KoSffyZyyeCNTIyJiZnCuPakJ1QbCHlpty6gbWUj/7yl+w0PXIchgmmJnJSvddzBb8iZ2xew/vGlxWUIP17P2g==",
- "dependencies": {
- "IdentityModel": "4.4.0"
- }
+ "resolved": "6.0.0",
+ "contentHash": "eVHCR7a6m/dm5RFcBzE3qs/Jg5j9R5Rjpu8aTOv9e4AFvaQtBXb5ah7kmwU+YwA0ufRwz4wf1hnIvsD2hSnI4g=="
},
"LaunchDarkly.Cache": {
"type": "Transitive",
@@ -292,26 +269,27 @@
},
"LaunchDarkly.CommonSdk": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "YYYq+41gZRMQ8dIoMC6HOq/dI+4RY3HsexLLAaE9T1+1tVMeQkbCqak7sVeKX4QcE7xlXx23lWgipYUkRoRUyw==",
+ "resolved": "6.2.0",
+ "contentHash": "eLeb+tTNLwOxlUIsZWzJlcPmG9Wyf20NYyucP6MW6aqKW6doKFeSO+aJe0z+WyijbvfX1Dp1U1HQatOu6fa1Gg==",
"dependencies": {
+ "LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
},
"LaunchDarkly.EventSource": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "DN44Ry5M4lyrjiF7LEu0Ijco7Wm8R7mJopN+giYsYjkQlszsXdFvm3POoehIDAOtL1HHl5bZvF9k9xK034u3IA==",
+ "resolved": "5.1.0",
+ "contentHash": "PztDWiMvPWODx+kfBnCroZ8Lpya4nPc7ZO4TZysOogODbVXDDPDYrdcgVivCMgf4davhGrp61ekvZc+Uy1NYMA==",
"dependencies": {
- "LaunchDarkly.Logging": "[1.0.1, 3.0.0)"
+ "LaunchDarkly.Logging": "[2.0.0, 3.0.0)"
}
},
"LaunchDarkly.InternalSdk": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "jW8VEfFciuCcJUEuvSzmrbMVYYXwGL/ZWHUZLiA4aDOQ1LcEXp32uK405NQW/izEypUfWB+9TaSjPpFIC+5Wzw==",
+ "resolved": "3.3.0",
+ "contentHash": "TBvs/B6iyXp9MqRKjIoBZ/T0+/xgp5xg+MuHqr5U+N5+7DghtI2FnsmgeBedTIeQdA3Tk8Z4Bj4hlqU9FBiEnw==",
"dependencies": {
- "LaunchDarkly.CommonSdk": "6.0.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
"LaunchDarkly.Logging": "[2.0.0, 3.0.0)",
"System.Collections.Immutable": "1.7.1"
}
@@ -326,13 +304,13 @@
},
"LaunchDarkly.ServerSdk": {
"type": "Transitive",
- "resolved": "7.0.0",
- "contentHash": "gkTWb+f5QlsXIqFAciBef3qKZU2y0Hy3Fpt4pvZoxNcnBKg2PNTDSnbpbYEKPeQ1yk1avNaI/tKprnahfrmJFg==",
+ "resolved": "8.0.0",
+ "contentHash": "vosFEXYJABuIDIA0+6sncalTmrKXEkBKeqzuP9/vvcCVlFSXUl/ZnrkrAVg3ViDWDi7kjpJSk2W3h5D0TUfCGA==",
"dependencies": {
"LaunchDarkly.Cache": "1.0.2",
- "LaunchDarkly.CommonSdk": "6.0.0",
- "LaunchDarkly.EventSource": "5.0.1",
- "LaunchDarkly.InternalSdk": "3.1.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
+ "LaunchDarkly.EventSource": "5.1.0",
+ "LaunchDarkly.InternalSdk": "3.3.0",
"LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
@@ -344,16 +322,16 @@
},
"linq2db": {
"type": "Transitive",
- "resolved": "5.2.1",
- "contentHash": "OOBM8s39zhbZAgqFnl2KGxT5RqBDw21X69U528qV2PgQispaA3f+or0ILrLEgnNIJuB4EBgaw8gC6ttSHn4X0Q=="
+ "resolved": "5.3.1",
+ "contentHash": "707mIbEmtptvKeUW940UwoNwq05I7OUu0VWtclLtyYaASp+ugX4I/Er1UVpeldsDawqlVMXB5EQ5/Oar6AkUGQ=="
},
"linq2db.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.5.0",
- "contentHash": "ePHzO99xbObgMLlAFh08of1SnVhg6j4Su9327DrIB7RZWCgtQIX6k+nbl+HRVOooAndZSs7b+DduSgdnJjaJGw==",
+ "resolved": "7.6.0",
+ "contentHash": "T1W9o8wVzApsUwu7SRg/L7487kaiLQYt2AqRVnXVGfobD+ZKy2oRsUMws0PICtciaz4qbfLp/r/+NksfuYsFlw==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Relational": "7.0.0",
- "linq2db": "5.2.1"
+ "linq2db": "5.3.1"
}
},
"MailKit": {
@@ -393,10 +371,10 @@
},
"Microsoft.AspNetCore.Authentication.OpenIdConnect": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "O1cAQYUTU8EfRqwc5/rfTns4E4hKlFlg59fuKRrST+PzsxI6H07KqRN/JjdYhAuVYxF8jPnIGbj+zuc5paOWUw==",
+ "resolved": "6.0.0",
+ "contentHash": "cJxdro36spFzk/K2OFCddM6vZ+yoj6ug8mTFRH3Gdv1Pul/buSuCtfb/FSCp31UmS5S4C1315dU7wX3ErLFuDg==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.5.0"
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.10.0"
}
},
"Microsoft.AspNetCore.Connections.Abstractions": {
@@ -438,8 +416,8 @@
},
"Microsoft.AspNetCore.DataProtection.Abstractions": {
"type": "Transitive",
- "resolved": "3.1.32",
- "contentHash": "MPL4iVyiaRxnOUY5VATHjvhDWaAEFb77KFiUxVRklv3Z3v+STofUr1UG/aCt1O9cgN7FVTDaC5A7U+zsLub8Xg=="
+ "resolved": "6.0.0",
+ "contentHash": "Z/UU4NEBm5UgNufJmw+j5baW26ytCOIZ0G7sZocPaOzsUeBon1bkM3lSMNZQG2GmDjAIVP2XMSODf2jzSGbibw=="
},
"Microsoft.AspNetCore.SignalR.Common": {
"type": "Transitive",
@@ -533,48 +511,44 @@
},
"Microsoft.Data.SqlClient": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "uu8dfrsx081cSbEevWuZAvqdmANDGJkbLBL2G3j0LAZxX1Oy8RCVAaC4Lcuak6jNicWP6CWvHqBTIEmQNSxQlw==",
+ "resolved": "5.1.1",
+ "contentHash": "MW5E9HFvCaV069o8b6YpuRDPBux8s96qDnOJ+4N9QNUCs7c5W3KxwQ+ftpAjbMUlImL+c9WR+l+f5hzjkqhu2g==",
"dependencies": {
- "Azure.Identity": "1.6.0",
- "Microsoft.Data.SqlClient.SNI.runtime": "5.0.1",
- "Microsoft.Identity.Client": "4.45.0",
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.21.0",
+ "Azure.Identity": "1.7.0",
+ "Microsoft.Data.SqlClient.SNI.runtime": "5.1.0",
+ "Microsoft.Identity.Client": "4.47.2",
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.24.0",
"Microsoft.SqlServer.Server": "1.0.0",
- "Microsoft.Win32.Registry": "5.0.0",
- "System.Buffers": "4.5.1",
- "System.Configuration.ConfigurationManager": "5.0.0",
- "System.Diagnostics.DiagnosticSource": "5.0.0",
- "System.IO": "4.3.0",
- "System.Resources.ResourceManager": "4.3.0",
- "System.Runtime.Caching": "5.0.0",
+ "System.Configuration.ConfigurationManager": "6.0.1",
+ "System.Diagnostics.DiagnosticSource": "6.0.0",
+ "System.Runtime.Caching": "6.0.0",
"System.Security.Cryptography.Cng": "5.0.0",
"System.Security.Principal.Windows": "5.0.0",
- "System.Text.Encoding.CodePages": "5.0.0",
- "System.Text.Encodings.Web": "4.7.2"
+ "System.Text.Encoding.CodePages": "6.0.0",
+ "System.Text.Encodings.Web": "6.0.0"
}
},
"Microsoft.Data.SqlClient.SNI.runtime": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "y0X5MxiNdbITJYoafJ2ruaX6hqO0twpCGR/ipiDOe85JKLU8WL4TuAQfDe5qtt3bND5Je26HnrarLSAMMnVTNg=="
+ "resolved": "5.1.0",
+ "contentHash": "jVsElisM5sfBzaaV9kdq2NXZLwIbytetnsOIlJ0cQGgQP4zFNBmkfHBnpwtmKrtBJBEV9+9PVQPVrcCVhDgcIg=="
},
"Microsoft.Data.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "FTerRmQPqHrCrnoUzhBu+E+1DNGwyrAMLqHkAqOOOu5pGfyMOj8qQUBxI/gDtWtG11p49UxSfWmBzRNlwZqfUg==",
+ "resolved": "7.0.14",
+ "contentHash": "qvYae3/v9Fvqsjp/7OKQBuJK+Uc3m/WctfpIUMmGMDot2Bd8UWBKiMSlh26UtfQa9x4N+k7NxCT+AbZVoNrCdg==",
"dependencies": {
"SQLitePCLRaw.core": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "RXbRLHHWP2Z3pq8qcL5nQ6LPeoOyp8hasM5bd0Te8PiQi3RjWQR4tcbdY5XMqQ+oTO9wA8/RLhZRn/hnxlTDnQ==",
+ "resolved": "7.0.14",
+ "contentHash": "0KYkAemPygW6yzifciFlmMzkO4sI4Dw69xLgwg3ui5rXJS5XvzuAWVvfdrKJciqeCbCnVS/ZbOWpcwWgqce5bQ==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Abstractions": "7.0.5",
- "Microsoft.EntityFrameworkCore.Analyzers": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Abstractions": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Analyzers": "7.0.14",
"Microsoft.Extensions.Caching.Memory": "7.0.0",
"Microsoft.Extensions.DependencyInjection": "7.0.0",
"Microsoft.Extensions.Logging": "7.0.0"
@@ -582,49 +556,49 @@
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "iwQso+hFRsEWjhH2WsEQj1D2QE5BlEXiXEt6A3SlYTPRPdZsyTNDeDDEdtxL+H/UJPQgQYY+9SMMRcEiXBmCAA=="
+ "resolved": "7.0.14",
+ "contentHash": "aEcXDSYpDdD5wdIRKTqcS44f3W4capqQ1BWVRPJgacATfHkO62RX9Nnh0hUFg+rei9OLuJp0Y4zsy1fNeOXv5g=="
},
"Microsoft.EntityFrameworkCore.Analyzers": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "yMLM/aK1MikVqpjxd7PJ1Pjgztd3VAd26ZHxyjxG3RPeM9cHjvS5tCg9kAAayR6eHmBg0ffZsHdT28WfA5tTlA=="
+ "resolved": "7.0.14",
+ "contentHash": "esI4RF6mix4DDFBhWB9k1vJxAL8GouSf5ZV8oFJoVsIQ9d2J3MPgC1VL2qM9Vw5cH7Vg7TzRyKNpCRXFVkWs9w=="
},
"Microsoft.EntityFrameworkCore.Relational": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "u/33DC4S6g2hpMPgBc5Kdnlz//nqHR5c/ovgjtiP/wQ7sOd0EOdygVzUJAAOxCwbtAHDsJXS9Vc3jLFYq0yu8Q==",
+ "resolved": "7.0.14",
+ "contentHash": "MrVBnWOFYwfLMGQfrcIuqEM9Xvokv1vJeYxqNH3K3xOtAdHwHQTrKnpDP97tU+LBlvcnyXAtAtryYcpLXWtRNA==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "7.0.5",
+ "Microsoft.EntityFrameworkCore": "7.0.14",
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.Sqlite": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "2XPZB9OLF5/m13HgZp7/Dv0u8FWEJzcaBsMYR9Kp3R6aygkb3RnOijofPDTsmdhAqG9YTysCmh2bFaGs0TCc7A==",
+ "resolved": "7.0.14",
+ "contentHash": "8c8Hw2tmfy5YEsi9RL2/u2Qi9IwVbmj/yDlJy4iJPadeE3/AssLrgtobOBz4ftg2y5PVjFL59Gq7YzGLQH5q1A==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.14",
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "4C+9ct6A/Bq61Ta9Uh2td4/XwNpRCiPI03SWTa3hPJjA/g8wCw2hetbh3DDe5HcydzgDq/lRRjU/eRy3UODklQ==",
+ "resolved": "7.0.14",
+ "contentHash": "JNUkZVff1V/A/P3JiBbgt+Y2oCQSuzORxE3jOqFDbFjSFu7jHDEetJ/afSF/taa0lbyN9OpvaKjsbKk3Iis29Q==",
"dependencies": {
- "Microsoft.Data.Sqlite.Core": "7.0.5",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5",
+ "Microsoft.Data.Sqlite.Core": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14",
"Microsoft.Extensions.DependencyModel": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.SqlServer": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "cUJqCiamT0EvpKNgZEV5fqNv2MyVfKNgOPQfFINqHiIKHOYrS0nTCUJP97+UuG0JIIrP792/PwnuNjbekImtBg==",
+ "resolved": "7.0.14",
+ "contentHash": "d9hqEw4W/TdQ1WDm03uyFuDoehL6GNq/NMChFaC4dcV60I42vKdUC0fYTuE2QPunVUpf5XUTCkJ6fYGjMos2AA==",
"dependencies": {
- "Microsoft.Data.SqlClient": "5.0.1",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5"
+ "Microsoft.Data.SqlClient": "5.1.1",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14"
}
},
"Microsoft.Extensions.Caching.Abstractions": {
@@ -882,50 +856,52 @@
},
"Microsoft.IdentityModel.Abstractions": {
"type": "Transitive",
- "resolved": "6.22.0",
- "contentHash": "iI+9V+2ciCrbheeLjpmjcqCnhy+r6yCoEcid3nkoFWerHgjVuT6CPM4HODUTtUPe1uwks4wcnAujJ8u+IKogHQ=="
+ "resolved": "6.24.0",
+ "contentHash": "X6aBK56Ot15qKyG7X37KsPnrwah+Ka55NJWPppWVTDi8xWq7CJgeNw2XyaeHgE1o/mW4THwoabZkBbeG2TPBiw=="
},
"Microsoft.IdentityModel.JsonWebTokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "d3h1/BaMeylKTkdP6XwRCxuOoDJZ44V9xaXr6gl5QxmpnZGdoK3bySo3OQN8ehRLJHShb94ElLUvoXyglQtgAw==",
+ "resolved": "6.24.0",
+ "contentHash": "XDWrkThcxfuWp79AvAtg5f+uRS1BxkIbJnsG/e8VPzOWkYYuDg33emLjp5EWcwXYYIDsHnVZD/00kM/PYFQc/g==",
"dependencies": {
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Tokens": "6.24.0",
+ "System.Text.Encoding": "4.3.0",
+ "System.Text.Json": "4.7.2"
}
},
"Microsoft.IdentityModel.Logging": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "tuEhHIQwvBEhMf8I50hy8FHmRSUkffDFP5EdLsSDV4qRcl2wvOPkQxYqEzWkh+ytW6sbdJGEXElGhmhDfAxAKg==",
+ "resolved": "6.24.0",
+ "contentHash": "qLYWDOowM/zghmYKXw1yfYKlHOdS41i8t4hVXr9bSI90zHqhyhQh9GwVy8pENzs5wHeytU23DymluC9NtgYv7w==",
"dependencies": {
- "Microsoft.IdentityModel.Abstractions": "6.21.0"
+ "Microsoft.IdentityModel.Abstractions": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "0FqY5cTLQKtHrClzHEI+QxJl8OBT2vUiEQQB7UKk832JDiJJmetzYZ3AdSrPjN/3l3nkhByeWzXnhrX0JbifKg==",
+ "resolved": "6.24.0",
+ "contentHash": "+NzKCkvsQ8X1r/Ff74V7CFr9OsdMRaB6DsV+qpH7NNLdYJ8O4qHbmTnNEsjFcDmk/gVNDwhoL2gN5pkPVq0lwQ==",
"dependencies": {
- "Microsoft.IdentityModel.Logging": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Logging": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols.OpenIdConnect": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "vtSKL7n6EnAsLyxmiviusm6LKrblT2ndnNqN6rvVq6iIHAnPCK9E2DkDx6h1Jrpy1cvbp40r0cnTg23nhEAGTA==",
+ "resolved": "6.24.0",
+ "contentHash": "a/2RRrc8C9qaw8qdD9hv1ES9YKFgxaqr/SnwMSLbwQZJSUQDd4qx1K4EYgWaQWs73R+VXLyKSxN0f/uE9CsBiQ==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols": "6.21.0",
- "System.IdentityModel.Tokens.Jwt": "6.21.0"
+ "Microsoft.IdentityModel.Protocols": "6.24.0",
+ "System.IdentityModel.Tokens.Jwt": "6.24.0"
}
},
"Microsoft.IdentityModel.Tokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "AAEHZvZyb597a+QJSmtxH3n2P1nIJGpZ4Q89GTenknRx6T6zyfzf592yW/jA5e8EHN4tNMjjXHQaYWEq5+L05w==",
+ "resolved": "6.24.0",
+ "contentHash": "ZPqHi86UYuqJXJ7bLnlEctHKkPKT4lGUFbotoCNiXNCSL02emYlcxzGYsRGWWmbFEcYDMi2dcTLLYNzHqWOTsw==",
"dependencies": {
"Microsoft.CSharp": "4.5.0",
- "Microsoft.IdentityModel.Logging": "6.21.0",
+ "Microsoft.IdentityModel.Logging": "6.24.0",
"System.Security.Cryptography.Cng": "4.5.0"
}
},
@@ -1056,13 +1032,13 @@
},
"Newtonsoft.Json": {
"type": "Transitive",
- "resolved": "13.0.1",
- "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
+ "resolved": "13.0.3",
+ "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ=="
},
"Npgsql": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "7UVPYy2RP0ci04PED1tc9ZCaTw/DfSdSkLiGEFCAvwMwsgA/bAluj1liNzP1IpN0MFofnOF0cm1zJfmbEuCehg==",
+ "resolved": "7.0.6",
+ "contentHash": "TAqvwRnm3NJ0QvN7cvu6geJkbI0XPzGVRElVY5hF4gsgA+BnE12x6GM1TLhdeq+7ZKvvo3BD8jXKnXmr3tvdEw==",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "6.0.0",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
@@ -1070,13 +1046,13 @@
},
"Npgsql.EntityFrameworkCore.PostgreSQL": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "ZYMtyG6pmLtUsFAx0/XaIlVkJM+1gArWEKD55cLLxiVlGScAphjiGj+G7Gk16yg5lhhdWx+bgXWpIUISXuS33g==",
+ "resolved": "7.0.11",
+ "contentHash": "cHEgEz0ldXc9wVANs8sJqC+3eilqefrkasCBgaVT0tyj8tb1p3/pwy2ngjboNkDG3M0z+xJsJ4jC5p8wySAM3w==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, 8.0.0)",
- "Npgsql": "7.0.4"
+ "Microsoft.EntityFrameworkCore": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.11, 8.0.0)",
+ "Npgsql": "7.0.6"
}
},
"NSec.Cryptography": {
@@ -1399,8 +1375,8 @@
},
"Serilog.Sinks.SyslogMessages": {
"type": "Transitive",
- "resolved": "2.0.6",
- "contentHash": "V2Yq2GEbk7taEPbpBLFzLXhrHrUzKf4sQu/zLrANU8XIoUn/Mr08M2E8PrcrWVXCj0R4xLMWYe0Z1sxOrMF3IA==",
+ "resolved": "2.0.9",
+ "contentHash": "y7J+/h/Nf5EAtbpa6lC1nDhK/F9kC5oxuVYmQivv242Oh4hAVMeoAk5Gv6bgb/KbmqufGPXUFkX/AlcrvZ8Ywg==",
"dependencies": {
"Serilog": "2.5.0",
"Serilog.Sinks.PeriodicBatching": "2.3.0"
@@ -1533,8 +1509,8 @@
},
"System.Configuration.ConfigurationManager": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "7T+m0kDSlIPTHIkPMIu6m6tV6qsMqJpvQWW2jIc2qi7sn40qxFo0q+7mEQAhMPXZHMKnWrnv47ntGlM/ejvw3g==",
+ "resolved": "6.0.1",
+ "contentHash": "jXw9MlUu/kRfEU0WyTptAVueupqIeE3/rl0EZDMlf8pcvJnitQ8HeVEp69rZdaStXwTV72boi/Bhw8lOeO+U2w==",
"dependencies": {
"System.Security.Cryptography.ProtectedData": "6.0.0",
"System.Security.Permissions": "6.0.0"
@@ -1693,11 +1669,11 @@
},
"System.IdentityModel.Tokens.Jwt": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "JRD8AuypBE+2zYxT3dMJomQVsPYsCqlyZhWel3J1d5nzQokSRyTueF+Q4ID3Jcu6zSZKuzOdJ1MLTkbQsDqcvQ==",
+ "resolved": "6.24.0",
+ "contentHash": "Qibsj9MPWq8S/C0FgvmsLfIlHLE7ay0MJIaAmK94ivN3VyDdglqReed5qMvdQhSL0BzK6v0Z1wB/sD88zVu6Jw==",
"dependencies": {
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"System.IO": {
@@ -2133,10 +2109,10 @@
},
"System.Runtime.Caching": {
"type": "Transitive",
- "resolved": "5.0.0",
- "contentHash": "30D6MkO8WF9jVGWZIP0hmCN8l9BTY4LCsAzLIe4xFSXzs+AjDotR7DpSmj27pFskDURzUvqYYY0ikModgBTxWw==",
+ "resolved": "6.0.0",
+ "contentHash": "E0e03kUp5X2k+UAoVl6efmI7uU7JRBWi5EIdlQ7cr0NpBGjHG4fWII35PgsBY9T4fJQ8E4QPsL0rKksU9gcL5A==",
"dependencies": {
- "System.Configuration.ConfigurationManager": "5.0.0"
+ "System.Configuration.ConfigurationManager": "6.0.0"
}
},
"System.Runtime.CompilerServices.Unsafe": {
@@ -2666,11 +2642,10 @@
"BitPay.Light": "[1.0.1907, )",
"Braintree": "[5.19.0, )",
"DnsClient": "[1.7.0, )",
+ "Duende.IdentityServer": "[6.0.4, )",
"Fido2.AspNet": "[3.0.1, )",
- "Handlebars.Net": "[2.1.2, )",
- "IdentityServer4": "[4.1.2, )",
- "IdentityServer4.AccessTokenValidation": "[3.0.1, )",
- "LaunchDarkly.ServerSdk": "[7.0.0, )",
+ "Handlebars.Net": "[2.1.4, )",
+ "LaunchDarkly.ServerSdk": "[8.0.0, )",
"MailKit": "[4.2.0, )",
"Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )",
"Microsoft.Azure.Cosmos.Table": "[1.0.8, )",
@@ -2680,7 +2655,7 @@
"Microsoft.Extensions.Configuration.EnvironmentVariables": "[6.0.1, )",
"Microsoft.Extensions.Configuration.UserSecrets": "[6.0.1, )",
"Microsoft.Extensions.Identity.Stores": "[6.0.4, )",
- "Newtonsoft.Json": "[13.0.1, )",
+ "Newtonsoft.Json": "[13.0.3, )",
"Otp.NET": "[1.2.2, )",
"Quartz": "[3.4.0, )",
"SendGrid": "[9.27.0, )",
@@ -2689,7 +2664,7 @@
"Serilog.Extensions.Logging": "[3.1.0, )",
"Serilog.Extensions.Logging.File": "[2.0.0, )",
"Serilog.Sinks.AzureCosmosDB": "[2.0.0, )",
- "Serilog.Sinks.SyslogMessages": "[2.0.6, )",
+ "Serilog.Sinks.SyslogMessages": "[2.0.9, )",
"Stripe.net": "[40.0.0, )",
"YubicoDotNetClient": "[1.2.0, )"
}
@@ -2697,29 +2672,29 @@
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "Dapper": "[2.0.123, )"
+ "Core": "[2023.12.0, )",
+ "Dapper": "[2.1.24, )"
}
},
"infrastructure.entityframework": {
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )",
- "Core": "[2023.10.2, )",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )",
- "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )",
- "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )",
- "Npgsql.EntityFrameworkCore.PostgreSQL": "[7.0.4, )",
+ "Core": "[2023.12.0, )",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.14, )",
+ "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.14, )",
+ "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.14, )",
+ "Npgsql.EntityFrameworkCore.PostgreSQL": "[7.0.11, )",
"Pomelo.EntityFrameworkCore.MySql": "[7.0.0, )",
- "linq2db.EntityFrameworkCore": "[7.5.0, )"
+ "linq2db.EntityFrameworkCore": "[7.6.0, )"
}
},
"sharedweb": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "Infrastructure.Dapper": "[2023.10.2, )",
- "Infrastructure.EntityFramework": "[2023.10.2, )"
+ "Core": "[2023.12.0, )",
+ "Infrastructure.Dapper": "[2023.12.0, )",
+ "Infrastructure.EntityFramework": "[2023.12.0, )"
}
}
}
diff --git a/src/SharedWeb/Utilities/ServiceCollectionExtensions.cs b/src/SharedWeb/Utilities/ServiceCollectionExtensions.cs
index c12c849e37..a526ee7420 100644
--- a/src/SharedWeb/Utilities/ServiceCollectionExtensions.cs
+++ b/src/SharedWeb/Utilities/ServiceCollectionExtensions.cs
@@ -33,10 +33,10 @@ using Bit.Core.Vault.Services;
using Bit.Infrastructure.Dapper;
using Bit.Infrastructure.EntityFramework;
using DnsClient;
+using Duende.IdentityServer.Configuration;
using IdentityModel;
-using IdentityServer4.AccessTokenValidation;
-using IdentityServer4.Configuration;
using Microsoft.AspNetCore.Authentication.Cookies;
+using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.DataProtection;
@@ -168,18 +168,18 @@ public static class ServiceCollectionExtensions
SsoTokenable.DataProtectorPurpose,
serviceProvider.GetDataProtectionProvider(),
serviceProvider.GetRequiredService>>()));
- services.AddSingleton>(serviceProvider =>
- new DataProtectorTokenFactory(
- WebAuthnLoginTokenable.ClearTextPrefix,
- WebAuthnLoginTokenable.DataProtectorPurpose,
- serviceProvider.GetDataProtectionProvider(),
- serviceProvider.GetRequiredService>>()));
services.AddSingleton>(serviceProvider =>
new DataProtectorTokenFactory(
WebAuthnCredentialCreateOptionsTokenable.ClearTextPrefix,
WebAuthnCredentialCreateOptionsTokenable.DataProtectorPurpose,
serviceProvider.GetDataProtectionProvider(),
serviceProvider.GetRequiredService>>()));
+ services.AddSingleton>(serviceProvider =>
+ new DataProtectorTokenFactory(
+ WebAuthnLoginAssertionOptionsTokenable.ClearTextPrefix,
+ WebAuthnLoginAssertionOptionsTokenable.DataProtectorPurpose,
+ serviceProvider.GetDataProtectionProvider(),
+ serviceProvider.GetRequiredService>>()));
services.AddSingleton>(serviceProvider =>
new DataProtectorTokenFactory(
SsoEmail2faSessionTokenable.ClearTextPrefix,
@@ -435,16 +435,24 @@ public static class ServiceCollectionExtensions
this IServiceCollection services, GlobalSettings globalSettings, IWebHostEnvironment environment,
Action addAuthorization)
{
- services
- .AddAuthentication(IdentityServerAuthenticationDefaults.AuthenticationScheme)
- .AddIdentityServerAuthentication(options =>
+ services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
+ .AddJwtBearer(options =>
{
+ options.MapInboundClaims = false;
options.Authority = globalSettings.BaseServiceUri.InternalIdentity;
options.RequireHttpsMetadata = !environment.IsDevelopment() &&
globalSettings.BaseServiceUri.InternalIdentity.StartsWith("https");
- options.TokenRetriever = TokenRetrieval.FromAuthorizationHeaderOrQueryString();
- options.NameClaimType = ClaimTypes.Email;
- options.SupportedTokens = SupportedTokens.Jwt;
+ options.TokenValidationParameters.ValidateAudience = false;
+ options.TokenValidationParameters.ValidTypes = new[] { "at+jwt" };
+ options.TokenValidationParameters.NameClaimType = ClaimTypes.Email;
+ options.Events = new JwtBearerEvents
+ {
+ OnMessageReceived = (context) =>
+ {
+ context.Token = TokenRetrieval.FromAuthorizationHeaderOrQueryString()(context.Request);
+ return Task.CompletedTask;
+ }
+ };
});
if (addAuthorization != null)
diff --git a/src/SharedWeb/packages.lock.json b/src/SharedWeb/packages.lock.json
index 1310a5c61c..e444c7fb92 100644
--- a/src/SharedWeb/packages.lock.json
+++ b/src/SharedWeb/packages.lock.json
@@ -173,8 +173,8 @@
},
"Dapper": {
"type": "Transitive",
- "resolved": "2.0.123",
- "contentHash": "RDFF4rBLLmbpi6pwkY7q/M6UXHRJEOerplDGE5jwEkP/JGJnBauAClYavNKJPW1yOTWRPIyfj4is3EaJxQXILQ=="
+ "resolved": "2.1.24",
+ "contentHash": "/2t2vsdJyZRsk13AsWigZpsuFvEwK+o3v862cEULXoww905gyKhJFSuwmZI/4Ui9COX9ZCFCI09UHyH4wVYl3A=="
},
"DnsClient": {
"type": "Transitive",
@@ -184,6 +184,24 @@
"Microsoft.Win32.Registry": "5.0.0"
}
},
+ "Duende.IdentityServer": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "4HVjzx1F8v5J+U7oa8RGAQGj2QzmzNSu87r18Sh+dlh10uyZZL8teAaT/FaVLDObnfItGdPFvN8mwpF/HkI3Xw==",
+ "dependencies": {
+ "Duende.IdentityServer.Storage": "6.0.4",
+ "Microsoft.AspNetCore.Authentication.OpenIdConnect": "6.0.0"
+ }
+ },
+ "Duende.IdentityServer.Storage": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "s5gAjfbpr2IMgI+fU2Nx+2AZdzstmbt9gpo13iX7GwvqSeSaBVqj9ZskAN0R2KF1OemPdZuGnfaTcevdXMUrrw==",
+ "dependencies": {
+ "IdentityModel": "6.0.0",
+ "Microsoft.AspNetCore.DataProtection.Abstractions": "6.0.0"
+ }
+ },
"Fido2": {
"type": "Transitive",
"resolved": "3.0.1",
@@ -212,57 +230,16 @@
},
"Handlebars.Net": {
"type": "Transitive",
- "resolved": "2.1.2",
- "contentHash": "p60QyeBYpZmcZdIXRMqs9XySIBaxJ0lj3+QD0EJVr4ybTigOTCumXMMin5dPwjo9At1UwkDZ3gGwa1lmGjG6DA==",
+ "resolved": "2.1.4",
+ "contentHash": "Od7MWDfGxYKRtxETFMlcvCrY8hAqyuXZDX4EsOfiI/jzh+PVBuVxazHBC1HmVqTKX1JnRtoxIMcH95K9UFlYog==",
"dependencies": {
"Microsoft.CSharp": "4.7.0"
}
},
"IdentityModel": {
"type": "Transitive",
- "resolved": "4.4.0",
- "contentHash": "b18wrIx5wnZlMxAX7oVsE+nDtAJ4hajYlH0xPlaRvo4r/fz08K6pPeZvbiqS9nfNbzfIgLFmNX+FL9qR9ZR5PA==",
- "dependencies": {
- "Newtonsoft.Json": "11.0.2",
- "System.Text.Encodings.Web": "4.7.0"
- }
- },
- "IdentityModel.AspNetCore.OAuth2Introspection": {
- "type": "Transitive",
- "resolved": "4.0.1",
- "contentHash": "ZNdMZMaj9fqR3j50vYsu+1U3QGd6n8+fqwf+a8mCTcmXGor+HgFDfdq0mM34bsmD6uEgAQup7sv2ZW5kR36dbA==",
- "dependencies": {
- "IdentityModel": "4.0.0"
- }
- },
- "IdentityServer4": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "blaxxGuOA7v/w1q+fxn97wZ+x2ecG1ZD4mc/N/ZOXMNeFZZhqv+4LF26Gecyik3nWrJPmbMEtQbLmRsKG8k61w==",
- "dependencies": {
- "IdentityModel": "4.4.0",
- "IdentityServer4.Storage": "4.1.2",
- "Microsoft.AspNetCore.Authentication.OpenIdConnect": "3.1.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.6.0",
- "Newtonsoft.Json": "12.0.2"
- }
- },
- "IdentityServer4.AccessTokenValidation": {
- "type": "Transitive",
- "resolved": "3.0.1",
- "contentHash": "qu/M6UyN4o9NVep7q545Ms7hYAnsQqSdLbN1Fjjrn4m35lyBfeQPSSNzDryAKHbodyWOQfHaOqKEyMEJQ5Rpgw==",
- "dependencies": {
- "IdentityModel.AspNetCore.OAuth2Introspection": "4.0.1",
- "Microsoft.AspNetCore.Authentication.JwtBearer": "3.0.0"
- }
- },
- "IdentityServer4.Storage": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "KoSffyZyyeCNTIyJiZnCuPakJ1QbCHlpty6gbWUj/7yl+w0PXIchgmmJnJSvddzBb8iZ2xew/vGlxWUIP17P2g==",
- "dependencies": {
- "IdentityModel": "4.4.0"
- }
+ "resolved": "6.0.0",
+ "contentHash": "eVHCR7a6m/dm5RFcBzE3qs/Jg5j9R5Rjpu8aTOv9e4AFvaQtBXb5ah7kmwU+YwA0ufRwz4wf1hnIvsD2hSnI4g=="
},
"LaunchDarkly.Cache": {
"type": "Transitive",
@@ -271,26 +248,27 @@
},
"LaunchDarkly.CommonSdk": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "YYYq+41gZRMQ8dIoMC6HOq/dI+4RY3HsexLLAaE9T1+1tVMeQkbCqak7sVeKX4QcE7xlXx23lWgipYUkRoRUyw==",
+ "resolved": "6.2.0",
+ "contentHash": "eLeb+tTNLwOxlUIsZWzJlcPmG9Wyf20NYyucP6MW6aqKW6doKFeSO+aJe0z+WyijbvfX1Dp1U1HQatOu6fa1Gg==",
"dependencies": {
+ "LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
},
"LaunchDarkly.EventSource": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "DN44Ry5M4lyrjiF7LEu0Ijco7Wm8R7mJopN+giYsYjkQlszsXdFvm3POoehIDAOtL1HHl5bZvF9k9xK034u3IA==",
+ "resolved": "5.1.0",
+ "contentHash": "PztDWiMvPWODx+kfBnCroZ8Lpya4nPc7ZO4TZysOogODbVXDDPDYrdcgVivCMgf4davhGrp61ekvZc+Uy1NYMA==",
"dependencies": {
- "LaunchDarkly.Logging": "[1.0.1, 3.0.0)"
+ "LaunchDarkly.Logging": "[2.0.0, 3.0.0)"
}
},
"LaunchDarkly.InternalSdk": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "jW8VEfFciuCcJUEuvSzmrbMVYYXwGL/ZWHUZLiA4aDOQ1LcEXp32uK405NQW/izEypUfWB+9TaSjPpFIC+5Wzw==",
+ "resolved": "3.3.0",
+ "contentHash": "TBvs/B6iyXp9MqRKjIoBZ/T0+/xgp5xg+MuHqr5U+N5+7DghtI2FnsmgeBedTIeQdA3Tk8Z4Bj4hlqU9FBiEnw==",
"dependencies": {
- "LaunchDarkly.CommonSdk": "6.0.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
"LaunchDarkly.Logging": "[2.0.0, 3.0.0)",
"System.Collections.Immutable": "1.7.1"
}
@@ -305,13 +283,13 @@
},
"LaunchDarkly.ServerSdk": {
"type": "Transitive",
- "resolved": "7.0.0",
- "contentHash": "gkTWb+f5QlsXIqFAciBef3qKZU2y0Hy3Fpt4pvZoxNcnBKg2PNTDSnbpbYEKPeQ1yk1avNaI/tKprnahfrmJFg==",
+ "resolved": "8.0.0",
+ "contentHash": "vosFEXYJABuIDIA0+6sncalTmrKXEkBKeqzuP9/vvcCVlFSXUl/ZnrkrAVg3ViDWDi7kjpJSk2W3h5D0TUfCGA==",
"dependencies": {
"LaunchDarkly.Cache": "1.0.2",
- "LaunchDarkly.CommonSdk": "6.0.0",
- "LaunchDarkly.EventSource": "5.0.1",
- "LaunchDarkly.InternalSdk": "3.1.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
+ "LaunchDarkly.EventSource": "5.1.0",
+ "LaunchDarkly.InternalSdk": "3.3.0",
"LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
@@ -323,16 +301,16 @@
},
"linq2db": {
"type": "Transitive",
- "resolved": "5.2.1",
- "contentHash": "OOBM8s39zhbZAgqFnl2KGxT5RqBDw21X69U528qV2PgQispaA3f+or0ILrLEgnNIJuB4EBgaw8gC6ttSHn4X0Q=="
+ "resolved": "5.3.1",
+ "contentHash": "707mIbEmtptvKeUW940UwoNwq05I7OUu0VWtclLtyYaASp+ugX4I/Er1UVpeldsDawqlVMXB5EQ5/Oar6AkUGQ=="
},
"linq2db.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.5.0",
- "contentHash": "ePHzO99xbObgMLlAFh08of1SnVhg6j4Su9327DrIB7RZWCgtQIX6k+nbl+HRVOooAndZSs7b+DduSgdnJjaJGw==",
+ "resolved": "7.6.0",
+ "contentHash": "T1W9o8wVzApsUwu7SRg/L7487kaiLQYt2AqRVnXVGfobD+ZKy2oRsUMws0PICtciaz4qbfLp/r/+NksfuYsFlw==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Relational": "7.0.0",
- "linq2db": "5.2.1"
+ "linq2db": "5.3.1"
}
},
"MailKit": {
@@ -353,10 +331,10 @@
},
"Microsoft.AspNetCore.Authentication.OpenIdConnect": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "O1cAQYUTU8EfRqwc5/rfTns4E4hKlFlg59fuKRrST+PzsxI6H07KqRN/JjdYhAuVYxF8jPnIGbj+zuc5paOWUw==",
+ "resolved": "6.0.0",
+ "contentHash": "cJxdro36spFzk/K2OFCddM6vZ+yoj6ug8mTFRH3Gdv1Pul/buSuCtfb/FSCp31UmS5S4C1315dU7wX3ErLFuDg==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.5.0"
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.10.0"
}
},
"Microsoft.AspNetCore.Cryptography.Internal": {
@@ -389,8 +367,8 @@
},
"Microsoft.AspNetCore.DataProtection.Abstractions": {
"type": "Transitive",
- "resolved": "3.1.32",
- "contentHash": "MPL4iVyiaRxnOUY5VATHjvhDWaAEFb77KFiUxVRklv3Z3v+STofUr1UG/aCt1O9cgN7FVTDaC5A7U+zsLub8Xg=="
+ "resolved": "6.0.0",
+ "contentHash": "Z/UU4NEBm5UgNufJmw+j5baW26ytCOIZ0G7sZocPaOzsUeBon1bkM3lSMNZQG2GmDjAIVP2XMSODf2jzSGbibw=="
},
"Microsoft.Azure.Amqp": {
"type": "Transitive",
@@ -475,48 +453,44 @@
},
"Microsoft.Data.SqlClient": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "uu8dfrsx081cSbEevWuZAvqdmANDGJkbLBL2G3j0LAZxX1Oy8RCVAaC4Lcuak6jNicWP6CWvHqBTIEmQNSxQlw==",
+ "resolved": "5.1.1",
+ "contentHash": "MW5E9HFvCaV069o8b6YpuRDPBux8s96qDnOJ+4N9QNUCs7c5W3KxwQ+ftpAjbMUlImL+c9WR+l+f5hzjkqhu2g==",
"dependencies": {
- "Azure.Identity": "1.6.0",
- "Microsoft.Data.SqlClient.SNI.runtime": "5.0.1",
- "Microsoft.Identity.Client": "4.45.0",
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.21.0",
+ "Azure.Identity": "1.7.0",
+ "Microsoft.Data.SqlClient.SNI.runtime": "5.1.0",
+ "Microsoft.Identity.Client": "4.47.2",
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.24.0",
"Microsoft.SqlServer.Server": "1.0.0",
- "Microsoft.Win32.Registry": "5.0.0",
- "System.Buffers": "4.5.1",
- "System.Configuration.ConfigurationManager": "5.0.0",
- "System.Diagnostics.DiagnosticSource": "5.0.0",
- "System.IO": "4.3.0",
- "System.Resources.ResourceManager": "4.3.0",
- "System.Runtime.Caching": "5.0.0",
+ "System.Configuration.ConfigurationManager": "6.0.1",
+ "System.Diagnostics.DiagnosticSource": "6.0.0",
+ "System.Runtime.Caching": "6.0.0",
"System.Security.Cryptography.Cng": "5.0.0",
"System.Security.Principal.Windows": "5.0.0",
- "System.Text.Encoding.CodePages": "5.0.0",
- "System.Text.Encodings.Web": "4.7.2"
+ "System.Text.Encoding.CodePages": "6.0.0",
+ "System.Text.Encodings.Web": "6.0.0"
}
},
"Microsoft.Data.SqlClient.SNI.runtime": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "y0X5MxiNdbITJYoafJ2ruaX6hqO0twpCGR/ipiDOe85JKLU8WL4TuAQfDe5qtt3bND5Je26HnrarLSAMMnVTNg=="
+ "resolved": "5.1.0",
+ "contentHash": "jVsElisM5sfBzaaV9kdq2NXZLwIbytetnsOIlJ0cQGgQP4zFNBmkfHBnpwtmKrtBJBEV9+9PVQPVrcCVhDgcIg=="
},
"Microsoft.Data.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "FTerRmQPqHrCrnoUzhBu+E+1DNGwyrAMLqHkAqOOOu5pGfyMOj8qQUBxI/gDtWtG11p49UxSfWmBzRNlwZqfUg==",
+ "resolved": "7.0.14",
+ "contentHash": "qvYae3/v9Fvqsjp/7OKQBuJK+Uc3m/WctfpIUMmGMDot2Bd8UWBKiMSlh26UtfQa9x4N+k7NxCT+AbZVoNrCdg==",
"dependencies": {
"SQLitePCLRaw.core": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "RXbRLHHWP2Z3pq8qcL5nQ6LPeoOyp8hasM5bd0Te8PiQi3RjWQR4tcbdY5XMqQ+oTO9wA8/RLhZRn/hnxlTDnQ==",
+ "resolved": "7.0.14",
+ "contentHash": "0KYkAemPygW6yzifciFlmMzkO4sI4Dw69xLgwg3ui5rXJS5XvzuAWVvfdrKJciqeCbCnVS/ZbOWpcwWgqce5bQ==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Abstractions": "7.0.5",
- "Microsoft.EntityFrameworkCore.Analyzers": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Abstractions": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Analyzers": "7.0.14",
"Microsoft.Extensions.Caching.Memory": "7.0.0",
"Microsoft.Extensions.DependencyInjection": "7.0.0",
"Microsoft.Extensions.Logging": "7.0.0"
@@ -524,49 +498,49 @@
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "iwQso+hFRsEWjhH2WsEQj1D2QE5BlEXiXEt6A3SlYTPRPdZsyTNDeDDEdtxL+H/UJPQgQYY+9SMMRcEiXBmCAA=="
+ "resolved": "7.0.14",
+ "contentHash": "aEcXDSYpDdD5wdIRKTqcS44f3W4capqQ1BWVRPJgacATfHkO62RX9Nnh0hUFg+rei9OLuJp0Y4zsy1fNeOXv5g=="
},
"Microsoft.EntityFrameworkCore.Analyzers": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "yMLM/aK1MikVqpjxd7PJ1Pjgztd3VAd26ZHxyjxG3RPeM9cHjvS5tCg9kAAayR6eHmBg0ffZsHdT28WfA5tTlA=="
+ "resolved": "7.0.14",
+ "contentHash": "esI4RF6mix4DDFBhWB9k1vJxAL8GouSf5ZV8oFJoVsIQ9d2J3MPgC1VL2qM9Vw5cH7Vg7TzRyKNpCRXFVkWs9w=="
},
"Microsoft.EntityFrameworkCore.Relational": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "u/33DC4S6g2hpMPgBc5Kdnlz//nqHR5c/ovgjtiP/wQ7sOd0EOdygVzUJAAOxCwbtAHDsJXS9Vc3jLFYq0yu8Q==",
+ "resolved": "7.0.14",
+ "contentHash": "MrVBnWOFYwfLMGQfrcIuqEM9Xvokv1vJeYxqNH3K3xOtAdHwHQTrKnpDP97tU+LBlvcnyXAtAtryYcpLXWtRNA==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "7.0.5",
+ "Microsoft.EntityFrameworkCore": "7.0.14",
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.Sqlite": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "2XPZB9OLF5/m13HgZp7/Dv0u8FWEJzcaBsMYR9Kp3R6aygkb3RnOijofPDTsmdhAqG9YTysCmh2bFaGs0TCc7A==",
+ "resolved": "7.0.14",
+ "contentHash": "8c8Hw2tmfy5YEsi9RL2/u2Qi9IwVbmj/yDlJy4iJPadeE3/AssLrgtobOBz4ftg2y5PVjFL59Gq7YzGLQH5q1A==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.14",
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "4C+9ct6A/Bq61Ta9Uh2td4/XwNpRCiPI03SWTa3hPJjA/g8wCw2hetbh3DDe5HcydzgDq/lRRjU/eRy3UODklQ==",
+ "resolved": "7.0.14",
+ "contentHash": "JNUkZVff1V/A/P3JiBbgt+Y2oCQSuzORxE3jOqFDbFjSFu7jHDEetJ/afSF/taa0lbyN9OpvaKjsbKk3Iis29Q==",
"dependencies": {
- "Microsoft.Data.Sqlite.Core": "7.0.5",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5",
+ "Microsoft.Data.Sqlite.Core": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14",
"Microsoft.Extensions.DependencyModel": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.SqlServer": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "cUJqCiamT0EvpKNgZEV5fqNv2MyVfKNgOPQfFINqHiIKHOYrS0nTCUJP97+UuG0JIIrP792/PwnuNjbekImtBg==",
+ "resolved": "7.0.14",
+ "contentHash": "d9hqEw4W/TdQ1WDm03uyFuDoehL6GNq/NMChFaC4dcV60I42vKdUC0fYTuE2QPunVUpf5XUTCkJ6fYGjMos2AA==",
"dependencies": {
- "Microsoft.Data.SqlClient": "5.0.1",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5"
+ "Microsoft.Data.SqlClient": "5.1.1",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14"
}
},
"Microsoft.Extensions.Caching.Abstractions": {
@@ -819,50 +793,52 @@
},
"Microsoft.IdentityModel.Abstractions": {
"type": "Transitive",
- "resolved": "6.22.0",
- "contentHash": "iI+9V+2ciCrbheeLjpmjcqCnhy+r6yCoEcid3nkoFWerHgjVuT6CPM4HODUTtUPe1uwks4wcnAujJ8u+IKogHQ=="
+ "resolved": "6.24.0",
+ "contentHash": "X6aBK56Ot15qKyG7X37KsPnrwah+Ka55NJWPppWVTDi8xWq7CJgeNw2XyaeHgE1o/mW4THwoabZkBbeG2TPBiw=="
},
"Microsoft.IdentityModel.JsonWebTokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "d3h1/BaMeylKTkdP6XwRCxuOoDJZ44V9xaXr6gl5QxmpnZGdoK3bySo3OQN8ehRLJHShb94ElLUvoXyglQtgAw==",
+ "resolved": "6.24.0",
+ "contentHash": "XDWrkThcxfuWp79AvAtg5f+uRS1BxkIbJnsG/e8VPzOWkYYuDg33emLjp5EWcwXYYIDsHnVZD/00kM/PYFQc/g==",
"dependencies": {
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Tokens": "6.24.0",
+ "System.Text.Encoding": "4.3.0",
+ "System.Text.Json": "4.7.2"
}
},
"Microsoft.IdentityModel.Logging": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "tuEhHIQwvBEhMf8I50hy8FHmRSUkffDFP5EdLsSDV4qRcl2wvOPkQxYqEzWkh+ytW6sbdJGEXElGhmhDfAxAKg==",
+ "resolved": "6.24.0",
+ "contentHash": "qLYWDOowM/zghmYKXw1yfYKlHOdS41i8t4hVXr9bSI90zHqhyhQh9GwVy8pENzs5wHeytU23DymluC9NtgYv7w==",
"dependencies": {
- "Microsoft.IdentityModel.Abstractions": "6.21.0"
+ "Microsoft.IdentityModel.Abstractions": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "0FqY5cTLQKtHrClzHEI+QxJl8OBT2vUiEQQB7UKk832JDiJJmetzYZ3AdSrPjN/3l3nkhByeWzXnhrX0JbifKg==",
+ "resolved": "6.24.0",
+ "contentHash": "+NzKCkvsQ8X1r/Ff74V7CFr9OsdMRaB6DsV+qpH7NNLdYJ8O4qHbmTnNEsjFcDmk/gVNDwhoL2gN5pkPVq0lwQ==",
"dependencies": {
- "Microsoft.IdentityModel.Logging": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Logging": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols.OpenIdConnect": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "vtSKL7n6EnAsLyxmiviusm6LKrblT2ndnNqN6rvVq6iIHAnPCK9E2DkDx6h1Jrpy1cvbp40r0cnTg23nhEAGTA==",
+ "resolved": "6.24.0",
+ "contentHash": "a/2RRrc8C9qaw8qdD9hv1ES9YKFgxaqr/SnwMSLbwQZJSUQDd4qx1K4EYgWaQWs73R+VXLyKSxN0f/uE9CsBiQ==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols": "6.21.0",
- "System.IdentityModel.Tokens.Jwt": "6.21.0"
+ "Microsoft.IdentityModel.Protocols": "6.24.0",
+ "System.IdentityModel.Tokens.Jwt": "6.24.0"
}
},
"Microsoft.IdentityModel.Tokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "AAEHZvZyb597a+QJSmtxH3n2P1nIJGpZ4Q89GTenknRx6T6zyfzf592yW/jA5e8EHN4tNMjjXHQaYWEq5+L05w==",
+ "resolved": "6.24.0",
+ "contentHash": "ZPqHi86UYuqJXJ7bLnlEctHKkPKT4lGUFbotoCNiXNCSL02emYlcxzGYsRGWWmbFEcYDMi2dcTLLYNzHqWOTsw==",
"dependencies": {
"Microsoft.CSharp": "4.5.0",
- "Microsoft.IdentityModel.Logging": "6.21.0",
+ "Microsoft.IdentityModel.Logging": "6.24.0",
"System.Security.Cryptography.Cng": "4.5.0"
}
},
@@ -993,13 +969,13 @@
},
"Newtonsoft.Json": {
"type": "Transitive",
- "resolved": "13.0.1",
- "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
+ "resolved": "13.0.3",
+ "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ=="
},
"Npgsql": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "7UVPYy2RP0ci04PED1tc9ZCaTw/DfSdSkLiGEFCAvwMwsgA/bAluj1liNzP1IpN0MFofnOF0cm1zJfmbEuCehg==",
+ "resolved": "7.0.6",
+ "contentHash": "TAqvwRnm3NJ0QvN7cvu6geJkbI0XPzGVRElVY5hF4gsgA+BnE12x6GM1TLhdeq+7ZKvvo3BD8jXKnXmr3tvdEw==",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "6.0.0",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
@@ -1007,13 +983,13 @@
},
"Npgsql.EntityFrameworkCore.PostgreSQL": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "ZYMtyG6pmLtUsFAx0/XaIlVkJM+1gArWEKD55cLLxiVlGScAphjiGj+G7Gk16yg5lhhdWx+bgXWpIUISXuS33g==",
+ "resolved": "7.0.11",
+ "contentHash": "cHEgEz0ldXc9wVANs8sJqC+3eilqefrkasCBgaVT0tyj8tb1p3/pwy2ngjboNkDG3M0z+xJsJ4jC5p8wySAM3w==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, 8.0.0)",
- "Npgsql": "7.0.4"
+ "Microsoft.EntityFrameworkCore": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.11, 8.0.0)",
+ "Npgsql": "7.0.6"
}
},
"NSec.Cryptography": {
@@ -1336,8 +1312,8 @@
},
"Serilog.Sinks.SyslogMessages": {
"type": "Transitive",
- "resolved": "2.0.6",
- "contentHash": "V2Yq2GEbk7taEPbpBLFzLXhrHrUzKf4sQu/zLrANU8XIoUn/Mr08M2E8PrcrWVXCj0R4xLMWYe0Z1sxOrMF3IA==",
+ "resolved": "2.0.9",
+ "contentHash": "y7J+/h/Nf5EAtbpa6lC1nDhK/F9kC5oxuVYmQivv242Oh4hAVMeoAk5Gv6bgb/KbmqufGPXUFkX/AlcrvZ8Ywg==",
"dependencies": {
"Serilog": "2.5.0",
"Serilog.Sinks.PeriodicBatching": "2.3.0"
@@ -1470,8 +1446,8 @@
},
"System.Configuration.ConfigurationManager": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "7T+m0kDSlIPTHIkPMIu6m6tV6qsMqJpvQWW2jIc2qi7sn40qxFo0q+7mEQAhMPXZHMKnWrnv47ntGlM/ejvw3g==",
+ "resolved": "6.0.1",
+ "contentHash": "jXw9MlUu/kRfEU0WyTptAVueupqIeE3/rl0EZDMlf8pcvJnitQ8HeVEp69rZdaStXwTV72boi/Bhw8lOeO+U2w==",
"dependencies": {
"System.Security.Cryptography.ProtectedData": "6.0.0",
"System.Security.Permissions": "6.0.0"
@@ -1630,11 +1606,11 @@
},
"System.IdentityModel.Tokens.Jwt": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "JRD8AuypBE+2zYxT3dMJomQVsPYsCqlyZhWel3J1d5nzQokSRyTueF+Q4ID3Jcu6zSZKuzOdJ1MLTkbQsDqcvQ==",
+ "resolved": "6.24.0",
+ "contentHash": "Qibsj9MPWq8S/C0FgvmsLfIlHLE7ay0MJIaAmK94ivN3VyDdglqReed5qMvdQhSL0BzK6v0Z1wB/sD88zVu6Jw==",
"dependencies": {
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"System.IO": {
@@ -2083,10 +2059,10 @@
},
"System.Runtime.Caching": {
"type": "Transitive",
- "resolved": "5.0.0",
- "contentHash": "30D6MkO8WF9jVGWZIP0hmCN8l9BTY4LCsAzLIe4xFSXzs+AjDotR7DpSmj27pFskDURzUvqYYY0ikModgBTxWw==",
+ "resolved": "6.0.0",
+ "contentHash": "E0e03kUp5X2k+UAoVl6efmI7uU7JRBWi5EIdlQ7cr0NpBGjHG4fWII35PgsBY9T4fJQ8E4QPsL0rKksU9gcL5A==",
"dependencies": {
- "System.Configuration.ConfigurationManager": "5.0.0"
+ "System.Configuration.ConfigurationManager": "6.0.0"
}
},
"System.Runtime.CompilerServices.Unsafe": {
@@ -2616,11 +2592,10 @@
"BitPay.Light": "[1.0.1907, )",
"Braintree": "[5.19.0, )",
"DnsClient": "[1.7.0, )",
+ "Duende.IdentityServer": "[6.0.4, )",
"Fido2.AspNet": "[3.0.1, )",
- "Handlebars.Net": "[2.1.2, )",
- "IdentityServer4": "[4.1.2, )",
- "IdentityServer4.AccessTokenValidation": "[3.0.1, )",
- "LaunchDarkly.ServerSdk": "[7.0.0, )",
+ "Handlebars.Net": "[2.1.4, )",
+ "LaunchDarkly.ServerSdk": "[8.0.0, )",
"MailKit": "[4.2.0, )",
"Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )",
"Microsoft.Azure.Cosmos.Table": "[1.0.8, )",
@@ -2630,7 +2605,7 @@
"Microsoft.Extensions.Configuration.EnvironmentVariables": "[6.0.1, )",
"Microsoft.Extensions.Configuration.UserSecrets": "[6.0.1, )",
"Microsoft.Extensions.Identity.Stores": "[6.0.4, )",
- "Newtonsoft.Json": "[13.0.1, )",
+ "Newtonsoft.Json": "[13.0.3, )",
"Otp.NET": "[1.2.2, )",
"Quartz": "[3.4.0, )",
"SendGrid": "[9.27.0, )",
@@ -2639,7 +2614,7 @@
"Serilog.Extensions.Logging": "[3.1.0, )",
"Serilog.Extensions.Logging.File": "[2.0.0, )",
"Serilog.Sinks.AzureCosmosDB": "[2.0.0, )",
- "Serilog.Sinks.SyslogMessages": "[2.0.6, )",
+ "Serilog.Sinks.SyslogMessages": "[2.0.9, )",
"Stripe.net": "[40.0.0, )",
"YubicoDotNetClient": "[1.2.0, )"
}
@@ -2647,21 +2622,21 @@
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "Dapper": "[2.0.123, )"
+ "Core": "[2023.12.0, )",
+ "Dapper": "[2.1.24, )"
}
},
"infrastructure.entityframework": {
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )",
- "Core": "[2023.10.2, )",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )",
- "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )",
- "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )",
- "Npgsql.EntityFrameworkCore.PostgreSQL": "[7.0.4, )",
+ "Core": "[2023.12.0, )",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.14, )",
+ "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.14, )",
+ "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.14, )",
+ "Npgsql.EntityFrameworkCore.PostgreSQL": "[7.0.11, )",
"Pomelo.EntityFrameworkCore.MySql": "[7.0.0, )",
- "linq2db.EntityFrameworkCore": "[7.5.0, )"
+ "linq2db.EntityFrameworkCore": "[7.6.0, )"
}
}
}
diff --git a/src/Sql/Sql.sqlproj b/src/Sql/Sql.sqlproj
index b53ba1aeb3..7c522cf8f4 100644
--- a/src/Sql/Sql.sqlproj
+++ b/src/Sql/Sql.sqlproj
@@ -12,5 +12,11 @@
+
+
+
+
+ 71502
+
-
\ No newline at end of file
+
diff --git a/src/Sql/Vault/dbo/Functions/UserCipherDetails_V2.sql b/src/Sql/Vault/dbo/Functions/UserCipherDetails_V2.sql
new file mode 100644
index 0000000000..203d360d39
--- /dev/null
+++ b/src/Sql/Vault/dbo/Functions/UserCipherDetails_V2.sql
@@ -0,0 +1,61 @@
+CREATE FUNCTION [dbo].[UserCipherDetails_V2](@UserId UNIQUEIDENTIFIER)
+RETURNS TABLE
+AS RETURN
+WITH [CTE] AS (
+ SELECT
+ [Id],
+ [OrganizationId]
+ FROM
+ [OrganizationUser]
+ WHERE
+ [UserId] = @UserId
+ AND [Status] = 2 -- Confirmed
+)
+SELECT
+ C.*,
+ CASE
+ WHEN COALESCE(CU.[ReadOnly], CG.[ReadOnly], 0) = 0
+ THEN 1
+ ELSE 0
+ END [Edit],
+ CASE
+ WHEN COALESCE(CU.[HidePasswords], CG.[HidePasswords], 0) = 0
+ THEN 1
+ ELSE 0
+ END [ViewPassword],
+ CASE
+ WHEN O.[UseTotp] = 1
+ THEN 1
+ ELSE 0
+ END [OrganizationUseTotp]
+FROM
+ [dbo].[CipherDetails](@UserId) C
+INNER JOIN
+ [CTE] OU ON C.[UserId] IS NULL AND C.[OrganizationId] IN (SELECT [OrganizationId] FROM [CTE])
+INNER JOIN
+ [dbo].[Organization] O ON O.[Id] = OU.[OrganizationId] AND O.[Id] = C.[OrganizationId] AND O.[Enabled] = 1
+LEFT JOIN
+ [dbo].[CollectionCipher] CC ON CC.[CipherId] = C.[Id]
+LEFT JOIN
+ [dbo].[CollectionUser] CU ON CU.[CollectionId] = CC.[CollectionId] AND CU.[OrganizationUserId] = OU.[Id]
+LEFT JOIN
+ [dbo].[GroupUser] GU ON CU.[CollectionId] IS NULL AND GU.[OrganizationUserId] = OU.[Id]
+LEFT JOIN
+ [dbo].[Group] G ON G.[Id] = GU.[GroupId]
+LEFT JOIN
+ [dbo].[CollectionGroup] CG ON CG.[CollectionId] = CC.[CollectionId] AND CG.[GroupId] = GU.[GroupId]
+WHERE
+ CU.[CollectionId] IS NOT NULL
+ OR CG.[CollectionId] IS NOT NULL
+
+UNION ALL
+
+SELECT
+ *,
+ 1 [Edit],
+ 1 [ViewPassword],
+ 0 [OrganizationUseTotp]
+FROM
+ [dbo].[CipherDetails](@UserId)
+WHERE
+ [UserId] = @UserId
diff --git a/src/Sql/Vault/dbo/Stored Procedures/Cipher/CipherDetails_ReadByIdUserId_V2.sql b/src/Sql/Vault/dbo/Stored Procedures/Cipher/CipherDetails_ReadByIdUserId_V2.sql
new file mode 100644
index 0000000000..0b2c8515af
--- /dev/null
+++ b/src/Sql/Vault/dbo/Stored Procedures/Cipher/CipherDetails_ReadByIdUserId_V2.sql
@@ -0,0 +1,16 @@
+CREATE PROCEDURE [dbo].[CipherDetails_ReadByIdUserId_V2]
+ @Id UNIQUEIDENTIFIER,
+ @UserId UNIQUEIDENTIFIER
+AS
+BEGIN
+ SET NOCOUNT ON
+
+ SELECT TOP 1
+ *
+ FROM
+ [dbo].[UserCipherDetails_V2](@UserId)
+ WHERE
+ [Id] = @Id
+ ORDER BY
+ [Edit] DESC
+END
diff --git a/src/Sql/Vault/dbo/Stored Procedures/Cipher/CipherDetails_ReadByUserId_V2.sql b/src/Sql/Vault/dbo/Stored Procedures/Cipher/CipherDetails_ReadByUserId_V2.sql
new file mode 100644
index 0000000000..ab021a4f69
--- /dev/null
+++ b/src/Sql/Vault/dbo/Stored Procedures/Cipher/CipherDetails_ReadByUserId_V2.sql
@@ -0,0 +1,11 @@
+CREATE PROCEDURE [dbo].[CipherDetails_ReadByUserId_V2]
+ @UserId UNIQUEIDENTIFIER
+AS
+BEGIN
+ SET NOCOUNT ON
+
+ SELECT
+ *
+ FROM
+ [dbo].[UserCipherDetails_V2](@UserId)
+END
diff --git a/src/Sql/Vault/dbo/Stored Procedures/Cipher/Cipher_Delete_V2.sql b/src/Sql/Vault/dbo/Stored Procedures/Cipher/Cipher_Delete_V2.sql
new file mode 100644
index 0000000000..b57c799347
--- /dev/null
+++ b/src/Sql/Vault/dbo/Stored Procedures/Cipher/Cipher_Delete_V2.sql
@@ -0,0 +1,73 @@
+CREATE PROCEDURE [dbo].[Cipher_Delete_V2]
+ @Ids AS [dbo].[GuidIdArray] READONLY,
+ @UserId AS UNIQUEIDENTIFIER
+AS
+BEGIN
+ SET NOCOUNT ON
+
+ CREATE TABLE #Temp
+ (
+ [Id] UNIQUEIDENTIFIER NOT NULL,
+ [UserId] UNIQUEIDENTIFIER NULL,
+ [OrganizationId] UNIQUEIDENTIFIER NULL,
+ [Attachments] BIT NOT NULL
+ )
+
+ INSERT INTO #Temp
+ SELECT
+ [Id],
+ [UserId],
+ [OrganizationId],
+ CASE WHEN [Attachments] IS NULL THEN 0 ELSE 1 END
+ FROM
+ [dbo].[UserCipherDetails_V2](@UserId)
+ WHERE
+ [Edit] = 1
+ AND [Id] IN (SELECT * FROM @Ids)
+
+ -- Delete ciphers
+ DELETE
+ FROM
+ [dbo].[Cipher]
+ WHERE
+ [Id] IN (SELECT [Id] FROM #Temp)
+
+ -- Cleanup orgs
+ DECLARE @OrgId UNIQUEIDENTIFIER
+ DECLARE [OrgCursor] CURSOR FORWARD_ONLY FOR
+ SELECT
+ [OrganizationId]
+ FROM
+ #Temp
+ WHERE
+ [OrganizationId] IS NOT NULL
+ GROUP BY
+ [OrganizationId]
+ OPEN [OrgCursor]
+ FETCH NEXT FROM [OrgCursor] INTO @OrgId
+ WHILE @@FETCH_STATUS = 0 BEGIN
+ EXEC [dbo].[Organization_UpdateStorage] @OrgId
+ EXEC [dbo].[User_BumpAccountRevisionDateByOrganizationId] @OrgId
+ FETCH NEXT FROM [OrgCursor] INTO @OrgId
+ END
+ CLOSE [OrgCursor]
+ DEALLOCATE [OrgCursor]
+
+ -- Cleanup user
+ DECLARE @UserCiphersWithStorageCount INT
+ SELECT
+ @UserCiphersWithStorageCount = COUNT(1)
+ FROM
+ #Temp
+ WHERE
+ [UserId] IS NOT NULL
+ AND [Attachments] = 1
+
+ IF @UserCiphersWithStorageCount > 0
+ BEGIN
+ EXEC [dbo].[User_UpdateStorage] @UserId
+ END
+ EXEC [dbo].[User_BumpAccountRevisionDate] @UserId
+
+ DROP TABLE #Temp
+END
diff --git a/src/Sql/Vault/dbo/Stored Procedures/Cipher/Cipher_Move_V2.sql b/src/Sql/Vault/dbo/Stored Procedures/Cipher/Cipher_Move_V2.sql
new file mode 100644
index 0000000000..c495c3a260
--- /dev/null
+++ b/src/Sql/Vault/dbo/Stored Procedures/Cipher/Cipher_Move_V2.sql
@@ -0,0 +1,36 @@
+CREATE PROCEDURE [dbo].[Cipher_Move_V2]
+ @Ids AS [dbo].[GuidIdArray] READONLY,
+ @FolderId AS UNIQUEIDENTIFIER,
+ @UserId AS UNIQUEIDENTIFIER
+AS
+BEGIN
+ SET NOCOUNT ON
+
+ DECLARE @UserIdKey VARCHAR(50) = CONCAT('"', @UserId, '"')
+ DECLARE @UserIdPath VARCHAR(50) = CONCAT('$.', @UserIdKey)
+
+ ;WITH [IdsToMoveCTE] AS (
+ SELECT
+ [Id]
+ FROM
+ [dbo].[UserCipherDetails_V2](@UserId)
+ WHERE
+ [Id] IN (SELECT * FROM @Ids)
+ )
+ UPDATE
+ [dbo].[Cipher]
+ SET
+ [Folders] =
+ CASE
+ WHEN @FolderId IS NOT NULL AND [Folders] IS NULL THEN
+ CONCAT('{', @UserIdKey, ':"', @FolderId, '"', '}')
+ WHEN @FolderId IS NOT NULL THEN
+ JSON_MODIFY([Folders], @UserIdPath, CAST(@FolderId AS VARCHAR(50)))
+ ELSE
+ JSON_MODIFY([Folders], @UserIdPath, NULL)
+ END
+ WHERE
+ [Id] IN (SELECT * FROM [IdsToMoveCTE])
+
+ EXEC [dbo].[User_BumpAccountRevisionDate] @UserId
+END
diff --git a/src/Sql/Vault/dbo/Stored Procedures/Cipher/Cipher_Restore_V2.sql b/src/Sql/Vault/dbo/Stored Procedures/Cipher/Cipher_Restore_V2.sql
new file mode 100644
index 0000000000..13b5c1c16f
--- /dev/null
+++ b/src/Sql/Vault/dbo/Stored Procedures/Cipher/Cipher_Restore_V2.sql
@@ -0,0 +1,62 @@
+CREATE PROCEDURE [dbo].[Cipher_Restore_V2]
+ @Ids AS [dbo].[GuidIdArray] READONLY,
+ @UserId AS UNIQUEIDENTIFIER
+AS
+BEGIN
+ SET NOCOUNT ON
+
+ CREATE TABLE #Temp
+ (
+ [Id] UNIQUEIDENTIFIER NOT NULL,
+ [UserId] UNIQUEIDENTIFIER NULL,
+ [OrganizationId] UNIQUEIDENTIFIER NULL
+ )
+
+ INSERT INTO #Temp
+ SELECT
+ [Id],
+ [UserId],
+ [OrganizationId]
+ FROM
+ [dbo].[UserCipherDetails_V2](@UserId)
+ WHERE
+ [Edit] = 1
+ AND [DeletedDate] IS NOT NULL
+ AND [Id] IN (SELECT * FROM @Ids)
+
+ DECLARE @UtcNow DATETIME2(7) = GETUTCDATE();
+ UPDATE
+ [dbo].[Cipher]
+ SET
+ [DeletedDate] = NULL,
+ [RevisionDate] = @UtcNow
+ WHERE
+ [Id] IN (SELECT [Id] FROM #Temp)
+
+ -- Bump orgs
+ DECLARE @OrgId UNIQUEIDENTIFIER
+ DECLARE [OrgCursor] CURSOR FORWARD_ONLY FOR
+ SELECT
+ [OrganizationId]
+ FROM
+ #Temp
+ WHERE
+ [OrganizationId] IS NOT NULL
+ GROUP BY
+ [OrganizationId]
+ OPEN [OrgCursor]
+ FETCH NEXT FROM [OrgCursor] INTO @OrgId
+ WHILE @@FETCH_STATUS = 0 BEGIN
+ EXEC [dbo].[User_BumpAccountRevisionDateByOrganizationId] @OrgId
+ FETCH NEXT FROM [OrgCursor] INTO @OrgId
+ END
+ CLOSE [OrgCursor]
+ DEALLOCATE [OrgCursor]
+
+ -- Bump user
+ EXEC [dbo].[User_BumpAccountRevisionDate] @UserId
+
+ DROP TABLE #Temp
+
+ SELECT @UtcNow
+END
diff --git a/src/Sql/Vault/dbo/Stored Procedures/Cipher/Cipher_SoftDelete_V2.sql b/src/Sql/Vault/dbo/Stored Procedures/Cipher/Cipher_SoftDelete_V2.sql
new file mode 100644
index 0000000000..9a9424767b
--- /dev/null
+++ b/src/Sql/Vault/dbo/Stored Procedures/Cipher/Cipher_SoftDelete_V2.sql
@@ -0,0 +1,60 @@
+CREATE PROCEDURE [dbo].[Cipher_SoftDelete_V2]
+ @Ids AS [dbo].[GuidIdArray] READONLY,
+ @UserId AS UNIQUEIDENTIFIER
+AS
+BEGIN
+ SET NOCOUNT ON
+
+ CREATE TABLE #Temp
+ (
+ [Id] UNIQUEIDENTIFIER NOT NULL,
+ [UserId] UNIQUEIDENTIFIER NULL,
+ [OrganizationId] UNIQUEIDENTIFIER NULL
+ )
+
+ INSERT INTO #Temp
+ SELECT
+ [Id],
+ [UserId],
+ [OrganizationId]
+ FROM
+ [dbo].[UserCipherDetails_V2](@UserId)
+ WHERE
+ [Edit] = 1
+ AND [DeletedDate] IS NULL
+ AND [Id] IN (SELECT * FROM @Ids)
+
+ -- Delete ciphers
+ DECLARE @UtcNow DATETIME2(7) = GETUTCDATE();
+ UPDATE
+ [dbo].[Cipher]
+ SET
+ [DeletedDate] = @UtcNow,
+ [RevisionDate] = @UtcNow
+ WHERE
+ [Id] IN (SELECT [Id] FROM #Temp)
+
+ -- Cleanup orgs
+ DECLARE @OrgId UNIQUEIDENTIFIER
+ DECLARE [OrgCursor] CURSOR FORWARD_ONLY FOR
+ SELECT
+ [OrganizationId]
+ FROM
+ #Temp
+ WHERE
+ [OrganizationId] IS NOT NULL
+ GROUP BY
+ [OrganizationId]
+ OPEN [OrgCursor]
+ FETCH NEXT FROM [OrgCursor] INTO @OrgId
+ WHILE @@FETCH_STATUS = 0 BEGIN
+ EXEC [dbo].[User_BumpAccountRevisionDateByOrganizationId] @OrgId
+ FETCH NEXT FROM [OrgCursor] INTO @OrgId
+ END
+ CLOSE [OrgCursor]
+ DEALLOCATE [OrgCursor]
+
+ EXEC [dbo].[User_BumpAccountRevisionDate] @UserId
+
+ DROP TABLE #Temp
+END
diff --git a/src/Sql/dbo/Stored Procedures/CollectionCipher_ReadByUserIdCipherId_V2.sql b/src/Sql/dbo/Stored Procedures/CollectionCipher_ReadByUserIdCipherId_V2.sql
new file mode 100644
index 0000000000..de8cb6e8fb
--- /dev/null
+++ b/src/Sql/dbo/Stored Procedures/CollectionCipher_ReadByUserIdCipherId_V2.sql
@@ -0,0 +1,31 @@
+CREATE PROCEDURE [dbo].[CollectionCipher_ReadByUserIdCipherId_V2]
+ @UserId UNIQUEIDENTIFIER,
+ @CipherId UNIQUEIDENTIFIER
+AS
+BEGIN
+ SET NOCOUNT ON
+
+ SELECT
+ CC.*
+ FROM
+ [dbo].[CollectionCipher] CC
+ INNER JOIN
+ [dbo].[Collection] S ON S.[Id] = CC.[CollectionId]
+ INNER JOIN
+ [dbo].[OrganizationUser] OU ON OU.[OrganizationId] = S.[OrganizationId] AND OU.[UserId] = @UserId
+ LEFT JOIN
+ [dbo].[CollectionUser] CU ON CU.[CollectionId] = S.[Id] AND CU.[OrganizationUserId] = OU.[Id]
+ LEFT JOIN
+ [dbo].[GroupUser] GU ON CU.[CollectionId] IS NULL AND GU.[OrganizationUserId] = OU.[Id]
+ LEFT JOIN
+ [dbo].[Group] G ON G.[Id] = GU.[GroupId]
+ LEFT JOIN
+ [dbo].[CollectionGroup] CG ON CG.[CollectionId] = CC.[CollectionId] AND CG.[GroupId] = GU.[GroupId]
+ WHERE
+ CC.[CipherId] = @CipherId
+ AND OU.[Status] = 2 -- Confirmed
+ AND (
+ CU.[CollectionId] IS NOT NULL
+ OR CG.[CollectionId] IS NOT NULL
+ )
+END
diff --git a/src/Sql/dbo/Stored Procedures/CollectionCipher_ReadByUserId_V2.sql b/src/Sql/dbo/Stored Procedures/CollectionCipher_ReadByUserId_V2.sql
new file mode 100644
index 0000000000..6a0b444c3f
--- /dev/null
+++ b/src/Sql/dbo/Stored Procedures/CollectionCipher_ReadByUserId_V2.sql
@@ -0,0 +1,29 @@
+CREATE PROCEDURE [dbo].[CollectionCipher_ReadByUserId_V2]
+ @UserId UNIQUEIDENTIFIER
+AS
+BEGIN
+ SET NOCOUNT ON
+
+ SELECT
+ CC.*
+ FROM
+ [dbo].[CollectionCipher] CC
+ INNER JOIN
+ [dbo].[Collection] S ON S.[Id] = CC.[CollectionId]
+ INNER JOIN
+ [dbo].[OrganizationUser] OU ON OU.[OrganizationId] = S.[OrganizationId] AND OU.[UserId] = @UserId
+ LEFT JOIN
+ [dbo].[CollectionUser] CU ON CU.[CollectionId] = S.[Id] AND CU.[OrganizationUserId] = OU.[Id]
+ LEFT JOIN
+ [dbo].[GroupUser] GU ON CU.[CollectionId] IS NULL AND GU.[OrganizationUserId] = OU.[Id]
+ LEFT JOIN
+ [dbo].[Group] G ON G.[Id] = GU.[GroupId]
+ LEFT JOIN
+ [dbo].[CollectionGroup] CG ON CG.[CollectionId] = CC.[CollectionId] AND CG.[GroupId] = GU.[GroupId]
+ WHERE
+ OU.[Status] = 2 -- Confirmed
+ AND (
+ CU.[CollectionId] IS NOT NULL
+ OR CG.[CollectionId] IS NOT NULL
+ )
+END
diff --git a/src/Sql/dbo/Stored Procedures/CollectionCipher_UpdateCollectionsForCiphers_V2.sql b/src/Sql/dbo/Stored Procedures/CollectionCipher_UpdateCollectionsForCiphers_V2.sql
new file mode 100644
index 0000000000..ab06d65e4f
--- /dev/null
+++ b/src/Sql/dbo/Stored Procedures/CollectionCipher_UpdateCollectionsForCiphers_V2.sql
@@ -0,0 +1,62 @@
+CREATE PROCEDURE [dbo].[CollectionCipher_UpdateCollectionsForCiphers_V2]
+ @CipherIds AS [dbo].[GuidIdArray] READONLY,
+ @OrganizationId UNIQUEIDENTIFIER,
+ @UserId UNIQUEIDENTIFIER,
+ @CollectionIds AS [dbo].[GuidIdArray] READONLY
+AS
+BEGIN
+ SET NOCOUNT ON
+
+ CREATE TABLE #AvailableCollections (
+ [Id] UNIQUEIDENTIFIER
+ )
+
+ INSERT INTO #AvailableCollections
+ SELECT
+ C.[Id]
+ FROM
+ [dbo].[Collection] C
+ INNER JOIN
+ [Organization] O ON O.[Id] = C.[OrganizationId]
+ INNER JOIN
+ [dbo].[OrganizationUser] OU ON OU.[OrganizationId] = O.[Id] AND OU.[UserId] = @UserId
+ LEFT JOIN
+ [dbo].[CollectionUser] CU ON CU.[CollectionId] = C.[Id] AND CU.[OrganizationUserId] = OU.[Id]
+ LEFT JOIN
+ [dbo].[GroupUser] GU ON CU.[CollectionId] IS NULL AND GU.[OrganizationUserId] = OU.[Id]
+ LEFT JOIN
+ [dbo].[Group] G ON G.[Id] = GU.[GroupId]
+ LEFT JOIN
+ [dbo].[CollectionGroup] CG ON CG.[CollectionId] = C.[Id] AND CG.[GroupId] = GU.[GroupId]
+ WHERE
+ O.[Id] = @OrganizationId
+ AND O.[Enabled] = 1
+ AND OU.[Status] = 2 -- Confirmed
+ AND (
+ CU.[ReadOnly] = 0
+ OR CG.[ReadOnly] = 0
+ )
+
+ IF (SELECT COUNT(1) FROM #AvailableCollections) < 1
+ BEGIN
+ -- No writable collections available to share with in this organization.
+ RETURN
+ END
+
+ INSERT INTO [dbo].[CollectionCipher]
+ (
+ [CollectionId],
+ [CipherId]
+ )
+ SELECT
+ [Collection].[Id],
+ [Cipher].[Id]
+ FROM
+ @CollectionIds [Collection]
+ INNER JOIN
+ @CipherIds [Cipher] ON 1 = 1
+ WHERE
+ [Collection].[Id] IN (SELECT [Id] FROM #AvailableCollections)
+
+ EXEC [dbo].[User_BumpAccountRevisionDateByOrganizationId] @OrganizationId
+END
diff --git a/src/Sql/dbo/Stored Procedures/CollectionCipher_UpdateCollections_V2.sql b/src/Sql/dbo/Stored Procedures/CollectionCipher_UpdateCollections_V2.sql
new file mode 100644
index 0000000000..c540c17378
--- /dev/null
+++ b/src/Sql/dbo/Stored Procedures/CollectionCipher_UpdateCollections_V2.sql
@@ -0,0 +1,77 @@
+CREATE PROCEDURE [dbo].[CollectionCipher_UpdateCollections_V2]
+ @CipherId UNIQUEIDENTIFIER,
+ @UserId UNIQUEIDENTIFIER,
+ @CollectionIds AS [dbo].[GuidIdArray] READONLY
+AS
+BEGIN
+ SET NOCOUNT ON
+
+ DECLARE @OrgId UNIQUEIDENTIFIER = (
+ SELECT TOP 1
+ [OrganizationId]
+ FROM
+ [dbo].[Cipher]
+ WHERE
+ [Id] = @CipherId
+ )
+
+ ;WITH [AvailableCollectionsCTE] AS(
+ SELECT
+ C.[Id]
+ FROM
+ [dbo].[Collection] C
+ INNER JOIN
+ [Organization] O ON O.[Id] = C.[OrganizationId]
+ INNER JOIN
+ [dbo].[OrganizationUser] OU ON OU.[OrganizationId] = O.[Id] AND OU.[UserId] = @UserId
+ LEFT JOIN
+ [dbo].[CollectionUser] CU ON CU.[CollectionId] = C.[Id] AND CU.[OrganizationUserId] = OU.[Id]
+ LEFT JOIN
+ [dbo].[GroupUser] GU ON CU.[CollectionId] IS NULL AND GU.[OrganizationUserId] = OU.[Id]
+ LEFT JOIN
+ [dbo].[Group] G ON G.[Id] = GU.[GroupId]
+ LEFT JOIN
+ [dbo].[CollectionGroup] CG ON CG.[CollectionId] = C.[Id] AND CG.[GroupId] = GU.[GroupId]
+ WHERE
+ O.[Id] = @OrgId
+ AND O.[Enabled] = 1
+ AND OU.[Status] = 2 -- Confirmed
+ AND (
+ CU.[ReadOnly] = 0
+ OR CG.[ReadOnly] = 0
+ )
+ ),
+ [CollectionCiphersCTE] AS(
+ SELECT
+ [CollectionId],
+ [CipherId]
+ FROM
+ [dbo].[CollectionCipher]
+ WHERE
+ [CipherId] = @CipherId
+ )
+ MERGE
+ [CollectionCiphersCTE] AS [Target]
+ USING
+ @CollectionIds AS [Source]
+ ON
+ [Target].[CollectionId] = [Source].[Id]
+ AND [Target].[CipherId] = @CipherId
+ WHEN NOT MATCHED BY TARGET
+ AND [Source].[Id] IN (SELECT [Id] FROM [AvailableCollectionsCTE]) THEN
+ INSERT VALUES
+ (
+ [Source].[Id],
+ @CipherId
+ )
+ WHEN NOT MATCHED BY SOURCE
+ AND [Target].[CipherId] = @CipherId
+ AND [Target].[CollectionId] IN (SELECT [Id] FROM [AvailableCollectionsCTE]) THEN
+ DELETE
+ ;
+
+ IF @OrgId IS NOT NULL
+ BEGIN
+ EXEC [dbo].[User_BumpAccountRevisionDateByOrganizationId] @OrgId
+ END
+END
diff --git a/src/Sql/dbo/Stored Procedures/Organization_Create.sql b/src/Sql/dbo/Stored Procedures/Organization_Create.sql
index 1291e8c0a1..8e16c38f7f 100644
--- a/src/Sql/dbo/Stored Procedures/Organization_Create.sql
+++ b/src/Sql/dbo/Stored Procedures/Organization_Create.sql
@@ -51,7 +51,8 @@
@MaxAutoscaleSmSeats INT= null,
@MaxAutoscaleSmServiceAccounts INT = null,
@SecretsManagerBeta BIT = 0,
- @LimitCollectionCreationDeletion BIT = 1
+ @LimitCollectionCreationDeletion BIT = 1,
+ @AllowAdminAccessToAllCollectionItems BIT = 1
AS
BEGIN
SET NOCOUNT ON
@@ -110,7 +111,8 @@ BEGIN
[MaxAutoscaleSmSeats],
[MaxAutoscaleSmServiceAccounts],
[SecretsManagerBeta],
- [LimitCollectionCreationDeletion]
+ [LimitCollectionCreationDeletion],
+ [AllowAdminAccessToAllCollectionItems]
)
VALUES
(
@@ -166,6 +168,7 @@ BEGIN
@MaxAutoscaleSmSeats,
@MaxAutoscaleSmServiceAccounts,
@SecretsManagerBeta,
- @LimitCollectionCreationDeletion
+ @LimitCollectionCreationDeletion,
+ @AllowAdminAccessToAllCollectionItems
)
END
diff --git a/src/Sql/dbo/Stored Procedures/Organization_UnassignedToProviderSearch.sql b/src/Sql/dbo/Stored Procedures/Organization_UnassignedToProviderSearch.sql
index 45fcbaeb9b..dc71c809eb 100644
--- a/src/Sql/dbo/Stored Procedures/Organization_UnassignedToProviderSearch.sql
+++ b/src/Sql/dbo/Stored Procedures/Organization_UnassignedToProviderSearch.sql
@@ -21,7 +21,7 @@ BEGIN
INNER JOIN
[dbo].[User] U ON U.[Id] = OU.[UserId]
WHERE
- O.[PlanType] >= 8 AND O.[PlanType] <= 11 -- Get 'Team' and 'Enterprise' Organizations
+ ((O.[PlanType] >= 2 AND O.[PlanType] <= 5) OR (O.[PlanType] >= 8 AND O.[PlanType] <= 15)) -- All 'Teams' and 'Enterprise' organizations
AND NOT EXISTS (SELECT * FROM [dbo].[ProviderOrganizationView] PO WHERE PO.[OrganizationId] = O.[Id])
AND (@Name IS NULL OR O.[Name] LIKE @NameLikeSearch)
AND (U.[Email] LIKE @OwnerLikeSearch)
@@ -36,7 +36,7 @@ BEGIN
FROM
[dbo].[OrganizationView] O
WHERE
- O.[PlanType] >= 8 AND O.[PlanType] <= 11 -- Get 'Team' and 'Enterprise' Organizations
+ ((O.[PlanType] >= 2 AND O.[PlanType] <= 5) OR (O.[PlanType] >= 8 AND O.[PlanType] <= 15)) -- All 'Teams' and 'Enterprise' organizations
AND NOT EXISTS (SELECT * FROM [dbo].[ProviderOrganizationView] PO WHERE PO.[OrganizationId] = O.[Id])
AND (@Name IS NULL OR O.[Name] LIKE @NameLikeSearch)
ORDER BY O.[CreationDate] DESC
diff --git a/src/Sql/dbo/Stored Procedures/Organization_Update.sql b/src/Sql/dbo/Stored Procedures/Organization_Update.sql
index 35412c02cf..ebd1e9f0c0 100644
--- a/src/Sql/dbo/Stored Procedures/Organization_Update.sql
+++ b/src/Sql/dbo/Stored Procedures/Organization_Update.sql
@@ -51,7 +51,8 @@
@MaxAutoscaleSmSeats INT = null,
@MaxAutoscaleSmServiceAccounts INT = null,
@SecretsManagerBeta BIT = 0,
- @LimitCollectionCreationDeletion BIT = 1
+ @LimitCollectionCreationDeletion BIT = 1,
+ @AllowAdminAccessToAllCollectionItems BIT = 1
AS
BEGIN
SET NOCOUNT ON
@@ -110,7 +111,8 @@ BEGIN
[MaxAutoscaleSmSeats] = @MaxAutoscaleSmSeats,
[MaxAutoscaleSmServiceAccounts] = @MaxAutoscaleSmServiceAccounts,
[SecretsManagerBeta] = @SecretsManagerBeta,
- [LimitCollectionCreationDeletion] = @LimitCollectionCreationDeletion
+ [LimitCollectionCreationDeletion] = @LimitCollectionCreationDeletion,
+ [AllowAdminAccessToAllCollectionItems] = @AllowAdminAccessToAllCollectionItems
WHERE
[Id] = @Id
END
diff --git a/src/Sql/dbo/Tables/Organization.sql b/src/Sql/dbo/Tables/Organization.sql
index b3907f6a61..e4827d2982 100644
--- a/src/Sql/dbo/Tables/Organization.sql
+++ b/src/Sql/dbo/Tables/Organization.sql
@@ -52,6 +52,7 @@
[MaxAutoscaleSmServiceAccounts] INT NULL,
[SecretsManagerBeta] BIT NOT NULL CONSTRAINT [DF_Organization_SecretsManagerBeta] DEFAULT (0),
[LimitCollectionCreationDeletion] BIT NOT NULL CONSTRAINT [DF_Organization_LimitCollectionCreationDeletion] DEFAULT (1),
+ [AllowAdminAccessToAllCollectionItems] BIT NOT NULL CONSTRAINT [DF_Organization_AllowAdminAccessToAllCollectionItems] DEFAULT (1),
CONSTRAINT [PK_Organization] PRIMARY KEY CLUSTERED ([Id] ASC)
);
diff --git a/src/Sql/dbo/Views/OrganizationUserOrganizationDetailsView.sql b/src/Sql/dbo/Views/OrganizationUserOrganizationDetailsView.sql
index fdddc0cdb5..7ec5361ca8 100644
--- a/src/Sql/dbo/Views/OrganizationUserOrganizationDetailsView.sql
+++ b/src/Sql/dbo/Views/OrganizationUserOrganizationDetailsView.sql
@@ -45,7 +45,8 @@ SELECT
O.[UsePasswordManager],
O.[SmSeats],
O.[SmServiceAccounts],
- O.[LimitCollectionCreationDeletion]
+ O.[LimitCollectionCreationDeletion],
+ O.[AllowAdminAccessToAllCollectionItems]
FROM
[dbo].[OrganizationUser] OU
LEFT JOIN
diff --git a/test/Api.IntegrationTest/Controllers/ConfigControllerTests.cs b/test/Api.IntegrationTest/Controllers/ConfigControllerTests.cs
index 22c7398398..32db96dd17 100644
--- a/test/Api.IntegrationTest/Controllers/ConfigControllerTests.cs
+++ b/test/Api.IntegrationTest/Controllers/ConfigControllerTests.cs
@@ -2,7 +2,7 @@
using Bit.Api.IntegrationTest.Factories;
using Bit.Api.IntegrationTest.Helpers;
using Bit.Api.Models.Response;
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
using Xunit;
namespace Bit.Api.IntegrationTest.Controllers;
diff --git a/test/Api.IntegrationTest/Factories/ApiApplicationFactory.cs b/test/Api.IntegrationTest/Factories/ApiApplicationFactory.cs
index dc27ad5068..90a2335c22 100644
--- a/test/Api.IntegrationTest/Factories/ApiApplicationFactory.cs
+++ b/test/Api.IntegrationTest/Factories/ApiApplicationFactory.cs
@@ -1,6 +1,6 @@
using Bit.Core.Auth.Models.Api.Request.Accounts;
using Bit.IntegrationTestCommon.Factories;
-using IdentityServer4.AccessTokenValidation;
+using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.TestHost;
using Microsoft.Data.Sqlite;
@@ -27,12 +27,12 @@ public class ApiApplicationFactory : WebApplicationFactoryBase
builder.ConfigureTestServices(services =>
{
// Remove scheduled background jobs to prevent errors in parallel test execution
- var jobService = services.First(sd => sd.ServiceType == typeof(Microsoft.Extensions.Hosting.IHostedService) && sd.ImplementationType == typeof(Bit.Api.Jobs.JobsHostedService));
+ var jobService = services.First(sd => sd.ServiceType == typeof(IHostedService) && sd.ImplementationType == typeof(Jobs.JobsHostedService));
services.Remove(jobService);
- services.PostConfigure(IdentityServerAuthenticationDefaults.AuthenticationScheme, options =>
+ services.Configure(JwtBearerDefaults.AuthenticationScheme, options =>
{
- options.JwtBackChannelHandler = _identityApplicationFactory.Server.CreateHandler();
+ options.BackchannelHttpHandler = _identityApplicationFactory.Server.CreateHandler();
});
});
}
diff --git a/test/Api.IntegrationTest/Helpers/OrganizationTestHelpers.cs b/test/Api.IntegrationTest/Helpers/OrganizationTestHelpers.cs
index e84d89713e..39fe8a99d0 100644
--- a/test/Api.IntegrationTest/Helpers/OrganizationTestHelpers.cs
+++ b/test/Api.IntegrationTest/Helpers/OrganizationTestHelpers.cs
@@ -1,4 +1,5 @@
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Models.Business;
using Bit.Core.Repositories;
diff --git a/test/Api.IntegrationTest/SecretsManager/Controllers/ProjectsControllerTests.cs b/test/Api.IntegrationTest/SecretsManager/Controllers/ProjectsControllerTests.cs
index 65ec123a20..523998ee28 100644
--- a/test/Api.IntegrationTest/SecretsManager/Controllers/ProjectsControllerTests.cs
+++ b/test/Api.IntegrationTest/SecretsManager/Controllers/ProjectsControllerTests.cs
@@ -5,7 +5,7 @@ using Bit.Api.IntegrationTest.SecretsManager.Enums;
using Bit.Api.Models.Response;
using Bit.Api.SecretsManager.Models.Request;
using Bit.Api.SecretsManager.Models.Response;
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.Enums;
using Bit.Core.SecretsManager.Entities;
using Bit.Core.SecretsManager.Repositories;
diff --git a/test/Api.IntegrationTest/SecretsManager/Controllers/ServiceAccountsControllerTests.cs b/test/Api.IntegrationTest/SecretsManager/Controllers/ServiceAccountsControllerTests.cs
index 86e8c81b13..bfda63adf8 100644
--- a/test/Api.IntegrationTest/SecretsManager/Controllers/ServiceAccountsControllerTests.cs
+++ b/test/Api.IntegrationTest/SecretsManager/Controllers/ServiceAccountsControllerTests.cs
@@ -5,7 +5,7 @@ using Bit.Api.IntegrationTest.SecretsManager.Enums;
using Bit.Api.Models.Response;
using Bit.Api.SecretsManager.Models.Request;
using Bit.Api.SecretsManager.Models.Response;
-using Bit.Core.Entities;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.Enums;
using Bit.Core.SecretsManager.Entities;
using Bit.Core.SecretsManager.Repositories;
diff --git a/test/Api.IntegrationTest/SecretsManager/SecretsManagerOrganizationHelper.cs b/test/Api.IntegrationTest/SecretsManager/SecretsManagerOrganizationHelper.cs
index fdb14e8cc6..fea05de311 100644
--- a/test/Api.IntegrationTest/SecretsManager/SecretsManagerOrganizationHelper.cs
+++ b/test/Api.IntegrationTest/SecretsManager/SecretsManagerOrganizationHelper.cs
@@ -1,5 +1,6 @@
using Bit.Api.IntegrationTest.Factories;
using Bit.Api.IntegrationTest.Helpers;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Repositories;
diff --git a/test/Api.IntegrationTest/packages.lock.json b/test/Api.IntegrationTest/packages.lock.json
index fd398ec786..ba5887b158 100644
--- a/test/Api.IntegrationTest/packages.lock.json
+++ b/test/Api.IntegrationTest/packages.lock.json
@@ -353,8 +353,8 @@
},
"Dapper": {
"type": "Transitive",
- "resolved": "2.0.123",
- "contentHash": "RDFF4rBLLmbpi6pwkY7q/M6UXHRJEOerplDGE5jwEkP/JGJnBauAClYavNKJPW1yOTWRPIyfj4is3EaJxQXILQ=="
+ "resolved": "2.1.24",
+ "contentHash": "/2t2vsdJyZRsk13AsWigZpsuFvEwK+o3v862cEULXoww905gyKhJFSuwmZI/4Ui9COX9ZCFCI09UHyH4wVYl3A=="
},
"DnsClient": {
"type": "Transitive",
@@ -364,6 +364,24 @@
"Microsoft.Win32.Registry": "5.0.0"
}
},
+ "Duende.IdentityServer": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "4HVjzx1F8v5J+U7oa8RGAQGj2QzmzNSu87r18Sh+dlh10uyZZL8teAaT/FaVLDObnfItGdPFvN8mwpF/HkI3Xw==",
+ "dependencies": {
+ "Duende.IdentityServer.Storage": "6.0.4",
+ "Microsoft.AspNetCore.Authentication.OpenIdConnect": "6.0.0"
+ }
+ },
+ "Duende.IdentityServer.Storage": {
+ "type": "Transitive",
+ "resolved": "6.0.4",
+ "contentHash": "s5gAjfbpr2IMgI+fU2Nx+2AZdzstmbt9gpo13iX7GwvqSeSaBVqj9ZskAN0R2KF1OemPdZuGnfaTcevdXMUrrw==",
+ "dependencies": {
+ "IdentityModel": "6.0.0",
+ "Microsoft.AspNetCore.DataProtection.Abstractions": "6.0.0"
+ }
+ },
"Fare": {
"type": "Transitive",
"resolved": "2.1.1",
@@ -400,57 +418,16 @@
},
"Handlebars.Net": {
"type": "Transitive",
- "resolved": "2.1.2",
- "contentHash": "p60QyeBYpZmcZdIXRMqs9XySIBaxJ0lj3+QD0EJVr4ybTigOTCumXMMin5dPwjo9At1UwkDZ3gGwa1lmGjG6DA==",
+ "resolved": "2.1.4",
+ "contentHash": "Od7MWDfGxYKRtxETFMlcvCrY8hAqyuXZDX4EsOfiI/jzh+PVBuVxazHBC1HmVqTKX1JnRtoxIMcH95K9UFlYog==",
"dependencies": {
"Microsoft.CSharp": "4.7.0"
}
},
"IdentityModel": {
"type": "Transitive",
- "resolved": "4.4.0",
- "contentHash": "b18wrIx5wnZlMxAX7oVsE+nDtAJ4hajYlH0xPlaRvo4r/fz08K6pPeZvbiqS9nfNbzfIgLFmNX+FL9qR9ZR5PA==",
- "dependencies": {
- "Newtonsoft.Json": "11.0.2",
- "System.Text.Encodings.Web": "4.7.0"
- }
- },
- "IdentityModel.AspNetCore.OAuth2Introspection": {
- "type": "Transitive",
- "resolved": "4.0.1",
- "contentHash": "ZNdMZMaj9fqR3j50vYsu+1U3QGd6n8+fqwf+a8mCTcmXGor+HgFDfdq0mM34bsmD6uEgAQup7sv2ZW5kR36dbA==",
- "dependencies": {
- "IdentityModel": "4.0.0"
- }
- },
- "IdentityServer4": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "blaxxGuOA7v/w1q+fxn97wZ+x2ecG1ZD4mc/N/ZOXMNeFZZhqv+4LF26Gecyik3nWrJPmbMEtQbLmRsKG8k61w==",
- "dependencies": {
- "IdentityModel": "4.4.0",
- "IdentityServer4.Storage": "4.1.2",
- "Microsoft.AspNetCore.Authentication.OpenIdConnect": "3.1.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.6.0",
- "Newtonsoft.Json": "12.0.2"
- }
- },
- "IdentityServer4.AccessTokenValidation": {
- "type": "Transitive",
- "resolved": "3.0.1",
- "contentHash": "qu/M6UyN4o9NVep7q545Ms7hYAnsQqSdLbN1Fjjrn4m35lyBfeQPSSNzDryAKHbodyWOQfHaOqKEyMEJQ5Rpgw==",
- "dependencies": {
- "IdentityModel.AspNetCore.OAuth2Introspection": "4.0.1",
- "Microsoft.AspNetCore.Authentication.JwtBearer": "3.0.0"
- }
- },
- "IdentityServer4.Storage": {
- "type": "Transitive",
- "resolved": "4.1.2",
- "contentHash": "KoSffyZyyeCNTIyJiZnCuPakJ1QbCHlpty6gbWUj/7yl+w0PXIchgmmJnJSvddzBb8iZ2xew/vGlxWUIP17P2g==",
- "dependencies": {
- "IdentityModel": "4.4.0"
- }
+ "resolved": "6.0.0",
+ "contentHash": "eVHCR7a6m/dm5RFcBzE3qs/Jg5j9R5Rjpu8aTOv9e4AFvaQtBXb5ah7kmwU+YwA0ufRwz4wf1hnIvsD2hSnI4g=="
},
"Kralizek.AutoFixture.Extensions.MockHttp": {
"type": "Transitive",
@@ -468,26 +445,27 @@
},
"LaunchDarkly.CommonSdk": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "YYYq+41gZRMQ8dIoMC6HOq/dI+4RY3HsexLLAaE9T1+1tVMeQkbCqak7sVeKX4QcE7xlXx23lWgipYUkRoRUyw==",
+ "resolved": "6.2.0",
+ "contentHash": "eLeb+tTNLwOxlUIsZWzJlcPmG9Wyf20NYyucP6MW6aqKW6doKFeSO+aJe0z+WyijbvfX1Dp1U1HQatOu6fa1Gg==",
"dependencies": {
+ "LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
},
"LaunchDarkly.EventSource": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "DN44Ry5M4lyrjiF7LEu0Ijco7Wm8R7mJopN+giYsYjkQlszsXdFvm3POoehIDAOtL1HHl5bZvF9k9xK034u3IA==",
+ "resolved": "5.1.0",
+ "contentHash": "PztDWiMvPWODx+kfBnCroZ8Lpya4nPc7ZO4TZysOogODbVXDDPDYrdcgVivCMgf4davhGrp61ekvZc+Uy1NYMA==",
"dependencies": {
- "LaunchDarkly.Logging": "[1.0.1, 3.0.0)"
+ "LaunchDarkly.Logging": "[2.0.0, 3.0.0)"
}
},
"LaunchDarkly.InternalSdk": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "jW8VEfFciuCcJUEuvSzmrbMVYYXwGL/ZWHUZLiA4aDOQ1LcEXp32uK405NQW/izEypUfWB+9TaSjPpFIC+5Wzw==",
+ "resolved": "3.3.0",
+ "contentHash": "TBvs/B6iyXp9MqRKjIoBZ/T0+/xgp5xg+MuHqr5U+N5+7DghtI2FnsmgeBedTIeQdA3Tk8Z4Bj4hlqU9FBiEnw==",
"dependencies": {
- "LaunchDarkly.CommonSdk": "6.0.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
"LaunchDarkly.Logging": "[2.0.0, 3.0.0)",
"System.Collections.Immutable": "1.7.1"
}
@@ -502,13 +480,13 @@
},
"LaunchDarkly.ServerSdk": {
"type": "Transitive",
- "resolved": "7.0.0",
- "contentHash": "gkTWb+f5QlsXIqFAciBef3qKZU2y0Hy3Fpt4pvZoxNcnBKg2PNTDSnbpbYEKPeQ1yk1avNaI/tKprnahfrmJFg==",
+ "resolved": "8.0.0",
+ "contentHash": "vosFEXYJABuIDIA0+6sncalTmrKXEkBKeqzuP9/vvcCVlFSXUl/ZnrkrAVg3ViDWDi7kjpJSk2W3h5D0TUfCGA==",
"dependencies": {
"LaunchDarkly.Cache": "1.0.2",
- "LaunchDarkly.CommonSdk": "6.0.0",
- "LaunchDarkly.EventSource": "5.0.1",
- "LaunchDarkly.InternalSdk": "3.1.0",
+ "LaunchDarkly.CommonSdk": "6.2.0",
+ "LaunchDarkly.EventSource": "5.1.0",
+ "LaunchDarkly.InternalSdk": "3.3.0",
"LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
@@ -520,16 +498,16 @@
},
"linq2db": {
"type": "Transitive",
- "resolved": "5.2.1",
- "contentHash": "OOBM8s39zhbZAgqFnl2KGxT5RqBDw21X69U528qV2PgQispaA3f+or0ILrLEgnNIJuB4EBgaw8gC6ttSHn4X0Q=="
+ "resolved": "5.3.1",
+ "contentHash": "707mIbEmtptvKeUW940UwoNwq05I7OUu0VWtclLtyYaASp+ugX4I/Er1UVpeldsDawqlVMXB5EQ5/Oar6AkUGQ=="
},
"linq2db.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.5.0",
- "contentHash": "ePHzO99xbObgMLlAFh08of1SnVhg6j4Su9327DrIB7RZWCgtQIX6k+nbl+HRVOooAndZSs7b+DduSgdnJjaJGw==",
+ "resolved": "7.6.0",
+ "contentHash": "T1W9o8wVzApsUwu7SRg/L7487kaiLQYt2AqRVnXVGfobD+ZKy2oRsUMws0PICtciaz4qbfLp/r/+NksfuYsFlw==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Relational": "7.0.0",
- "linq2db": "5.2.1"
+ "linq2db": "5.3.1"
}
},
"MailKit": {
@@ -550,10 +528,10 @@
},
"Microsoft.AspNetCore.Authentication.OpenIdConnect": {
"type": "Transitive",
- "resolved": "3.1.0",
- "contentHash": "O1cAQYUTU8EfRqwc5/rfTns4E4hKlFlg59fuKRrST+PzsxI6H07KqRN/JjdYhAuVYxF8jPnIGbj+zuc5paOWUw==",
+ "resolved": "6.0.0",
+ "contentHash": "cJxdro36spFzk/K2OFCddM6vZ+yoj6ug8mTFRH3Gdv1Pul/buSuCtfb/FSCp31UmS5S4C1315dU7wX3ErLFuDg==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "5.5.0"
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.10.0"
}
},
"Microsoft.AspNetCore.Cryptography.Internal": {
@@ -586,8 +564,8 @@
},
"Microsoft.AspNetCore.DataProtection.Abstractions": {
"type": "Transitive",
- "resolved": "3.1.32",
- "contentHash": "MPL4iVyiaRxnOUY5VATHjvhDWaAEFb77KFiUxVRklv3Z3v+STofUr1UG/aCt1O9cgN7FVTDaC5A7U+zsLub8Xg=="
+ "resolved": "6.0.0",
+ "contentHash": "Z/UU4NEBm5UgNufJmw+j5baW26ytCOIZ0G7sZocPaOzsUeBon1bkM3lSMNZQG2GmDjAIVP2XMSODf2jzSGbibw=="
},
"Microsoft.AspNetCore.Mvc.Testing": {
"type": "Transitive",
@@ -695,48 +673,44 @@
},
"Microsoft.Data.SqlClient": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "uu8dfrsx081cSbEevWuZAvqdmANDGJkbLBL2G3j0LAZxX1Oy8RCVAaC4Lcuak6jNicWP6CWvHqBTIEmQNSxQlw==",
+ "resolved": "5.1.1",
+ "contentHash": "MW5E9HFvCaV069o8b6YpuRDPBux8s96qDnOJ+4N9QNUCs7c5W3KxwQ+ftpAjbMUlImL+c9WR+l+f5hzjkqhu2g==",
"dependencies": {
- "Azure.Identity": "1.6.0",
- "Microsoft.Data.SqlClient.SNI.runtime": "5.0.1",
- "Microsoft.Identity.Client": "4.45.0",
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.21.0",
+ "Azure.Identity": "1.7.0",
+ "Microsoft.Data.SqlClient.SNI.runtime": "5.1.0",
+ "Microsoft.Identity.Client": "4.47.2",
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.24.0",
"Microsoft.SqlServer.Server": "1.0.0",
- "Microsoft.Win32.Registry": "5.0.0",
- "System.Buffers": "4.5.1",
- "System.Configuration.ConfigurationManager": "5.0.0",
- "System.Diagnostics.DiagnosticSource": "5.0.0",
- "System.IO": "4.3.0",
- "System.Resources.ResourceManager": "4.3.0",
- "System.Runtime.Caching": "5.0.0",
+ "System.Configuration.ConfigurationManager": "6.0.1",
+ "System.Diagnostics.DiagnosticSource": "6.0.0",
+ "System.Runtime.Caching": "6.0.0",
"System.Security.Cryptography.Cng": "5.0.0",
"System.Security.Principal.Windows": "5.0.0",
- "System.Text.Encoding.CodePages": "5.0.0",
- "System.Text.Encodings.Web": "4.7.2"
+ "System.Text.Encoding.CodePages": "6.0.0",
+ "System.Text.Encodings.Web": "6.0.0"
}
},
"Microsoft.Data.SqlClient.SNI.runtime": {
"type": "Transitive",
- "resolved": "5.0.1",
- "contentHash": "y0X5MxiNdbITJYoafJ2ruaX6hqO0twpCGR/ipiDOe85JKLU8WL4TuAQfDe5qtt3bND5Je26HnrarLSAMMnVTNg=="
+ "resolved": "5.1.0",
+ "contentHash": "jVsElisM5sfBzaaV9kdq2NXZLwIbytetnsOIlJ0cQGgQP4zFNBmkfHBnpwtmKrtBJBEV9+9PVQPVrcCVhDgcIg=="
},
"Microsoft.Data.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "FTerRmQPqHrCrnoUzhBu+E+1DNGwyrAMLqHkAqOOOu5pGfyMOj8qQUBxI/gDtWtG11p49UxSfWmBzRNlwZqfUg==",
+ "resolved": "7.0.14",
+ "contentHash": "qvYae3/v9Fvqsjp/7OKQBuJK+Uc3m/WctfpIUMmGMDot2Bd8UWBKiMSlh26UtfQa9x4N+k7NxCT+AbZVoNrCdg==",
"dependencies": {
"SQLitePCLRaw.core": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "RXbRLHHWP2Z3pq8qcL5nQ6LPeoOyp8hasM5bd0Te8PiQi3RjWQR4tcbdY5XMqQ+oTO9wA8/RLhZRn/hnxlTDnQ==",
+ "resolved": "7.0.14",
+ "contentHash": "0KYkAemPygW6yzifciFlmMzkO4sI4Dw69xLgwg3ui5rXJS5XvzuAWVvfdrKJciqeCbCnVS/ZbOWpcwWgqce5bQ==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Abstractions": "7.0.5",
- "Microsoft.EntityFrameworkCore.Analyzers": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Abstractions": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Analyzers": "7.0.14",
"Microsoft.Extensions.Caching.Memory": "7.0.0",
"Microsoft.Extensions.DependencyInjection": "7.0.0",
"Microsoft.Extensions.Logging": "7.0.0"
@@ -744,49 +718,49 @@
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "iwQso+hFRsEWjhH2WsEQj1D2QE5BlEXiXEt6A3SlYTPRPdZsyTNDeDDEdtxL+H/UJPQgQYY+9SMMRcEiXBmCAA=="
+ "resolved": "7.0.14",
+ "contentHash": "aEcXDSYpDdD5wdIRKTqcS44f3W4capqQ1BWVRPJgacATfHkO62RX9Nnh0hUFg+rei9OLuJp0Y4zsy1fNeOXv5g=="
},
"Microsoft.EntityFrameworkCore.Analyzers": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "yMLM/aK1MikVqpjxd7PJ1Pjgztd3VAd26ZHxyjxG3RPeM9cHjvS5tCg9kAAayR6eHmBg0ffZsHdT28WfA5tTlA=="
+ "resolved": "7.0.14",
+ "contentHash": "esI4RF6mix4DDFBhWB9k1vJxAL8GouSf5ZV8oFJoVsIQ9d2J3MPgC1VL2qM9Vw5cH7Vg7TzRyKNpCRXFVkWs9w=="
},
"Microsoft.EntityFrameworkCore.Relational": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "u/33DC4S6g2hpMPgBc5Kdnlz//nqHR5c/ovgjtiP/wQ7sOd0EOdygVzUJAAOxCwbtAHDsJXS9Vc3jLFYq0yu8Q==",
+ "resolved": "7.0.14",
+ "contentHash": "MrVBnWOFYwfLMGQfrcIuqEM9Xvokv1vJeYxqNH3K3xOtAdHwHQTrKnpDP97tU+LBlvcnyXAtAtryYcpLXWtRNA==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "7.0.5",
+ "Microsoft.EntityFrameworkCore": "7.0.14",
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.Sqlite": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "2XPZB9OLF5/m13HgZp7/Dv0u8FWEJzcaBsMYR9Kp3R6aygkb3RnOijofPDTsmdhAqG9YTysCmh2bFaGs0TCc7A==",
+ "resolved": "7.0.14",
+ "contentHash": "8c8Hw2tmfy5YEsi9RL2/u2Qi9IwVbmj/yDlJy4iJPadeE3/AssLrgtobOBz4ftg2y5PVjFL59Gq7YzGLQH5q1A==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.5",
+ "Microsoft.EntityFrameworkCore.Sqlite.Core": "7.0.14",
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.4"
}
},
"Microsoft.EntityFrameworkCore.Sqlite.Core": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "4C+9ct6A/Bq61Ta9Uh2td4/XwNpRCiPI03SWTa3hPJjA/g8wCw2hetbh3DDe5HcydzgDq/lRRjU/eRy3UODklQ==",
+ "resolved": "7.0.14",
+ "contentHash": "JNUkZVff1V/A/P3JiBbgt+Y2oCQSuzORxE3jOqFDbFjSFu7jHDEetJ/afSF/taa0lbyN9OpvaKjsbKk3Iis29Q==",
"dependencies": {
- "Microsoft.Data.Sqlite.Core": "7.0.5",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5",
+ "Microsoft.Data.Sqlite.Core": "7.0.14",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14",
"Microsoft.Extensions.DependencyModel": "7.0.0"
}
},
"Microsoft.EntityFrameworkCore.SqlServer": {
"type": "Transitive",
- "resolved": "7.0.5",
- "contentHash": "cUJqCiamT0EvpKNgZEV5fqNv2MyVfKNgOPQfFINqHiIKHOYrS0nTCUJP97+UuG0JIIrP792/PwnuNjbekImtBg==",
+ "resolved": "7.0.14",
+ "contentHash": "d9hqEw4W/TdQ1WDm03uyFuDoehL6GNq/NMChFaC4dcV60I42vKdUC0fYTuE2QPunVUpf5XUTCkJ6fYGjMos2AA==",
"dependencies": {
- "Microsoft.Data.SqlClient": "5.0.1",
- "Microsoft.EntityFrameworkCore.Relational": "7.0.5"
+ "Microsoft.Data.SqlClient": "5.1.1",
+ "Microsoft.EntityFrameworkCore.Relational": "7.0.14"
}
},
"Microsoft.Extensions.ApiDescription.Server": {
@@ -1161,50 +1135,52 @@
},
"Microsoft.IdentityModel.Abstractions": {
"type": "Transitive",
- "resolved": "6.22.0",
- "contentHash": "iI+9V+2ciCrbheeLjpmjcqCnhy+r6yCoEcid3nkoFWerHgjVuT6CPM4HODUTtUPe1uwks4wcnAujJ8u+IKogHQ=="
+ "resolved": "6.24.0",
+ "contentHash": "X6aBK56Ot15qKyG7X37KsPnrwah+Ka55NJWPppWVTDi8xWq7CJgeNw2XyaeHgE1o/mW4THwoabZkBbeG2TPBiw=="
},
"Microsoft.IdentityModel.JsonWebTokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "d3h1/BaMeylKTkdP6XwRCxuOoDJZ44V9xaXr6gl5QxmpnZGdoK3bySo3OQN8ehRLJHShb94ElLUvoXyglQtgAw==",
+ "resolved": "6.24.0",
+ "contentHash": "XDWrkThcxfuWp79AvAtg5f+uRS1BxkIbJnsG/e8VPzOWkYYuDg33emLjp5EWcwXYYIDsHnVZD/00kM/PYFQc/g==",
"dependencies": {
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Tokens": "6.24.0",
+ "System.Text.Encoding": "4.3.0",
+ "System.Text.Json": "4.7.2"
}
},
"Microsoft.IdentityModel.Logging": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "tuEhHIQwvBEhMf8I50hy8FHmRSUkffDFP5EdLsSDV4qRcl2wvOPkQxYqEzWkh+ytW6sbdJGEXElGhmhDfAxAKg==",
+ "resolved": "6.24.0",
+ "contentHash": "qLYWDOowM/zghmYKXw1yfYKlHOdS41i8t4hVXr9bSI90zHqhyhQh9GwVy8pENzs5wHeytU23DymluC9NtgYv7w==",
"dependencies": {
- "Microsoft.IdentityModel.Abstractions": "6.21.0"
+ "Microsoft.IdentityModel.Abstractions": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "0FqY5cTLQKtHrClzHEI+QxJl8OBT2vUiEQQB7UKk832JDiJJmetzYZ3AdSrPjN/3l3nkhByeWzXnhrX0JbifKg==",
+ "resolved": "6.24.0",
+ "contentHash": "+NzKCkvsQ8X1r/Ff74V7CFr9OsdMRaB6DsV+qpH7NNLdYJ8O4qHbmTnNEsjFcDmk/gVNDwhoL2gN5pkPVq0lwQ==",
"dependencies": {
- "Microsoft.IdentityModel.Logging": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.Logging": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"Microsoft.IdentityModel.Protocols.OpenIdConnect": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "vtSKL7n6EnAsLyxmiviusm6LKrblT2ndnNqN6rvVq6iIHAnPCK9E2DkDx6h1Jrpy1cvbp40r0cnTg23nhEAGTA==",
+ "resolved": "6.24.0",
+ "contentHash": "a/2RRrc8C9qaw8qdD9hv1ES9YKFgxaqr/SnwMSLbwQZJSUQDd4qx1K4EYgWaQWs73R+VXLyKSxN0f/uE9CsBiQ==",
"dependencies": {
- "Microsoft.IdentityModel.Protocols": "6.21.0",
- "System.IdentityModel.Tokens.Jwt": "6.21.0"
+ "Microsoft.IdentityModel.Protocols": "6.24.0",
+ "System.IdentityModel.Tokens.Jwt": "6.24.0"
}
},
"Microsoft.IdentityModel.Tokens": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "AAEHZvZyb597a+QJSmtxH3n2P1nIJGpZ4Q89GTenknRx6T6zyfzf592yW/jA5e8EHN4tNMjjXHQaYWEq5+L05w==",
+ "resolved": "6.24.0",
+ "contentHash": "ZPqHi86UYuqJXJ7bLnlEctHKkPKT4lGUFbotoCNiXNCSL02emYlcxzGYsRGWWmbFEcYDMi2dcTLLYNzHqWOTsw==",
"dependencies": {
"Microsoft.CSharp": "4.5.0",
- "Microsoft.IdentityModel.Logging": "6.21.0",
+ "Microsoft.IdentityModel.Logging": "6.24.0",
"System.Security.Cryptography.Cng": "4.5.0"
}
},
@@ -1358,13 +1334,13 @@
},
"Newtonsoft.Json": {
"type": "Transitive",
- "resolved": "13.0.1",
- "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
+ "resolved": "13.0.3",
+ "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ=="
},
"Npgsql": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "7UVPYy2RP0ci04PED1tc9ZCaTw/DfSdSkLiGEFCAvwMwsgA/bAluj1liNzP1IpN0MFofnOF0cm1zJfmbEuCehg==",
+ "resolved": "7.0.6",
+ "contentHash": "TAqvwRnm3NJ0QvN7cvu6geJkbI0XPzGVRElVY5hF4gsgA+BnE12x6GM1TLhdeq+7ZKvvo3BD8jXKnXmr3tvdEw==",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "6.0.0",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
@@ -1372,13 +1348,13 @@
},
"Npgsql.EntityFrameworkCore.PostgreSQL": {
"type": "Transitive",
- "resolved": "7.0.4",
- "contentHash": "ZYMtyG6pmLtUsFAx0/XaIlVkJM+1gArWEKD55cLLxiVlGScAphjiGj+G7Gk16yg5lhhdWx+bgXWpIUISXuS33g==",
+ "resolved": "7.0.11",
+ "contentHash": "cHEgEz0ldXc9wVANs8sJqC+3eilqefrkasCBgaVT0tyj8tb1p3/pwy2ngjboNkDG3M0z+xJsJ4jC5p8wySAM3w==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.5, 8.0.0)",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, 8.0.0)",
- "Npgsql": "7.0.4"
+ "Microsoft.EntityFrameworkCore": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Abstractions": "[7.0.11, 8.0.0)",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.11, 8.0.0)",
+ "Npgsql": "7.0.6"
}
},
"NSec.Cryptography": {
@@ -1719,8 +1695,8 @@
},
"Serilog.Sinks.SyslogMessages": {
"type": "Transitive",
- "resolved": "2.0.6",
- "contentHash": "V2Yq2GEbk7taEPbpBLFzLXhrHrUzKf4sQu/zLrANU8XIoUn/Mr08M2E8PrcrWVXCj0R4xLMWYe0Z1sxOrMF3IA==",
+ "resolved": "2.0.9",
+ "contentHash": "y7J+/h/Nf5EAtbpa6lC1nDhK/F9kC5oxuVYmQivv242Oh4hAVMeoAk5Gv6bgb/KbmqufGPXUFkX/AlcrvZ8Ywg==",
"dependencies": {
"Serilog": "2.5.0",
"Serilog.Sinks.PeriodicBatching": "2.3.0"
@@ -1956,8 +1932,8 @@
},
"System.Configuration.ConfigurationManager": {
"type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "7T+m0kDSlIPTHIkPMIu6m6tV6qsMqJpvQWW2jIc2qi7sn40qxFo0q+7mEQAhMPXZHMKnWrnv47ntGlM/ejvw3g==",
+ "resolved": "6.0.1",
+ "contentHash": "jXw9MlUu/kRfEU0WyTptAVueupqIeE3/rl0EZDMlf8pcvJnitQ8HeVEp69rZdaStXwTV72boi/Bhw8lOeO+U2w==",
"dependencies": {
"System.Security.Cryptography.ProtectedData": "6.0.0",
"System.Security.Permissions": "6.0.0"
@@ -2120,11 +2096,11 @@
},
"System.IdentityModel.Tokens.Jwt": {
"type": "Transitive",
- "resolved": "6.21.0",
- "contentHash": "JRD8AuypBE+2zYxT3dMJomQVsPYsCqlyZhWel3J1d5nzQokSRyTueF+Q4ID3Jcu6zSZKuzOdJ1MLTkbQsDqcvQ==",
+ "resolved": "6.24.0",
+ "contentHash": "Qibsj9MPWq8S/C0FgvmsLfIlHLE7ay0MJIaAmK94ivN3VyDdglqReed5qMvdQhSL0BzK6v0Z1wB/sD88zVu6Jw==",
"dependencies": {
- "Microsoft.IdentityModel.JsonWebTokens": "6.21.0",
- "Microsoft.IdentityModel.Tokens": "6.21.0"
+ "Microsoft.IdentityModel.JsonWebTokens": "6.24.0",
+ "Microsoft.IdentityModel.Tokens": "6.24.0"
}
},
"System.IO": {
@@ -2574,10 +2550,10 @@
},
"System.Runtime.Caching": {
"type": "Transitive",
- "resolved": "5.0.0",
- "contentHash": "30D6MkO8WF9jVGWZIP0hmCN8l9BTY4LCsAzLIe4xFSXzs+AjDotR7DpSmj27pFskDURzUvqYYY0ikModgBTxWw==",
+ "resolved": "6.0.0",
+ "contentHash": "E0e03kUp5X2k+UAoVl6efmI7uU7JRBWi5EIdlQ7cr0NpBGjHG4fWII35PgsBY9T4fJQ8E4QPsL0rKksU9gcL5A==",
"dependencies": {
- "System.Configuration.ConfigurationManager": "5.0.0"
+ "System.Configuration.ConfigurationManager": "6.0.0"
}
},
"System.Runtime.CompilerServices.Unsafe": {
@@ -3153,25 +3129,25 @@
"AspNetCore.HealthChecks.SqlServer": "[6.0.2, )",
"AspNetCore.HealthChecks.Uris": "[6.0.3, )",
"Azure.Messaging.EventGrid": "[4.10.0, )",
- "Commercial.Core": "[2023.10.2, )",
- "Commercial.Infrastructure.EntityFramework": "[2023.10.2, )",
- "Core": "[2023.10.2, )",
- "SharedWeb": "[2023.10.2, )",
+ "Commercial.Core": "[2023.12.0, )",
+ "Commercial.Infrastructure.EntityFramework": "[2023.12.0, )",
+ "Core": "[2023.12.0, )",
+ "SharedWeb": "[2023.12.0, )",
"Swashbuckle.AspNetCore": "[6.5.0, )"
}
},
"commercial.core": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )"
+ "Core": "[2023.12.0, )"
}
},
"commercial.infrastructure.entityframework": {
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )",
- "Core": "[2023.10.2, )",
- "Infrastructure.EntityFramework": "[2023.10.2, )"
+ "Core": "[2023.12.0, )",
+ "Infrastructure.EntityFramework": "[2023.12.0, )"
}
},
"common": {
@@ -3179,7 +3155,7 @@
"dependencies": {
"AutoFixture.AutoNSubstitute": "[4.17.0, )",
"AutoFixture.Xunit2": "[4.17.0, )",
- "Core": "[2023.10.2, )",
+ "Core": "[2023.12.0, )",
"Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )",
"Microsoft.NET.Test.Sdk": "[17.1.0, )",
"NSubstitute": "[4.3.0, )",
@@ -3201,11 +3177,10 @@
"BitPay.Light": "[1.0.1907, )",
"Braintree": "[5.19.0, )",
"DnsClient": "[1.7.0, )",
+ "Duende.IdentityServer": "[6.0.4, )",
"Fido2.AspNet": "[3.0.1, )",
- "Handlebars.Net": "[2.1.2, )",
- "IdentityServer4": "[4.1.2, )",
- "IdentityServer4.AccessTokenValidation": "[3.0.1, )",
- "LaunchDarkly.ServerSdk": "[7.0.0, )",
+ "Handlebars.Net": "[2.1.4, )",
+ "LaunchDarkly.ServerSdk": "[8.0.0, )",
"MailKit": "[4.2.0, )",
"Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )",
"Microsoft.Azure.Cosmos.Table": "[1.0.8, )",
@@ -3215,7 +3190,7 @@
"Microsoft.Extensions.Configuration.EnvironmentVariables": "[6.0.1, )",
"Microsoft.Extensions.Configuration.UserSecrets": "[6.0.1, )",
"Microsoft.Extensions.Identity.Stores": "[6.0.4, )",
- "Newtonsoft.Json": "[13.0.1, )",
+ "Newtonsoft.Json": "[13.0.3, )",
"Otp.NET": "[1.2.2, )",
"Quartz": "[3.4.0, )",
"SendGrid": "[9.27.0, )",
@@ -3224,7 +3199,7 @@
"Serilog.Extensions.Logging": "[3.1.0, )",
"Serilog.Extensions.Logging.File": "[2.0.0, )",
"Serilog.Sinks.AzureCosmosDB": "[2.0.0, )",
- "Serilog.Sinks.SyslogMessages": "[2.0.6, )",
+ "Serilog.Sinks.SyslogMessages": "[2.0.9, )",
"Stripe.net": "[40.0.0, )",
"YubicoDotNetClient": "[1.2.0, )"
}
@@ -3232,36 +3207,36 @@
"identity": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "SharedWeb": "[2023.10.2, )",
+ "Core": "[2023.12.0, )",
+ "SharedWeb": "[2023.12.0, )",
"Swashbuckle.AspNetCore.SwaggerGen": "[6.5.0, )"
}
},
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "Dapper": "[2.0.123, )"
+ "Core": "[2023.12.0, )",
+ "Dapper": "[2.1.24, )"
}
},
"infrastructure.entityframework": {
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "[12.0.1, )",
- "Core": "[2023.10.2, )",
- "Microsoft.EntityFrameworkCore.Relational": "[7.0.5, )",
- "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.5, )",
- "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.5, )",
- "Npgsql.EntityFrameworkCore.PostgreSQL": "[7.0.4, )",
+ "Core": "[2023.12.0, )",
+ "Microsoft.EntityFrameworkCore.Relational": "[7.0.14, )",
+ "Microsoft.EntityFrameworkCore.SqlServer": "[7.0.14, )",
+ "Microsoft.EntityFrameworkCore.Sqlite": "[7.0.14, )",
+ "Npgsql.EntityFrameworkCore.PostgreSQL": "[7.0.11, )",
"Pomelo.EntityFrameworkCore.MySql": "[7.0.0, )",
- "linq2db.EntityFrameworkCore": "[7.5.0, )"
+ "linq2db.EntityFrameworkCore": "[7.6.0, )"
}
},
"integrationtestcommon": {
"type": "Project",
"dependencies": {
- "Common": "[2023.10.2, )",
- "Identity": "[2023.10.2, )",
+ "Common": "[2023.12.0, )",
+ "Identity": "[2023.12.0, )",
"Microsoft.AspNetCore.Mvc.Testing": "[6.0.5, )",
"Microsoft.Extensions.Configuration": "[6.0.1, )"
}
@@ -3269,9 +3244,9 @@
"sharedweb": {
"type": "Project",
"dependencies": {
- "Core": "[2023.10.2, )",
- "Infrastructure.Dapper": "[2023.10.2, )",
- "Infrastructure.EntityFramework": "[2023.10.2, )"
+ "Core": "[2023.12.0, )",
+ "Infrastructure.Dapper": "[2023.12.0, )",
+ "Infrastructure.EntityFramework": "[2023.12.0, )"
}
}
}
diff --git a/test/Api.Test/AdminConsole/Controllers/GroupsControllerTests.cs b/test/Api.Test/AdminConsole/Controllers/GroupsControllerTests.cs
index 9777cb9e66..4ddfeff646 100644
--- a/test/Api.Test/AdminConsole/Controllers/GroupsControllerTests.cs
+++ b/test/Api.Test/AdminConsole/Controllers/GroupsControllerTests.cs
@@ -4,7 +4,6 @@ using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Context;
-using Bit.Core.Entities;
using Bit.Core.Models.Data;
using Bit.Core.Repositories;
using Bit.Test.Common.AutoFixture;
diff --git a/test/Api.Test/AdminConsole/Controllers/OrganizationDomainControllerTests.cs b/test/Api.Test/AdminConsole/Controllers/OrganizationDomainControllerTests.cs
index 90a977157b..2f74303415 100644
--- a/test/Api.Test/AdminConsole/Controllers/OrganizationDomainControllerTests.cs
+++ b/test/Api.Test/AdminConsole/Controllers/OrganizationDomainControllerTests.cs
@@ -3,6 +3,7 @@ using Bit.Api.AdminConsole.Models.Request;
using Bit.Api.AdminConsole.Models.Request.Organizations;
using Bit.Api.AdminConsole.Models.Response.Organizations;
using Bit.Api.Models.Response;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.OrganizationFeatures.OrganizationDomains.Interfaces;
using Bit.Core.Context;
using Bit.Core.Entities;
diff --git a/test/Api.Test/AdminConsole/Controllers/OrganizationSponsorshipsControllerTests.cs b/test/Api.Test/AdminConsole/Controllers/OrganizationSponsorshipsControllerTests.cs
index e54a896885..8d9b10fded 100644
--- a/test/Api.Test/AdminConsole/Controllers/OrganizationSponsorshipsControllerTests.cs
+++ b/test/Api.Test/AdminConsole/Controllers/OrganizationSponsorshipsControllerTests.cs
@@ -1,5 +1,6 @@
using Bit.Api.Controllers;
using Bit.Api.Models.Request.Organizations;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.Context;
using Bit.Core.Entities;
using Bit.Core.Enums;
diff --git a/test/Api.Test/AdminConsole/Controllers/OrganizationUsersControllerTests.cs b/test/Api.Test/AdminConsole/Controllers/OrganizationUsersControllerTests.cs
index b62027919c..baf23bb9c1 100644
--- a/test/Api.Test/AdminConsole/Controllers/OrganizationUsersControllerTests.cs
+++ b/test/Api.Test/AdminConsole/Controllers/OrganizationUsersControllerTests.cs
@@ -1,7 +1,10 @@
using Bit.Api.AdminConsole.Controllers;
using Bit.Api.AdminConsole.Models.Request.Organizations;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.AdminConsole.Enums;
+using Bit.Core.AdminConsole.Models.Data.Organizations.Policies;
+using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Entities;
-using Bit.Core.Models.Data.Organizations.Policies;
using Bit.Core.OrganizationFeatures.OrganizationUsers.Interfaces;
using Bit.Core.Repositories;
using Bit.Core.Services;
@@ -82,7 +85,7 @@ public class OrganizationUsersControllerTests
};
sutProvider.GetDependency().GetUserByPrincipalAsync(default).ReturnsForAnyArgs(user);
sutProvider.GetDependency().GetByOrganizationIdTypeAsync(orgId,
- Core.Enums.PolicyType.ResetPassword).Returns(policy);
+ PolicyType.ResetPassword).Returns(policy);
await sutProvider.Sut.Accept(orgId, orgUserId, model);
diff --git a/test/Api.Test/AdminConsole/Controllers/OrganizationsControllerTests.cs b/test/Api.Test/AdminConsole/Controllers/OrganizationsControllerTests.cs
index 7a3f4437ca..fd24c47af2 100644
--- a/test/Api.Test/AdminConsole/Controllers/OrganizationsControllerTests.cs
+++ b/test/Api.Test/AdminConsole/Controllers/OrganizationsControllerTests.cs
@@ -3,6 +3,7 @@ using AutoFixture.Xunit2;
using Bit.Api.AdminConsole.Controllers;
using Bit.Api.AdminConsole.Models.Request.Organizations;
using Bit.Api.Models.Request.Organizations;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.OrganizationFeatures.OrganizationApiKeys.Interfaces;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Auth.Entities;
diff --git a/test/Api.Test/AdminConsole/Public/Controllers/GroupsControllerTests.cs b/test/Api.Test/AdminConsole/Public/Controllers/GroupsControllerTests.cs
index 37351b3255..a3d5294fe2 100644
--- a/test/Api.Test/AdminConsole/Public/Controllers/GroupsControllerTests.cs
+++ b/test/Api.Test/AdminConsole/Public/Controllers/GroupsControllerTests.cs
@@ -5,7 +5,6 @@ using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Context;
-using Bit.Core.Entities;
using Bit.Core.Models.Data;
using Bit.Core.Repositories;
using Bit.Test.Common.AutoFixture;
diff --git a/test/Api.Test/Controllers/AccountsControllerTests.cs b/test/Api.Test/Auth/Controllers/AccountsControllerTests.cs
similarity index 94%
rename from test/Api.Test/Controllers/AccountsControllerTests.cs
rename to test/Api.Test/Auth/Controllers/AccountsControllerTests.cs
index aa3cca0b4f..b0a9964007 100644
--- a/test/Api.Test/Controllers/AccountsControllerTests.cs
+++ b/test/Api.Test/Auth/Controllers/AccountsControllerTests.cs
@@ -1,7 +1,13 @@
using System.Security.Claims;
+using Bit.Api.Auth.Controllers;
+using Bit.Api.Auth.Models.Request;
using Bit.Api.Auth.Models.Request.Accounts;
-using Bit.Api.Controllers;
+using Bit.Api.Auth.Validators;
+using Bit.Api.Vault.Models.Request;
+using Bit.Core;
using Bit.Core.AdminConsole.Repositories;
+using Bit.Core.AdminConsole.Services;
+using Bit.Core.Auth.Entities;
using Bit.Core.Auth.Models.Api.Request.Accounts;
using Bit.Core.Auth.Services;
using Bit.Core.Auth.UserFeatures.UserKey;
@@ -16,13 +22,14 @@ using Bit.Core.Services;
using Bit.Core.Settings;
using Bit.Core.Tools.Repositories;
using Bit.Core.Tools.Services;
+using Bit.Core.Vault.Entities;
using Bit.Core.Vault.Repositories;
using Bit.Test.Common.AutoFixture.Attributes;
using Microsoft.AspNetCore.Identity;
using NSubstitute;
using Xunit;
-namespace Bit.Api.Test.Controllers;
+namespace Bit.Api.Test.Auth.Controllers;
public class AccountsControllerTests : IDisposable
{
@@ -47,6 +54,12 @@ public class AccountsControllerTests : IDisposable
private readonly ICurrentContext _currentContext;
+ private readonly IRotationValidator, IEnumerable> _cipherValidator;
+ private readonly IRotationValidator, IEnumerable> _folderValidator;
+ private readonly IRotationValidator, IEnumerable>
+ _emergencyAccessValidator;
+
+
public AccountsControllerTests()
{
_userService = Substitute.For();
@@ -66,6 +79,12 @@ public class AccountsControllerTests : IDisposable
_rotateUserKeyCommand = Substitute.For();
_featureService = Substitute.For();
_currentContext = Substitute.For();
+ _cipherValidator =
+ Substitute.For, IEnumerable>>();
+ _folderValidator =
+ Substitute.For, IEnumerable>>();
+ _emergencyAccessValidator = Substitute.For,
+ IEnumerable>>();
_sut = new AccountsController(
_globalSettings,
@@ -84,7 +103,10 @@ public class AccountsControllerTests : IDisposable
_setInitialMasterPasswordCommand,
_rotateUserKeyCommand,
_featureService,
- _currentContext
+ _currentContext,
+ _cipherValidator,
+ _folderValidator,
+ _emergencyAccessValidator
);
}
@@ -110,14 +132,14 @@ public class AccountsControllerTests : IDisposable
}
[Fact]
- public async Task PostPrelogin_WhenUserDoesNotExist_ShouldDefaultToSha256And100000Iterations()
+ public async Task PostPrelogin_WhenUserDoesNotExist_ShouldDefaultToPBKDF()
{
_userRepository.GetKdfInformationByEmailAsync(Arg.Any()).Returns(Task.FromResult((UserKdfInformation)null));
var response = await _sut.PostPrelogin(new PreloginRequestModel { Email = "user@example.com" });
Assert.Equal(KdfType.PBKDF2_SHA256, response.Kdf);
- Assert.Equal(100000, response.KdfIterations);
+ Assert.Equal(AuthConstants.PBKDF2_ITERATIONS.Default, response.KdfIterations);
}
[Fact]
diff --git a/test/Api.Test/Auth/Controllers/WebAuthnControllerTests.cs b/test/Api.Test/Auth/Controllers/WebAuthnControllerTests.cs
index 26265f5c41..c8d2ea905c 100644
--- a/test/Api.Test/Auth/Controllers/WebAuthnControllerTests.cs
+++ b/test/Api.Test/Auth/Controllers/WebAuthnControllerTests.cs
@@ -1,9 +1,10 @@
using Bit.Api.Auth.Controllers;
using Bit.Api.Auth.Models.Request.Accounts;
using Bit.Api.Auth.Models.Request.Webauthn;
+using Bit.Core.AdminConsole.Enums;
+using Bit.Core.AdminConsole.Services;
using Bit.Core.Auth.Models.Business.Tokenables;
using Bit.Core.Entities;
-using Bit.Core.Enums;
using Bit.Core.Exceptions;
using Bit.Core.Services;
using Bit.Core.Tokens;
diff --git a/test/Api.Test/Auth/Validators/EmergencyAccessRotationValidatorTests.cs b/test/Api.Test/Auth/Validators/EmergencyAccessRotationValidatorTests.cs
new file mode 100644
index 0000000000..7e9cf6a6b3
--- /dev/null
+++ b/test/Api.Test/Auth/Validators/EmergencyAccessRotationValidatorTests.cs
@@ -0,0 +1,136 @@
+using Bit.Api.Auth.Models.Request;
+using Bit.Api.Auth.Validators;
+using Bit.Core.Auth.Models.Data;
+using Bit.Core.Entities;
+using Bit.Core.Exceptions;
+using Bit.Core.Repositories;
+using Bit.Core.Services;
+using Bit.Test.Common.AutoFixture;
+using Bit.Test.Common.AutoFixture.Attributes;
+using NSubstitute;
+using Xunit;
+
+namespace Bit.Api.Test.Auth.Validators;
+
+[SutProviderCustomize]
+public class EmergencyAccessRotationValidatorTests
+{
+ [Theory]
+ [BitAutoData]
+ public async Task ValidateAsync_MissingEmergencyAccess_Throws(
+ SutProvider sutProvider, User user,
+ IEnumerable emergencyAccessKeys)
+ {
+ sutProvider.GetDependency().CanAccessPremium(user).Returns(true);
+ var userEmergencyAccess = emergencyAccessKeys.Select(e => new EmergencyAccessDetails
+ {
+ Id = e.Id,
+ GrantorName = user.Name,
+ GrantorEmail = user.Email,
+ KeyEncrypted = e.KeyEncrypted,
+ Type = e.Type
+ }).ToList();
+ userEmergencyAccess.Add(new EmergencyAccessDetails { Id = Guid.NewGuid(), KeyEncrypted = "TestKey" });
+ sutProvider.GetDependency().GetManyDetailsByGrantorIdAsync(user.Id)
+ .Returns(userEmergencyAccess);
+
+ await Assert.ThrowsAsync(async () =>
+ await sutProvider.Sut.ValidateAsync(user, emergencyAccessKeys));
+ }
+
+ [Theory]
+ [BitAutoData]
+ public async Task ValidateAsync_EmergencyAccessDoesNotBelongToUser_NotIncluded(
+ SutProvider sutProvider, User user,
+ IEnumerable emergencyAccessKeys)
+ {
+ sutProvider.GetDependency().CanAccessPremium(user).Returns(true);
+ var userEmergencyAccess = emergencyAccessKeys.Select(e => new EmergencyAccessDetails
+ {
+ Id = e.Id,
+ GrantorName = user.Name,
+ GrantorEmail = user.Email,
+ KeyEncrypted = e.KeyEncrypted,
+ Type = e.Type
+ }).ToList();
+ userEmergencyAccess.RemoveAt(0);
+ sutProvider.GetDependency().GetManyDetailsByGrantorIdAsync(user.Id)
+ .Returns(userEmergencyAccess);
+
+ var result = await sutProvider.Sut.ValidateAsync(user, emergencyAccessKeys);
+
+ Assert.DoesNotContain(result, c => c.Id == emergencyAccessKeys.First().Id);
+ }
+
+ [Theory]
+ [BitAutoData]
+ public async Task ValidateAsync_UserNotPremium_Success(
+ SutProvider sutProvider, User user,
+ IEnumerable emergencyAccessKeys)
+ {
+ // We want to allow users who have lost premium to rotate their key for any existing emergency access, as long
+ // as we restrict it to existing records and don't let them alter data
+ user.Premium = false;
+ var userEmergencyAccess = emergencyAccessKeys.Select(e => new EmergencyAccessDetails
+ {
+ Id = e.Id,
+ GrantorName = user.Name,
+ GrantorEmail = user.Email,
+ KeyEncrypted = e.KeyEncrypted,
+ Type = e.Type
+ }).ToList();
+ sutProvider.GetDependency().GetManyDetailsByGrantorIdAsync(user.Id)
+ .Returns(userEmergencyAccess);
+
+ var result = await sutProvider.Sut.ValidateAsync(user, emergencyAccessKeys);
+
+ Assert.Equal(userEmergencyAccess, result);
+ }
+
+ [Theory]
+ [BitAutoData]
+ public async Task ValidateAsync_NonConfirmedEmergencyAccess_NotReturned(
+ SutProvider sutProvider, User user,
+ IEnumerable emergencyAccessKeys)
+ {
+ emergencyAccessKeys.First().KeyEncrypted = null;
+ sutProvider.GetDependency().CanAccessPremium(user).Returns(true);
+ var userEmergencyAccess = emergencyAccessKeys.Select(e => new EmergencyAccessDetails
+ {
+ Id = e.Id,
+ GrantorName = user.Name,
+ GrantorEmail = user.Email,
+ KeyEncrypted = e.KeyEncrypted,
+ Type = e.Type
+ }).ToList();
+ sutProvider.GetDependency().GetManyDetailsByGrantorIdAsync(user.Id)
+ .Returns(userEmergencyAccess);
+
+ var result = await sutProvider.Sut.ValidateAsync(user, emergencyAccessKeys);
+
+ Assert.DoesNotContain(result, c => c.Id == emergencyAccessKeys.First().Id);
+ }
+
+ [Theory]
+ [BitAutoData]
+ public async Task ValidateAsync_AttemptToSetKeyToNull_Throws(
+ SutProvider sutProvider, User user,
+ IEnumerable emergencyAccessKeys)
+ {
+ sutProvider.GetDependency().CanAccessPremium(user).Returns(true);
+ var userEmergencyAccess = emergencyAccessKeys.Select(e => new EmergencyAccessDetails
+ {
+ Id = e.Id,
+ GrantorName = user.Name,
+ GrantorEmail = user.Email,
+ KeyEncrypted = e.KeyEncrypted,
+ Type = e.Type
+ }).ToList();
+ sutProvider.GetDependency().GetManyDetailsByGrantorIdAsync(user.Id)
+ .Returns(userEmergencyAccess);
+ emergencyAccessKeys.First().KeyEncrypted = null;
+
+ await Assert.ThrowsAsync(async () =>
+ await sutProvider.Sut.ValidateAsync(user, emergencyAccessKeys));
+ }
+}
diff --git a/test/Api.Test/Controllers/CollectionsControllerTests.cs b/test/Api.Test/Controllers/CollectionsControllerTests.cs
index 5bd5bfcb4c..3919e6f4ee 100644
--- a/test/Api.Test/Controllers/CollectionsControllerTests.cs
+++ b/test/Api.Test/Controllers/CollectionsControllerTests.cs
@@ -3,6 +3,7 @@ using Bit.Api.Controllers;
using Bit.Api.Models.Request;
using Bit.Api.Vault.AuthorizationHandlers.Collections;
using Bit.Core;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.Context;
using Bit.Core.Entities;
using Bit.Core.Exceptions;
diff --git a/test/Api.Test/Controllers/LegacyCollectionsControllerTests.cs b/test/Api.Test/Controllers/LegacyCollectionsControllerTests.cs
index 68683837d1..07c27d4abc 100644
--- a/test/Api.Test/Controllers/LegacyCollectionsControllerTests.cs
+++ b/test/Api.Test/Controllers/LegacyCollectionsControllerTests.cs
@@ -1,7 +1,9 @@
using Bit.Api.Controllers;
using Bit.Api.Models.Request;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.Context;
using Bit.Core.Entities;
+using Bit.Core.Enums;
using Bit.Core.Exceptions;
using Bit.Core.Models.Data;
using Bit.Core.OrganizationFeatures.OrganizationCollections.Interfaces;
@@ -11,6 +13,8 @@ using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
using NSubstitute;
using Xunit;
+using Collection = Bit.Core.Entities.Collection;
+using User = Bit.Core.Entities.User;
namespace Bit.Api.Test.Controllers;
@@ -23,8 +27,11 @@ namespace Bit.Api.Test.Controllers;
public class LegacyCollectionsControllerTests
{
[Theory, BitAutoData]
- public async Task Post_Success(Guid orgId, SutProvider sutProvider)
+ public async Task Post_Manager_AssignsToCollection_Success(Guid orgId, OrganizationUser orgUser, SutProvider sutProvider)
{
+ orgUser.Type = OrganizationUserType.Manager;
+ orgUser.Status = OrganizationUserStatusType.Confirmed;
+
sutProvider.GetDependency()
.OrganizationManager(orgId)
.Returns(true);
@@ -33,6 +40,15 @@ public class LegacyCollectionsControllerTests
.EditAnyCollection(orgId)
.Returns(false);
+ sutProvider.GetDependency()
+ .EditAssignedCollections(orgId)
+ .Returns(true);
+
+ sutProvider.GetDependency().UserId = orgUser.UserId;
+
+ sutProvider.GetDependency().GetByOrganizationAsync(orgId, orgUser.UserId.Value)
+ .Returns(orgUser);
+
var collectionRequest = new CollectionRequestModel
{
Name = "encrypted_string",
@@ -41,9 +57,49 @@ public class LegacyCollectionsControllerTests
_ = await sutProvider.Sut.Post(orgId, collectionRequest);
+ var test = sutProvider.GetDependency().ReceivedCalls();
await sutProvider.GetDependency()
.Received(1)
- .SaveAsync(Arg.Any(), Arg.Any>(), null);
+ .SaveAsync(Arg.Any(), Arg.Any>(),
+ Arg.Is>(users => users.Any(u => u.Id == orgUser.Id && !u.ReadOnly && !u.HidePasswords && !u.Manage)));
+ }
+
+ [Theory, BitAutoData]
+ public async Task Post_Owner_DoesNotAssignToCollection_Success(Guid orgId, OrganizationUser orgUser, SutProvider sutProvider)
+ {
+ orgUser.Type = OrganizationUserType.Owner;
+ orgUser.Status = OrganizationUserStatusType.Confirmed;
+
+ sutProvider.GetDependency()
+ .OrganizationManager(orgId)
+ .Returns(true);
+
+ sutProvider.GetDependency()
+ .EditAnyCollection(orgId)
+ .Returns(true);
+
+ sutProvider.GetDependency()
+ .EditAssignedCollections(orgId)
+ .Returns(true);
+
+ sutProvider.GetDependency().UserId = orgUser.UserId;
+
+ sutProvider.GetDependency().GetByOrganizationAsync(orgId, orgUser.UserId.Value)
+ .Returns(orgUser);
+
+ var collectionRequest = new CollectionRequestModel
+ {
+ Name = "encrypted_string",
+ ExternalId = "my_external_id"
+ };
+
+ _ = await sutProvider.Sut.Post(orgId, collectionRequest);
+
+ var test = sutProvider.GetDependency().ReceivedCalls();
+ await sutProvider.GetDependency()
+ .Received(1)
+ .SaveAsync(Arg.Any(), Arg.Any>(),
+ Arg.Is>(users => !users.Any()));
}
[Theory, BitAutoData]
diff --git a/test/Api.Test/Controllers/PoliciesControllerTests.cs b/test/Api.Test/Controllers/PoliciesControllerTests.cs
index 0d2f004b17..ec69104e52 100644
--- a/test/Api.Test/Controllers/PoliciesControllerTests.cs
+++ b/test/Api.Test/Controllers/PoliciesControllerTests.cs
@@ -1,10 +1,12 @@
using System.Security.Claims;
using System.Text.Json;
using Bit.Api.AdminConsole.Controllers;
+using Bit.Core.AdminConsole.Entities;
+using Bit.Core.AdminConsole.Enums;
+using Bit.Core.AdminConsole.Models.Data.Organizations.Policies;
+using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Entities;
-using Bit.Core.Enums;
using Bit.Core.Exceptions;
-using Bit.Core.Models.Data.Organizations.Policies;
using Bit.Core.Repositories;
using Bit.Core.Services;
using Bit.Test.Common.AutoFixture;
diff --git a/test/Api.Test/Models/Request/Accounts/KdfRequestModelTests.cs b/test/Api.Test/Models/Request/Accounts/KdfRequestModelTests.cs
index 0edd5a96d0..612b7ad442 100644
--- a/test/Api.Test/Models/Request/Accounts/KdfRequestModelTests.cs
+++ b/test/Api.Test/Models/Request/Accounts/KdfRequestModelTests.cs
@@ -9,11 +9,11 @@ public class KdfRequestModelTests
{
[Theory]
[InlineData(KdfType.PBKDF2_SHA256, 1_000_000, null, null)] // Somewhere in the middle
- [InlineData(KdfType.PBKDF2_SHA256, 5000, null, null)] // Right on the lower boundary
+ [InlineData(KdfType.PBKDF2_SHA256, 600_000, null, null)] // Right on the lower boundary
[InlineData(KdfType.PBKDF2_SHA256, 2_000_000, null, null)] // Right on the upper boundary
- [InlineData(KdfType.Argon2id, 10, 500, 8)] // Somewhere in the middle
- [InlineData(KdfType.Argon2id, 1, 15, 1)] // Right on the lower boundary
- [InlineData(KdfType.Argon2id, 5000, 1024, 16)] // Right on the upper boundary
+ [InlineData(KdfType.Argon2id, 5, 500, 8)] // Somewhere in the middle
+ [InlineData(KdfType.Argon2id, 2, 15, 1)] // Right on the lower boundary
+ [InlineData(KdfType.Argon2id, 10, 1024, 16)] // Right on the upper boundary
public void Validate_IsValid(KdfType kdfType, int? kdfIterations, int? kdfMemory, int? kdfParallelism)
{
var model = new KdfRequestModel
@@ -32,7 +32,7 @@ public class KdfRequestModelTests
[Theory]
[InlineData(null, 350_000, null, null, 1)] // Although KdfType is nullable, it's marked as [Required]
- [InlineData(KdfType.PBKDF2_SHA256, 1000, null, null, 1)] // Too few iterations
+ [InlineData(KdfType.PBKDF2_SHA256, 500_000, null, null, 1)] // Too few iterations
[InlineData(KdfType.PBKDF2_SHA256, 2_000_001, null, null, 1)] // Too many iterations
[InlineData(KdfType.Argon2id, 0, 30, 8, 1)] // Iterations must be greater than 0
[InlineData(KdfType.Argon2id, 10, 14, 8, 1)] // Too little memory
diff --git a/test/Api.Test/SecretsManager/Controllers/ServiceAccountsControllerTests.cs b/test/Api.Test/SecretsManager/Controllers/ServiceAccountsControllerTests.cs
index 29dcd117c1..6e23a4dfe0 100644
--- a/test/Api.Test/SecretsManager/Controllers/ServiceAccountsControllerTests.cs
+++ b/test/Api.Test/SecretsManager/Controllers/ServiceAccountsControllerTests.cs
@@ -1,8 +1,8 @@
using System.Security.Claims;
using Bit.Api.SecretsManager.Controllers;
using Bit.Api.SecretsManager.Models.Request;
+using Bit.Core.AdminConsole.Entities;
using Bit.Core.Context;
-using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Exceptions;
using Bit.Core.Models.Business;
diff --git a/test/Api.Test/Vault/AuthorizationHandlers/CollectionAuthorizationHandlerTests.cs b/test/Api.Test/Vault/AuthorizationHandlers/CollectionAuthorizationHandlerTests.cs
index aaaa3076b0..6dc63b69e5 100644
--- a/test/Api.Test/Vault/AuthorizationHandlers/CollectionAuthorizationHandlerTests.cs
+++ b/test/Api.Test/Vault/AuthorizationHandlers/CollectionAuthorizationHandlerTests.cs
@@ -143,7 +143,7 @@ public class CollectionAuthorizationHandlerTests
}
[Theory, BitAutoData, CollectionCustomization]
- public async Task HandleRequirementAsync_TargetCollectionsMultipleOrgs_Failure(
+ public async Task HandleRequirementAsync_TargetCollectionsMultipleOrgs_Exception(
SutProvider