diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 1e001d527f..84e2577046 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -2,5 +2,5 @@ # # https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners -**/SecretsManager @bitwarden/pod-sm-dev +**/SecretsManager @bitwarden/team-secrets-manager-dev **/Vault @bitwarden/team-vault-dev diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0755c1f974..fd6932b335 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -324,10 +324,7 @@ jobs: IMAGE_TAG=$(echo "${GITHUB_REF:11}" | sed "s#/#-#g") # slash safe branch name if [[ "$IMAGE_TAG" == "master" ]]; then IMAGE_TAG=dev - elif [[ "$IMAGE_TAG" == "rc" ]] || [[ "$IMAGE_TAG" == "hotfix-rc" ]]; then - IMAGE_TAG=beta fi - echo "image_tag=$IMAGE_TAG" >> $GITHUB_OUTPUT - name: Setup project name @@ -501,7 +498,7 @@ jobs: dotnet restore - name: Publish project - run: dotnet publish -c "Release" -o obj/build-output/publish -r ${{ matrix.target }} --self-contained true + run: dotnet publish -c "Release" -o obj/build-output/publish -r ${{ matrix.target }} -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true --self-contained true - name: Upload project artifact Windows if: ${{ contains(matrix.target, 'win') == true }} diff --git a/Directory.Build.props b/Directory.Build.props index 8d5dc85fbe..0f4915ed97 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -3,7 +3,7 @@ net6.0 - 2023.2.2 + 2023.3.0 Bit.$(MSBuildProjectName) true enable @@ -32,10 +32,6 @@ NuGet: https://www.nuget.org/packages/coverlet.collector/ --> 3.1.2 - - 6.0.3 diff --git a/bitwarden_license/src/Commercial.Core/SecretsManager/Commands/Projects/DeleteProjectCommand.cs b/bitwarden_license/src/Commercial.Core/SecretsManager/Commands/Projects/DeleteProjectCommand.cs index e975df93f7..06e282c28e 100644 --- a/bitwarden_license/src/Commercial.Core/SecretsManager/Commands/Projects/DeleteProjectCommand.cs +++ b/bitwarden_license/src/Commercial.Core/SecretsManager/Commands/Projects/DeleteProjectCommand.cs @@ -11,11 +11,13 @@ public class DeleteProjectCommand : IDeleteProjectCommand { private readonly IProjectRepository _projectRepository; private readonly ICurrentContext _currentContext; + private readonly ISecretRepository _secretRepository; - public DeleteProjectCommand(IProjectRepository projectRepository, ICurrentContext currentContext) + public DeleteProjectCommand(IProjectRepository projectRepository, ICurrentContext currentContext, ISecretRepository secretRepository) { _projectRepository = projectRepository; _currentContext = currentContext; + _secretRepository = secretRepository; } public async Task>> DeleteProjects(List ids, Guid userId) @@ -25,7 +27,7 @@ public class DeleteProjectCommand : IDeleteProjectCommand throw new ArgumentNullException(); } - var projects = (await _projectRepository.GetManyByIds(ids))?.ToList(); + var projects = (await _projectRepository.GetManyWithSecretsByIds(ids))?.ToList(); if (projects?.Any() != true || projects.Count != ids.Count) { @@ -72,9 +74,16 @@ public class DeleteProjectCommand : IDeleteProjectCommand if (deleteIds.Count > 0) { + var secretIds = results.SelectMany(projTuple => projTuple.Item1?.Secrets?.Select(s => s.Id) ?? Array.Empty()).ToList(); + + if (secretIds.Count > 0) + { + await _secretRepository.UpdateRevisionDates(secretIds); + } + await _projectRepository.DeleteManyByIdAsync(deleteIds); } + return results; } } - diff --git a/bitwarden_license/src/Commercial.Core/packages.lock.json b/bitwarden_license/src/Commercial.Core/packages.lock.json index 508f0f6c25..30397abc69 100644 --- a/bitwarden_license/src/Commercial.Core/packages.lock.json +++ b/bitwarden_license/src/Commercial.Core/packages.lock.json @@ -2604,43 +2604,43 @@ "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } } } diff --git a/bitwarden_license/src/Commercial.Infrastructure.EntityFramework/SecretsManager/Repositories/ProjectRepository.cs b/bitwarden_license/src/Commercial.Infrastructure.EntityFramework/SecretsManager/Repositories/ProjectRepository.cs index f9bb3740d3..fe5936cf16 100644 --- a/bitwarden_license/src/Commercial.Infrastructure.EntityFramework/SecretsManager/Repositories/ProjectRepository.cs +++ b/bitwarden_license/src/Commercial.Infrastructure.EntityFramework/SecretsManager/Repositories/ProjectRepository.cs @@ -1,7 +1,6 @@ using System.Linq.Expressions; using AutoMapper; using Bit.Core.Enums; -using Bit.Core.SecretsManager.Models.Data; using Bit.Core.SecretsManager.Repositories; using Bit.Infrastructure.EntityFramework.Repositories; using Bit.Infrastructure.EntityFramework.SecretsManager.Models; @@ -28,31 +27,6 @@ public class ProjectRepository : Repository GetPermissionDetailsByIdAsync(Guid id, Guid userId) - { - using var scope = ServiceScopeFactory.CreateScope(); - var dbContext = GetDatabaseContext(scope); - - var project = await dbContext.Project - .Where(c => c.Id == id && c.DeletedDate == null) - .Select(p => new ProjectPermissionDetails - { - Id = p.Id, - OrganizationId = p.OrganizationId, - Name = p.Name, - CreationDate = p.CreationDate, - RevisionDate = p.RevisionDate, - DeletedDate = p.DeletedDate, - Read = p.UserAccessPolicies.Any(ap => ap.OrganizationUser.User.Id == userId && ap.Read) - || p.GroupAccessPolicies.Any(ap => - ap.Group.GroupUsers.Any(gu => gu.OrganizationUser.User.Id == userId && ap.Read)), - Write = p.UserAccessPolicies.Any(ap => ap.OrganizationUser.User.Id == userId && ap.Write) || - p.GroupAccessPolicies.Any(ap => - ap.Group.GroupUsers.Any(gu => gu.OrganizationUser.User.Id == userId && ap.Write)), - }).FirstOrDefaultAsync(); - return project; - } - public async Task> GetManyByOrganizationIdAsync(Guid organizationId, Guid userId, AccessClientType accessType) { using var scope = ServiceScopeFactory.CreateScope(); @@ -117,12 +91,13 @@ public class ProjectRepository : Repository> GetManyByIds(IEnumerable ids) + public async Task> GetManyWithSecretsByIds(IEnumerable ids) { using (var scope = ServiceScopeFactory.CreateScope()) { var dbContext = GetDatabaseContext(scope); var projects = await dbContext.Project + .Include(p => p.Secrets) .Where(c => ids.Contains(c.Id) && c.DeletedDate == null) .ToListAsync(); return Mapper.Map>(projects); @@ -182,4 +157,37 @@ public class ProjectRepository : Repository AccessToProjectAsync(Guid id, Guid userId, AccessClientType accessType) + { + using var scope = ServiceScopeFactory.CreateScope(); + var dbContext = GetDatabaseContext(scope); + + var projectQuery = dbContext.Project + .Where(s => s.Id == id); + + var query = accessType switch + { + AccessClientType.NoAccessCheck => projectQuery.Select(_ => new { Read = true, Write = true }), + AccessClientType.User => projectQuery.Select(p => new + { + Read = p.UserAccessPolicies.Any(ap => ap.OrganizationUser.User.Id == userId && ap.Read) + || p.GroupAccessPolicies.Any(ap => + ap.Group.GroupUsers.Any(gu => gu.OrganizationUser.User.Id == userId && ap.Read)), + Write = p.UserAccessPolicies.Any(ap => ap.OrganizationUser.User.Id == userId && ap.Write) || + p.GroupAccessPolicies.Any(ap => + ap.Group.GroupUsers.Any(gu => gu.OrganizationUser.User.Id == userId && ap.Write)), + }), + AccessClientType.ServiceAccount => projectQuery.Select(p => new + { + Read = p.ServiceAccountAccessPolicies.Any(ap => ap.ServiceAccountId == userId && ap.Read), + Write = p.ServiceAccountAccessPolicies.Any(ap => ap.ServiceAccountId == userId && ap.Write), + }), + _ => projectQuery.Select(_ => new { Read = false, Write = false }), + }; + + var policy = await query.FirstOrDefaultAsync(); + + return (policy.Read, policy.Write); + } } diff --git a/bitwarden_license/src/Commercial.Infrastructure.EntityFramework/SecretsManager/Repositories/SecretRepository.cs b/bitwarden_license/src/Commercial.Infrastructure.EntityFramework/SecretsManager/Repositories/SecretRepository.cs index e08f89efbe..d25af115ce 100644 --- a/bitwarden_license/src/Commercial.Infrastructure.EntityFramework/SecretsManager/Repositories/SecretRepository.cs +++ b/bitwarden_license/src/Commercial.Infrastructure.EntityFramework/SecretsManager/Repositories/SecretRepository.cs @@ -1,6 +1,7 @@ using System.Linq.Expressions; using AutoMapper; using Bit.Core.Enums; +using Bit.Core.SecretsManager.Models.Data; using Bit.Core.SecretsManager.Repositories; using Bit.Infrastructure.EntityFramework; using Bit.Infrastructure.EntityFramework.Repositories; @@ -35,40 +36,25 @@ public class SecretRepository : Repository ids.Contains(c.Id) && c.DeletedDate == null) - .Include(c => c.Projects) - .ToListAsync(); + .Where(c => ids.Contains(c.Id) && c.DeletedDate == null) + .Include(c => c.Projects) + .ToListAsync(); return Mapper.Map>(secrets); } } - private static Expression> ServiceAccountHasReadAccessToSecret(Guid serviceAccountId) => s => - s.Projects.Any(p => - p.ServiceAccountAccessPolicies.Any(ap => ap.ServiceAccount.Id == serviceAccountId && ap.Read)); - - private static Expression> UserHasReadAccessToSecret(Guid userId) => s => - s.Projects.Any(p => - p.UserAccessPolicies.Any(ap => ap.OrganizationUser.UserId == userId && ap.Read) || - p.GroupAccessPolicies.Any(ap => - ap.Group.GroupUsers.Any(gu => gu.OrganizationUser.UserId == userId && ap.Read))); - - - public async Task> GetManyByOrganizationIdAsync(Guid organizationId, Guid userId, AccessClientType accessType) + public async Task> GetManyByOrganizationIdAsync(Guid organizationId, Guid userId, AccessClientType accessType) { using var scope = ServiceScopeFactory.CreateScope(); var dbContext = GetDatabaseContext(scope); - var query = dbContext.Secret.Include(c => c.Projects).Where(c => c.OrganizationId == organizationId && c.DeletedDate == null); + var query = dbContext.Secret + .Include(c => c.Projects) + .Where(c => c.OrganizationId == organizationId && c.DeletedDate == null) + .OrderBy(s => s.RevisionDate); - query = accessType switch - { - AccessClientType.NoAccessCheck => query, - AccessClientType.User => query.Where(UserHasReadAccessToSecret(userId)), - AccessClientType.ServiceAccount => query.Where(ServiceAccountHasReadAccessToSecret(userId)), - _ => throw new ArgumentOutOfRangeException(nameof(accessType), accessType, null), - }; + var secrets = SecretToPermissionDetails(query, userId, accessType); - var secrets = await query.OrderBy(c => c.RevisionDate).ToListAsync(); - return Mapper.Map>(secrets); + return await secrets.ToListAsync(); } public async Task> GetManyByOrganizationIdInTrashByIdsAsync(Guid organizationId, IEnumerable ids) @@ -86,7 +72,7 @@ public class SecretRepository : Repository> GetManyByOrganizationIdInTrashAsync(Guid organizationId) + public async Task> GetManyByOrganizationIdInTrashAsync(Guid organizationId) { using (var scope = ServiceScopeFactory.CreateScope()) { @@ -97,29 +83,26 @@ public class SecretRepository : Repository c.RevisionDate) .ToListAsync(); - return Mapper.Map>(secrets); + // This should be changed if/when we allow non admins to access trashed items + return Mapper.Map>(secrets).Select(s => new SecretPermissionDetails + { + Secret = s, + Read = true, + Write = true, + }); } } - public async Task> GetManyByProjectIdAsync(Guid projectId, Guid userId, AccessClientType accessType) + public async Task> GetManyByProjectIdAsync(Guid projectId, Guid userId, AccessClientType accessType) { - using (var scope = ServiceScopeFactory.CreateScope()) - { - var dbContext = GetDatabaseContext(scope); - var query = dbContext.Secret.Include(s => s.Projects) - .Where(s => s.Projects.Any(p => p.Id == projectId) && s.DeletedDate == null); + using var scope = ServiceScopeFactory.CreateScope(); + var dbContext = GetDatabaseContext(scope); + var query = dbContext.Secret.Include(s => s.Projects) + .Where(s => s.Projects.Any(p => p.Id == projectId) && s.DeletedDate == null); - query = accessType switch - { - AccessClientType.NoAccessCheck => query, - AccessClientType.User => query.Where(UserHasReadAccessToSecret(userId)), - AccessClientType.ServiceAccount => query.Where(ServiceAccountHasReadAccessToSecret(userId)), - _ => throw new ArgumentOutOfRangeException(nameof(accessType), accessType, null), - }; + var secrets = SecretToPermissionDetails(query, userId, accessType); - var secrets = await query.OrderBy(s => s.RevisionDate).ToListAsync(); - return Mapper.Map>(secrets); - } + return await secrets.ToListAsync(); } public override async Task CreateAsync(Core.SecretsManager.Entities.Secret secret) @@ -212,11 +195,13 @@ public class SecretRepository : Repository ids.Contains(c.Id)); await secrets.ForEachAsync(secret => { dbContext.Attach(secret); secret.DeletedDate = null; + secret.RevisionDate = utcNow; }); await dbContext.SaveChangesAsync(); } @@ -252,4 +237,103 @@ public class SecretRepository : Repository ids) + { + using (var scope = ServiceScopeFactory.CreateScope()) + { + var dbContext = GetDatabaseContext(scope); + var utcNow = DateTime.UtcNow; + var secrets = dbContext.Secret.Where(s => ids.Contains(s.Id)); + + await secrets.ForEachAsync(secret => + { + dbContext.Attach(secret); + secret.RevisionDate = utcNow; + }); + + await dbContext.SaveChangesAsync(); + } + } + + public async Task<(bool Read, bool Write)> AccessToSecretAsync(Guid id, Guid userId, AccessClientType accessType) + { + using var scope = ServiceScopeFactory.CreateScope(); + var dbContext = GetDatabaseContext(scope); + + var secret = dbContext.Secret + .Where(s => s.Id == id); + + var query = accessType switch + { + AccessClientType.NoAccessCheck => secret.Select(_ => new { Read = true, Write = true }), + AccessClientType.User => secret.Select(s => new + { + Read = s.Projects.Any(p => + p.UserAccessPolicies.Any(ap => ap.OrganizationUser.User.Id == userId && ap.Read) || + p.GroupAccessPolicies.Any(ap => + ap.Group.GroupUsers.Any(gu => gu.OrganizationUser.User.Id == userId && ap.Read))), + Write = s.Projects.Any(p => + p.UserAccessPolicies.Any(ap => ap.OrganizationUser.User.Id == userId && ap.Write) || + p.GroupAccessPolicies.Any(ap => + ap.Group.GroupUsers.Any(gu => gu.OrganizationUser.User.Id == userId && ap.Write))), + }), + AccessClientType.ServiceAccount => secret.Select(s => new + { + Read = s.Projects.Any(p => + p.ServiceAccountAccessPolicies.Any(ap => ap.ServiceAccountId == userId && ap.Read)), + Write = s.Projects.Any(p => + p.ServiceAccountAccessPolicies.Any(ap => ap.ServiceAccountId == userId && ap.Write)), + }), + _ => secret.Select(_ => new { Read = false, Write = false }), + }; + + var policy = await query.FirstOrDefaultAsync(); + + return (policy.Read, policy.Write); + } + + private IQueryable SecretToPermissionDetails(IQueryable query, Guid userId, AccessClientType accessType) + { + var secrets = accessType switch + { + AccessClientType.NoAccessCheck => query.Select(s => new SecretPermissionDetails + { + Secret = Mapper.Map(s), + Read = true, + Write = true, + }), + AccessClientType.User => query.Where(UserHasReadAccessToSecret(userId)).Select(SecretToPermissionsUser(userId, true)), + AccessClientType.ServiceAccount => query.Where(ServiceAccountHasReadAccessToSecret(userId)).Select(s => + new SecretPermissionDetails + { + Secret = Mapper.Map(s), + Read = true, + Write = false, + }), + _ => throw new ArgumentOutOfRangeException(nameof(accessType), accessType, null), + }; + return secrets; + } + + private Expression> SecretToPermissionsUser(Guid userId, bool read) => + s => new SecretPermissionDetails + { + Secret = Mapper.Map(s), + Read = read, + Write = s.Projects.Any(p => + p.UserAccessPolicies.Any(ap => ap.OrganizationUser.User.Id == userId && ap.Write) || + p.GroupAccessPolicies.Any(ap => + ap.Group.GroupUsers.Any(gu => gu.OrganizationUser.User.Id == userId && ap.Write))), + }; + + private static Expression> ServiceAccountHasReadAccessToSecret(Guid serviceAccountId) => s => + s.Projects.Any(p => + p.ServiceAccountAccessPolicies.Any(ap => ap.ServiceAccount.Id == serviceAccountId && ap.Read)); + + private static Expression> UserHasReadAccessToSecret(Guid userId) => s => + s.Projects.Any(p => + p.UserAccessPolicies.Any(ap => ap.OrganizationUser.UserId == userId && ap.Read) || + p.GroupAccessPolicies.Any(ap => + ap.Group.GroupUsers.Any(gu => gu.OrganizationUser.UserId == userId && ap.Read))); } diff --git a/bitwarden_license/src/Commercial.Infrastructure.EntityFramework/packages.lock.json b/bitwarden_license/src/Commercial.Infrastructure.EntityFramework/packages.lock.json index 101abb2fd0..8d5c09d877 100644 --- a/bitwarden_license/src/Commercial.Infrastructure.EntityFramework/packages.lock.json +++ b/bitwarden_license/src/Commercial.Infrastructure.EntityFramework/packages.lock.json @@ -2777,56 +2777,56 @@ "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } }, "infrastructure.entityframework": { "type": "Project", "dependencies": { - "AutoMapper.Extensions.Microsoft.DependencyInjection": "[11.0.0, )", - "Core": "[2023.2.0, )", - "Microsoft.EntityFrameworkCore.Relational": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.SqlServer": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.Sqlite": "[6.0.12, )", - "Npgsql.EntityFrameworkCore.PostgreSQL": "[6.0.8, )", - "Pomelo.EntityFrameworkCore.MySql": "[6.0.2, )", - "linq2db.EntityFrameworkCore": "[6.11.0, )" + "AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0", + "Core": "2023.2.2", + "Microsoft.EntityFrameworkCore.Relational": "6.0.12", + "Microsoft.EntityFrameworkCore.SqlServer": "6.0.12", + "Microsoft.EntityFrameworkCore.Sqlite": "6.0.12", + "Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.8", + "Pomelo.EntityFrameworkCore.MySql": "6.0.2", + "linq2db.EntityFrameworkCore": "6.11.0" } } } diff --git a/bitwarden_license/src/Scim/Scim.csproj b/bitwarden_license/src/Scim/Scim.csproj index 3387d74e02..6f4db722b4 100644 --- a/bitwarden_license/src/Scim/Scim.csproj +++ b/bitwarden_license/src/Scim/Scim.csproj @@ -5,10 +5,6 @@ false - - - - diff --git a/bitwarden_license/src/Scim/packages.lock.json b/bitwarden_license/src/Scim/packages.lock.json index 9ad69109af..2ea44edcfb 100644 --- a/bitwarden_license/src/Scim/packages.lock.json +++ b/bitwarden_license/src/Scim/packages.lock.json @@ -2,15 +2,6 @@ "version": 1, "dependencies": { "net6.0": { - "Microsoft.VisualStudio.Web.CodeGeneration.Design": { - "type": "Direct", - "requested": "[5.0.2, )", - "resolved": "5.0.2", - "contentHash": "9eTZV7W+S2iO2AJD03xXyXJZ+Nf71Y25gMXhqyXb8bB63jPfn+VQhV8I1lb6J+NR3jW98m5EB9QBftBSrjgiYQ==", - "dependencies": { - "Microsoft.VisualStudio.Web.CodeGenerators.Mvc": "5.0.2" - } - }, "AspNetCoreRateLimit": { "type": "Transitive", "resolved": "4.0.2", @@ -199,14 +190,6 @@ "Microsoft.CSharp": "4.7.0" } }, - "Humanizer.Core": { - "type": "Transitive", - "resolved": "2.2.0", - "contentHash": "rsYXB7+iUPP8AHgQ8JP2UZI2xK2KhjcdGr9E6zX3CsZaTLCaw8M35vaAJRo1rfxeaZEVMuXeaquLVCkZ7JcZ5Q==", - "dependencies": { - "NETStandard.Library": "1.6.1" - } - }, "IdentityModel": { "type": "Transitive", "resolved": "4.4.0", @@ -401,14 +384,6 @@ "Microsoft.Extensions.Configuration.Abstractions": "2.1.0" } }, - "Microsoft.AspNetCore.Html.Abstractions": { - "type": "Transitive", - "resolved": "2.2.0", - "contentHash": "Y4rs5aMEXY8G7wJo5S3EEt6ltqyOTr/qOeZzfn+hw/fuQj5GppGckMY5psGLETo1U9hcT5MmAhaT5xtusM1b5g==", - "dependencies": { - "System.Text.Encodings.Web": "4.5.0" - } - }, "Microsoft.AspNetCore.Http.Abstractions": { "type": "Transitive", "resolved": "2.1.0", @@ -426,28 +401,6 @@ "Microsoft.Extensions.Primitives": "2.1.0" } }, - "Microsoft.AspNetCore.Razor": { - "type": "Transitive", - "resolved": "2.2.0", - "contentHash": "V54PIyDCFl8COnTp9gezNHpUNHk7F9UnerGeZy3UfbnwYvfzbo+ipqQmSgeoESH8e0JvKhRTyQyZquW2EPtCmg==", - "dependencies": { - "Microsoft.AspNetCore.Html.Abstractions": "2.2.0" - } - }, - "Microsoft.AspNetCore.Razor.Language": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "6yOBBASGfXMx1fY6hyjvG+oM3eR8vovIehDdEZW7jAV4gKlY4xuAvTm7Iw1fEq7KPunh2VrJwo7oRK1XxUn1OQ==" - }, - "Microsoft.AspNetCore.Razor.Runtime": { - "type": "Transitive", - "resolved": "2.2.0", - "contentHash": "7YqK+H61lN6yj9RiQUko7oaOhKtRR9Q/kBcoWNRemhJdTIWOh1OmdvJKzZrMWOlff3BAjejkPQm+0V0qXk+B1w==", - "dependencies": { - "Microsoft.AspNetCore.Html.Abstractions": "2.2.0", - "Microsoft.AspNetCore.Razor": "2.2.0" - } - }, "Microsoft.Azure.Amqp": { "type": "Transitive", "resolved": "2.4.11", @@ -550,64 +503,6 @@ "resolved": "1.1.0", "contentHash": "J2G1k+u5unBV+aYcwxo94ip16Rkp65pgWFb0R6zwJipzWNMgvqlWeuI7/+R+e8bob66LnSG+llLJ+z8wI94cHg==" }, - "Microsoft.CodeAnalysis.Analyzers": { - "type": "Transitive", - "resolved": "3.0.0", - "contentHash": "ojG5pGAhTPmjxRGTNvuszO3H8XPZqksDwr9xLd4Ae/JBjZZdl6GuoLk7uLMf+o7yl5wO0TAqoWcEKkEWqrZE5g==" - }, - "Microsoft.CodeAnalysis.Common": { - "type": "Transitive", - "resolved": "3.8.0", - "contentHash": "8YTZ7GpsbTdC08DITx7/kwV0k4SC6cbBAFqc13cOm5vKJZcEIAh51tNSyGSkWisMgYCr96B2wb5Zri1bsla3+g==", - "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "3.0.0", - "System.Collections.Immutable": "5.0.0", - "System.Memory": "4.5.4", - "System.Reflection.Metadata": "5.0.0", - "System.Runtime.CompilerServices.Unsafe": "4.7.1", - "System.Text.Encoding.CodePages": "4.5.1", - "System.Threading.Tasks.Extensions": "4.5.4" - } - }, - "Microsoft.CodeAnalysis.CSharp": { - "type": "Transitive", - "resolved": "3.8.0", - "contentHash": "hKqFCUSk9TIMBDjiYMF8/ZfK9p9mzpU+slM73CaCHu4ctfkoqJGHLQhyT8wvrYsIg+ufrUWBF8hcJYmyr5rc5Q==", - "dependencies": { - "Microsoft.CodeAnalysis.Common": "[3.8.0]" - } - }, - "Microsoft.CodeAnalysis.CSharp.Workspaces": { - "type": "Transitive", - "resolved": "3.8.0", - "contentHash": "rdEBvPWqe/IIscsnp7OkZ4tQin8khxBcSLyV9tU+sHdw9uW9U0GKL+Dv2rD4voC1bZBaO18Hp+m4Vkyfmaz0OA==", - "dependencies": { - "Humanizer.Core": "2.2.0", - "Microsoft.CodeAnalysis.CSharp": "[3.8.0]", - "Microsoft.CodeAnalysis.Common": "[3.8.0]", - "Microsoft.CodeAnalysis.Workspaces.Common": "[3.8.0]" - } - }, - "Microsoft.CodeAnalysis.Razor": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "s4u/6z/MQ35y/egrXf4WgJlUZf5GGvuba9mZ700dH4XxLBrA9Fw9kFZ8uymoATry7hwz5owvFhBVo+2VnoiGRg==", - "dependencies": { - "Microsoft.AspNetCore.Razor.Language": "5.0.0", - "Microsoft.CodeAnalysis.CSharp": "3.7.0", - "Microsoft.CodeAnalysis.Common": "3.7.0" - } - }, - "Microsoft.CodeAnalysis.Workspaces.Common": { - "type": "Transitive", - "resolved": "3.8.0", - "contentHash": "GPYVydsmOmScOWDJA1LFky7/MkoXpx1JI3lZJShxC+bvVUvL9zVKE8WDZMLsYJ5MAbry2xkZftdfeMpZ+kvLDQ==", - "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "1.1.1", - "Microsoft.CodeAnalysis.Common": "[3.8.0]", - "System.Composition": "1.0.31" - } - }, "Microsoft.CSharp": { "type": "Transitive", "resolved": "4.7.0", @@ -1056,72 +951,6 @@ "resolved": "1.0.0", "contentHash": "N4KeF3cpcm1PUHym1RmakkzfkEv3GRMyofVv40uXsQhCQeglr2OHNcUk2WOG51AKpGO8ynGpo9M/kFXSzghwug==" }, - "Microsoft.VisualStudio.Web.CodeGeneration": { - "type": "Transitive", - "resolved": "5.0.2", - "contentHash": "YUah81QG5q/ViVbr1BZcTbDLNJ5/k84fr+xx3/IoDVJR8KEUm89HmPAGM+FMMyWOjit+CIVpyOq7yEmRBBWXxQ==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection": "5.0.0", - "Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore": "5.0.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration.Contracts": { - "type": "Transitive", - "resolved": "5.0.2", - "contentHash": "34v6AkkRJykgFq7rHwNbzXBsLFquevLuegM9XDQl2j+wyOfj+ql1++jUR1WdZoPkv04WoM09mD47S3lMzJmHrQ==", - "dependencies": { - "Newtonsoft.Json": "11.0.2", - "System.Collections.Immutable": "1.7.0" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration.Core": { - "type": "Transitive", - "resolved": "5.0.2", - "contentHash": "R7mrxvTtv/MiEH42OtHYi/3L0A/vaAH8mwg+3yAyQtVuy6v9CeeVyL30lfTQ7EYV4ezUmuQKFwfjcU6PP0/KSQ==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection": "5.0.0", - "Microsoft.VisualStudio.Web.CodeGeneration.Templating": "5.0.2", - "Newtonsoft.Json": "11.0.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore": { - "type": "Transitive", - "resolved": "5.0.2", - "contentHash": "f9XeBRS9ICosrCpbO9jnAVMd/ISLhaZgx388XNBjigiyBJuq577J6tQgQWZA8PQTiPj6MKe9HVIW2GnKXDiUrQ==", - "dependencies": { - "Microsoft.VisualStudio.Web.CodeGeneration.Core": "5.0.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration.Templating": { - "type": "Transitive", - "resolved": "5.0.2", - "contentHash": "P3z/JZTGP5DhSc8ik4xrimWuCZ2ZaEZ6q7WGgfgmSVibfXxwh2Oo+dtdkiXwq8MNlkrcP0AZAo3+1wowYUzluA==", - "dependencies": { - "Microsoft.AspNetCore.Razor.Language": "5.0.0", - "Microsoft.AspNetCore.Razor.Runtime": "2.2.0", - "Microsoft.CodeAnalysis.CSharp": "3.8.0", - "Microsoft.CodeAnalysis.Razor": "5.0.0", - "Microsoft.VisualStudio.Web.CodeGeneration.Utils": "5.0.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration.Utils": { - "type": "Transitive", - "resolved": "5.0.2", - "contentHash": "4zViWGIFeKsGxDmc5xpn2G8kWs2FSHiLOolw85ZPHihDXc2jiFKp7qjA3SRt8U23kR3zeb0vZiFlETxgTHwAUA==", - "dependencies": { - "Microsoft.CodeAnalysis.CSharp.Workspaces": "3.8.0", - "Microsoft.VisualStudio.Web.CodeGeneration.Contracts": "5.0.2", - "Newtonsoft.Json": "11.0.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGenerators.Mvc": { - "type": "Transitive", - "resolved": "5.0.2", - "contentHash": "W4Uk2y0oja+4E+XP5d5OFu+ViTEtlqm3a6nYuuC3tjA+lTK6dLaMf0G6WnO4BO18i0kM0l49XjTwwXd5XpjnAQ==", - "dependencies": { - "Microsoft.VisualStudio.Web.CodeGeneration": "5.0.2" - } - }, "Microsoft.Win32.Primitives": { "type": "Transitive", "resolved": "4.3.0", @@ -1696,102 +1525,6 @@ "System.Threading": "4.0.11" } }, - "System.Composition": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "I+D26qpYdoklyAVUdqwUBrEIckMNjAYnuPJy/h9dsQItpQwVREkDFs4b4tkBza0kT2Yk48Lcfsv2QQ9hWsh9Iw==", - "dependencies": { - "System.Composition.AttributedModel": "1.0.31", - "System.Composition.Convention": "1.0.31", - "System.Composition.Hosting": "1.0.31", - "System.Composition.Runtime": "1.0.31", - "System.Composition.TypedParts": "1.0.31" - } - }, - "System.Composition.AttributedModel": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "NHWhkM3ZkspmA0XJEsKdtTt1ViDYuojgSND3yHhTzwxepiwqZf+BCWuvCbjUt4fe0NxxQhUDGJ5km6sLjo9qnQ==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Composition.Convention": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "GLjh2Ju71k6C0qxMMtl4efHa68NmWeIUYh4fkUI8xbjQrEBvFmRwMDFcylT8/PR9SQbeeL48IkFxU/+gd0nYEQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Composition.AttributedModel": "1.0.31", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Composition.Hosting": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "fN1bT4RX4vUqjbgoyuJFVUizAl2mYF5VAb+bVIxIYZSSc0BdnX+yGAxcavxJuDDCQ1K+/mdpgyEFc8e9ikjvrg==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Composition.Runtime": "1.0.31", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.ObjectModel": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Composition.Runtime": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "0LEJN+2NVM89CE4SekDrrk5tHV5LeATltkp+9WNYrR+Huiyt0vaCqHbbHtVAjPyeLWIc8dOz/3kthRBj32wGQg==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.Linq": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Composition.TypedParts": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "0Zae/FtzeFgDBBuILeIbC/T9HMYbW4olAmi8XqqAGosSOWvXfiQLfARZEhiGd0LVXaYgXr0NhxiU1LldRP1fpQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Composition.AttributedModel": "1.0.31", - "System.Composition.Hosting": "1.0.31", - "System.Composition.Runtime": "1.0.31", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0" - } - }, "System.Configuration.ConfigurationManager": { "type": "Transitive", "resolved": "6.0.0", @@ -2451,11 +2184,6 @@ "System.Runtime": "4.3.0" } }, - "System.Reflection.Metadata": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "5NecZgXktdGg34rh1OenY1rFNDCI8xSjFr+Z4OU4cU06AQHUdRnIIEeWENu3Wl4YowbzkymAIMvi3WyK9U53pQ==" - }, "System.Reflection.Primitives": { "type": "Transitive", "resolved": "4.3.0", @@ -3053,71 +2781,71 @@ "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } }, "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Dapper": "[2.0.123, )" + "Core": "2023.2.2", + "Dapper": "2.0.123" } }, "infrastructure.entityframework": { "type": "Project", "dependencies": { - "AutoMapper.Extensions.Microsoft.DependencyInjection": "[11.0.0, )", - "Core": "[2023.2.0, )", - "Microsoft.EntityFrameworkCore.Relational": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.SqlServer": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.Sqlite": "[6.0.12, )", - "Npgsql.EntityFrameworkCore.PostgreSQL": "[6.0.8, )", - "Pomelo.EntityFrameworkCore.MySql": "[6.0.2, )", - "linq2db.EntityFrameworkCore": "[6.11.0, )" + "AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0", + "Core": "2023.2.2", + "Microsoft.EntityFrameworkCore.Relational": "6.0.12", + "Microsoft.EntityFrameworkCore.SqlServer": "6.0.12", + "Microsoft.EntityFrameworkCore.Sqlite": "6.0.12", + "Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.8", + "Pomelo.EntityFrameworkCore.MySql": "6.0.2", + "linq2db.EntityFrameworkCore": "6.11.0" } }, "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Infrastructure.Dapper": "[2023.2.0, )", - "Infrastructure.EntityFramework": "[2023.2.0, )" + "Core": "2023.2.2", + "Infrastructure.Dapper": "2023.2.2", + "Infrastructure.EntityFramework": "2023.2.2" } } } diff --git a/bitwarden_license/src/Sso/packages.lock.json b/bitwarden_license/src/Sso/packages.lock.json index d5113fa3c0..a80326a1da 100644 --- a/bitwarden_license/src/Sso/packages.lock.json +++ b/bitwarden_license/src/Sso/packages.lock.json @@ -2923,71 +2923,71 @@ "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } }, "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Dapper": "[2.0.123, )" + "Core": "2023.2.2", + "Dapper": "2.0.123" } }, "infrastructure.entityframework": { "type": "Project", "dependencies": { - "AutoMapper.Extensions.Microsoft.DependencyInjection": "[11.0.0, )", - "Core": "[2023.2.0, )", - "Microsoft.EntityFrameworkCore.Relational": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.SqlServer": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.Sqlite": "[6.0.12, )", - "Npgsql.EntityFrameworkCore.PostgreSQL": "[6.0.8, )", - "Pomelo.EntityFrameworkCore.MySql": "[6.0.2, )", - "linq2db.EntityFrameworkCore": "[6.11.0, )" + "AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0", + "Core": "2023.2.2", + "Microsoft.EntityFrameworkCore.Relational": "6.0.12", + "Microsoft.EntityFrameworkCore.SqlServer": "6.0.12", + "Microsoft.EntityFrameworkCore.Sqlite": "6.0.12", + "Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.8", + "Pomelo.EntityFrameworkCore.MySql": "6.0.2", + "linq2db.EntityFrameworkCore": "6.11.0" } }, "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Infrastructure.Dapper": "[2023.2.0, )", - "Infrastructure.EntityFramework": "[2023.2.0, )" + "Core": "2023.2.2", + "Infrastructure.Dapper": "2023.2.2", + "Infrastructure.EntityFramework": "2023.2.2" } } } diff --git a/bitwarden_license/test/Commercial.Core.Test/SecretsManager/Projects/DeleteProjectCommandTests.cs b/bitwarden_license/test/Commercial.Core.Test/SecretsManager/Projects/DeleteProjectCommandTests.cs index e48c2cf0af..f85125b191 100644 --- a/bitwarden_license/test/Commercial.Core.Test/SecretsManager/Projects/DeleteProjectCommandTests.cs +++ b/bitwarden_license/test/Commercial.Core.Test/SecretsManager/Projects/DeleteProjectCommandTests.cs @@ -19,7 +19,7 @@ public class DeleteProjectCommandTests public async Task DeleteProjects_Throws_NotFoundException(List data, Guid userId, SutProvider sutProvider) { - sutProvider.GetDependency().GetManyByIds(data).Returns(new List()); + sutProvider.GetDependency().GetManyWithSecretsByIds(data).Returns(new List()); await Assert.ThrowsAsync(() => sutProvider.Sut.DeleteProjects(data, userId)); @@ -35,7 +35,7 @@ public class DeleteProjectCommandTests { Id = Guid.NewGuid() }; - sutProvider.GetDependency().GetManyByIds(data).Returns(new List() { project }); + sutProvider.GetDependency().GetManyWithSecretsByIds(data).Returns(new List() { project }); await Assert.ThrowsAsync(() => sutProvider.Sut.DeleteProjects(data, userId)); @@ -51,7 +51,7 @@ public class DeleteProjectCommandTests sutProvider.GetDependency().AccessSecretsManager(organizationId).Returns(true); sutProvider.GetDependency().ClientType = ClientType.User; - sutProvider.GetDependency().GetManyByIds(data).Returns(projects); + sutProvider.GetDependency().GetManyWithSecretsByIds(data).Returns(projects); sutProvider.GetDependency().UserHasWriteAccessToProject(Arg.Any(), userId).Returns(true); var results = await sutProvider.Sut.DeleteProjects(data, userId); @@ -73,7 +73,7 @@ public class DeleteProjectCommandTests sutProvider.GetDependency().AccessSecretsManager(organizationId).Returns(true); sutProvider.GetDependency().ClientType = ClientType.User; - sutProvider.GetDependency().GetManyByIds(data).Returns(projects); + sutProvider.GetDependency().GetManyWithSecretsByIds(data).Returns(projects); sutProvider.GetDependency().UserHasWriteAccessToProject(userId, userId).Returns(false); var results = await sutProvider.Sut.DeleteProjects(data, userId); @@ -95,7 +95,7 @@ public class DeleteProjectCommandTests sutProvider.GetDependency().AccessSecretsManager(organizationId).Returns(true); sutProvider.GetDependency().OrganizationAdmin(organizationId).Returns(true); - sutProvider.GetDependency().GetManyByIds(data).Returns(projects); + sutProvider.GetDependency().GetManyWithSecretsByIds(data).Returns(projects); var results = await sutProvider.Sut.DeleteProjects(data, userId); diff --git a/bitwarden_license/test/Commercial.Core.Test/packages.lock.json b/bitwarden_license/test/Commercial.Core.Test/packages.lock.json index c455dcd5cb..c438f8889f 100644 --- a/bitwarden_license/test/Commercial.Core.Test/packages.lock.json +++ b/bitwarden_license/test/Commercial.Core.Test/packages.lock.json @@ -2855,75 +2855,75 @@ "commercial.core": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )" + "Core": "2023.2.2" } }, "common": { "type": "Project", "dependencies": { - "AutoFixture.AutoNSubstitute": "[4.17.0, )", - "AutoFixture.Xunit2": "[4.17.0, )", - "Core": "[2023.2.0, )", - "Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )", - "Microsoft.NET.Test.Sdk": "[17.1.0, )", - "NSubstitute": "[4.3.0, )", - "xunit": "[2.4.1, )" + "AutoFixture.AutoNSubstitute": "4.17.0", + "AutoFixture.Xunit2": "4.17.0", + "Core": "2023.2.2", + "Kralizek.AutoFixture.Extensions.MockHttp": "1.2.0", + "Microsoft.NET.Test.Sdk": "17.1.0", + "NSubstitute": "4.3.0", + "xunit": "2.4.1" } }, "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } }, "core.test": { "type": "Project", "dependencies": { - "AutoFixture.AutoNSubstitute": "[4.17.0, )", - "AutoFixture.Xunit2": "[4.17.0, )", - "Common": "[2023.2.0, )", - "Core": "[2023.2.0, )", - "Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )", - "Microsoft.NET.Test.Sdk": "[17.1.0, )", - "Moq": "[4.17.2, )", - "NSubstitute": "[4.3.0, )", - "xunit": "[2.4.1, )" + "AutoFixture.AutoNSubstitute": "4.17.0", + "AutoFixture.Xunit2": "4.17.0", + "Common": "2023.2.2", + "Core": "2023.2.2", + "Kralizek.AutoFixture.Extensions.MockHttp": "1.2.0", + "Microsoft.NET.Test.Sdk": "17.1.0", + "Moq": "4.17.2", + "NSubstitute": "4.3.0", + "xunit": "2.4.1" } } } diff --git a/bitwarden_license/test/Scim.IntegrationTest/packages.lock.json b/bitwarden_license/test/Scim.IntegrationTest/packages.lock.json index af733e55c0..0e033c0059 100644 --- a/bitwarden_license/test/Scim.IntegrationTest/packages.lock.json +++ b/bitwarden_license/test/Scim.IntegrationTest/packages.lock.json @@ -296,14 +296,6 @@ "Microsoft.CSharp": "4.7.0" } }, - "Humanizer.Core": { - "type": "Transitive", - "resolved": "2.2.0", - "contentHash": "rsYXB7+iUPP8AHgQ8JP2UZI2xK2KhjcdGr9E6zX3CsZaTLCaw8M35vaAJRo1rfxeaZEVMuXeaquLVCkZ7JcZ5Q==", - "dependencies": { - "NETStandard.Library": "1.6.1" - } - }, "IdentityModel": { "type": "Transitive", "resolved": "4.4.0", @@ -507,14 +499,6 @@ "Microsoft.Extensions.Configuration.Abstractions": "2.1.0" } }, - "Microsoft.AspNetCore.Html.Abstractions": { - "type": "Transitive", - "resolved": "2.2.0", - "contentHash": "Y4rs5aMEXY8G7wJo5S3EEt6ltqyOTr/qOeZzfn+hw/fuQj5GppGckMY5psGLETo1U9hcT5MmAhaT5xtusM1b5g==", - "dependencies": { - "System.Text.Encodings.Web": "4.5.0" - } - }, "Microsoft.AspNetCore.Http.Abstractions": { "type": "Transitive", "resolved": "2.1.0", @@ -532,28 +516,6 @@ "Microsoft.Extensions.Primitives": "2.1.0" } }, - "Microsoft.AspNetCore.Razor": { - "type": "Transitive", - "resolved": "2.2.0", - "contentHash": "V54PIyDCFl8COnTp9gezNHpUNHk7F9UnerGeZy3UfbnwYvfzbo+ipqQmSgeoESH8e0JvKhRTyQyZquW2EPtCmg==", - "dependencies": { - "Microsoft.AspNetCore.Html.Abstractions": "2.2.0" - } - }, - "Microsoft.AspNetCore.Razor.Language": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "6yOBBASGfXMx1fY6hyjvG+oM3eR8vovIehDdEZW7jAV4gKlY4xuAvTm7Iw1fEq7KPunh2VrJwo7oRK1XxUn1OQ==" - }, - "Microsoft.AspNetCore.Razor.Runtime": { - "type": "Transitive", - "resolved": "2.2.0", - "contentHash": "7YqK+H61lN6yj9RiQUko7oaOhKtRR9Q/kBcoWNRemhJdTIWOh1OmdvJKzZrMWOlff3BAjejkPQm+0V0qXk+B1w==", - "dependencies": { - "Microsoft.AspNetCore.Html.Abstractions": "2.2.0", - "Microsoft.AspNetCore.Razor": "2.2.0" - } - }, "Microsoft.AspNetCore.TestHost": { "type": "Transitive", "resolved": "6.0.5", @@ -664,64 +626,6 @@ "resolved": "1.1.0", "contentHash": "J2G1k+u5unBV+aYcwxo94ip16Rkp65pgWFb0R6zwJipzWNMgvqlWeuI7/+R+e8bob66LnSG+llLJ+z8wI94cHg==" }, - "Microsoft.CodeAnalysis.Analyzers": { - "type": "Transitive", - "resolved": "3.0.0", - "contentHash": "ojG5pGAhTPmjxRGTNvuszO3H8XPZqksDwr9xLd4Ae/JBjZZdl6GuoLk7uLMf+o7yl5wO0TAqoWcEKkEWqrZE5g==" - }, - "Microsoft.CodeAnalysis.Common": { - "type": "Transitive", - "resolved": "3.8.0", - "contentHash": "8YTZ7GpsbTdC08DITx7/kwV0k4SC6cbBAFqc13cOm5vKJZcEIAh51tNSyGSkWisMgYCr96B2wb5Zri1bsla3+g==", - "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "3.0.0", - "System.Collections.Immutable": "5.0.0", - "System.Memory": "4.5.4", - "System.Reflection.Metadata": "5.0.0", - "System.Runtime.CompilerServices.Unsafe": "4.7.1", - "System.Text.Encoding.CodePages": "4.5.1", - "System.Threading.Tasks.Extensions": "4.5.4" - } - }, - "Microsoft.CodeAnalysis.CSharp": { - "type": "Transitive", - "resolved": "3.8.0", - "contentHash": "hKqFCUSk9TIMBDjiYMF8/ZfK9p9mzpU+slM73CaCHu4ctfkoqJGHLQhyT8wvrYsIg+ufrUWBF8hcJYmyr5rc5Q==", - "dependencies": { - "Microsoft.CodeAnalysis.Common": "[3.8.0]" - } - }, - "Microsoft.CodeAnalysis.CSharp.Workspaces": { - "type": "Transitive", - "resolved": "3.8.0", - "contentHash": "rdEBvPWqe/IIscsnp7OkZ4tQin8khxBcSLyV9tU+sHdw9uW9U0GKL+Dv2rD4voC1bZBaO18Hp+m4Vkyfmaz0OA==", - "dependencies": { - "Humanizer.Core": "2.2.0", - "Microsoft.CodeAnalysis.CSharp": "[3.8.0]", - "Microsoft.CodeAnalysis.Common": "[3.8.0]", - "Microsoft.CodeAnalysis.Workspaces.Common": "[3.8.0]" - } - }, - "Microsoft.CodeAnalysis.Razor": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "s4u/6z/MQ35y/egrXf4WgJlUZf5GGvuba9mZ700dH4XxLBrA9Fw9kFZ8uymoATry7hwz5owvFhBVo+2VnoiGRg==", - "dependencies": { - "Microsoft.AspNetCore.Razor.Language": "5.0.0", - "Microsoft.CodeAnalysis.CSharp": "3.7.0", - "Microsoft.CodeAnalysis.Common": "3.7.0" - } - }, - "Microsoft.CodeAnalysis.Workspaces.Common": { - "type": "Transitive", - "resolved": "3.8.0", - "contentHash": "GPYVydsmOmScOWDJA1LFky7/MkoXpx1JI3lZJShxC+bvVUvL9zVKE8WDZMLsYJ5MAbry2xkZftdfeMpZ+kvLDQ==", - "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "1.1.1", - "Microsoft.CodeAnalysis.Common": "[3.8.0]", - "System.Composition": "1.0.31" - } - }, "Microsoft.CodeCoverage": { "type": "Transitive", "resolved": "17.1.0", @@ -1307,80 +1211,6 @@ "Newtonsoft.Json": "9.0.1" } }, - "Microsoft.VisualStudio.Web.CodeGeneration": { - "type": "Transitive", - "resolved": "5.0.2", - "contentHash": "YUah81QG5q/ViVbr1BZcTbDLNJ5/k84fr+xx3/IoDVJR8KEUm89HmPAGM+FMMyWOjit+CIVpyOq7yEmRBBWXxQ==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection": "5.0.0", - "Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore": "5.0.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration.Contracts": { - "type": "Transitive", - "resolved": "5.0.2", - "contentHash": "34v6AkkRJykgFq7rHwNbzXBsLFquevLuegM9XDQl2j+wyOfj+ql1++jUR1WdZoPkv04WoM09mD47S3lMzJmHrQ==", - "dependencies": { - "Newtonsoft.Json": "11.0.2", - "System.Collections.Immutable": "1.7.0" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration.Core": { - "type": "Transitive", - "resolved": "5.0.2", - "contentHash": "R7mrxvTtv/MiEH42OtHYi/3L0A/vaAH8mwg+3yAyQtVuy6v9CeeVyL30lfTQ7EYV4ezUmuQKFwfjcU6PP0/KSQ==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection": "5.0.0", - "Microsoft.VisualStudio.Web.CodeGeneration.Templating": "5.0.2", - "Newtonsoft.Json": "11.0.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration.Design": { - "type": "Transitive", - "resolved": "5.0.2", - "contentHash": "9eTZV7W+S2iO2AJD03xXyXJZ+Nf71Y25gMXhqyXb8bB63jPfn+VQhV8I1lb6J+NR3jW98m5EB9QBftBSrjgiYQ==", - "dependencies": { - "Microsoft.VisualStudio.Web.CodeGenerators.Mvc": "5.0.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore": { - "type": "Transitive", - "resolved": "5.0.2", - "contentHash": "f9XeBRS9ICosrCpbO9jnAVMd/ISLhaZgx388XNBjigiyBJuq577J6tQgQWZA8PQTiPj6MKe9HVIW2GnKXDiUrQ==", - "dependencies": { - "Microsoft.VisualStudio.Web.CodeGeneration.Core": "5.0.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration.Templating": { - "type": "Transitive", - "resolved": "5.0.2", - "contentHash": "P3z/JZTGP5DhSc8ik4xrimWuCZ2ZaEZ6q7WGgfgmSVibfXxwh2Oo+dtdkiXwq8MNlkrcP0AZAo3+1wowYUzluA==", - "dependencies": { - "Microsoft.AspNetCore.Razor.Language": "5.0.0", - "Microsoft.AspNetCore.Razor.Runtime": "2.2.0", - "Microsoft.CodeAnalysis.CSharp": "3.8.0", - "Microsoft.CodeAnalysis.Razor": "5.0.0", - "Microsoft.VisualStudio.Web.CodeGeneration.Utils": "5.0.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration.Utils": { - "type": "Transitive", - "resolved": "5.0.2", - "contentHash": "4zViWGIFeKsGxDmc5xpn2G8kWs2FSHiLOolw85ZPHihDXc2jiFKp7qjA3SRt8U23kR3zeb0vZiFlETxgTHwAUA==", - "dependencies": { - "Microsoft.CodeAnalysis.CSharp.Workspaces": "3.8.0", - "Microsoft.VisualStudio.Web.CodeGeneration.Contracts": "5.0.2", - "Newtonsoft.Json": "11.0.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGenerators.Mvc": { - "type": "Transitive", - "resolved": "5.0.2", - "contentHash": "W4Uk2y0oja+4E+XP5d5OFu+ViTEtlqm3a6nYuuC3tjA+lTK6dLaMf0G6WnO4BO18i0kM0l49XjTwwXd5XpjnAQ==", - "dependencies": { - "Microsoft.VisualStudio.Web.CodeGeneration": "5.0.2" - } - }, "Microsoft.Win32.Primitives": { "type": "Transitive", "resolved": "4.3.0", @@ -2039,102 +1869,6 @@ "System.Threading": "4.3.0" } }, - "System.Composition": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "I+D26qpYdoklyAVUdqwUBrEIckMNjAYnuPJy/h9dsQItpQwVREkDFs4b4tkBza0kT2Yk48Lcfsv2QQ9hWsh9Iw==", - "dependencies": { - "System.Composition.AttributedModel": "1.0.31", - "System.Composition.Convention": "1.0.31", - "System.Composition.Hosting": "1.0.31", - "System.Composition.Runtime": "1.0.31", - "System.Composition.TypedParts": "1.0.31" - } - }, - "System.Composition.AttributedModel": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "NHWhkM3ZkspmA0XJEsKdtTt1ViDYuojgSND3yHhTzwxepiwqZf+BCWuvCbjUt4fe0NxxQhUDGJ5km6sLjo9qnQ==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Composition.Convention": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "GLjh2Ju71k6C0qxMMtl4efHa68NmWeIUYh4fkUI8xbjQrEBvFmRwMDFcylT8/PR9SQbeeL48IkFxU/+gd0nYEQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Composition.AttributedModel": "1.0.31", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Composition.Hosting": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "fN1bT4RX4vUqjbgoyuJFVUizAl2mYF5VAb+bVIxIYZSSc0BdnX+yGAxcavxJuDDCQ1K+/mdpgyEFc8e9ikjvrg==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Composition.Runtime": "1.0.31", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.ObjectModel": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Composition.Runtime": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "0LEJN+2NVM89CE4SekDrrk5tHV5LeATltkp+9WNYrR+Huiyt0vaCqHbbHtVAjPyeLWIc8dOz/3kthRBj32wGQg==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.Linq": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Composition.TypedParts": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "0Zae/FtzeFgDBBuILeIbC/T9HMYbW4olAmi8XqqAGosSOWvXfiQLfARZEhiGd0LVXaYgXr0NhxiU1LldRP1fpQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Composition.AttributedModel": "1.0.31", - "System.Composition.Hosting": "1.0.31", - "System.Composition.Runtime": "1.0.31", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0" - } - }, "System.Configuration.ConfigurationManager": { "type": "Transitive", "resolved": "6.0.0", @@ -2800,8 +2534,8 @@ }, "System.Reflection.Metadata": { "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "5NecZgXktdGg34rh1OenY1rFNDCI8xSjFr+Z4OU4cU06AQHUdRnIIEeWENu3Wl4YowbzkymAIMvi3WyK9U53pQ==" + "resolved": "1.6.0", + "contentHash": "COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ==" }, "System.Reflection.Primitives": { "type": "Transitive", @@ -3445,109 +3179,108 @@ "common": { "type": "Project", "dependencies": { - "AutoFixture.AutoNSubstitute": "[4.17.0, )", - "AutoFixture.Xunit2": "[4.17.0, )", - "Core": "[2023.2.0, )", - "Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )", - "Microsoft.NET.Test.Sdk": "[17.1.0, )", - "NSubstitute": "[4.3.0, )", - "xunit": "[2.4.1, )" + "AutoFixture.AutoNSubstitute": "4.17.0", + "AutoFixture.Xunit2": "4.17.0", + "Core": "2023.2.2", + "Kralizek.AutoFixture.Extensions.MockHttp": "1.2.0", + "Microsoft.NET.Test.Sdk": "17.1.0", + "NSubstitute": "4.3.0", + "xunit": "2.4.1" } }, "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } }, "identity": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "SharedWeb": "[2023.2.0, )", - "Swashbuckle.AspNetCore.SwaggerGen": "[6.5.0, )" + "Core": "2023.2.2", + "SharedWeb": "2023.2.2", + "Swashbuckle.AspNetCore.SwaggerGen": "6.5.0" } }, "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Dapper": "[2.0.123, )" + "Core": "2023.2.2", + "Dapper": "2.0.123" } }, "infrastructure.entityframework": { "type": "Project", "dependencies": { - "AutoMapper.Extensions.Microsoft.DependencyInjection": "[11.0.0, )", - "Core": "[2023.2.0, )", - "Microsoft.EntityFrameworkCore.Relational": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.SqlServer": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.Sqlite": "[6.0.12, )", - "Npgsql.EntityFrameworkCore.PostgreSQL": "[6.0.8, )", - "Pomelo.EntityFrameworkCore.MySql": "[6.0.2, )", - "linq2db.EntityFrameworkCore": "[6.11.0, )" + "AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0", + "Core": "2023.2.2", + "Microsoft.EntityFrameworkCore.Relational": "6.0.12", + "Microsoft.EntityFrameworkCore.SqlServer": "6.0.12", + "Microsoft.EntityFrameworkCore.Sqlite": "6.0.12", + "Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.8", + "Pomelo.EntityFrameworkCore.MySql": "6.0.2", + "linq2db.EntityFrameworkCore": "6.11.0" } }, "integrationtestcommon": { "type": "Project", "dependencies": { - "Common": "[2023.2.0, )", - "Identity": "[2023.2.0, )", - "Microsoft.AspNetCore.Mvc.Testing": "[6.0.5, )", - "Microsoft.EntityFrameworkCore.InMemory": "[6.0.5, )", - "Microsoft.Extensions.Configuration": "[6.0.1, )" + "Common": "2023.2.2", + "Identity": "2023.2.2", + "Microsoft.AspNetCore.Mvc.Testing": "6.0.5", + "Microsoft.EntityFrameworkCore.InMemory": "6.0.5", + "Microsoft.Extensions.Configuration": "6.0.1" } }, "scim": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Microsoft.VisualStudio.Web.CodeGeneration.Design": "[5.0.2, )", - "SharedWeb": "[2023.2.0, )" + "Core": "2023.2.2", + "SharedWeb": "2023.2.2" } }, "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Infrastructure.Dapper": "[2023.2.0, )", - "Infrastructure.EntityFramework": "[2023.2.0, )" + "Core": "2023.2.2", + "Infrastructure.Dapper": "2023.2.2", + "Infrastructure.EntityFramework": "2023.2.2" } } } diff --git a/bitwarden_license/test/Scim.Test/packages.lock.json b/bitwarden_license/test/Scim.Test/packages.lock.json index 95596f297d..7101272046 100644 --- a/bitwarden_license/test/Scim.Test/packages.lock.json +++ b/bitwarden_license/test/Scim.Test/packages.lock.json @@ -284,14 +284,6 @@ "Microsoft.CSharp": "4.7.0" } }, - "Humanizer.Core": { - "type": "Transitive", - "resolved": "2.2.0", - "contentHash": "rsYXB7+iUPP8AHgQ8JP2UZI2xK2KhjcdGr9E6zX3CsZaTLCaw8M35vaAJRo1rfxeaZEVMuXeaquLVCkZ7JcZ5Q==", - "dependencies": { - "NETStandard.Library": "1.6.1" - } - }, "IdentityModel": { "type": "Transitive", "resolved": "4.4.0", @@ -495,14 +487,6 @@ "Microsoft.Extensions.Configuration.Abstractions": "2.1.0" } }, - "Microsoft.AspNetCore.Html.Abstractions": { - "type": "Transitive", - "resolved": "2.2.0", - "contentHash": "Y4rs5aMEXY8G7wJo5S3EEt6ltqyOTr/qOeZzfn+hw/fuQj5GppGckMY5psGLETo1U9hcT5MmAhaT5xtusM1b5g==", - "dependencies": { - "System.Text.Encodings.Web": "4.5.0" - } - }, "Microsoft.AspNetCore.Http.Abstractions": { "type": "Transitive", "resolved": "2.1.0", @@ -520,28 +504,6 @@ "Microsoft.Extensions.Primitives": "2.1.0" } }, - "Microsoft.AspNetCore.Razor": { - "type": "Transitive", - "resolved": "2.2.0", - "contentHash": "V54PIyDCFl8COnTp9gezNHpUNHk7F9UnerGeZy3UfbnwYvfzbo+ipqQmSgeoESH8e0JvKhRTyQyZquW2EPtCmg==", - "dependencies": { - "Microsoft.AspNetCore.Html.Abstractions": "2.2.0" - } - }, - "Microsoft.AspNetCore.Razor.Language": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "6yOBBASGfXMx1fY6hyjvG+oM3eR8vovIehDdEZW7jAV4gKlY4xuAvTm7Iw1fEq7KPunh2VrJwo7oRK1XxUn1OQ==" - }, - "Microsoft.AspNetCore.Razor.Runtime": { - "type": "Transitive", - "resolved": "2.2.0", - "contentHash": "7YqK+H61lN6yj9RiQUko7oaOhKtRR9Q/kBcoWNRemhJdTIWOh1OmdvJKzZrMWOlff3BAjejkPQm+0V0qXk+B1w==", - "dependencies": { - "Microsoft.AspNetCore.Html.Abstractions": "2.2.0", - "Microsoft.AspNetCore.Razor": "2.2.0" - } - }, "Microsoft.Azure.Amqp": { "type": "Transitive", "resolved": "2.4.11", @@ -644,64 +606,6 @@ "resolved": "1.1.0", "contentHash": "J2G1k+u5unBV+aYcwxo94ip16Rkp65pgWFb0R6zwJipzWNMgvqlWeuI7/+R+e8bob66LnSG+llLJ+z8wI94cHg==" }, - "Microsoft.CodeAnalysis.Analyzers": { - "type": "Transitive", - "resolved": "3.0.0", - "contentHash": "ojG5pGAhTPmjxRGTNvuszO3H8XPZqksDwr9xLd4Ae/JBjZZdl6GuoLk7uLMf+o7yl5wO0TAqoWcEKkEWqrZE5g==" - }, - "Microsoft.CodeAnalysis.Common": { - "type": "Transitive", - "resolved": "3.8.0", - "contentHash": "8YTZ7GpsbTdC08DITx7/kwV0k4SC6cbBAFqc13cOm5vKJZcEIAh51tNSyGSkWisMgYCr96B2wb5Zri1bsla3+g==", - "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "3.0.0", - "System.Collections.Immutable": "5.0.0", - "System.Memory": "4.5.4", - "System.Reflection.Metadata": "5.0.0", - "System.Runtime.CompilerServices.Unsafe": "4.7.1", - "System.Text.Encoding.CodePages": "4.5.1", - "System.Threading.Tasks.Extensions": "4.5.4" - } - }, - "Microsoft.CodeAnalysis.CSharp": { - "type": "Transitive", - "resolved": "3.8.0", - "contentHash": "hKqFCUSk9TIMBDjiYMF8/ZfK9p9mzpU+slM73CaCHu4ctfkoqJGHLQhyT8wvrYsIg+ufrUWBF8hcJYmyr5rc5Q==", - "dependencies": { - "Microsoft.CodeAnalysis.Common": "[3.8.0]" - } - }, - "Microsoft.CodeAnalysis.CSharp.Workspaces": { - "type": "Transitive", - "resolved": "3.8.0", - "contentHash": "rdEBvPWqe/IIscsnp7OkZ4tQin8khxBcSLyV9tU+sHdw9uW9U0GKL+Dv2rD4voC1bZBaO18Hp+m4Vkyfmaz0OA==", - "dependencies": { - "Humanizer.Core": "2.2.0", - "Microsoft.CodeAnalysis.CSharp": "[3.8.0]", - "Microsoft.CodeAnalysis.Common": "[3.8.0]", - "Microsoft.CodeAnalysis.Workspaces.Common": "[3.8.0]" - } - }, - "Microsoft.CodeAnalysis.Razor": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "s4u/6z/MQ35y/egrXf4WgJlUZf5GGvuba9mZ700dH4XxLBrA9Fw9kFZ8uymoATry7hwz5owvFhBVo+2VnoiGRg==", - "dependencies": { - "Microsoft.AspNetCore.Razor.Language": "5.0.0", - "Microsoft.CodeAnalysis.CSharp": "3.7.0", - "Microsoft.CodeAnalysis.Common": "3.7.0" - } - }, - "Microsoft.CodeAnalysis.Workspaces.Common": { - "type": "Transitive", - "resolved": "3.8.0", - "contentHash": "GPYVydsmOmScOWDJA1LFky7/MkoXpx1JI3lZJShxC+bvVUvL9zVKE8WDZMLsYJ5MAbry2xkZftdfeMpZ+kvLDQ==", - "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "1.1.1", - "Microsoft.CodeAnalysis.Common": "[3.8.0]", - "System.Composition": "1.0.31" - } - }, "Microsoft.CodeCoverage": { "type": "Transitive", "resolved": "17.1.0", @@ -1173,80 +1077,6 @@ "Newtonsoft.Json": "9.0.1" } }, - "Microsoft.VisualStudio.Web.CodeGeneration": { - "type": "Transitive", - "resolved": "5.0.2", - "contentHash": "YUah81QG5q/ViVbr1BZcTbDLNJ5/k84fr+xx3/IoDVJR8KEUm89HmPAGM+FMMyWOjit+CIVpyOq7yEmRBBWXxQ==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection": "5.0.0", - "Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore": "5.0.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration.Contracts": { - "type": "Transitive", - "resolved": "5.0.2", - "contentHash": "34v6AkkRJykgFq7rHwNbzXBsLFquevLuegM9XDQl2j+wyOfj+ql1++jUR1WdZoPkv04WoM09mD47S3lMzJmHrQ==", - "dependencies": { - "Newtonsoft.Json": "11.0.2", - "System.Collections.Immutable": "1.7.0" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration.Core": { - "type": "Transitive", - "resolved": "5.0.2", - "contentHash": "R7mrxvTtv/MiEH42OtHYi/3L0A/vaAH8mwg+3yAyQtVuy6v9CeeVyL30lfTQ7EYV4ezUmuQKFwfjcU6PP0/KSQ==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection": "5.0.0", - "Microsoft.VisualStudio.Web.CodeGeneration.Templating": "5.0.2", - "Newtonsoft.Json": "11.0.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration.Design": { - "type": "Transitive", - "resolved": "5.0.2", - "contentHash": "9eTZV7W+S2iO2AJD03xXyXJZ+Nf71Y25gMXhqyXb8bB63jPfn+VQhV8I1lb6J+NR3jW98m5EB9QBftBSrjgiYQ==", - "dependencies": { - "Microsoft.VisualStudio.Web.CodeGenerators.Mvc": "5.0.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore": { - "type": "Transitive", - "resolved": "5.0.2", - "contentHash": "f9XeBRS9ICosrCpbO9jnAVMd/ISLhaZgx388XNBjigiyBJuq577J6tQgQWZA8PQTiPj6MKe9HVIW2GnKXDiUrQ==", - "dependencies": { - "Microsoft.VisualStudio.Web.CodeGeneration.Core": "5.0.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration.Templating": { - "type": "Transitive", - "resolved": "5.0.2", - "contentHash": "P3z/JZTGP5DhSc8ik4xrimWuCZ2ZaEZ6q7WGgfgmSVibfXxwh2Oo+dtdkiXwq8MNlkrcP0AZAo3+1wowYUzluA==", - "dependencies": { - "Microsoft.AspNetCore.Razor.Language": "5.0.0", - "Microsoft.AspNetCore.Razor.Runtime": "2.2.0", - "Microsoft.CodeAnalysis.CSharp": "3.8.0", - "Microsoft.CodeAnalysis.Razor": "5.0.0", - "Microsoft.VisualStudio.Web.CodeGeneration.Utils": "5.0.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration.Utils": { - "type": "Transitive", - "resolved": "5.0.2", - "contentHash": "4zViWGIFeKsGxDmc5xpn2G8kWs2FSHiLOolw85ZPHihDXc2jiFKp7qjA3SRt8U23kR3zeb0vZiFlETxgTHwAUA==", - "dependencies": { - "Microsoft.CodeAnalysis.CSharp.Workspaces": "3.8.0", - "Microsoft.VisualStudio.Web.CodeGeneration.Contracts": "5.0.2", - "Newtonsoft.Json": "11.0.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGenerators.Mvc": { - "type": "Transitive", - "resolved": "5.0.2", - "contentHash": "W4Uk2y0oja+4E+XP5d5OFu+ViTEtlqm3a6nYuuC3tjA+lTK6dLaMf0G6WnO4BO18i0kM0l49XjTwwXd5XpjnAQ==", - "dependencies": { - "Microsoft.VisualStudio.Web.CodeGeneration": "5.0.2" - } - }, "Microsoft.Win32.Primitives": { "type": "Transitive", "resolved": "4.3.0", @@ -1889,102 +1719,6 @@ "System.Threading": "4.3.0" } }, - "System.Composition": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "I+D26qpYdoklyAVUdqwUBrEIckMNjAYnuPJy/h9dsQItpQwVREkDFs4b4tkBza0kT2Yk48Lcfsv2QQ9hWsh9Iw==", - "dependencies": { - "System.Composition.AttributedModel": "1.0.31", - "System.Composition.Convention": "1.0.31", - "System.Composition.Hosting": "1.0.31", - "System.Composition.Runtime": "1.0.31", - "System.Composition.TypedParts": "1.0.31" - } - }, - "System.Composition.AttributedModel": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "NHWhkM3ZkspmA0XJEsKdtTt1ViDYuojgSND3yHhTzwxepiwqZf+BCWuvCbjUt4fe0NxxQhUDGJ5km6sLjo9qnQ==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Composition.Convention": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "GLjh2Ju71k6C0qxMMtl4efHa68NmWeIUYh4fkUI8xbjQrEBvFmRwMDFcylT8/PR9SQbeeL48IkFxU/+gd0nYEQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Composition.AttributedModel": "1.0.31", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Composition.Hosting": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "fN1bT4RX4vUqjbgoyuJFVUizAl2mYF5VAb+bVIxIYZSSc0BdnX+yGAxcavxJuDDCQ1K+/mdpgyEFc8e9ikjvrg==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Composition.Runtime": "1.0.31", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.ObjectModel": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Composition.Runtime": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "0LEJN+2NVM89CE4SekDrrk5tHV5LeATltkp+9WNYrR+Huiyt0vaCqHbbHtVAjPyeLWIc8dOz/3kthRBj32wGQg==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.Linq": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Composition.TypedParts": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "0Zae/FtzeFgDBBuILeIbC/T9HMYbW4olAmi8XqqAGosSOWvXfiQLfARZEhiGd0LVXaYgXr0NhxiU1LldRP1fpQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Composition.AttributedModel": "1.0.31", - "System.Composition.Hosting": "1.0.31", - "System.Composition.Runtime": "1.0.31", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0" - } - }, "System.Configuration.ConfigurationManager": { "type": "Transitive", "resolved": "6.0.0", @@ -2645,8 +2379,8 @@ }, "System.Reflection.Metadata": { "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "5NecZgXktdGg34rh1OenY1rFNDCI8xSjFr+Z4OU4cU06AQHUdRnIIEeWENu3Wl4YowbzkymAIMvi3WyK9U53pQ==" + "resolved": "1.6.0", + "contentHash": "COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ==" }, "System.Reflection.Primitives": { "type": "Transitive", @@ -3290,91 +3024,90 @@ "common": { "type": "Project", "dependencies": { - "AutoFixture.AutoNSubstitute": "[4.17.0, )", - "AutoFixture.Xunit2": "[4.17.0, )", - "Core": "[2023.2.0, )", - "Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )", - "Microsoft.NET.Test.Sdk": "[17.1.0, )", - "NSubstitute": "[4.3.0, )", - "xunit": "[2.4.1, )" + "AutoFixture.AutoNSubstitute": "4.17.0", + "AutoFixture.Xunit2": "4.17.0", + "Core": "2023.2.2", + "Kralizek.AutoFixture.Extensions.MockHttp": "1.2.0", + "Microsoft.NET.Test.Sdk": "17.1.0", + "NSubstitute": "4.3.0", + "xunit": "2.4.1" } }, "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } }, "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Dapper": "[2.0.123, )" + "Core": "2023.2.2", + "Dapper": "2.0.123" } }, "infrastructure.entityframework": { "type": "Project", "dependencies": { - "AutoMapper.Extensions.Microsoft.DependencyInjection": "[11.0.0, )", - "Core": "[2023.2.0, )", - "Microsoft.EntityFrameworkCore.Relational": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.SqlServer": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.Sqlite": "[6.0.12, )", - "Npgsql.EntityFrameworkCore.PostgreSQL": "[6.0.8, )", - "Pomelo.EntityFrameworkCore.MySql": "[6.0.2, )", - "linq2db.EntityFrameworkCore": "[6.11.0, )" + "AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0", + "Core": "2023.2.2", + "Microsoft.EntityFrameworkCore.Relational": "6.0.12", + "Microsoft.EntityFrameworkCore.SqlServer": "6.0.12", + "Microsoft.EntityFrameworkCore.Sqlite": "6.0.12", + "Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.8", + "Pomelo.EntityFrameworkCore.MySql": "6.0.2", + "linq2db.EntityFrameworkCore": "6.11.0" } }, "scim": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Microsoft.VisualStudio.Web.CodeGeneration.Design": "[5.0.2, )", - "SharedWeb": "[2023.2.0, )" + "Core": "2023.2.2", + "SharedWeb": "2023.2.2" } }, "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Infrastructure.Dapper": "[2023.2.0, )", - "Infrastructure.EntityFramework": "[2023.2.0, )" + "Core": "2023.2.2", + "Infrastructure.Dapper": "2023.2.2", + "Infrastructure.EntityFramework": "2023.2.2" } } } diff --git a/dev/.env.example b/dev/.env.example index 62024d19ec..18346872e6 100644 --- a/dev/.env.example +++ b/dev/.env.example @@ -1,4 +1,4 @@ -COMPOSE_PROJECT_NAME=BitwardenServer +COMPOSE_PROJECT_NAME=bitwardenserver # Ensure the MSSQL_PASSWORD is complex and follows the password policy defined at # https://docs.microsoft.com/en-us/sql/relational-databases/security/password-policy?view=sql-server-ver15 MSSQL_PASSWORD=SET_A_PASSWORD_HERE_123 diff --git a/dev/docker-compose.yml b/dev/docker-compose.yml index 66d07b56ed..2e0e4113d7 100644 --- a/dev/docker-compose.yml +++ b/dev/docker-compose.yml @@ -4,7 +4,7 @@ services: mssql: image: mcr.microsoft.com/azure-sql-edge:latest environment: - ACCEPT_EULA: Y + ACCEPT_EULA: "Y" MSSQL_SA_PASSWORD: ${MSSQL_PASSWORD} MSSQL_PID: Developer volumes: @@ -13,15 +13,15 @@ services: - ./helpers/mssql:/mnt/helpers - ./.data/mssql:/mnt/data ports: - - '1433:1433' + - "1433:1433" profiles: - cloud - mssql - + storage: image: mcr.microsoft.com/azure-storage/azurite:latest - ports: - - "10000:10000" + ports: + - "10000:10000" - "10001:10001" - "10002:10002" volumes: @@ -29,18 +29,18 @@ services: profiles: - storage - cloud - + mail: image: sj26/mailcatcher:latest - ports: - - "${MAILCATCHER_PORT}:1080" + ports: + - "${MAILCATCHER_PORT}:1080" - "10250:1025" profiles: - mail postgres: image: postgres:14 - ports: + ports: - "5432:5432" environment: POSTGRES_DB: vault_dev @@ -56,7 +56,7 @@ services: mysql: image: mysql:8 container_name: bw-mysql - ports: + ports: - "3306:3306" command: --default-authentication-plugin=mysql_native_password environment: @@ -90,19 +90,19 @@ services: volumes: - ./directory.ldif:/container/service/slapd/assets/config/bootstrap/ldif/output.ldif ports: - - '389:389' - - '636:636' + - "389:389" + - "636:636" profiles: - ldap - + reverse-proxy: image: nginx:alpine container_name: reverse-proxy volumes: - "./reverse-proxy.conf:/etc/nginx/conf.d/default.conf" - ports: - - "${API_PROXY_PORT}:${API_PROXY_PORT}" - - "${IDENTITY_PROXY_PORT}:${IDENTITY_PROXY_PORT}" + ports: + - "${API_PROXY_PORT}:${API_PROXY_PORT}" + - "${IDENTITY_PROXY_PORT}:${IDENTITY_PROXY_PORT}" profiles: - proxy diff --git a/perf/MicroBenchmarks/packages.lock.json b/perf/MicroBenchmarks/packages.lock.json index 727b2f4f45..6ae97a6e1c 100644 --- a/perf/MicroBenchmarks/packages.lock.json +++ b/perf/MicroBenchmarks/packages.lock.json @@ -2711,43 +2711,43 @@ "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } } } diff --git a/src/Admin/Admin.csproj b/src/Admin/Admin.csproj index 31d3b6067b..daad8acf1f 100644 --- a/src/Admin/Admin.csproj +++ b/src/Admin/Admin.csproj @@ -23,7 +23,6 @@ - diff --git a/src/Admin/Controllers/ToolsController.cs b/src/Admin/Controllers/ToolsController.cs index b18864d371..6f9c557341 100644 --- a/src/Admin/Controllers/ToolsController.cs +++ b/src/Admin/Controllers/ToolsController.cs @@ -27,6 +27,7 @@ public class ToolsController : Controller private readonly IPaymentService _paymentService; private readonly ITaxRateRepository _taxRateRepository; private readonly IStripeAdapter _stripeAdapter; + private readonly IWebHostEnvironment _environment; public ToolsController( GlobalSettings globalSettings, @@ -38,7 +39,8 @@ public class ToolsController : Controller IOrganizationUserRepository organizationUserRepository, ITaxRateRepository taxRateRepository, IPaymentService paymentService, - IStripeAdapter stripeAdapter) + IStripeAdapter stripeAdapter, + IWebHostEnvironment environment) { _globalSettings = globalSettings; _organizationRepository = organizationRepository; @@ -50,6 +52,7 @@ public class ToolsController : Controller _taxRateRepository = taxRateRepository; _paymentService = paymentService; _stripeAdapter = stripeAdapter; + _environment = environment; } public IActionResult ChargeBraintree() @@ -450,11 +453,12 @@ public class ToolsController : Controller subscriptions.FirstOrDefault()?.Id : null; + var isProduction = _environment.IsProduction(); var model = new StripeSubscriptionsModel() { Items = subscriptions.Select(s => new StripeSubscriptionRowModel(s)).ToList(), Prices = (await _stripeAdapter.PriceListAsync(new Stripe.PriceListOptions() { Limit = 100 })).Data, - TestClocks = await _stripeAdapter.TestClockListAsync(), + TestClocks = isProduction ? new List() : await _stripeAdapter.TestClockListAsync(), Filter = options }; return View(model); @@ -465,8 +469,9 @@ public class ToolsController : Controller { if (!ModelState.IsValid) { + var isProduction = _environment.IsProduction(); model.Prices = (await _stripeAdapter.PriceListAsync(new Stripe.PriceListOptions() { Limit = 100 })).Data; - model.TestClocks = await _stripeAdapter.TestClockListAsync(); + model.TestClocks = isProduction ? new List() : await _stripeAdapter.TestClockListAsync(); return View(model); } diff --git a/src/Admin/packages.lock.json b/src/Admin/packages.lock.json index 1a211886bf..f19f4abdeb 100644 --- a/src/Admin/packages.lock.json +++ b/src/Admin/packages.lock.json @@ -22,18 +22,6 @@ "System.ValueTuple": "4.5.0" } }, - "Microsoft.VisualStudio.Web.CodeGeneration.Design": { - "type": "Direct", - "requested": "[6.0.3, )", - "resolved": "6.0.3", - "contentHash": "cqxm2k5KF7T0KejRlxt71aizeR+2a/9qk94c1p7/CCOjns4cgwL92IxyrhhpILn0U+kylslBE2O/AJoi28wkSA==", - "dependencies": { - "Microsoft.Build.Locator": "1.4.1", - "Microsoft.DotNet.Scaffolding.Shared": "6.0.3", - "Microsoft.VisualStudio.Web.CodeGenerators.Mvc": "6.0.3", - "System.Private.Uri": "4.3.2" - } - }, "AspNetCoreRateLimit": { "type": "Transitive", "resolved": "4.0.2", @@ -241,14 +229,6 @@ "Microsoft.CSharp": "4.7.0" } }, - "Humanizer.Core": { - "type": "Transitive", - "resolved": "2.2.0", - "contentHash": "rsYXB7+iUPP8AHgQ8JP2UZI2xK2KhjcdGr9E6zX3CsZaTLCaw8M35vaAJRo1rfxeaZEVMuXeaquLVCkZ7JcZ5Q==", - "dependencies": { - "NETStandard.Library": "1.6.1" - } - }, "IdentityModel": { "type": "Transitive", "resolved": "4.4.0", @@ -374,30 +354,6 @@ "MimeKit": "3.2.0" } }, - "MessagePack": { - "type": "Transitive", - "resolved": "2.1.152", - "contentHash": "PlJ31qf42uGuJfwc61x/Pt4hJi01xh1rrBofj1MJSLzEot/2UAIRdSgxEHN/8qou5CV8OBeDM9HXKPi1Oj8rpQ==", - "dependencies": { - "MessagePack.Annotations": "2.1.152", - "Microsoft.Bcl.AsyncInterfaces": "1.0.0", - "System.Memory": "4.5.3", - "System.Reflection.Emit": "4.6.0", - "System.Reflection.Emit.Lightweight": "4.6.0", - "System.Runtime.CompilerServices.Unsafe": "4.5.2", - "System.Threading.Tasks.Extensions": "4.5.3" - } - }, - "MessagePack.Annotations": { - "type": "Transitive", - "resolved": "2.1.152", - "contentHash": "RONktDA/HA641ds/2bfOqYSVew8o8EJMcQ1P4M1J77QGgbzWiWt3nBHvCAwlx0VfO6K9S8xq4b5OLD2CUnhtCg==" - }, - "MessagePackAnalyzer": { - "type": "Transitive", - "resolved": "2.1.152", - "contentHash": "uJhZlGMkXDaFYsH8V9S6o1EyvsUqB9mpU4DVBXNr0DXZVzZMhuLP1IkLj5xK3EKlaAcvkFkZv3eSvuz360wb3Q==" - }, "Microsoft.AspNetCore.Authentication.JwtBearer": { "type": "Transitive", "resolved": "6.0.4", @@ -484,11 +440,6 @@ "Microsoft.Extensions.Primitives": "2.1.0" } }, - "Microsoft.AspNetCore.Razor.Language": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "yCtBr1GSGzJrrp1NJUb4ltwFYMKHw/tJLnIDvg9g/FnkGIEzmE19tbCQqXARIJv5kdtBgsoVIdGLL+zmjxvM/A==" - }, "Microsoft.Azure.Amqp": { "type": "Transitive", "resolved": "2.4.11", @@ -563,196 +514,14 @@ }, "Microsoft.Bcl.AsyncInterfaces": { "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "W8DPQjkMScOMTtJbPwmPyj9c3zYSFGawDW3jwlBOOsnY+EzZFLgNQ/UMkK35JmkNOVPdCyPr2Tw7Vv9N+KA3ZQ==" + "resolved": "1.1.1", + "contentHash": "yuvf07qFWFqtK3P/MRkEKLhn5r2UbSpVueRziSqj0yJQIKFwG1pq9mOayK3zE5qZCTs0CbrwL9M6R8VwqyGy2w==" }, "Microsoft.Bcl.HashCode": { "type": "Transitive", "resolved": "1.1.0", "contentHash": "J2G1k+u5unBV+aYcwxo94ip16Rkp65pgWFb0R6zwJipzWNMgvqlWeuI7/+R+e8bob66LnSG+llLJ+z8wI94cHg==" }, - "Microsoft.Build": { - "type": "Transitive", - "resolved": "17.0.0", - "contentHash": "hCs9OzyCD/TYRid1LxPgghvUDqgXf+tEvV4qd8tBfOyp3zxAk+/rssgxtJnKLMZIu0CEZi3JegvfenaIXjEacQ==", - "dependencies": { - "Microsoft.Build.Framework": "17.0.0", - "Microsoft.NET.StringTools": "1.0.0", - "Microsoft.Win32.Registry": "4.3.0", - "System.Collections.Immutable": "5.0.0", - "System.Configuration.ConfigurationManager": "4.7.0", - "System.Reflection.Metadata": "1.6.0", - "System.Security.Principal.Windows": "4.7.0", - "System.Text.Encoding.CodePages": "4.0.1", - "System.Text.Json": "5.0.2", - "System.Threading.Tasks.Dataflow": "4.9.0" - } - }, - "Microsoft.Build.Framework": { - "type": "Transitive", - "resolved": "17.0.0", - "contentHash": "XbFA0z+6Ws2pNeRXYcDF3lKlNgRoSGMm2Q5HKzZD+EbwYMKPKrl/BJnnkMuDJHU0KravYHfhzBnLLJpPeZ3E7A==", - "dependencies": { - "System.Security.Permissions": "4.7.0" - } - }, - "Microsoft.Build.Locator": { - "type": "Transitive", - "resolved": "1.4.1", - "contentHash": "UfyGaxNTjw/r3uWMX/Cv1CPKELo7TCrR5VIahaSKL0WyqmbDT6og9pyjwuhyyUkxC9gk2ElB7oOEySL1OzTZ1g==" - }, - "Microsoft.CodeAnalysis.Analyzers": { - "type": "Transitive", - "resolved": "3.3.2", - "contentHash": "7xt6zTlIEizUgEsYAIgm37EbdkiMmr6fP6J9pDoKEpiGM4pi32BCPGr/IczmSJI9Zzp0a6HOzpr9OvpMP+2veA==" - }, - "Microsoft.CodeAnalysis.AnalyzerUtilities": { - "type": "Transitive", - "resolved": "3.3.0", - "contentHash": "gyQ70pJ4T7hu/s0+QnEaXtYfeG/JrttGnxHJlrhpxsQjRIUGuRhVwNBtkHHYOrUAZ/l47L98/NiJX6QmTwAyrg==" - }, - "Microsoft.CodeAnalysis.Common": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "d02ybMhUJl1r/dI6SkJPHrTiTzXBYCZeJdOLMckV+jyoMU/GGkjqFX/sRbv1K0QmlpwwKuLTiYVQvfYC+8ox2g==", - "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "3.3.2", - "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": "4.0.0", - "contentHash": "2UVTGtyQGgTCazvnT6t82f+7AV2L+kqJdyb61rT9GQed4yK+tVh5IkaKcsm70VqyZQhBbDqsfZFNHnY65xhrRw==", - "dependencies": { - "Microsoft.CodeAnalysis.Common": "[4.0.0]" - } - }, - "Microsoft.CodeAnalysis.CSharp.Features": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "WOTeKJN0I4/AzylA+VuTtB7V7VvnM41GXqnyiiDRNa3QtKFAzJbQ7CwLG97pcme+oQLz708z+s4Nzd9g0irytw==", - "dependencies": { - "Humanizer.Core": "2.2.0", - "Microsoft.CodeAnalysis.CSharp": "[4.0.0]", - "Microsoft.CodeAnalysis.CSharp.Workspaces": "[4.0.0]", - "Microsoft.CodeAnalysis.Common": "[4.0.0]", - "Microsoft.CodeAnalysis.Features": "[4.0.0]", - "Microsoft.CodeAnalysis.Workspaces.Common": "[4.0.0]" - } - }, - "Microsoft.CodeAnalysis.CSharp.Scripting": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "Z8Y8Ye2snCqVQLLx7K6FcEs0hcvdPi4nTG2RDWdPpOfMH8ed1yxTabt252qAd4TH0jpyruuCnBfW4s6DXliMYg==", - "dependencies": { - "Microsoft.CSharp": "4.3.0", - "Microsoft.CodeAnalysis.CSharp": "[4.0.0]", - "Microsoft.CodeAnalysis.Common": "[4.0.0]", - "Microsoft.CodeAnalysis.Scripting.Common": "[4.0.0]" - } - }, - "Microsoft.CodeAnalysis.CSharp.Workspaces": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "RQMc1+2cIRdOvY8vp6ygkzfBrvlYphnbmhhluKNh9+X+PpprQDKlbPrn9fLn6v9RlCsfa87joS3zJyGBEeWTXQ==", - "dependencies": { - "Humanizer.Core": "2.2.0", - "Microsoft.CodeAnalysis.CSharp": "[4.0.0]", - "Microsoft.CodeAnalysis.Common": "[4.0.0]", - "Microsoft.CodeAnalysis.Workspaces.Common": "[4.0.0]" - } - }, - "Microsoft.CodeAnalysis.Features": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "ci4pgjEgihb+fu2i1E12iOMGXU6GisYR3YrNd2aqt55ijjzLNqPV/+zt+cV3Qc0n08rJrIY2Bf6cTTMPY0bwJQ==", - "dependencies": { - "Microsoft.CodeAnalysis.AnalyzerUtilities": "3.3.0", - "Microsoft.CodeAnalysis.Common": "[4.0.0]", - "Microsoft.CodeAnalysis.Scripting.Common": "[4.0.0]", - "Microsoft.CodeAnalysis.Workspaces.Common": "[4.0.0]", - "Microsoft.DiaSymReader": "1.3.0", - "Microsoft.VisualStudio.Debugger.Contracts": "17.2.0", - "System.Threading.Tasks.Extensions": "4.5.4" - } - }, - "Microsoft.CodeAnalysis.Razor": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "uqdzuQXxD7XrJCbIbbwpI/LOv0PBJ9VIR0gdvANTHOfK5pjTaCir+XcwvYvBZ5BIzd0KGzyiamzlEWw1cK1q0w==", - "dependencies": { - "Microsoft.AspNetCore.Razor.Language": "6.0.0", - "Microsoft.CodeAnalysis.CSharp": "4.0.0", - "Microsoft.CodeAnalysis.Common": "4.0.0" - } - }, - "Microsoft.CodeAnalysis.Scripting.Common": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "jU/ncoHSFnXU/L2iju9AFlOwmsAYByIxhCCpeLPNTguXwosJp1o13mtrboJOfkDhi7ebvzQmvcZ++yBu8cF4Sw==", - "dependencies": { - "Microsoft.CodeAnalysis.Common": "[4.0.0]" - } - }, - "Microsoft.CodeAnalysis.VisualBasic": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "FK+OGUMUh9O6/GCwyIy4c/sOrarF36/yEY07BbXVYMql1qCqHGWfyWXyCQKQ6m/KqReCqW6aO4cK7kK/AYBpyA==", - "dependencies": { - "Microsoft.CodeAnalysis.Common": "[4.0.0]" - } - }, - "Microsoft.CodeAnalysis.VisualBasic.Features": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "GEJsXFcMd7o+D6OYCLPui2ZvNsonTmdPSluGK0wC3EXVB+gnrro7Lr/sjtTSOwVeiXPlhXgprRuO7zJiMn1uzw==", - "dependencies": { - "Microsoft.CodeAnalysis.Common": "[4.0.0]", - "Microsoft.CodeAnalysis.Features": "[4.0.0]", - "Microsoft.CodeAnalysis.VisualBasic": "[4.0.0]", - "Microsoft.CodeAnalysis.VisualBasic.Workspaces": "[4.0.0]", - "Microsoft.CodeAnalysis.Workspaces.Common": "[4.0.0]" - } - }, - "Microsoft.CodeAnalysis.VisualBasic.Workspaces": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "ozmB/thXGX5MoP/oiV9w5ZVGS08mz7fK3lRXiRSHHBeuiXZW1ZCGARwG2YkhylzAl1LlEwSQmlgrr8Irlu+3qQ==", - "dependencies": { - "Microsoft.CodeAnalysis.Common": "[4.0.0]", - "Microsoft.CodeAnalysis.VisualBasic": "[4.0.0]", - "Microsoft.CodeAnalysis.Workspaces.Common": "[4.0.0]" - } - }, - "Microsoft.CodeAnalysis.Workspaces.Common": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "bEfHzx8PLmEN6aogVYHWmViHCWfms8emI43w9nNX+C8MLgtynOmVL/OJ4hbuONVp+4OuDAy5BDj69n5MnXQX8g==", - "dependencies": { - "Humanizer.Core": "2.2.0", - "Microsoft.Bcl.AsyncInterfaces": "5.0.0", - "Microsoft.CodeAnalysis.Common": "[4.0.0]", - "System.Composition": "1.0.31", - "System.IO.Pipelines": "5.0.1" - } - }, - "Microsoft.CodeAnalysis.Workspaces.MSBuild": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "0LYNKESZPK4AQmAXwn8l2e8UF/rYpT0pvceEhiTVjurjQ9Y7pGdUZ5E30r8knxYtT5/9ZESR7wKf/AU00r95Mw==", - "dependencies": { - "Microsoft.Build.Framework": "16.5.0", - "Microsoft.CodeAnalysis.Common": "[4.0.0]", - "Microsoft.CodeAnalysis.Workspaces.Common": "[4.0.0]", - "System.Text.Json": "4.7.0" - } - }, "Microsoft.CSharp": { "type": "Transitive", "resolved": "4.7.0", @@ -795,32 +564,6 @@ "SQLitePCLRaw.core": "2.1.2" } }, - "Microsoft.DiaSymReader": { - "type": "Transitive", - "resolved": "1.3.0", - "contentHash": "/fn1Tfo7j7k/slViPlM8azJuxQmri7FZ8dQ+gTeLbI29leN/1VK0U/BFcRdJNctsRCUgyKJ2q+I0Tjq07Rc1/Q==", - "dependencies": { - "NETStandard.Library": "1.6.1" - } - }, - "Microsoft.DotNet.Scaffolding.Shared": { - "type": "Transitive", - "resolved": "6.0.3", - "contentHash": "MHPcl+Vm8tEyvCA0dSEMDd/DfEYW2VtkGs7DXEJBbeRToBmHoK/5djIQws4XWcdqcpuJNo1WqX+C35h7Y5G26w==", - "dependencies": { - "Microsoft.CodeAnalysis.CSharp.Features": "4.0.0", - "Microsoft.CodeAnalysis.CSharp.Scripting": "4.0.0", - "Microsoft.CodeAnalysis.CSharp.Workspaces": "4.0.0", - "Microsoft.CodeAnalysis.Features": "4.0.0", - "Microsoft.CodeAnalysis.VisualBasic.Features": "4.0.0", - "Microsoft.CodeAnalysis.VisualBasic.Workspaces": "4.0.0", - "Microsoft.CodeAnalysis.Workspaces.MSBuild": "4.0.0", - "Newtonsoft.Json": "13.0.1", - "NuGet.ProjectModel": "5.11.0", - "System.Collections.Immutable": "6.0.0", - "System.Private.Uri": "4.3.2" - } - }, "Microsoft.EntityFrameworkCore": { "type": "Transitive", "resolved": "6.0.12", @@ -1203,15 +946,6 @@ "System.Security.Cryptography.Cng": "4.5.0" } }, - "Microsoft.NET.StringTools": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "ZYVcoDM0LnSyT5nWoRGfShYdOecCw2sOXWwP6j1Z0u48Xq3+BVvZ+EiPCX9/8Gz439giW+O1H1kWF9Eb/w6rVg==", - "dependencies": { - "System.Memory": "4.5.4", - "System.Runtime.CompilerServices.Unsafe": "5.0.0" - } - }, "Microsoft.NETCore.Platforms": { "type": "Transitive", "resolved": "5.0.0", @@ -1246,84 +980,6 @@ "resolved": "1.0.0", "contentHash": "N4KeF3cpcm1PUHym1RmakkzfkEv3GRMyofVv40uXsQhCQeglr2OHNcUk2WOG51AKpGO8ynGpo9M/kFXSzghwug==" }, - "Microsoft.VisualStudio.Debugger.Contracts": { - "type": "Transitive", - "resolved": "17.2.0", - "contentHash": "br/qV/aHqLqVlqtcMKglCC8MHMMLey0yMkKSplnMl58F5gKjwnh7wjs8+g0j/vf4T6h4KK7JWrC0+oN70pbugg==", - "dependencies": { - "MessagePack": "2.1.152", - "MessagePackAnalyzer": "2.1.152", - "Microsoft.Bcl.AsyncInterfaces": "1.1.1", - "System.Collections.Immutable": "5.0.0" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration": { - "type": "Transitive", - "resolved": "6.0.3", - "contentHash": "rD1Lj6LljO7iEeZJuGtEp0O9rZHvr+tAZJx8QgwdmlrMReaYA0+KQCH/woEdcmBo+ifnwUUyNgG+9NUECYTT9g==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection": "6.0.0", - "Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore": "6.0.3", - "System.Collections.Immutable": "6.0.0", - "System.Private.Uri": "4.3.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration.Core": { - "type": "Transitive", - "resolved": "6.0.3", - "contentHash": "o+rN2+WrG4NTU4dzcExaMAGpQk84+SJMC8D3v7pe35f6DJQIXC3lc9V9npgNtiiD19aP+Pdto8L5nuwQ83dgTw==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection": "6.0.0", - "Microsoft.VisualStudio.Web.CodeGeneration.Templating": "6.0.3", - "Newtonsoft.Json": "13.0.1", - "System.Private.Uri": "4.3.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore": { - "type": "Transitive", - "resolved": "6.0.3", - "contentHash": "Mg0HpwFZyOJQHtW04gbCLekZ8Lt3VSs9s9JqgGm6DXoeTbAbaHhJGZohuT296Z+0MuFJgl9mD1/j1Zof8hPgcA==", - "dependencies": { - "Microsoft.DotNet.Scaffolding.Shared": "6.0.3", - "Microsoft.VisualStudio.Web.CodeGeneration.Core": "6.0.3", - "System.Private.Uri": "4.3.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration.Templating": { - "type": "Transitive", - "resolved": "6.0.3", - "contentHash": "TMV1xzJSjNpiWCGkw6/8/XHmYF0HiimH/8kmPZfT/J+WBKABn4DRbZNpgTYNKmcuYxg4mKySFPVpblQ0XMf9Tg==", - "dependencies": { - "Microsoft.AspNetCore.Razor.Language": "6.0.0", - "Microsoft.CodeAnalysis.CSharp": "4.0.0", - "Microsoft.CodeAnalysis.Razor": "6.0.0", - "Microsoft.VisualStudio.Web.CodeGeneration.Utils": "6.0.3", - "System.Private.Uri": "4.3.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration.Utils": { - "type": "Transitive", - "resolved": "6.0.3", - "contentHash": "M8k06jnZ0l7031mPYDbLaiiz20ju1MP+FJlpDKVilkAPOQVITSFRDm8Hhd2Pyd+BSj+nCzDC1ZMglK8z+lJ5ig==", - "dependencies": { - "Microsoft.Build": "17.0.0", - "Microsoft.Build.Locator": "1.4.1", - "Microsoft.CodeAnalysis.CSharp.Workspaces": "4.0.0", - "Microsoft.DotNet.Scaffolding.Shared": "6.0.3", - "Newtonsoft.Json": "13.0.1", - "System.Private.Uri": "4.3.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGenerators.Mvc": { - "type": "Transitive", - "resolved": "6.0.3", - "contentHash": "Oe3QkXildc2AFM33rN9WSLj53kzuQAPLAv7aduz+bnYc86SFBPA/qpYZ2ZJhlKYbrJUpztRqoWvLqGfDT6XkUw==", - "dependencies": { - "Microsoft.DotNet.Scaffolding.Shared": "6.0.3", - "Microsoft.VisualStudio.Web.CodeGeneration": "6.0.3", - "System.Private.Uri": "4.3.2" - } - }, "Microsoft.Win32.Primitives": { "type": "Transitive", "resolved": "4.3.0", @@ -1445,79 +1101,6 @@ "libsodium": "[1.0.18.2, 1.0.19)" } }, - "NuGet.Common": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "WCHexQBfSqBDRqP3PSDSUw7YM+PwuvMHGAkT/sXI5UHze4T41yLE+VB/km2Fe0z9y3m2mudcr2djFZezivjMJw==", - "dependencies": { - "NuGet.Frameworks": "5.11.0" - } - }, - "NuGet.Configuration": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "NqsQe198CTHoo7NMrKQL8utd6n9yVb9CPgJmpyF6kpEsLFo/9r0wqGL3ln8Mtcz8yuJpOPWFQEoOlzDzu3LfUg==", - "dependencies": { - "NuGet.Common": "5.11.0", - "System.Security.Cryptography.ProtectedData": "4.4.0" - } - }, - "NuGet.DependencyResolver.Core": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "kkWhU0msuCRyiIJeoL95j6bXUQMc1mTk8wZ3mMxl+0VzOf39eXSObmxKuJ7eh+6zOMQyzd0TAXU5u5aQSxOVSg==", - "dependencies": { - "NuGet.LibraryModel": "5.11.0", - "NuGet.Protocol": "5.11.0" - } - }, - "NuGet.Frameworks": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "eaiXkUjC4NPcquGWzAGMXjuxvLwc6XGKMptSyOGQeT0X70BUZObuybJFZLA0OfTdueLd3US23NBPTBb6iF3V1Q==" - }, - "NuGet.LibraryModel": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "Iq0tbX3Rsl4837VlWy90fliA7T2+g2FPdz/s/lK6H9g/5RCta/7AZADV0l/A/f0HDCDlMxBN2ha1hsmgxe1sGQ==", - "dependencies": { - "NuGet.Common": "5.11.0", - "NuGet.Versioning": "5.11.0" - } - }, - "NuGet.Packaging": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "knlpQuqTL8BEXUHTdZ9Wlz3pjck5nv0OYsCpSkaQAukl7fFcX4apAs8cwJgxHiEZjfWNG1npZOzpYdHG59v5xQ==", - "dependencies": { - "Newtonsoft.Json": "9.0.1", - "NuGet.Configuration": "5.11.0", - "NuGet.Versioning": "5.11.0", - "System.Security.Cryptography.Cng": "5.0.0", - "System.Security.Cryptography.Pkcs": "5.0.0" - } - }, - "NuGet.ProjectModel": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "8q7mAwHHP1/Ua1r3FQDg+kXcFvRgBmCCXQeqTkTVQoO5t3G/AwxzJVt7Jii0eNrM17Wzm975U0gnkNqlp+gdsw==", - "dependencies": { - "NuGet.DependencyResolver.Core": "5.11.0" - } - }, - "NuGet.Protocol": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "eS/sJLqMzPz6gonD1zaXIcpDME/1DuKqv0Hlag8RuJcboZJliA15qjfg7UvuQB8/ineOleaEvrTzMjpKE0FdbQ==", - "dependencies": { - "NuGet.Packaging": "5.11.0" - } - }, - "NuGet.Versioning": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "mCv/GzvMk5iatWoZY41PoIShEbwVxq9CDCc1fV/uqPFKZ4DD/1JuKZ5AL/FJJRsTanvMR3EOXKYCLdQ7PFYn8Q==" - }, "Otp.NET": { "type": "Transitive", "resolved": "1.2.2", @@ -2011,102 +1594,6 @@ "System.Threading": "4.3.0" } }, - "System.Composition": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "I+D26qpYdoklyAVUdqwUBrEIckMNjAYnuPJy/h9dsQItpQwVREkDFs4b4tkBza0kT2Yk48Lcfsv2QQ9hWsh9Iw==", - "dependencies": { - "System.Composition.AttributedModel": "1.0.31", - "System.Composition.Convention": "1.0.31", - "System.Composition.Hosting": "1.0.31", - "System.Composition.Runtime": "1.0.31", - "System.Composition.TypedParts": "1.0.31" - } - }, - "System.Composition.AttributedModel": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "NHWhkM3ZkspmA0XJEsKdtTt1ViDYuojgSND3yHhTzwxepiwqZf+BCWuvCbjUt4fe0NxxQhUDGJ5km6sLjo9qnQ==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Composition.Convention": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "GLjh2Ju71k6C0qxMMtl4efHa68NmWeIUYh4fkUI8xbjQrEBvFmRwMDFcylT8/PR9SQbeeL48IkFxU/+gd0nYEQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Composition.AttributedModel": "1.0.31", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Composition.Hosting": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "fN1bT4RX4vUqjbgoyuJFVUizAl2mYF5VAb+bVIxIYZSSc0BdnX+yGAxcavxJuDDCQ1K+/mdpgyEFc8e9ikjvrg==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Composition.Runtime": "1.0.31", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.ObjectModel": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Composition.Runtime": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "0LEJN+2NVM89CE4SekDrrk5tHV5LeATltkp+9WNYrR+Huiyt0vaCqHbbHtVAjPyeLWIc8dOz/3kthRBj32wGQg==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.Linq": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Composition.TypedParts": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "0Zae/FtzeFgDBBuILeIbC/T9HMYbW4olAmi8XqqAGosSOWvXfiQLfARZEhiGd0LVXaYgXr0NhxiU1LldRP1fpQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Composition.AttributedModel": "1.0.31", - "System.Composition.Hosting": "1.0.31", - "System.Composition.Runtime": "1.0.31", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0" - } - }, "System.Configuration.ConfigurationManager": { "type": "Transitive", "resolved": "6.0.0", @@ -2733,8 +2220,15 @@ }, "System.Reflection.Emit": { "type": "Transitive", - "resolved": "4.6.0", - "contentHash": "qAo4jyXtC9i71iElngX7P2r+zLaiHzxKwf66sc3X91tL5Ks6fnQ1vxL04o7ZSm3sYfLExySL7GN8aTpNYpU1qw==" + "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", @@ -2748,8 +2242,14 @@ }, "System.Reflection.Emit.Lightweight": { "type": "Transitive", - "resolved": "4.6.0", - "contentHash": "j/V5HVvxvBQ7uubYD0PptQW2KGsi1Pc2kZ9yfwLixv3ADdjL/4M78KyC5e+ymW612DY8ZE4PFoZmWpoNmN2mqg==" + "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", @@ -2762,11 +2262,6 @@ "System.Runtime": "4.3.0" } }, - "System.Reflection.Metadata": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "5NecZgXktdGg34rh1OenY1rFNDCI8xSjFr+Z4OU4cU06AQHUdRnIIEeWENu3Wl4YowbzkymAIMvi3WyK9U53pQ==" - }, "System.Reflection.Primitives": { "type": "Transitive", "resolved": "4.3.0", @@ -3205,11 +2700,6 @@ "System.Runtime": "4.3.0" } }, - "System.Threading.Tasks.Dataflow": { - "type": "Transitive", - "resolved": "4.9.0", - "contentHash": "dTS+3D/GtG2/Pvc3E5YzVvAa7aQJgLDlZDIzukMOJjYudVOQOUXEU68y6Zi3Nn/jqIeB5kOCwrGbQFAKHVzXEQ==" - }, "System.Threading.Tasks.Extensions": { "type": "Transitive", "resolved": "4.5.4", @@ -3381,106 +2871,106 @@ "commercial.core": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )" + "Core": "2023.2.2" } }, "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } }, "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Dapper": "[2.0.123, )" + "Core": "2023.2.2", + "Dapper": "2.0.123" } }, "infrastructure.entityframework": { "type": "Project", "dependencies": { - "AutoMapper.Extensions.Microsoft.DependencyInjection": "[11.0.0, )", - "Core": "[2023.2.0, )", - "Microsoft.EntityFrameworkCore.Relational": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.SqlServer": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.Sqlite": "[6.0.12, )", - "Npgsql.EntityFrameworkCore.PostgreSQL": "[6.0.8, )", - "Pomelo.EntityFrameworkCore.MySql": "[6.0.2, )", - "linq2db.EntityFrameworkCore": "[6.11.0, )" + "AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0", + "Core": "2023.2.2", + "Microsoft.EntityFrameworkCore.Relational": "6.0.12", + "Microsoft.EntityFrameworkCore.SqlServer": "6.0.12", + "Microsoft.EntityFrameworkCore.Sqlite": "6.0.12", + "Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.8", + "Pomelo.EntityFrameworkCore.MySql": "6.0.2", + "linq2db.EntityFrameworkCore": "6.11.0" } }, "migrator": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Microsoft.Extensions.Logging": "[6.0.0, )", - "dbup-sqlserver": "[5.0.8, )" + "Core": "2023.2.2", + "Microsoft.Extensions.Logging": "6.0.0", + "dbup-sqlserver": "5.0.8" } }, "mysqlmigrations": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Infrastructure.EntityFramework": "[2023.2.0, )" + "Core": "2023.2.2", + "Infrastructure.EntityFramework": "2023.2.2" } }, "postgresmigrations": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Infrastructure.EntityFramework": "[2023.2.0, )" + "Core": "2023.2.2", + "Infrastructure.EntityFramework": "2023.2.2" } }, "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Infrastructure.Dapper": "[2023.2.0, )", - "Infrastructure.EntityFramework": "[2023.2.0, )" + "Core": "2023.2.2", + "Infrastructure.Dapper": "2023.2.2", + "Infrastructure.EntityFramework": "2023.2.2" } }, "sqlitemigrations": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Infrastructure.EntityFramework": "[2023.2.0, )" + "Core": "2023.2.2", + "Infrastructure.EntityFramework": "2023.2.2" } } } diff --git a/src/Api/Controllers/AuthRequestsController.cs b/src/Api/Controllers/AuthRequestsController.cs index 3468b1ad72..ee5515fbbe 100644 --- a/src/Api/Controllers/AuthRequestsController.cs +++ b/src/Api/Controllers/AuthRequestsController.cs @@ -107,8 +107,7 @@ public class AuthRequestsController : Controller AccessCode = model.AccessCode, PublicKey = model.PublicKey, UserId = user.Id, - Type = model.Type.Value, - RequestFingerprint = model.FingerprintPhrase + Type = model.Type.Value }; authRequest = await _authRequestRepository.CreateAsync(authRequest); await _pushNotificationService.PushAuthRequestAsync(authRequest); diff --git a/src/Api/Controllers/CollectionsController.cs b/src/Api/Controllers/CollectionsController.cs index 3697c7f4b6..6f06c643a2 100644 --- a/src/Api/Controllers/CollectionsController.cs +++ b/src/Api/Controllers/CollectionsController.cs @@ -79,7 +79,7 @@ public class CollectionsController : Controller [HttpGet("details")] public async Task> GetManyWithDetails(Guid orgId) { - if (!await ViewAtLeastOneCollectionAsync(orgId) && !await _currentContext.ManageUsers(orgId)) + if (!await ViewAtLeastOneCollectionAsync(orgId) && !await _currentContext.ManageUsers(orgId) && !await _currentContext.ManageGroups(orgId)) { throw new NotFoundException(); } @@ -204,12 +204,12 @@ public class CollectionsController : Controller { var orgId = new Guid(model.OrganizationId); var collectionIds = model.Ids.Select(i => new Guid(i)); - if (!await _currentContext.DeleteAssignedCollections(orgId)) + if (!await _currentContext.DeleteAssignedCollections(orgId) && !await _currentContext.DeleteAnyCollection(orgId)) { throw new NotFoundException(); } - var userCollections = await _collectionRepository.GetManyByUserIdAsync(_currentContext.UserId.Value); + var userCollections = await _collectionService.GetOrganizationCollections(orgId); var filteredCollections = userCollections.Where(c => collectionIds.Contains(c.Id) && c.OrganizationId == orgId); if (!filteredCollections.Any()) diff --git a/src/Api/Controllers/ConfigController.cs b/src/Api/Controllers/ConfigController.cs index 51d224bc6e..167de7c905 100644 --- a/src/Api/Controllers/ConfigController.cs +++ b/src/Api/Controllers/ConfigController.cs @@ -1,4 +1,6 @@ using Bit.Api.Models.Response; +using Bit.Core.Context; +using Bit.Core.Services; using Bit.Core.Settings; using Microsoft.AspNetCore.Mvc; @@ -9,15 +11,22 @@ namespace Bit.Api.Controllers; public class ConfigController : Controller { private readonly IGlobalSettings _globalSettings; + private readonly ICurrentContext _currentContext; + private readonly IFeatureService _featureService; - public ConfigController(IGlobalSettings globalSettings) + public ConfigController( + IGlobalSettings globalSettings, + ICurrentContext currentContext, + IFeatureService featureService) { _globalSettings = globalSettings; + _currentContext = currentContext; + _featureService = featureService; } [HttpGet("")] public ConfigResponseModel GetConfigs() { - return new ConfigResponseModel(_globalSettings); + return new ConfigResponseModel(_globalSettings, _featureService.GetAll(_currentContext)); } } diff --git a/src/Api/Controllers/OrganizationsController.cs b/src/Api/Controllers/OrganizationsController.cs index eb242a475f..92e9fcb876 100644 --- a/src/Api/Controllers/OrganizationsController.cs +++ b/src/Api/Controllers/OrganizationsController.cs @@ -703,8 +703,11 @@ public class OrganizationsController : Controller if (model.Enabled) { var orgUser = await _organizationUserRepository.GetByOrganizationAsync(id, userId); - orgUser.AccessSecretsManager = true; - await _organizationUserRepository.ReplaceAsync(orgUser); + if (orgUser != null) + { + orgUser.AccessSecretsManager = true; + await _organizationUserRepository.ReplaceAsync(orgUser); + } } } } diff --git a/src/Api/Models/Request/AuthRequestRequestModel.cs b/src/Api/Models/Request/AuthRequestRequestModel.cs index 8dab8036b6..d3f85a2570 100644 --- a/src/Api/Models/Request/AuthRequestRequestModel.cs +++ b/src/Api/Models/Request/AuthRequestRequestModel.cs @@ -17,8 +17,6 @@ public class AuthRequestCreateRequestModel public string AccessCode { get; set; } [Required] public AuthRequestType? Type { get; set; } - [Required] - public string FingerprintPhrase { get; set; } } public class AuthRequestUpdateRequestModel diff --git a/src/Api/Models/Response/AuthRequestResponseModel.cs b/src/Api/Models/Response/AuthRequestResponseModel.cs index 99f90d3694..1fa118f91b 100644 --- a/src/Api/Models/Response/AuthRequestResponseModel.cs +++ b/src/Api/Models/Response/AuthRequestResponseModel.cs @@ -20,7 +20,6 @@ public class AuthRequestResponseModel : ResponseModel RequestDeviceType = authRequest.RequestDeviceType.GetType().GetMember(authRequest.RequestDeviceType.ToString()) .FirstOrDefault()?.GetCustomAttribute()?.GetName(); RequestIpAddress = authRequest.RequestIpAddress; - RequestFingerprint = authRequest.RequestFingerprint; Key = authRequest.Key; MasterPasswordHash = authRequest.MasterPasswordHash; CreationDate = authRequest.CreationDate; @@ -33,7 +32,6 @@ public class AuthRequestResponseModel : ResponseModel public string PublicKey { get; set; } public string RequestDeviceType { get; set; } public string RequestIpAddress { get; set; } - public string RequestFingerprint { get; set; } public string Key { get; set; } public string MasterPasswordHash { get; set; } public DateTime CreationDate { get; set; } diff --git a/src/Api/Models/Response/ConfigResponseModel.cs b/src/Api/Models/Response/ConfigResponseModel.cs index 019ee161c4..2e85a3a30d 100644 --- a/src/Api/Models/Response/ConfigResponseModel.cs +++ b/src/Api/Models/Response/ConfigResponseModel.cs @@ -10,15 +10,19 @@ public class ConfigResponseModel : ResponseModel public string GitHash { get; set; } public ServerConfigResponseModel Server { get; set; } public EnvironmentConfigResponseModel Environment { get; set; } + public IDictionary FeatureStates { get; set; } - public ConfigResponseModel(string obj = "config") : base(obj) + public ConfigResponseModel() : base("config") { Version = AssemblyHelpers.GetVersion(); GitHash = AssemblyHelpers.GetGitHash(); Environment = new EnvironmentConfigResponseModel(); + FeatureStates = new Dictionary(); } - public ConfigResponseModel(IGlobalSettings globalSettings, string obj = "config") : base(obj) + public ConfigResponseModel( + IGlobalSettings globalSettings, + IDictionary featureStates) : base("config") { Version = AssemblyHelpers.GetVersion(); GitHash = AssemblyHelpers.GetGitHash(); @@ -30,6 +34,7 @@ public class ConfigResponseModel : ResponseModel Notifications = globalSettings.BaseServiceUri.Notifications, Sso = globalSettings.BaseServiceUri.Sso }; + FeatureStates = featureStates; } } diff --git a/src/Api/Models/Response/ProfileOrganizationResponseModel.cs b/src/Api/Models/Response/ProfileOrganizationResponseModel.cs index 94ef68c263..b8895fdc92 100644 --- a/src/Api/Models/Response/ProfileOrganizationResponseModel.cs +++ b/src/Api/Models/Response/ProfileOrganizationResponseModel.cs @@ -28,6 +28,8 @@ public class ProfileOrganizationResponseModel : ResponseModel UseSecretsManager = organization.UseSecretsManager; UsersGetPremium = organization.UsersGetPremium; UseCustomPermissions = organization.UseCustomPermissions; + UseActivateAutofillPolicy = organization.PlanType == PlanType.EnterpriseAnnually || + organization.PlanType == PlanType.EnterpriseMonthly; SelfHost = organization.SelfHost; Seats = organization.Seats; MaxCollections = organization.MaxCollections; @@ -78,6 +80,7 @@ public class ProfileOrganizationResponseModel : ResponseModel public bool UseSecretsManager { get; set; } public bool UsersGetPremium { get; set; } public bool UseCustomPermissions { get; set; } + public bool UseActivateAutofillPolicy { get; set; } public bool SelfHost { get; set; } public int? Seats { get; set; } public short? MaxCollections { get; set; } diff --git a/src/Api/Models/Response/ProfileProviderOrganizationResponseModel.cs b/src/Api/Models/Response/ProfileProviderOrganizationResponseModel.cs index 1d508cae17..d08e3b1ea4 100644 --- a/src/Api/Models/Response/ProfileProviderOrganizationResponseModel.cs +++ b/src/Api/Models/Response/ProfileProviderOrganizationResponseModel.cs @@ -24,6 +24,8 @@ public class ProfileProviderOrganizationResponseModel : ProfileOrganizationRespo UseResetPassword = organization.UseResetPassword; UsersGetPremium = organization.UsersGetPremium; UseCustomPermissions = organization.UseCustomPermissions; + UseActivateAutofillPolicy = organization.PlanType == PlanType.EnterpriseAnnually || + organization.PlanType == PlanType.EnterpriseMonthly; SelfHost = organization.SelfHost; Seats = organization.Seats; MaxCollections = organization.MaxCollections; diff --git a/src/Api/SecretsManager/Controllers/ProjectsController.cs b/src/Api/SecretsManager/Controllers/ProjectsController.cs index 75738b9819..b3b52cd074 100644 --- a/src/Api/SecretsManager/Controllers/ProjectsController.cs +++ b/src/Api/SecretsManager/Controllers/ProjectsController.cs @@ -82,8 +82,7 @@ public class ProjectsController : Controller [HttpGet("projects/{id}")] public async Task GetAsync([FromRoute] Guid id) { - var userId = _userService.GetProperUserId(User).Value; - var project = await _projectRepository.GetPermissionDetailsByIdAsync(id, userId); + var project = await _projectRepository.GetByIdAsync(id); if (project == null) { throw new NotFoundException(); @@ -94,41 +93,24 @@ public class ProjectsController : Controller throw new NotFoundException(); } + var userId = _userService.GetProperUserId(User).Value; var orgAdmin = await _currentContext.OrganizationAdmin(project.OrganizationId); var accessClient = AccessClientHelper.ToAccessClient(_currentContext.ClientType, orgAdmin); - bool hasAccess; - var read = project.Read; - var write = project.Write; + var access = await _projectRepository.AccessToProjectAsync(id, userId, accessClient); - switch (accessClient) - { - case AccessClientType.NoAccessCheck: - hasAccess = true; - write = true; - read = true; - break; - case AccessClientType.User: - hasAccess = project.Read; - break; - default: - hasAccess = false; - break; - } - - if (!hasAccess) + if (!access.Read) { throw new NotFoundException(); } - return new ProjectPermissionDetailsResponseModel(project, read, write); + return new ProjectPermissionDetailsResponseModel(project, access.Read, access.Write); } [HttpPost("projects/delete")] public async Task> BulkDeleteAsync([FromBody] List ids) { var userId = _userService.GetProperUserId(User).Value; - var results = await _deleteProjectCommand.DeleteProjects(ids, userId); var responses = results.Select(r => new BulkDeleteResponseModel(r.Item1.Id, r.Item2)); return new ListResponseModel(responses); diff --git a/src/Api/SecretsManager/Controllers/SecretsController.cs b/src/Api/SecretsManager/Controllers/SecretsController.cs index 9cf0a91edd..fd60c15fbc 100644 --- a/src/Api/SecretsManager/Controllers/SecretsController.cs +++ b/src/Api/SecretsManager/Controllers/SecretsController.cs @@ -5,8 +5,9 @@ using Bit.Core.Context; using Bit.Core.Enums; using Bit.Core.Exceptions; using Bit.Core.Identity; +using Bit.Core.Models.Business; +using Bit.Core.Repositories; using Bit.Core.SecretsManager.Commands.Secrets.Interfaces; -using Bit.Core.SecretsManager.Entities; using Bit.Core.SecretsManager.Repositories; using Bit.Core.Services; using Microsoft.AspNetCore.Authorization; @@ -21,30 +22,37 @@ public class SecretsController : Controller private readonly ICurrentContext _currentContext; private readonly IProjectRepository _projectRepository; private readonly ISecretRepository _secretRepository; + private readonly IOrganizationRepository _organizationRepository; private readonly ICreateSecretCommand _createSecretCommand; private readonly IUpdateSecretCommand _updateSecretCommand; private readonly IDeleteSecretCommand _deleteSecretCommand; private readonly IUserService _userService; private readonly IEventService _eventService; + private readonly IReferenceEventService _referenceEventService; public SecretsController( ICurrentContext currentContext, IProjectRepository projectRepository, ISecretRepository secretRepository, + IOrganizationRepository organizationRepository, ICreateSecretCommand createSecretCommand, IUpdateSecretCommand updateSecretCommand, IDeleteSecretCommand deleteSecretCommand, IUserService userService, - IEventService eventService) + IEventService eventService, + IReferenceEventService referenceEventService) { _currentContext = currentContext; _projectRepository = projectRepository; _secretRepository = secretRepository; + _organizationRepository = organizationRepository; _createSecretCommand = createSecretCommand; _updateSecretCommand = updateSecretCommand; _deleteSecretCommand = deleteSecretCommand; _userService = userService; _eventService = eventService; + _referenceEventService = referenceEventService; + } [HttpGet("organizations/{organizationId}/secrets")] @@ -74,7 +82,9 @@ public class SecretsController : Controller var userId = _userService.GetProperUserId(User).Value; var result = await _createSecretCommand.CreateAsync(createRequest.ToSecret(organizationId), userId); - return new SecretResponseModel(result); + + // Creating a secret means you have read & write permission. + return new SecretResponseModel(result, true, true); } [HttpGet("secrets/{id}")] @@ -87,18 +97,26 @@ public class SecretsController : Controller throw new NotFoundException(); } - if (!await UserHasReadAccessToSecret(secret)) + var userId = _userService.GetProperUserId(User).Value; + var orgAdmin = await _currentContext.OrganizationAdmin(secret.OrganizationId); + var accessClient = AccessClientHelper.ToAccessClient(_currentContext.ClientType, orgAdmin); + + var access = await _secretRepository.AccessToSecretAsync(id, userId, accessClient); + + if (!access.Read) { throw new NotFoundException(); } if (_currentContext.ClientType == ClientType.ServiceAccount) { - var userId = _userService.GetProperUserId(User).Value; await _eventService.LogServiceAccountSecretEventAsync(userId, secret, EventType.Secret_Retrieved); + + var org = await _organizationRepository.GetByIdAsync(secret.OrganizationId); + await _referenceEventService.RaiseEventAsync(new ReferenceEvent(ReferenceEventType.SmServiceAccountAccessedSecret, org)); } - return new SecretResponseModel(secret); + return new SecretResponseModel(secret, access.Read, access.Write); } [HttpGet("projects/{projectId}/secrets")] @@ -125,7 +143,9 @@ public class SecretsController : Controller var userId = _userService.GetProperUserId(User).Value; var secret = updateRequest.ToSecret(id); var result = await _updateSecretCommand.UpdateAsync(secret, userId); - return new SecretResponseModel(result); + + // Updating a secret means you have read & write permission. + return new SecretResponseModel(result, true, true); } [HttpPost("secrets/delete")] @@ -136,26 +156,4 @@ public class SecretsController : Controller var responses = results.Select(r => new BulkDeleteResponseModel(r.Item1.Id, r.Item2)); return new ListResponseModel(responses); } - - public async Task UserHasReadAccessToSecret(Secret secret) - { - var userId = _userService.GetProperUserId(User).Value; - var orgAdmin = await _currentContext.OrganizationAdmin(secret.OrganizationId); - var accessClient = AccessClientHelper.ToAccessClient(_currentContext.ClientType, orgAdmin); - var hasAccess = orgAdmin; - - if (secret.Projects?.Count > 0) - { - Guid projectId = secret.Projects.FirstOrDefault().Id; - hasAccess = accessClient switch - { - AccessClientType.NoAccessCheck => true, - AccessClientType.User => await _projectRepository.UserHasReadAccessToProject(projectId, userId), - AccessClientType.ServiceAccount => await _projectRepository.ServiceAccountHasReadAccessToProject(projectId, userId), - _ => false, - }; - } - - return hasAccess; - } } diff --git a/src/Api/SecretsManager/Controllers/SecretsManagerPortingController.cs b/src/Api/SecretsManager/Controllers/SecretsManagerPortingController.cs index e077d67cbc..a74c2fa48c 100644 --- a/src/Api/SecretsManager/Controllers/SecretsManagerPortingController.cs +++ b/src/Api/SecretsManager/Controllers/SecretsManagerPortingController.cs @@ -6,11 +6,13 @@ using Bit.Core.Exceptions; using Bit.Core.SecretsManager.Commands.Porting.Interfaces; using Bit.Core.SecretsManager.Repositories; using Bit.Core.Services; +using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; namespace Bit.Api.SecretsManager.Controllers; [SecretsManager] +[Authorize("secrets")] public class SecretsManagerPortingController : Controller { private readonly ISecretRepository _secretRepository; @@ -31,7 +33,7 @@ public class SecretsManagerPortingController : Controller [HttpGet("sm/{organizationId}/export")] public async Task Export([FromRoute] Guid organizationId, [FromRoute] string format = "json") { - if (!await _currentContext.OrganizationAdmin(organizationId)) + if (!await _currentContext.OrganizationAdmin(organizationId) || !_currentContext.AccessSecretsManager(organizationId)) { throw new NotFoundException(); } @@ -45,13 +47,13 @@ public class SecretsManagerPortingController : Controller throw new NotFoundException(); } - return new SMExportResponseModel(projects, secrets); + return new SMExportResponseModel(projects, secrets.Select(s => s.Secret)); } [HttpPost("sm/{organizationId}/import")] public async Task Import([FromRoute] Guid organizationId, [FromBody] SMImportRequestModel importRequest) { - if (!await _currentContext.OrganizationAdmin(organizationId)) + if (!await _currentContext.OrganizationAdmin(organizationId) || !_currentContext.AccessSecretsManager(organizationId)) { throw new NotFoundException(); } diff --git a/src/Api/SecretsManager/Models/Response/AccessTokenResponseModel.cs b/src/Api/SecretsManager/Models/Response/AccessTokenResponseModel.cs index 1b0658af9a..72f9fcac64 100644 --- a/src/Api/SecretsManager/Models/Response/AccessTokenResponseModel.cs +++ b/src/Api/SecretsManager/Models/Response/AccessTokenResponseModel.cs @@ -5,7 +5,9 @@ namespace Bit.Api.SecretsManager.Models.Response; public class AccessTokenResponseModel : ResponseModel { - public AccessTokenResponseModel(ApiKey apiKey, string obj = "accessToken") + private const string _objectName = "accessToken"; + + public AccessTokenResponseModel(ApiKey apiKey, string obj = _objectName) : base(obj) { Id = apiKey.Id; @@ -17,6 +19,10 @@ public class AccessTokenResponseModel : ResponseModel RevisionDate = apiKey.RevisionDate; } + public AccessTokenResponseModel() : base(_objectName) + { + } + public Guid Id { get; set; } public string Name { get; set; } public ICollection Scopes { get; set; } diff --git a/src/Api/SecretsManager/Models/Response/SecretResponseModel.cs b/src/Api/SecretsManager/Models/Response/SecretResponseModel.cs index db2ee3729f..15f46434c5 100644 --- a/src/Api/SecretsManager/Models/Response/SecretResponseModel.cs +++ b/src/Api/SecretsManager/Models/Response/SecretResponseModel.cs @@ -7,7 +7,7 @@ public class SecretResponseModel : ResponseModel { private const string _objectName = "secret"; - public SecretResponseModel(Secret secret) : base(_objectName) + public SecretResponseModel(Secret secret, bool read, bool write) : base(_objectName) { if (secret == null) { @@ -22,6 +22,9 @@ public class SecretResponseModel : ResponseModel CreationDate = secret.CreationDate; RevisionDate = secret.RevisionDate; Projects = secret.Projects?.Select(p => new InnerProject(p)); + + Read = read; + Write = write; } public SecretResponseModel() : base(_objectName) @@ -44,6 +47,10 @@ public class SecretResponseModel : ResponseModel public IEnumerable Projects { get; set; } + public bool Read { get; set; } + + public bool Write { get; set; } + public class InnerProject { public InnerProject(Project project) diff --git a/src/Api/SecretsManager/Models/Response/SecretWithProjectsListResponseModel.cs b/src/Api/SecretsManager/Models/Response/SecretWithProjectsListResponseModel.cs index ec841b9012..ff7d820029 100644 --- a/src/Api/SecretsManager/Models/Response/SecretWithProjectsListResponseModel.cs +++ b/src/Api/SecretsManager/Models/Response/SecretWithProjectsListResponseModel.cs @@ -1,5 +1,6 @@ using Bit.Core.Models.Api; using Bit.Core.SecretsManager.Entities; +using Bit.Core.SecretsManager.Models.Data; namespace Bit.Api.SecretsManager.Models.Response; @@ -7,10 +8,10 @@ public class SecretWithProjectsListResponseModel : ResponseModel { private const string _objectName = "SecretsWithProjectsList"; - public SecretWithProjectsListResponseModel(IEnumerable secrets) : base(_objectName) + public SecretWithProjectsListResponseModel(IEnumerable secrets) : base(_objectName) { Secrets = secrets.Select(s => new InnerSecret(s)); - Projects = secrets.SelectMany(s => s.Projects).DistinctBy(p => p.Id).Select(p => new InnerProject(p)); + Projects = secrets.SelectMany(s => s.Secret.Projects).DistinctBy(p => p.Id).Select(p => new InnerProject(p)); } public SecretWithProjectsListResponseModel() : base(_objectName) @@ -38,14 +39,16 @@ public class SecretWithProjectsListResponseModel : ResponseModel public class InnerSecret { - public InnerSecret(Secret secret) + public InnerSecret(SecretPermissionDetails secret) { - Id = secret.Id.ToString(); - OrganizationId = secret.OrganizationId.ToString(); - Key = secret.Key; - CreationDate = secret.CreationDate; - RevisionDate = secret.RevisionDate; - Projects = secret.Projects?.Select(p => new InnerProject(p)); + Id = secret.Secret.Id.ToString(); + OrganizationId = secret.Secret.OrganizationId.ToString(); + Key = secret.Secret.Key; + CreationDate = secret.Secret.CreationDate; + RevisionDate = secret.Secret.RevisionDate; + Projects = secret.Secret.Projects?.Select(p => new InnerProject(p)); + Read = secret.Read; + Write = secret.Write; } public InnerSecret() @@ -63,6 +66,8 @@ public class SecretWithProjectsListResponseModel : ResponseModel public DateTime RevisionDate { get; set; } public IEnumerable Projects { get; set; } + public bool Read { get; set; } + public bool Write { get; set; } } } diff --git a/src/Api/packages.lock.json b/src/Api/packages.lock.json index 5df8f48e90..5282901d88 100644 --- a/src/Api/packages.lock.json +++ b/src/Api/packages.lock.json @@ -2835,85 +2835,85 @@ "commercial.core": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )" + "Core": "2023.2.2" } }, "commercial.infrastructure.entityframework": { "type": "Project", "dependencies": { - "AutoMapper.Extensions.Microsoft.DependencyInjection": "[11.0.0, )", - "Core": "[2023.2.0, )", - "Infrastructure.EntityFramework": "[2023.2.0, )" + "AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0", + "Core": "2023.2.2", + "Infrastructure.EntityFramework": "2023.2.2" } }, "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } }, "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Dapper": "[2.0.123, )" + "Core": "2023.2.2", + "Dapper": "2.0.123" } }, "infrastructure.entityframework": { "type": "Project", "dependencies": { - "AutoMapper.Extensions.Microsoft.DependencyInjection": "[11.0.0, )", - "Core": "[2023.2.0, )", - "Microsoft.EntityFrameworkCore.Relational": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.SqlServer": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.Sqlite": "[6.0.12, )", - "Npgsql.EntityFrameworkCore.PostgreSQL": "[6.0.8, )", - "Pomelo.EntityFrameworkCore.MySql": "[6.0.2, )", - "linq2db.EntityFrameworkCore": "[6.11.0, )" + "AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0", + "Core": "2023.2.2", + "Microsoft.EntityFrameworkCore.Relational": "6.0.12", + "Microsoft.EntityFrameworkCore.SqlServer": "6.0.12", + "Microsoft.EntityFrameworkCore.Sqlite": "6.0.12", + "Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.8", + "Pomelo.EntityFrameworkCore.MySql": "6.0.2", + "linq2db.EntityFrameworkCore": "6.11.0" } }, "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Infrastructure.Dapper": "[2023.2.0, )", - "Infrastructure.EntityFramework": "[2023.2.0, )" + "Core": "2023.2.2", + "Infrastructure.Dapper": "2023.2.2", + "Infrastructure.EntityFramework": "2023.2.2" } } } diff --git a/src/Billing/Billing.csproj b/src/Billing/Billing.csproj index 03cbe041a4..3fa3af711c 100644 --- a/src/Billing/Billing.csproj +++ b/src/Billing/Billing.csproj @@ -10,8 +10,4 @@ - - - - diff --git a/src/Billing/packages.lock.json b/src/Billing/packages.lock.json index 738ec4aac7..2ea44edcfb 100644 --- a/src/Billing/packages.lock.json +++ b/src/Billing/packages.lock.json @@ -2,18 +2,6 @@ "version": 1, "dependencies": { "net6.0": { - "Microsoft.VisualStudio.Web.CodeGeneration.Design": { - "type": "Direct", - "requested": "[6.0.3, )", - "resolved": "6.0.3", - "contentHash": "cqxm2k5KF7T0KejRlxt71aizeR+2a/9qk94c1p7/CCOjns4cgwL92IxyrhhpILn0U+kylslBE2O/AJoi28wkSA==", - "dependencies": { - "Microsoft.Build.Locator": "1.4.1", - "Microsoft.DotNet.Scaffolding.Shared": "6.0.3", - "Microsoft.VisualStudio.Web.CodeGenerators.Mvc": "6.0.3", - "System.Private.Uri": "4.3.2" - } - }, "AspNetCoreRateLimit": { "type": "Transitive", "resolved": "4.0.2", @@ -202,14 +190,6 @@ "Microsoft.CSharp": "4.7.0" } }, - "Humanizer.Core": { - "type": "Transitive", - "resolved": "2.2.0", - "contentHash": "rsYXB7+iUPP8AHgQ8JP2UZI2xK2KhjcdGr9E6zX3CsZaTLCaw8M35vaAJRo1rfxeaZEVMuXeaquLVCkZ7JcZ5Q==", - "dependencies": { - "NETStandard.Library": "1.6.1" - } - }, "IdentityModel": { "type": "Transitive", "resolved": "4.4.0", @@ -335,30 +315,6 @@ "MimeKit": "3.2.0" } }, - "MessagePack": { - "type": "Transitive", - "resolved": "2.1.152", - "contentHash": "PlJ31qf42uGuJfwc61x/Pt4hJi01xh1rrBofj1MJSLzEot/2UAIRdSgxEHN/8qou5CV8OBeDM9HXKPi1Oj8rpQ==", - "dependencies": { - "MessagePack.Annotations": "2.1.152", - "Microsoft.Bcl.AsyncInterfaces": "1.0.0", - "System.Memory": "4.5.3", - "System.Reflection.Emit": "4.6.0", - "System.Reflection.Emit.Lightweight": "4.6.0", - "System.Runtime.CompilerServices.Unsafe": "4.5.2", - "System.Threading.Tasks.Extensions": "4.5.3" - } - }, - "MessagePack.Annotations": { - "type": "Transitive", - "resolved": "2.1.152", - "contentHash": "RONktDA/HA641ds/2bfOqYSVew8o8EJMcQ1P4M1J77QGgbzWiWt3nBHvCAwlx0VfO6K9S8xq4b5OLD2CUnhtCg==" - }, - "MessagePackAnalyzer": { - "type": "Transitive", - "resolved": "2.1.152", - "contentHash": "uJhZlGMkXDaFYsH8V9S6o1EyvsUqB9mpU4DVBXNr0DXZVzZMhuLP1IkLj5xK3EKlaAcvkFkZv3eSvuz360wb3Q==" - }, "Microsoft.AspNetCore.Authentication.JwtBearer": { "type": "Transitive", "resolved": "6.0.4", @@ -445,11 +401,6 @@ "Microsoft.Extensions.Primitives": "2.1.0" } }, - "Microsoft.AspNetCore.Razor.Language": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "yCtBr1GSGzJrrp1NJUb4ltwFYMKHw/tJLnIDvg9g/FnkGIEzmE19tbCQqXARIJv5kdtBgsoVIdGLL+zmjxvM/A==" - }, "Microsoft.Azure.Amqp": { "type": "Transitive", "resolved": "2.4.11", @@ -544,196 +495,14 @@ }, "Microsoft.Bcl.AsyncInterfaces": { "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "W8DPQjkMScOMTtJbPwmPyj9c3zYSFGawDW3jwlBOOsnY+EzZFLgNQ/UMkK35JmkNOVPdCyPr2Tw7Vv9N+KA3ZQ==" + "resolved": "1.1.1", + "contentHash": "yuvf07qFWFqtK3P/MRkEKLhn5r2UbSpVueRziSqj0yJQIKFwG1pq9mOayK3zE5qZCTs0CbrwL9M6R8VwqyGy2w==" }, "Microsoft.Bcl.HashCode": { "type": "Transitive", "resolved": "1.1.0", "contentHash": "J2G1k+u5unBV+aYcwxo94ip16Rkp65pgWFb0R6zwJipzWNMgvqlWeuI7/+R+e8bob66LnSG+llLJ+z8wI94cHg==" }, - "Microsoft.Build": { - "type": "Transitive", - "resolved": "17.0.0", - "contentHash": "hCs9OzyCD/TYRid1LxPgghvUDqgXf+tEvV4qd8tBfOyp3zxAk+/rssgxtJnKLMZIu0CEZi3JegvfenaIXjEacQ==", - "dependencies": { - "Microsoft.Build.Framework": "17.0.0", - "Microsoft.NET.StringTools": "1.0.0", - "Microsoft.Win32.Registry": "4.3.0", - "System.Collections.Immutable": "5.0.0", - "System.Configuration.ConfigurationManager": "4.7.0", - "System.Reflection.Metadata": "1.6.0", - "System.Security.Principal.Windows": "4.7.0", - "System.Text.Encoding.CodePages": "4.0.1", - "System.Text.Json": "5.0.2", - "System.Threading.Tasks.Dataflow": "4.9.0" - } - }, - "Microsoft.Build.Framework": { - "type": "Transitive", - "resolved": "17.0.0", - "contentHash": "XbFA0z+6Ws2pNeRXYcDF3lKlNgRoSGMm2Q5HKzZD+EbwYMKPKrl/BJnnkMuDJHU0KravYHfhzBnLLJpPeZ3E7A==", - "dependencies": { - "System.Security.Permissions": "4.7.0" - } - }, - "Microsoft.Build.Locator": { - "type": "Transitive", - "resolved": "1.4.1", - "contentHash": "UfyGaxNTjw/r3uWMX/Cv1CPKELo7TCrR5VIahaSKL0WyqmbDT6og9pyjwuhyyUkxC9gk2ElB7oOEySL1OzTZ1g==" - }, - "Microsoft.CodeAnalysis.Analyzers": { - "type": "Transitive", - "resolved": "3.3.2", - "contentHash": "7xt6zTlIEizUgEsYAIgm37EbdkiMmr6fP6J9pDoKEpiGM4pi32BCPGr/IczmSJI9Zzp0a6HOzpr9OvpMP+2veA==" - }, - "Microsoft.CodeAnalysis.AnalyzerUtilities": { - "type": "Transitive", - "resolved": "3.3.0", - "contentHash": "gyQ70pJ4T7hu/s0+QnEaXtYfeG/JrttGnxHJlrhpxsQjRIUGuRhVwNBtkHHYOrUAZ/l47L98/NiJX6QmTwAyrg==" - }, - "Microsoft.CodeAnalysis.Common": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "d02ybMhUJl1r/dI6SkJPHrTiTzXBYCZeJdOLMckV+jyoMU/GGkjqFX/sRbv1K0QmlpwwKuLTiYVQvfYC+8ox2g==", - "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "3.3.2", - "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": "4.0.0", - "contentHash": "2UVTGtyQGgTCazvnT6t82f+7AV2L+kqJdyb61rT9GQed4yK+tVh5IkaKcsm70VqyZQhBbDqsfZFNHnY65xhrRw==", - "dependencies": { - "Microsoft.CodeAnalysis.Common": "[4.0.0]" - } - }, - "Microsoft.CodeAnalysis.CSharp.Features": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "WOTeKJN0I4/AzylA+VuTtB7V7VvnM41GXqnyiiDRNa3QtKFAzJbQ7CwLG97pcme+oQLz708z+s4Nzd9g0irytw==", - "dependencies": { - "Humanizer.Core": "2.2.0", - "Microsoft.CodeAnalysis.CSharp": "[4.0.0]", - "Microsoft.CodeAnalysis.CSharp.Workspaces": "[4.0.0]", - "Microsoft.CodeAnalysis.Common": "[4.0.0]", - "Microsoft.CodeAnalysis.Features": "[4.0.0]", - "Microsoft.CodeAnalysis.Workspaces.Common": "[4.0.0]" - } - }, - "Microsoft.CodeAnalysis.CSharp.Scripting": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "Z8Y8Ye2snCqVQLLx7K6FcEs0hcvdPi4nTG2RDWdPpOfMH8ed1yxTabt252qAd4TH0jpyruuCnBfW4s6DXliMYg==", - "dependencies": { - "Microsoft.CSharp": "4.3.0", - "Microsoft.CodeAnalysis.CSharp": "[4.0.0]", - "Microsoft.CodeAnalysis.Common": "[4.0.0]", - "Microsoft.CodeAnalysis.Scripting.Common": "[4.0.0]" - } - }, - "Microsoft.CodeAnalysis.CSharp.Workspaces": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "RQMc1+2cIRdOvY8vp6ygkzfBrvlYphnbmhhluKNh9+X+PpprQDKlbPrn9fLn6v9RlCsfa87joS3zJyGBEeWTXQ==", - "dependencies": { - "Humanizer.Core": "2.2.0", - "Microsoft.CodeAnalysis.CSharp": "[4.0.0]", - "Microsoft.CodeAnalysis.Common": "[4.0.0]", - "Microsoft.CodeAnalysis.Workspaces.Common": "[4.0.0]" - } - }, - "Microsoft.CodeAnalysis.Features": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "ci4pgjEgihb+fu2i1E12iOMGXU6GisYR3YrNd2aqt55ijjzLNqPV/+zt+cV3Qc0n08rJrIY2Bf6cTTMPY0bwJQ==", - "dependencies": { - "Microsoft.CodeAnalysis.AnalyzerUtilities": "3.3.0", - "Microsoft.CodeAnalysis.Common": "[4.0.0]", - "Microsoft.CodeAnalysis.Scripting.Common": "[4.0.0]", - "Microsoft.CodeAnalysis.Workspaces.Common": "[4.0.0]", - "Microsoft.DiaSymReader": "1.3.0", - "Microsoft.VisualStudio.Debugger.Contracts": "17.2.0", - "System.Threading.Tasks.Extensions": "4.5.4" - } - }, - "Microsoft.CodeAnalysis.Razor": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "uqdzuQXxD7XrJCbIbbwpI/LOv0PBJ9VIR0gdvANTHOfK5pjTaCir+XcwvYvBZ5BIzd0KGzyiamzlEWw1cK1q0w==", - "dependencies": { - "Microsoft.AspNetCore.Razor.Language": "6.0.0", - "Microsoft.CodeAnalysis.CSharp": "4.0.0", - "Microsoft.CodeAnalysis.Common": "4.0.0" - } - }, - "Microsoft.CodeAnalysis.Scripting.Common": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "jU/ncoHSFnXU/L2iju9AFlOwmsAYByIxhCCpeLPNTguXwosJp1o13mtrboJOfkDhi7ebvzQmvcZ++yBu8cF4Sw==", - "dependencies": { - "Microsoft.CodeAnalysis.Common": "[4.0.0]" - } - }, - "Microsoft.CodeAnalysis.VisualBasic": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "FK+OGUMUh9O6/GCwyIy4c/sOrarF36/yEY07BbXVYMql1qCqHGWfyWXyCQKQ6m/KqReCqW6aO4cK7kK/AYBpyA==", - "dependencies": { - "Microsoft.CodeAnalysis.Common": "[4.0.0]" - } - }, - "Microsoft.CodeAnalysis.VisualBasic.Features": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "GEJsXFcMd7o+D6OYCLPui2ZvNsonTmdPSluGK0wC3EXVB+gnrro7Lr/sjtTSOwVeiXPlhXgprRuO7zJiMn1uzw==", - "dependencies": { - "Microsoft.CodeAnalysis.Common": "[4.0.0]", - "Microsoft.CodeAnalysis.Features": "[4.0.0]", - "Microsoft.CodeAnalysis.VisualBasic": "[4.0.0]", - "Microsoft.CodeAnalysis.VisualBasic.Workspaces": "[4.0.0]", - "Microsoft.CodeAnalysis.Workspaces.Common": "[4.0.0]" - } - }, - "Microsoft.CodeAnalysis.VisualBasic.Workspaces": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "ozmB/thXGX5MoP/oiV9w5ZVGS08mz7fK3lRXiRSHHBeuiXZW1ZCGARwG2YkhylzAl1LlEwSQmlgrr8Irlu+3qQ==", - "dependencies": { - "Microsoft.CodeAnalysis.Common": "[4.0.0]", - "Microsoft.CodeAnalysis.VisualBasic": "[4.0.0]", - "Microsoft.CodeAnalysis.Workspaces.Common": "[4.0.0]" - } - }, - "Microsoft.CodeAnalysis.Workspaces.Common": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "bEfHzx8PLmEN6aogVYHWmViHCWfms8emI43w9nNX+C8MLgtynOmVL/OJ4hbuONVp+4OuDAy5BDj69n5MnXQX8g==", - "dependencies": { - "Humanizer.Core": "2.2.0", - "Microsoft.Bcl.AsyncInterfaces": "5.0.0", - "Microsoft.CodeAnalysis.Common": "[4.0.0]", - "System.Composition": "1.0.31", - "System.IO.Pipelines": "5.0.1" - } - }, - "Microsoft.CodeAnalysis.Workspaces.MSBuild": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "0LYNKESZPK4AQmAXwn8l2e8UF/rYpT0pvceEhiTVjurjQ9Y7pGdUZ5E30r8knxYtT5/9ZESR7wKf/AU00r95Mw==", - "dependencies": { - "Microsoft.Build.Framework": "16.5.0", - "Microsoft.CodeAnalysis.Common": "[4.0.0]", - "Microsoft.CodeAnalysis.Workspaces.Common": "[4.0.0]", - "System.Text.Json": "4.7.0" - } - }, "Microsoft.CSharp": { "type": "Transitive", "resolved": "4.7.0", @@ -776,32 +545,6 @@ "SQLitePCLRaw.core": "2.1.2" } }, - "Microsoft.DiaSymReader": { - "type": "Transitive", - "resolved": "1.3.0", - "contentHash": "/fn1Tfo7j7k/slViPlM8azJuxQmri7FZ8dQ+gTeLbI29leN/1VK0U/BFcRdJNctsRCUgyKJ2q+I0Tjq07Rc1/Q==", - "dependencies": { - "NETStandard.Library": "1.6.1" - } - }, - "Microsoft.DotNet.Scaffolding.Shared": { - "type": "Transitive", - "resolved": "6.0.3", - "contentHash": "MHPcl+Vm8tEyvCA0dSEMDd/DfEYW2VtkGs7DXEJBbeRToBmHoK/5djIQws4XWcdqcpuJNo1WqX+C35h7Y5G26w==", - "dependencies": { - "Microsoft.CodeAnalysis.CSharp.Features": "4.0.0", - "Microsoft.CodeAnalysis.CSharp.Scripting": "4.0.0", - "Microsoft.CodeAnalysis.CSharp.Workspaces": "4.0.0", - "Microsoft.CodeAnalysis.Features": "4.0.0", - "Microsoft.CodeAnalysis.VisualBasic.Features": "4.0.0", - "Microsoft.CodeAnalysis.VisualBasic.Workspaces": "4.0.0", - "Microsoft.CodeAnalysis.Workspaces.MSBuild": "4.0.0", - "Newtonsoft.Json": "13.0.1", - "NuGet.ProjectModel": "5.11.0", - "System.Collections.Immutable": "6.0.0", - "System.Private.Uri": "4.3.2" - } - }, "Microsoft.EntityFrameworkCore": { "type": "Transitive", "resolved": "6.0.12", @@ -1174,15 +917,6 @@ "System.Security.Cryptography.Cng": "4.5.0" } }, - "Microsoft.NET.StringTools": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "ZYVcoDM0LnSyT5nWoRGfShYdOecCw2sOXWwP6j1Z0u48Xq3+BVvZ+EiPCX9/8Gz439giW+O1H1kWF9Eb/w6rVg==", - "dependencies": { - "System.Memory": "4.5.4", - "System.Runtime.CompilerServices.Unsafe": "5.0.0" - } - }, "Microsoft.NETCore.Platforms": { "type": "Transitive", "resolved": "5.0.0", @@ -1190,8 +924,8 @@ }, "Microsoft.NETCore.Targets": { "type": "Transitive", - "resolved": "1.1.3", - "contentHash": "3Wrmi0kJDzClwAC+iBdUBpEKmEle8FQNsCs77fkiOIw/9oYA07bL1EZNX0kQ2OMN3xpwvl0vAtOCYY3ndDNlhQ==" + "resolved": "1.1.0", + "contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==" }, "Microsoft.OData.Core": { "type": "Transitive", @@ -1217,84 +951,6 @@ "resolved": "1.0.0", "contentHash": "N4KeF3cpcm1PUHym1RmakkzfkEv3GRMyofVv40uXsQhCQeglr2OHNcUk2WOG51AKpGO8ynGpo9M/kFXSzghwug==" }, - "Microsoft.VisualStudio.Debugger.Contracts": { - "type": "Transitive", - "resolved": "17.2.0", - "contentHash": "br/qV/aHqLqVlqtcMKglCC8MHMMLey0yMkKSplnMl58F5gKjwnh7wjs8+g0j/vf4T6h4KK7JWrC0+oN70pbugg==", - "dependencies": { - "MessagePack": "2.1.152", - "MessagePackAnalyzer": "2.1.152", - "Microsoft.Bcl.AsyncInterfaces": "1.1.1", - "System.Collections.Immutable": "5.0.0" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration": { - "type": "Transitive", - "resolved": "6.0.3", - "contentHash": "rD1Lj6LljO7iEeZJuGtEp0O9rZHvr+tAZJx8QgwdmlrMReaYA0+KQCH/woEdcmBo+ifnwUUyNgG+9NUECYTT9g==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection": "6.0.0", - "Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore": "6.0.3", - "System.Collections.Immutable": "6.0.0", - "System.Private.Uri": "4.3.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration.Core": { - "type": "Transitive", - "resolved": "6.0.3", - "contentHash": "o+rN2+WrG4NTU4dzcExaMAGpQk84+SJMC8D3v7pe35f6DJQIXC3lc9V9npgNtiiD19aP+Pdto8L5nuwQ83dgTw==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection": "6.0.0", - "Microsoft.VisualStudio.Web.CodeGeneration.Templating": "6.0.3", - "Newtonsoft.Json": "13.0.1", - "System.Private.Uri": "4.3.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore": { - "type": "Transitive", - "resolved": "6.0.3", - "contentHash": "Mg0HpwFZyOJQHtW04gbCLekZ8Lt3VSs9s9JqgGm6DXoeTbAbaHhJGZohuT296Z+0MuFJgl9mD1/j1Zof8hPgcA==", - "dependencies": { - "Microsoft.DotNet.Scaffolding.Shared": "6.0.3", - "Microsoft.VisualStudio.Web.CodeGeneration.Core": "6.0.3", - "System.Private.Uri": "4.3.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration.Templating": { - "type": "Transitive", - "resolved": "6.0.3", - "contentHash": "TMV1xzJSjNpiWCGkw6/8/XHmYF0HiimH/8kmPZfT/J+WBKABn4DRbZNpgTYNKmcuYxg4mKySFPVpblQ0XMf9Tg==", - "dependencies": { - "Microsoft.AspNetCore.Razor.Language": "6.0.0", - "Microsoft.CodeAnalysis.CSharp": "4.0.0", - "Microsoft.CodeAnalysis.Razor": "6.0.0", - "Microsoft.VisualStudio.Web.CodeGeneration.Utils": "6.0.3", - "System.Private.Uri": "4.3.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration.Utils": { - "type": "Transitive", - "resolved": "6.0.3", - "contentHash": "M8k06jnZ0l7031mPYDbLaiiz20ju1MP+FJlpDKVilkAPOQVITSFRDm8Hhd2Pyd+BSj+nCzDC1ZMglK8z+lJ5ig==", - "dependencies": { - "Microsoft.Build": "17.0.0", - "Microsoft.Build.Locator": "1.4.1", - "Microsoft.CodeAnalysis.CSharp.Workspaces": "4.0.0", - "Microsoft.DotNet.Scaffolding.Shared": "6.0.3", - "Newtonsoft.Json": "13.0.1", - "System.Private.Uri": "4.3.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGenerators.Mvc": { - "type": "Transitive", - "resolved": "6.0.3", - "contentHash": "Oe3QkXildc2AFM33rN9WSLj53kzuQAPLAv7aduz+bnYc86SFBPA/qpYZ2ZJhlKYbrJUpztRqoWvLqGfDT6XkUw==", - "dependencies": { - "Microsoft.DotNet.Scaffolding.Shared": "6.0.3", - "Microsoft.VisualStudio.Web.CodeGeneration": "6.0.3", - "System.Private.Uri": "4.3.2" - } - }, "Microsoft.Win32.Primitives": { "type": "Transitive", "resolved": "4.3.0", @@ -1416,79 +1072,6 @@ "libsodium": "[1.0.18.2, 1.0.19)" } }, - "NuGet.Common": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "WCHexQBfSqBDRqP3PSDSUw7YM+PwuvMHGAkT/sXI5UHze4T41yLE+VB/km2Fe0z9y3m2mudcr2djFZezivjMJw==", - "dependencies": { - "NuGet.Frameworks": "5.11.0" - } - }, - "NuGet.Configuration": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "NqsQe198CTHoo7NMrKQL8utd6n9yVb9CPgJmpyF6kpEsLFo/9r0wqGL3ln8Mtcz8yuJpOPWFQEoOlzDzu3LfUg==", - "dependencies": { - "NuGet.Common": "5.11.0", - "System.Security.Cryptography.ProtectedData": "4.4.0" - } - }, - "NuGet.DependencyResolver.Core": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "kkWhU0msuCRyiIJeoL95j6bXUQMc1mTk8wZ3mMxl+0VzOf39eXSObmxKuJ7eh+6zOMQyzd0TAXU5u5aQSxOVSg==", - "dependencies": { - "NuGet.LibraryModel": "5.11.0", - "NuGet.Protocol": "5.11.0" - } - }, - "NuGet.Frameworks": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "eaiXkUjC4NPcquGWzAGMXjuxvLwc6XGKMptSyOGQeT0X70BUZObuybJFZLA0OfTdueLd3US23NBPTBb6iF3V1Q==" - }, - "NuGet.LibraryModel": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "Iq0tbX3Rsl4837VlWy90fliA7T2+g2FPdz/s/lK6H9g/5RCta/7AZADV0l/A/f0HDCDlMxBN2ha1hsmgxe1sGQ==", - "dependencies": { - "NuGet.Common": "5.11.0", - "NuGet.Versioning": "5.11.0" - } - }, - "NuGet.Packaging": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "knlpQuqTL8BEXUHTdZ9Wlz3pjck5nv0OYsCpSkaQAukl7fFcX4apAs8cwJgxHiEZjfWNG1npZOzpYdHG59v5xQ==", - "dependencies": { - "Newtonsoft.Json": "9.0.1", - "NuGet.Configuration": "5.11.0", - "NuGet.Versioning": "5.11.0", - "System.Security.Cryptography.Cng": "5.0.0", - "System.Security.Cryptography.Pkcs": "5.0.0" - } - }, - "NuGet.ProjectModel": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "8q7mAwHHP1/Ua1r3FQDg+kXcFvRgBmCCXQeqTkTVQoO5t3G/AwxzJVt7Jii0eNrM17Wzm975U0gnkNqlp+gdsw==", - "dependencies": { - "NuGet.DependencyResolver.Core": "5.11.0" - } - }, - "NuGet.Protocol": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "eS/sJLqMzPz6gonD1zaXIcpDME/1DuKqv0Hlag8RuJcboZJliA15qjfg7UvuQB8/ineOleaEvrTzMjpKE0FdbQ==", - "dependencies": { - "NuGet.Packaging": "5.11.0" - } - }, - "NuGet.Versioning": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "mCv/GzvMk5iatWoZY41PoIShEbwVxq9CDCc1fV/uqPFKZ4DD/1JuKZ5AL/FJJRsTanvMR3EOXKYCLdQ7PFYn8Q==" - }, "Otp.NET": { "type": "Transitive", "resolved": "1.2.2", @@ -1942,102 +1525,6 @@ "System.Threading": "4.0.11" } }, - "System.Composition": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "I+D26qpYdoklyAVUdqwUBrEIckMNjAYnuPJy/h9dsQItpQwVREkDFs4b4tkBza0kT2Yk48Lcfsv2QQ9hWsh9Iw==", - "dependencies": { - "System.Composition.AttributedModel": "1.0.31", - "System.Composition.Convention": "1.0.31", - "System.Composition.Hosting": "1.0.31", - "System.Composition.Runtime": "1.0.31", - "System.Composition.TypedParts": "1.0.31" - } - }, - "System.Composition.AttributedModel": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "NHWhkM3ZkspmA0XJEsKdtTt1ViDYuojgSND3yHhTzwxepiwqZf+BCWuvCbjUt4fe0NxxQhUDGJ5km6sLjo9qnQ==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Composition.Convention": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "GLjh2Ju71k6C0qxMMtl4efHa68NmWeIUYh4fkUI8xbjQrEBvFmRwMDFcylT8/PR9SQbeeL48IkFxU/+gd0nYEQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Composition.AttributedModel": "1.0.31", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Composition.Hosting": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "fN1bT4RX4vUqjbgoyuJFVUizAl2mYF5VAb+bVIxIYZSSc0BdnX+yGAxcavxJuDDCQ1K+/mdpgyEFc8e9ikjvrg==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Composition.Runtime": "1.0.31", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.ObjectModel": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Composition.Runtime": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "0LEJN+2NVM89CE4SekDrrk5tHV5LeATltkp+9WNYrR+Huiyt0vaCqHbbHtVAjPyeLWIc8dOz/3kthRBj32wGQg==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.Linq": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Composition.TypedParts": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "0Zae/FtzeFgDBBuILeIbC/T9HMYbW4olAmi8XqqAGosSOWvXfiQLfARZEhiGd0LVXaYgXr0NhxiU1LldRP1fpQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Composition.AttributedModel": "1.0.31", - "System.Composition.Hosting": "1.0.31", - "System.Composition.Runtime": "1.0.31", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0" - } - }, "System.Configuration.ConfigurationManager": { "type": "Transitive", "resolved": "6.0.0", @@ -2641,15 +2128,6 @@ "System.Xml.XmlSerializer": "4.0.11" } }, - "System.Private.Uri": { - "type": "Transitive", - "resolved": "4.3.2", - "contentHash": "o1+7RJnu3Ik3PazR7Z7tJhjPdE000Eq2KGLLWhqJJKXj04wrS8lwb1OFtDF9jzXXADhUuZNJZlPc98uwwqmpFA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.1", - "Microsoft.NETCore.Targets": "1.1.3" - } - }, "System.Reflection": { "type": "Transitive", "resolved": "4.3.0", @@ -2664,8 +2142,15 @@ }, "System.Reflection.Emit": { "type": "Transitive", - "resolved": "4.6.0", - "contentHash": "qAo4jyXtC9i71iElngX7P2r+zLaiHzxKwf66sc3X91tL5Ks6fnQ1vxL04o7ZSm3sYfLExySL7GN8aTpNYpU1qw==" + "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", @@ -2679,8 +2164,14 @@ }, "System.Reflection.Emit.Lightweight": { "type": "Transitive", - "resolved": "4.6.0", - "contentHash": "j/V5HVvxvBQ7uubYD0PptQW2KGsi1Pc2kZ9yfwLixv3ADdjL/4M78KyC5e+ymW612DY8ZE4PFoZmWpoNmN2mqg==" + "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", @@ -2693,11 +2184,6 @@ "System.Runtime": "4.3.0" } }, - "System.Reflection.Metadata": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "5NecZgXktdGg34rh1OenY1rFNDCI8xSjFr+Z4OU4cU06AQHUdRnIIEeWENu3Wl4YowbzkymAIMvi3WyK9U53pQ==" - }, "System.Reflection.Primitives": { "type": "Transitive", "resolved": "4.3.0", @@ -3124,11 +2610,6 @@ "System.Runtime": "4.3.0" } }, - "System.Threading.Tasks.Dataflow": { - "type": "Transitive", - "resolved": "4.9.0", - "contentHash": "dTS+3D/GtG2/Pvc3E5YzVvAa7aQJgLDlZDIzukMOJjYudVOQOUXEU68y6Zi3Nn/jqIeB5kOCwrGbQFAKHVzXEQ==" - }, "System.Threading.Tasks.Extensions": { "type": "Transitive", "resolved": "4.5.4", @@ -3300,71 +2781,71 @@ "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } }, "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Dapper": "[2.0.123, )" + "Core": "2023.2.2", + "Dapper": "2.0.123" } }, "infrastructure.entityframework": { "type": "Project", "dependencies": { - "AutoMapper.Extensions.Microsoft.DependencyInjection": "[11.0.0, )", - "Core": "[2023.2.0, )", - "Microsoft.EntityFrameworkCore.Relational": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.SqlServer": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.Sqlite": "[6.0.12, )", - "Npgsql.EntityFrameworkCore.PostgreSQL": "[6.0.8, )", - "Pomelo.EntityFrameworkCore.MySql": "[6.0.2, )", - "linq2db.EntityFrameworkCore": "[6.11.0, )" + "AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0", + "Core": "2023.2.2", + "Microsoft.EntityFrameworkCore.Relational": "6.0.12", + "Microsoft.EntityFrameworkCore.SqlServer": "6.0.12", + "Microsoft.EntityFrameworkCore.Sqlite": "6.0.12", + "Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.8", + "Pomelo.EntityFrameworkCore.MySql": "6.0.2", + "linq2db.EntityFrameworkCore": "6.11.0" } }, "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Infrastructure.Dapper": "[2023.2.0, )", - "Infrastructure.EntityFramework": "[2023.2.0, )" + "Core": "2023.2.2", + "Infrastructure.Dapper": "2023.2.2", + "Infrastructure.EntityFramework": "2023.2.2" } } } diff --git a/src/Core/Constants.cs b/src/Core/Constants.cs index 19117f1b79..27ac579a01 100644 --- a/src/Core/Constants.cs +++ b/src/Core/Constants.cs @@ -1,4 +1,6 @@ -namespace Bit.Core; +using System.Reflection; + +namespace Bit.Core; public static class Constants { @@ -26,4 +28,13 @@ public static class AuthenticationSchemes public static class FeatureFlagKeys { public const string SecretsManager = "secrets-manager"; + public const string DisplayEuEnvironment = "display-eu-environment"; + + public static List GetAllKeys() + { + return typeof(FeatureFlagKeys).GetFields(BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy) + .Where(fi => fi.IsLiteral && !fi.IsInitOnly && fi.FieldType == typeof(string)) + .Select(x => (string)x.GetRawConstantValue()) + .ToList(); + } } diff --git a/src/Core/Entities/AuthRequest.cs b/src/Core/Entities/AuthRequest.cs index 285cf9ab42..42da4e6dff 100644 --- a/src/Core/Entities/AuthRequest.cs +++ b/src/Core/Entities/AuthRequest.cs @@ -13,7 +13,6 @@ public class AuthRequest : ITableObject public Enums.DeviceType RequestDeviceType { get; set; } [MaxLength(50)] public string RequestIpAddress { get; set; } - public string RequestFingerprint { get; set; } public Guid? ResponseDeviceId { get; set; } [MaxLength(25)] public string AccessCode { get; set; } diff --git a/src/Core/Enums/PolicyType.cs b/src/Core/Enums/PolicyType.cs index e4c1208362..30dac3d917 100644 --- a/src/Core/Enums/PolicyType.cs +++ b/src/Core/Enums/PolicyType.cs @@ -13,4 +13,5 @@ public enum PolicyType : byte ResetPassword = 8, MaximumVaultTimeout = 9, DisablePersonalVaultExport = 10, + ActivateAutofill = 11, } diff --git a/src/Core/Enums/ReferenceEventType.cs b/src/Core/Enums/ReferenceEventType.cs index 4e5134a2e5..65f3918ff0 100644 --- a/src/Core/Enums/ReferenceEventType.cs +++ b/src/Core/Enums/ReferenceEventType.cs @@ -41,5 +41,7 @@ public enum ReferenceEventType [EnumMember(Value = "organization-edited-by-admin")] OrganizationEditedByAdmin, [EnumMember(Value = "organization-created-by-admin")] - OrganizationCreatedByAdmin + OrganizationCreatedByAdmin, + [EnumMember(Value = "sm-service-account-accessed-secret")] + SmServiceAccountAccessedSecret, } diff --git a/src/Core/MailTemplates/Handlebars/Layouts/Full.html.hbs b/src/Core/MailTemplates/Handlebars/Layouts/Full.html.hbs index bf884604ff..2655324a6e 100644 --- a/src/Core/MailTemplates/Handlebars/Layouts/Full.html.hbs +++ b/src/Core/MailTemplates/Handlebars/Layouts/Full.html.hbs @@ -5,7 +5,6 @@ Bitwarden - {{! Yahoo center fix }} - + +
- {{! 600px container }} - - - {{! Left column (center fix) }} - + {{! Right column (center fix) }} + +
- - - - -
- - - + +
+ + +
+ {{! 600px container }} + + + {{! Left column (center fix) }} + - {{! Right column (center fix) }} - -
+ + + + +
+ + + - -
- {{>@partial-block}} + {{>@partial-block}} -
- - - - - - - - -
-
+
+ + + + + + + + +
+
diff --git a/src/Core/MailTemplates/Handlebars/Layouts/TitleContactUs.html.hbs b/src/Core/MailTemplates/Handlebars/Layouts/TitleContactUs.html.hbs new file mode 100644 index 0000000000..962ca564ec --- /dev/null +++ b/src/Core/MailTemplates/Handlebars/Layouts/TitleContactUs.html.hbs @@ -0,0 +1,26 @@ +{{#>FullHtmlLayout}} +
+
+
+
+ {{TitleFirst}}{{TitleSecondBold}}{{TitleThird}} +
+
+
+ +
+
+ + {{>@partial-block}} + +
+ +
+ +
+
+
+{{/FullHtmlLayout}} \ No newline at end of file diff --git a/src/Core/MailTemplates/Handlebars/Layouts/TitleContactUs.text.hbs b/src/Core/MailTemplates/Handlebars/Layouts/TitleContactUs.text.hbs new file mode 100644 index 0000000000..bf0aa74785 --- /dev/null +++ b/src/Core/MailTemplates/Handlebars/Layouts/TitleContactUs.text.hbs @@ -0,0 +1,11 @@ +{{#>FullTextLayout}} +{{TitleFirst}} {{TitleSecondBold}} {{TitleThird}} + +{{>@partial-block}} + + +We’re here for you! +If you have any questions, search the Bitwarden Help site or contact us. +- https://bitwarden.com/help/ +- https://bitwarden.com/contact/ +{{/FullTextLayout}} \ No newline at end of file diff --git a/src/Core/MailTemplates/Handlebars/OrganizationUserConfirmed.html.hbs b/src/Core/MailTemplates/Handlebars/OrganizationUserConfirmed.html.hbs index 81b6628c7d..1cef152327 100644 --- a/src/Core/MailTemplates/Handlebars/OrganizationUserConfirmed.html.hbs +++ b/src/Core/MailTemplates/Handlebars/OrganizationUserConfirmed.html.hbs @@ -1,14 +1,25 @@ -{{#>FullHtmlLayout}} - - - - - - - -
- This email is to notify you that you have been confirmed as a user of {{OrganizationName}}. -
- Any collections and logins being shared with you by this organization will now appear in your Bitwarden vault. -
-{{/FullHtmlLayout}} +{{#>TitleContactUsHtmlLayout}} +
+
+ You may now access logins and other items this organizations has shared with you from your Bitwarden vault. +
+
+
+
+ + Go to vault + +
+
+
+
+ Tip: Use the Bitwarden mobile app to quickly save logins and auto-fill forms. Download from the App Store or Google Play. +
+
+
+
+ Android download + iOS download +
+
+{{/TitleContactUsHtmlLayout}} diff --git a/src/Core/MailTemplates/Handlebars/OrganizationUserConfirmed.text.hbs b/src/Core/MailTemplates/Handlebars/OrganizationUserConfirmed.text.hbs index 7a7c1a498e..f728c2b15e 100644 --- a/src/Core/MailTemplates/Handlebars/OrganizationUserConfirmed.text.hbs +++ b/src/Core/MailTemplates/Handlebars/OrganizationUserConfirmed.text.hbs @@ -1,5 +1,5 @@ -{{#>BasicTextLayout}} -This email is to notify you that you have been confirmed as a user of {{OrganizationName}}. +{{#>TitleContactUsTextLayout}} +You may now access logins and other items this organizations has shared with you from your Bitwarden vault. -Any collections and logins being shared with you by this organization will now appear in your Bitwarden vault. -{{/BasicTextLayout}} \ No newline at end of file +Tip: Use the Bitwarden mobile app to quickly save logins and auto-fill forms. Download from the App Store or Google Play. +{{/TitleContactUsTextLayout}} \ No newline at end of file diff --git a/src/Core/MailTemplates/Handlebars/OrganizationUserInvited.html.hbs b/src/Core/MailTemplates/Handlebars/OrganizationUserInvited.html.hbs index 01a642a59b..8db383b199 100644 --- a/src/Core/MailTemplates/Handlebars/OrganizationUserInvited.html.hbs +++ b/src/Core/MailTemplates/Handlebars/OrganizationUserInvited.html.hbs @@ -1,24 +1,15 @@ -{{#>FullHtmlLayout}} - - - - - - - - - - -
- You have been invited to join the {{OrganizationName}} organization. This link expires on {{ExpirationDate}}. -
- If you do not wish to join this organization, you can safely ignore this email. -
-
-
- - Join Organization Now - -
-
-{{/FullHtmlLayout}} +{{#>TitleContactUsHtmlLayout}} +
+
+ + Join Organization Now + +
+
+
+
+ This invitation expires on {{ExpirationDate}} +
+
+{{/TitleContactUsHtmlLayout}} + diff --git a/src/Core/MailTemplates/Handlebars/OrganizationUserInvited.text.hbs b/src/Core/MailTemplates/Handlebars/OrganizationUserInvited.text.hbs index e7f2b9da2c..e062840746 100644 --- a/src/Core/MailTemplates/Handlebars/OrganizationUserInvited.text.hbs +++ b/src/Core/MailTemplates/Handlebars/OrganizationUserInvited.text.hbs @@ -1,10 +1,5 @@ -{{#>BasicTextLayout}} -You have been invited to join the {{OrganizationName}} organization. - -This link expires on {{ExpirationDate}}. - -If you do not wish to join this organization, you can safely ignore this email. - +{{#>TitleContactUsTextLayout}} {{{Url}}} -{{/BasicTextLayout}} +This invitation expires on {{ExpirationDate}}. +{{/TitleContactUsTextLayout}} diff --git a/src/Core/Models/Mail/BaseTitleContactUsMailModel.cs b/src/Core/Models/Mail/BaseTitleContactUsMailModel.cs new file mode 100644 index 0000000000..a048312652 --- /dev/null +++ b/src/Core/Models/Mail/BaseTitleContactUsMailModel.cs @@ -0,0 +1,9 @@ +namespace Bit.Core.Models.Mail; + +public class BaseTitleContactUsMailModel : BaseMailModel +{ + public string TitleFirst { get; set; } + public string TitleSecondBold { get; set; } + public string TitleThird { get; set; } +} + diff --git a/src/Core/Models/Mail/OrganizationUserConfirmedViewModel.cs b/src/Core/Models/Mail/OrganizationUserConfirmedViewModel.cs index 61e7107742..8254d3d841 100644 --- a/src/Core/Models/Mail/OrganizationUserConfirmedViewModel.cs +++ b/src/Core/Models/Mail/OrganizationUserConfirmedViewModel.cs @@ -1,6 +1,6 @@ namespace Bit.Core.Models.Mail; -public class OrganizationUserConfirmedViewModel : BaseMailModel +public class OrganizationUserConfirmedViewModel : BaseTitleContactUsMailModel { public string OrganizationName { get; set; } } diff --git a/src/Core/Models/Mail/OrganizationUserInvitedViewModel.cs b/src/Core/Models/Mail/OrganizationUserInvitedViewModel.cs index 5f10db74a5..99156b551c 100644 --- a/src/Core/Models/Mail/OrganizationUserInvitedViewModel.cs +++ b/src/Core/Models/Mail/OrganizationUserInvitedViewModel.cs @@ -1,6 +1,6 @@ namespace Bit.Core.Models.Mail; -public class OrganizationUserInvitedViewModel : BaseMailModel +public class OrganizationUserInvitedViewModel : BaseTitleContactUsMailModel { public string OrganizationName { get; set; } public string OrganizationId { get; set; } diff --git a/src/Core/SecretsManager/Models/Data/SecretPermissionDetails.cs b/src/Core/SecretsManager/Models/Data/SecretPermissionDetails.cs new file mode 100644 index 0000000000..3a3c8d29c4 --- /dev/null +++ b/src/Core/SecretsManager/Models/Data/SecretPermissionDetails.cs @@ -0,0 +1,10 @@ +using Bit.Core.SecretsManager.Entities; + +namespace Bit.Core.SecretsManager.Models.Data; + +public class SecretPermissionDetails +{ + public Secret Secret; + public bool Read { get; set; } + public bool Write { get; set; } +} diff --git a/src/Core/SecretsManager/Repositories/IProjectRepository.cs b/src/Core/SecretsManager/Repositories/IProjectRepository.cs index 1841fafecd..9bb234cd5d 100644 --- a/src/Core/SecretsManager/Repositories/IProjectRepository.cs +++ b/src/Core/SecretsManager/Repositories/IProjectRepository.cs @@ -1,6 +1,5 @@ using Bit.Core.Enums; using Bit.Core.SecretsManager.Entities; -using Bit.Core.SecretsManager.Models.Data; namespace Bit.Core.SecretsManager.Repositories; @@ -8,8 +7,7 @@ public interface IProjectRepository { Task> GetManyByOrganizationIdAsync(Guid organizationId, Guid userId, AccessClientType accessType); Task> GetManyByOrganizationIdWriteAccessAsync(Guid organizationId, Guid userId, AccessClientType accessType); - Task> GetManyByIds(IEnumerable ids); - Task GetPermissionDetailsByIdAsync(Guid id, Guid userId); + Task> GetManyWithSecretsByIds(IEnumerable ids); Task GetByIdAsync(Guid id); Task CreateAsync(Project project); Task ReplaceAsync(Project project); @@ -19,4 +17,5 @@ public interface IProjectRepository Task UserHasWriteAccessToProject(Guid id, Guid userId); Task ServiceAccountHasWriteAccessToProject(Guid id, Guid userId); Task ServiceAccountHasReadAccessToProject(Guid id, Guid userId); + Task<(bool Read, bool Write)> AccessToProjectAsync(Guid id, Guid userId, AccessClientType accessType); } diff --git a/src/Core/SecretsManager/Repositories/ISecretRepository.cs b/src/Core/SecretsManager/Repositories/ISecretRepository.cs index bfc59fed6a..5b40a33278 100644 --- a/src/Core/SecretsManager/Repositories/ISecretRepository.cs +++ b/src/Core/SecretsManager/Repositories/ISecretRepository.cs @@ -1,15 +1,16 @@ using Bit.Core.Enums; using Bit.Core.SecretsManager.Entities; +using Bit.Core.SecretsManager.Models.Data; namespace Bit.Core.SecretsManager.Repositories; public interface ISecretRepository { - Task> GetManyByOrganizationIdAsync(Guid organizationId, Guid userId, AccessClientType accessType); - Task> GetManyByOrganizationIdInTrashAsync(Guid organizationId); + Task> GetManyByOrganizationIdAsync(Guid organizationId, Guid userId, AccessClientType accessType); + Task> GetManyByOrganizationIdInTrashAsync(Guid organizationId); Task> GetManyByOrganizationIdInTrashByIdsAsync(Guid organizationId, IEnumerable ids); Task> GetManyByIds(IEnumerable ids); - Task> GetManyByProjectIdAsync(Guid projectId, Guid userId, AccessClientType accessType); + Task> GetManyByProjectIdAsync(Guid projectId, Guid userId, AccessClientType accessType); Task GetByIdAsync(Guid id); Task CreateAsync(Secret secret); Task UpdateAsync(Secret secret); @@ -17,4 +18,6 @@ public interface ISecretRepository Task HardDeleteManyByIdAsync(IEnumerable ids); Task RestoreManyByIdAsync(IEnumerable ids); Task> ImportAsync(IEnumerable secrets); + Task UpdateRevisionDates(IEnumerable ids); + Task<(bool Read, bool Write)> AccessToSecretAsync(Guid id, Guid userId, AccessClientType accessType); } diff --git a/src/Core/Services/IFeatureService.cs b/src/Core/Services/IFeatureService.cs index 0d8e7a4222..a85b16ec8e 100644 --- a/src/Core/Services/IFeatureService.cs +++ b/src/Core/Services/IFeatureService.cs @@ -36,4 +36,11 @@ public interface IFeatureService /// The default value for the feature. /// The feature variation value. string GetStringVariation(string key, ICurrentContext currentContext, string defaultValue = null); + + /// + /// Gets all feature values. + /// + /// A context providing information that can be used to evaluate the feature values. + /// A dictionary of feature keys and their values. + Dictionary GetAll(ICurrentContext currentContext); } diff --git a/src/Core/Services/IMailService.cs b/src/Core/Services/IMailService.cs index 59c3056d2d..d873ea5729 100644 --- a/src/Core/Services/IMailService.cs +++ b/src/Core/Services/IMailService.cs @@ -15,8 +15,8 @@ public interface IMailService Task SendTwoFactorEmailAsync(string email, string token); Task SendNoMasterPasswordHintEmailAsync(string email); Task SendMasterPasswordHintEmailAsync(string email, string hint); - Task SendOrganizationInviteEmailAsync(string organizationName, OrganizationUser orgUser, ExpiringToken token, bool initOrganization = false); - Task BulkSendOrganizationInviteEmailAsync(string organizationName, IEnumerable<(OrganizationUser orgUser, ExpiringToken token)> invites, bool initOrganization = false); + Task SendOrganizationInviteEmailAsync(string organizationName, OrganizationUser orgUser, ExpiringToken token, bool isFreeOrg, bool initOrganization = false); + Task BulkSendOrganizationInviteEmailAsync(string organizationName, IEnumerable<(OrganizationUser orgUser, ExpiringToken token)> invites, bool isFreeOrg, bool initOrganization = false); Task SendOrganizationMaxSeatLimitReachedEmailAsync(Organization organization, int maxSeatCount, IEnumerable ownerEmails); Task SendOrganizationAutoscaledEmailAsync(Organization organization, int initialSeatCount, IEnumerable ownerEmails); Task SendOrganizationAcceptedEmailAsync(Organization organization, string userIdentifier, IEnumerable adminEmails); diff --git a/src/Core/Services/Implementations/CollectionService.cs b/src/Core/Services/Implementations/CollectionService.cs index 607cb9eb35..c14020e2d8 100644 --- a/src/Core/Services/Implementations/CollectionService.cs +++ b/src/Core/Services/Implementations/CollectionService.cs @@ -97,7 +97,7 @@ public class CollectionService : ICollectionService public async Task> GetOrganizationCollections(Guid organizationId) { - if (!await _currentContext.ViewAllCollections(organizationId) && !await _currentContext.ManageUsers(organizationId)) + if (!await _currentContext.ViewAllCollections(organizationId) && !await _currentContext.ManageUsers(organizationId) && !await _currentContext.ManageGroups(organizationId)) { throw new NotFoundException(); } diff --git a/src/Core/Services/Implementations/HandlebarsMailService.cs b/src/Core/Services/Implementations/HandlebarsMailService.cs index 4c85fc730e..e0f18c275b 100644 --- a/src/Core/Services/Implementations/HandlebarsMailService.cs +++ b/src/Core/Services/Implementations/HandlebarsMailService.cs @@ -191,6 +191,9 @@ public class HandlebarsMailService : IMailService var message = CreateDefaultMessage($"You Have Been Confirmed To {organizationName}", email); var model = new OrganizationUserConfirmedViewModel { + TitleFirst = "You're confirmed as a member of ", + TitleSecondBold = CoreHelpers.SanitizeForEmail(organizationName, false), + TitleThird = "!", OrganizationName = CoreHelpers.SanitizeForEmail(organizationName, false), WebVaultUrl = _globalSettings.BaseServiceUri.VaultWithHash, SiteName = _globalSettings.SiteName @@ -200,21 +203,24 @@ public class HandlebarsMailService : IMailService await _mailDeliveryService.SendEmailAsync(message); } - public Task SendOrganizationInviteEmailAsync(string organizationName, OrganizationUser orgUser, ExpiringToken token, bool initOrganization = false) => - BulkSendOrganizationInviteEmailAsync(organizationName, new[] { (orgUser, token) }, initOrganization); + public Task SendOrganizationInviteEmailAsync(string organizationName, OrganizationUser orgUser, ExpiringToken token, bool isFreeOrg, bool initOrganization = false) => + BulkSendOrganizationInviteEmailAsync(organizationName, new[] { (orgUser, token) }, isFreeOrg, initOrganization); - public async Task BulkSendOrganizationInviteEmailAsync(string organizationName, IEnumerable<(OrganizationUser orgUser, ExpiringToken token)> invites, bool initOrganization = false) + public async Task BulkSendOrganizationInviteEmailAsync(string organizationName, IEnumerable<(OrganizationUser orgUser, ExpiringToken token)> invites, bool isFreeOrg, bool initOrganization = false) { MailQueueMessage CreateMessage(string email, object model) { var message = CreateDefaultMessage($"Join {organizationName}", email); return new MailQueueMessage(message, "OrganizationUserInvited", model); } - + var freeOrgTitle = "A Bitwarden member invited you to an organization. Join now to start securing your passwords!"; var messageModels = invites.Select(invite => CreateMessage(invite.orgUser.Email, new OrganizationUserInvitedViewModel { - OrganizationName = CoreHelpers.SanitizeForEmail(organizationName, false), + TitleFirst = isFreeOrg ? freeOrgTitle : "Join ", + TitleSecondBold = isFreeOrg ? string.Empty : CoreHelpers.SanitizeForEmail(organizationName, false), + TitleThird = isFreeOrg ? string.Empty : " on Bitwarden and start securing your passwords!", + OrganizationName = CoreHelpers.SanitizeForEmail(organizationName, false) + invite.orgUser.Status, Email = WebUtility.UrlEncode(invite.orgUser.Email), OrganizationId = invite.orgUser.OrganizationId.ToString(), OrganizationUserId = invite.orgUser.Id.ToString(), @@ -479,6 +485,10 @@ public class HandlebarsMailService : IMailService Handlebars.RegisterTemplate("FullHtmlLayout", fullHtmlLayoutSource); var fullTextLayoutSource = await ReadSourceAsync("Layouts.Full.text"); Handlebars.RegisterTemplate("FullTextLayout", fullTextLayoutSource); + var titleContactUsHtmlLayoutSource = await ReadSourceAsync("Layouts.TitleContactUs.html"); + Handlebars.RegisterTemplate("TitleContactUsHtmlLayout", titleContactUsHtmlLayoutSource); + var titleContactUsTextLayoutSource = await ReadSourceAsync("Layouts.TitleContactUs.text"); + Handlebars.RegisterTemplate("TitleContactUsTextLayout", titleContactUsTextLayoutSource); Handlebars.RegisterHelper("date", (writer, context, parameters) => { diff --git a/src/Core/Services/Implementations/LaunchDarklyFeatureService.cs b/src/Core/Services/Implementations/LaunchDarklyFeatureService.cs index eeb2e57238..b3ac5bc628 100644 --- a/src/Core/Services/Implementations/LaunchDarklyFeatureService.cs +++ b/src/Core/Services/Implementations/LaunchDarklyFeatureService.cs @@ -8,6 +8,7 @@ namespace Bit.Core.Services; public class LaunchDarklyFeatureService : IFeatureService, IDisposable { private readonly LdClient _client; + private const string _anonymousUser = "25a15cac-58cf-4ac0-ad0f-b17c4bd92294"; public LaunchDarklyFeatureService( IGlobalSettings globalSettings) @@ -63,6 +64,38 @@ public class LaunchDarklyFeatureService : IFeatureService, IDisposable return _client.StringVariation(key, BuildContext(currentContext), defaultValue); } + public Dictionary GetAll(ICurrentContext currentContext) + { + var results = new Dictionary(); + + var keys = FeatureFlagKeys.GetAllKeys(); + + var values = _client.AllFlagsState(BuildContext(currentContext)); + if (values.Valid) + { + foreach (var key in keys) + { + var value = values.GetFlagValueJson(key); + switch (value.Type) + { + case LaunchDarkly.Sdk.LdValueType.Bool: + results.Add(key, value.AsBool); + break; + + case LaunchDarkly.Sdk.LdValueType.Number: + results.Add(key, value.AsInt); + break; + + case LaunchDarkly.Sdk.LdValueType.String: + results.Add(key, value.AsString); + break; + } + } + } + + return results; + } + public void Dispose() { _client?.Dispose(); @@ -72,18 +105,62 @@ public class LaunchDarklyFeatureService : IFeatureService, IDisposable { var builder = LaunchDarkly.Sdk.Context.MultiBuilder(); - if (currentContext.UserId.HasValue) + switch (currentContext.ClientType) { - var user = LaunchDarkly.Sdk.Context.Builder(currentContext.UserId.Value.ToString()); - user.Kind(LaunchDarkly.Sdk.ContextKind.Default); - builder.Add(user.Build()); - } + case Identity.ClientType.User: + { + LaunchDarkly.Sdk.ContextBuilder ldUser; + if (currentContext.UserId.HasValue) + { + ldUser = LaunchDarkly.Sdk.Context.Builder(currentContext.UserId.Value.ToString()); + } + else + { + // group all unauthenticated activity under one anonymous user key and mark as such + ldUser = LaunchDarkly.Sdk.Context.Builder(_anonymousUser); + ldUser.Anonymous(true); + } - if (currentContext.OrganizationId.HasValue) - { - var org = LaunchDarkly.Sdk.Context.Builder(currentContext.OrganizationId.Value.ToString()); - org.Kind("org"); - builder.Add(org.Build()); + ldUser.Kind(LaunchDarkly.Sdk.ContextKind.Default); + + if (currentContext.Organizations?.Any() ?? false) + { + var ldOrgs = currentContext.Organizations.Select(o => LaunchDarkly.Sdk.LdValue.Of(o.Id.ToString())); + ldUser.Set("organizations", LaunchDarkly.Sdk.LdValue.ArrayFrom(ldOrgs)); + } + + builder.Add(ldUser.Build()); + } + break; + + case Identity.ClientType.Organization: + { + if (currentContext.OrganizationId.HasValue) + { + var ldOrg = LaunchDarkly.Sdk.Context.Builder(currentContext.OrganizationId.Value.ToString()); + ldOrg.Kind("organization"); + builder.Add(ldOrg.Build()); + } + } + break; + + case Identity.ClientType.ServiceAccount: + { + if (currentContext.UserId.HasValue) + { + var ldServiceAccount = LaunchDarkly.Sdk.Context.Builder(currentContext.UserId.Value.ToString()); + ldServiceAccount.Kind("service-account"); + builder.Add(ldServiceAccount.Build()); + } + + if (currentContext.OrganizationId.HasValue) + { + var ldOrg = LaunchDarkly.Sdk.Context.Builder(currentContext.OrganizationId.Value.ToString()); + ldOrg.Kind("organization"); + builder.Add(ldOrg.Build()); + } + } + break; } return builder.Build(); diff --git a/src/Core/Services/Implementations/OrganizationService.cs b/src/Core/Services/Implementations/OrganizationService.cs index 4de6043c13..4494cc7d4a 100644 --- a/src/Core/Services/Implementations/OrganizationService.cs +++ b/src/Core/Services/Implementations/OrganizationService.cs @@ -1196,7 +1196,7 @@ public class OrganizationService : IOrganizationService _dataProtector.Protect($"OrganizationUserInvite {orgUser.Id} {orgUser.Email} {CoreHelpers.ToEpocMilliseconds(DateTime.UtcNow)}"); await _mailService.BulkSendOrganizationInviteEmailAsync(organization.Name, - orgUsers.Select(o => (o, new ExpiringToken(MakeToken(o), DateTime.UtcNow.AddDays(5))))); + orgUsers.Select(o => (o, new ExpiringToken(MakeToken(o), DateTime.UtcNow.AddDays(5)))), organization.PlanType == PlanType.Free); } private async Task SendInviteAsync(OrganizationUser orgUser, Organization organization, bool initOrganization) @@ -1205,8 +1205,7 @@ public class OrganizationService : IOrganizationService var nowMillis = CoreHelpers.ToEpocMilliseconds(now); var token = _dataProtector.Protect( $"OrganizationUserInvite {orgUser.Id} {orgUser.Email} {nowMillis}"); - - await _mailService.SendOrganizationInviteEmailAsync(organization.Name, orgUser, new ExpiringToken(token, now.AddDays(5)), initOrganization); + await _mailService.SendOrganizationInviteEmailAsync(organization.Name, orgUser, new ExpiringToken(token, now.AddDays(5)), organization.PlanType == PlanType.Free, initOrganization); } public async Task AcceptUserAsync(Guid organizationUserId, User user, string token, diff --git a/src/Core/Services/Implementations/PolicyService.cs b/src/Core/Services/Implementations/PolicyService.cs index a8d4f7ac93..f7ba081b4b 100644 --- a/src/Core/Services/Implementations/PolicyService.cs +++ b/src/Core/Services/Implementations/PolicyService.cs @@ -73,6 +73,14 @@ public class PolicyService : IPolicyService await DependsOnSingleOrgAsync(org); } break; + + // Activate Autofill is only available to Enterprise 2020-current plans + case PolicyType.ActivateAutofill: + if (policy.Enabled) + { + LockedTo2020Plan(org); + } + break; } var now = DateTime.UtcNow; @@ -168,4 +176,12 @@ public class PolicyService : IPolicyService throw new BadRequestException("Maximum Vault Timeout policy is enabled."); } } + + private void LockedTo2020Plan(Organization org) + { + if (org.PlanType != PlanType.EnterpriseAnnually && org.PlanType != PlanType.EnterpriseMonthly) + { + throw new BadRequestException("This policy is only available to 2020 Enterprise plans."); + } + } } diff --git a/src/Core/Services/NoopImplementations/NoopMailService.cs b/src/Core/Services/NoopImplementations/NoopMailService.cs index e4db9cf3e6..8f0cc2eb27 100644 --- a/src/Core/Services/NoopImplementations/NoopMailService.cs +++ b/src/Core/Services/NoopImplementations/NoopMailService.cs @@ -52,12 +52,12 @@ public class NoopMailService : IMailService return Task.FromResult(0); } - public Task SendOrganizationInviteEmailAsync(string organizationName, OrganizationUser orgUser, ExpiringToken token, bool initOrganization = false) + public Task SendOrganizationInviteEmailAsync(string organizationName, OrganizationUser orgUser, ExpiringToken token, bool isFreeOrg, bool initOrganization = false) { return Task.FromResult(0); } - public Task BulkSendOrganizationInviteEmailAsync(string organizationName, IEnumerable<(OrganizationUser orgUser, ExpiringToken token)> invites, bool initOrganization = false) + public Task BulkSendOrganizationInviteEmailAsync(string organizationName, IEnumerable<(OrganizationUser orgUser, ExpiringToken token)> invites, bool isFreeOrg, bool initOrganization = false) { return Task.FromResult(0); } diff --git a/src/Events/packages.lock.json b/src/Events/packages.lock.json index 35dc377c46..2ea44edcfb 100644 --- a/src/Events/packages.lock.json +++ b/src/Events/packages.lock.json @@ -2781,71 +2781,71 @@ "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } }, "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Dapper": "[2.0.123, )" + "Core": "2023.2.2", + "Dapper": "2.0.123" } }, "infrastructure.entityframework": { "type": "Project", "dependencies": { - "AutoMapper.Extensions.Microsoft.DependencyInjection": "[11.0.0, )", - "Core": "[2023.2.0, )", - "Microsoft.EntityFrameworkCore.Relational": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.SqlServer": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.Sqlite": "[6.0.12, )", - "Npgsql.EntityFrameworkCore.PostgreSQL": "[6.0.8, )", - "Pomelo.EntityFrameworkCore.MySql": "[6.0.2, )", - "linq2db.EntityFrameworkCore": "[6.11.0, )" + "AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0", + "Core": "2023.2.2", + "Microsoft.EntityFrameworkCore.Relational": "6.0.12", + "Microsoft.EntityFrameworkCore.SqlServer": "6.0.12", + "Microsoft.EntityFrameworkCore.Sqlite": "6.0.12", + "Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.8", + "Pomelo.EntityFrameworkCore.MySql": "6.0.2", + "linq2db.EntityFrameworkCore": "6.11.0" } }, "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Infrastructure.Dapper": "[2023.2.0, )", - "Infrastructure.EntityFramework": "[2023.2.0, )" + "Core": "2023.2.2", + "Infrastructure.Dapper": "2023.2.2", + "Infrastructure.EntityFramework": "2023.2.2" } } } diff --git a/src/EventsProcessor/packages.lock.json b/src/EventsProcessor/packages.lock.json index 35dc377c46..2ea44edcfb 100644 --- a/src/EventsProcessor/packages.lock.json +++ b/src/EventsProcessor/packages.lock.json @@ -2781,71 +2781,71 @@ "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } }, "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Dapper": "[2.0.123, )" + "Core": "2023.2.2", + "Dapper": "2.0.123" } }, "infrastructure.entityframework": { "type": "Project", "dependencies": { - "AutoMapper.Extensions.Microsoft.DependencyInjection": "[11.0.0, )", - "Core": "[2023.2.0, )", - "Microsoft.EntityFrameworkCore.Relational": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.SqlServer": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.Sqlite": "[6.0.12, )", - "Npgsql.EntityFrameworkCore.PostgreSQL": "[6.0.8, )", - "Pomelo.EntityFrameworkCore.MySql": "[6.0.2, )", - "linq2db.EntityFrameworkCore": "[6.11.0, )" + "AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0", + "Core": "2023.2.2", + "Microsoft.EntityFrameworkCore.Relational": "6.0.12", + "Microsoft.EntityFrameworkCore.SqlServer": "6.0.12", + "Microsoft.EntityFrameworkCore.Sqlite": "6.0.12", + "Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.8", + "Pomelo.EntityFrameworkCore.MySql": "6.0.2", + "linq2db.EntityFrameworkCore": "6.11.0" } }, "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Infrastructure.Dapper": "[2023.2.0, )", - "Infrastructure.EntityFramework": "[2023.2.0, )" + "Core": "2023.2.2", + "Infrastructure.Dapper": "2023.2.2", + "Infrastructure.EntityFramework": "2023.2.2" } } } diff --git a/src/Icons/packages.lock.json b/src/Icons/packages.lock.json index 99e8ef0037..00dcf32562 100644 --- a/src/Icons/packages.lock.json +++ b/src/Icons/packages.lock.json @@ -2791,71 +2791,71 @@ "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } }, "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Dapper": "[2.0.123, )" + "Core": "2023.2.2", + "Dapper": "2.0.123" } }, "infrastructure.entityframework": { "type": "Project", "dependencies": { - "AutoMapper.Extensions.Microsoft.DependencyInjection": "[11.0.0, )", - "Core": "[2023.2.0, )", - "Microsoft.EntityFrameworkCore.Relational": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.SqlServer": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.Sqlite": "[6.0.12, )", - "Npgsql.EntityFrameworkCore.PostgreSQL": "[6.0.8, )", - "Pomelo.EntityFrameworkCore.MySql": "[6.0.2, )", - "linq2db.EntityFrameworkCore": "[6.11.0, )" + "AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0", + "Core": "2023.2.2", + "Microsoft.EntityFrameworkCore.Relational": "6.0.12", + "Microsoft.EntityFrameworkCore.SqlServer": "6.0.12", + "Microsoft.EntityFrameworkCore.Sqlite": "6.0.12", + "Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.8", + "Pomelo.EntityFrameworkCore.MySql": "6.0.2", + "linq2db.EntityFrameworkCore": "6.11.0" } }, "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Infrastructure.Dapper": "[2023.2.0, )", - "Infrastructure.EntityFramework": "[2023.2.0, )" + "Core": "2023.2.2", + "Infrastructure.Dapper": "2023.2.2", + "Infrastructure.EntityFramework": "2023.2.2" } } } diff --git a/src/Identity/packages.lock.json b/src/Identity/packages.lock.json index 9dbaf53e13..358aa6b8e0 100644 --- a/src/Identity/packages.lock.json +++ b/src/Identity/packages.lock.json @@ -2803,71 +2803,71 @@ "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } }, "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Dapper": "[2.0.123, )" + "Core": "2023.2.2", + "Dapper": "2.0.123" } }, "infrastructure.entityframework": { "type": "Project", "dependencies": { - "AutoMapper.Extensions.Microsoft.DependencyInjection": "[11.0.0, )", - "Core": "[2023.2.0, )", - "Microsoft.EntityFrameworkCore.Relational": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.SqlServer": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.Sqlite": "[6.0.12, )", - "Npgsql.EntityFrameworkCore.PostgreSQL": "[6.0.8, )", - "Pomelo.EntityFrameworkCore.MySql": "[6.0.2, )", - "linq2db.EntityFrameworkCore": "[6.11.0, )" + "AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0", + "Core": "2023.2.2", + "Microsoft.EntityFrameworkCore.Relational": "6.0.12", + "Microsoft.EntityFrameworkCore.SqlServer": "6.0.12", + "Microsoft.EntityFrameworkCore.Sqlite": "6.0.12", + "Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.8", + "Pomelo.EntityFrameworkCore.MySql": "6.0.2", + "linq2db.EntityFrameworkCore": "6.11.0" } }, "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Infrastructure.Dapper": "[2023.2.0, )", - "Infrastructure.EntityFramework": "[2023.2.0, )" + "Core": "2023.2.2", + "Infrastructure.Dapper": "2023.2.2", + "Infrastructure.EntityFramework": "2023.2.2" } } } diff --git a/src/Infrastructure.Dapper/packages.lock.json b/src/Infrastructure.Dapper/packages.lock.json index 22a17dfbf3..65b395f78c 100644 --- a/src/Infrastructure.Dapper/packages.lock.json +++ b/src/Infrastructure.Dapper/packages.lock.json @@ -2610,43 +2610,43 @@ "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } } } diff --git a/src/Infrastructure.EntityFramework/EntityFrameworkServiceCollectionExtensions.cs b/src/Infrastructure.EntityFramework/EntityFrameworkServiceCollectionExtensions.cs index a058e6fb36..008766cbc4 100644 --- a/src/Infrastructure.EntityFramework/EntityFrameworkServiceCollectionExtensions.cs +++ b/src/Infrastructure.EntityFramework/EntityFrameworkServiceCollectionExtensions.cs @@ -9,6 +9,8 @@ using LinqToDB.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; +namespace Bit.Infrastructure.EntityFramework; + public static class EntityFrameworkServiceCollectionExtensions { public static void SetupEntityFramework(this IServiceCollection services, string connectionString, SupportedDatabaseProviders provider) diff --git a/src/Infrastructure.EntityFramework/packages.lock.json b/src/Infrastructure.EntityFramework/packages.lock.json index 1da5836273..b5ed949aea 100644 --- a/src/Infrastructure.EntityFramework/packages.lock.json +++ b/src/Infrastructure.EntityFramework/packages.lock.json @@ -2783,43 +2783,43 @@ "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } } } diff --git a/src/Notifications/packages.lock.json b/src/Notifications/packages.lock.json index 35f6a194e2..d127747c09 100644 --- a/src/Notifications/packages.lock.json +++ b/src/Notifications/packages.lock.json @@ -2831,71 +2831,71 @@ "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } }, "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Dapper": "[2.0.123, )" + "Core": "2023.2.2", + "Dapper": "2.0.123" } }, "infrastructure.entityframework": { "type": "Project", "dependencies": { - "AutoMapper.Extensions.Microsoft.DependencyInjection": "[11.0.0, )", - "Core": "[2023.2.0, )", - "Microsoft.EntityFrameworkCore.Relational": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.SqlServer": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.Sqlite": "[6.0.12, )", - "Npgsql.EntityFrameworkCore.PostgreSQL": "[6.0.8, )", - "Pomelo.EntityFrameworkCore.MySql": "[6.0.2, )", - "linq2db.EntityFrameworkCore": "[6.11.0, )" + "AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0", + "Core": "2023.2.2", + "Microsoft.EntityFrameworkCore.Relational": "6.0.12", + "Microsoft.EntityFrameworkCore.SqlServer": "6.0.12", + "Microsoft.EntityFrameworkCore.Sqlite": "6.0.12", + "Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.8", + "Pomelo.EntityFrameworkCore.MySql": "6.0.2", + "linq2db.EntityFrameworkCore": "6.11.0" } }, "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Infrastructure.Dapper": "[2023.2.0, )", - "Infrastructure.EntityFramework": "[2023.2.0, )" + "Core": "2023.2.2", + "Infrastructure.Dapper": "2023.2.2", + "Infrastructure.EntityFramework": "2023.2.2" } } } diff --git a/src/SharedWeb/Utilities/ServiceCollectionExtensions.cs b/src/SharedWeb/Utilities/ServiceCollectionExtensions.cs index d2b1f65de1..0af5e60681 100644 --- a/src/SharedWeb/Utilities/ServiceCollectionExtensions.cs +++ b/src/SharedWeb/Utilities/ServiceCollectionExtensions.cs @@ -18,6 +18,7 @@ using Bit.Core.Tokens; using Bit.Core.Utilities; using Bit.Core.Vault.Services; using Bit.Infrastructure.Dapper; +using Bit.Infrastructure.EntityFramework; using IdentityModel; using IdentityServer4.AccessTokenValidation; using IdentityServer4.Configuration; @@ -463,7 +464,7 @@ public static class ServiceCollectionExtensions } public static GlobalSettings AddGlobalSettingsServices(this IServiceCollection services, - IConfiguration configuration, IWebHostEnvironment environment) + IConfiguration configuration, IHostEnvironment environment) { var globalSettings = new GlobalSettings(); ConfigurationBinder.Bind(configuration.GetSection("GlobalSettings"), globalSettings); diff --git a/src/SharedWeb/packages.lock.json b/src/SharedWeb/packages.lock.json index 1ad2b8a01c..266f0f361a 100644 --- a/src/SharedWeb/packages.lock.json +++ b/src/SharedWeb/packages.lock.json @@ -2781,63 +2781,63 @@ "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } }, "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Dapper": "[2.0.123, )" + "Core": "2023.2.2", + "Dapper": "2.0.123" } }, "infrastructure.entityframework": { "type": "Project", "dependencies": { - "AutoMapper.Extensions.Microsoft.DependencyInjection": "[11.0.0, )", - "Core": "[2023.2.0, )", - "Microsoft.EntityFrameworkCore.Relational": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.SqlServer": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.Sqlite": "[6.0.12, )", - "Npgsql.EntityFrameworkCore.PostgreSQL": "[6.0.8, )", - "Pomelo.EntityFrameworkCore.MySql": "[6.0.2, )", - "linq2db.EntityFrameworkCore": "[6.11.0, )" + "AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0", + "Core": "2023.2.2", + "Microsoft.EntityFrameworkCore.Relational": "6.0.12", + "Microsoft.EntityFrameworkCore.SqlServer": "6.0.12", + "Microsoft.EntityFrameworkCore.Sqlite": "6.0.12", + "Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.8", + "Pomelo.EntityFrameworkCore.MySql": "6.0.2", + "linq2db.EntityFrameworkCore": "6.11.0" } } } diff --git a/src/Sql/dbo/Stored Procedures/AuthRequest_Create.sql b/src/Sql/dbo/Stored Procedures/AuthRequest_Create.sql index 9516ff3b59..ef5b09f443 100644 --- a/src/Sql/dbo/Stored Procedures/AuthRequest_Create.sql +++ b/src/Sql/dbo/Stored Procedures/AuthRequest_Create.sql @@ -5,7 +5,6 @@ @RequestDeviceIdentifier NVARCHAR(50), @RequestDeviceType TINYINT, @RequestIpAddress VARCHAR(50), - @RequestFingerprint VARCHAR(MAX), @ResponseDeviceId UNIQUEIDENTIFIER, @AccessCode VARCHAR(25), @PublicKey VARCHAR(MAX), @@ -27,7 +26,6 @@ BEGIN [RequestDeviceIdentifier], [RequestDeviceType], [RequestIpAddress], - [RequestFingerprint], [ResponseDeviceId], [AccessCode], [PublicKey], @@ -46,7 +44,6 @@ BEGIN @RequestDeviceIdentifier, @RequestDeviceType, @RequestIpAddress, - @RequestFingerprint, @ResponseDeviceId, @AccessCode, @PublicKey, diff --git a/src/Sql/dbo/Stored Procedures/AuthRequest_Update.sql b/src/Sql/dbo/Stored Procedures/AuthRequest_Update.sql index 29503c4b42..83c7f32a23 100644 --- a/src/Sql/dbo/Stored Procedures/AuthRequest_Update.sql +++ b/src/Sql/dbo/Stored Procedures/AuthRequest_Update.sql @@ -5,7 +5,6 @@ @RequestDeviceIdentifier NVARCHAR(50), @RequestDeviceType SMALLINT, @RequestIpAddress VARCHAR(50), - @RequestFingerprint VARCHAR(MAX), @ResponseDeviceId UNIQUEIDENTIFIER, @AccessCode VARCHAR(25), @PublicKey VARCHAR(MAX), @@ -27,7 +26,6 @@ BEGIN [RequestDeviceIdentifier] = @RequestDeviceIdentifier, [RequestDeviceType] = @RequestDeviceType, [RequestIpAddress] = @RequestIpAddress, - [RequestFingerprint] = @RequestFingerprint, [ResponseDeviceId] = @ResponseDeviceId, [AccessCode] = @AccessCode, [PublicKey] = @PublicKey, diff --git a/src/Sql/dbo/Tables/AuthRequest.sql b/src/Sql/dbo/Tables/AuthRequest.sql index 9bc38fd9be..a0edd17dea 100644 --- a/src/Sql/dbo/Tables/AuthRequest.sql +++ b/src/Sql/dbo/Tables/AuthRequest.sql @@ -5,7 +5,6 @@ [RequestDeviceIdentifier] NVARCHAR(50) NOT NULL, [RequestDeviceType] SMALLINT NOT NULL, [RequestIpAddress] VARCHAR(50) NOT NULL, - [RequestFingerprint] VARCHAR(MAX) NOT NULL, [ResponseDeviceId] UNIQUEIDENTIFIER NULL, [AccessCode] VARCHAR(25) NOT NULL, [PublicKey] VARCHAR(MAX) NOT NULL, diff --git a/test/Api.IntegrationTest/Controllers/ConfigControllerTests.cs b/test/Api.IntegrationTest/Controllers/ConfigControllerTests.cs new file mode 100644 index 0000000000..22c7398398 --- /dev/null +++ b/test/Api.IntegrationTest/Controllers/ConfigControllerTests.cs @@ -0,0 +1,94 @@ +using System.Net.Http.Headers; +using Bit.Api.IntegrationTest.Factories; +using Bit.Api.IntegrationTest.Helpers; +using Bit.Api.Models.Response; +using Bit.Core.Entities; +using Xunit; + +namespace Bit.Api.IntegrationTest.Controllers; + +public class ConfigControllerTests : IClassFixture, IAsyncLifetime +{ + private readonly HttpClient _client; + private readonly ApiApplicationFactory _factory; + + private string _email = null!; + + public ConfigControllerTests(ApiApplicationFactory factory) + { + _factory = factory; + _client = _factory.CreateClient(); + } + + public async Task InitializeAsync() + { + _email = $"integration-test{Guid.NewGuid()}@bitwarden.com"; + + var tokens = await _factory.LoginWithNewAccount(_email); + _client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokens.Token); + } + + public Task DisposeAsync() + { + _client.Dispose(); + return Task.CompletedTask; + } + + private async Task LoginAsync() + { + var tokens = await _factory.LoginAsync(_email); + _client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokens.Token); + } + + [Fact] + public async Task GetConfigs_Unauthenticated() + { + _client.DefaultRequestHeaders.Authorization = null; + + var response = await _client.GetAsync("/config"); + response.EnsureSuccessStatusCode(); + var result = await response.Content.ReadFromJsonAsync(); + + Assert.NotNull(result); + Assert.NotEmpty(result!.Version); + } + + [Fact] + public async Task GetConfigs_Authenticated() + { + await LoginAsync(); + + var response = await _client.GetAsync("/config"); + response.EnsureSuccessStatusCode(); + var result = await response.Content.ReadFromJsonAsync(); + + Assert.NotNull(result); + Assert.NotEmpty(result!.Version); + } + + [Theory] + [InlineData(1)] + [InlineData(3)] + public async Task GetConfigs_WithOrganizations(int orgCount) + { + for (var i = 0; i < orgCount; i++) + { + var ownerEmail = $"integration-test{Guid.NewGuid()}@bitwarden.com"; + await _factory.LoginWithNewAccount(ownerEmail); + + Organization org; + (org, _) = await OrganizationTestHelpers.SignUpAsync(_factory, plan: Core.Enums.PlanType.Free, ownerEmail: ownerEmail, + name: i.ToString(), billingEmail: ownerEmail, ownerKey: i.ToString()); + await OrganizationTestHelpers.CreateUserAsync(_factory, org.Id, _email, Core.Enums.OrganizationUserType.User); + } + + await LoginAsync(); + + var response = await _client.GetAsync("/config"); + response.EnsureSuccessStatusCode(); + var result = await response.Content.ReadFromJsonAsync(); + + Assert.NotNull(result); + Assert.NotEmpty(result!.Version); + } +} diff --git a/test/Api.IntegrationTest/SecretsManager/Controllers/AccessPoliciesControllerTest.cs b/test/Api.IntegrationTest/SecretsManager/Controllers/AccessPoliciesControllerTests.cs similarity index 99% rename from test/Api.IntegrationTest/SecretsManager/Controllers/AccessPoliciesControllerTest.cs rename to test/Api.IntegrationTest/SecretsManager/Controllers/AccessPoliciesControllerTests.cs index a37567739e..1db8115ed1 100644 --- a/test/Api.IntegrationTest/SecretsManager/Controllers/AccessPoliciesControllerTest.cs +++ b/test/Api.IntegrationTest/SecretsManager/Controllers/AccessPoliciesControllerTests.cs @@ -13,7 +13,7 @@ using Xunit; namespace Bit.Api.IntegrationTest.SecretsManager.Controllers; -public class AccessPoliciesControllerTest : IClassFixture, IAsyncLifetime +public class AccessPoliciesControllerTests : IClassFixture, IAsyncLifetime { private const string _mockEncryptedString = "2.3Uk+WNBIoU5xzmVFNcoWzz==|1MsPIYuRfdOHfu/0uY6H2Q==|/98sp4wb6pHP1VTZ9JcNCYgQjEUMFPlqJgCwRk1YXKg="; @@ -27,7 +27,7 @@ public class AccessPoliciesControllerTest : IClassFixture private string _email = null!; private SecretsManagerOrganizationHelper _organizationHelper = null!; - public AccessPoliciesControllerTest(ApiApplicationFactory factory) + public AccessPoliciesControllerTests(ApiApplicationFactory factory) { _factory = factory; _client = _factory.CreateClient(); diff --git a/test/Api.IntegrationTest/SecretsManager/Controllers/ProjectsControllerTest.cs b/test/Api.IntegrationTest/SecretsManager/Controllers/ProjectsControllerTests.cs similarity index 98% rename from test/Api.IntegrationTest/SecretsManager/Controllers/ProjectsControllerTest.cs rename to test/Api.IntegrationTest/SecretsManager/Controllers/ProjectsControllerTests.cs index d855465e6e..1b0d97626f 100644 --- a/test/Api.IntegrationTest/SecretsManager/Controllers/ProjectsControllerTest.cs +++ b/test/Api.IntegrationTest/SecretsManager/Controllers/ProjectsControllerTests.cs @@ -14,7 +14,7 @@ using Xunit; namespace Bit.Api.IntegrationTest.SecretsManager.Controllers; -public class ProjectsControllerTest : IClassFixture, IAsyncLifetime +public class ProjectsControllerTests : IClassFixture, IAsyncLifetime { private readonly string _mockEncryptedString = "2.3Uk+WNBIoU5xzmVFNcoWzz==|1MsPIYuRfdOHfu/0uY6H2Q==|/98sp4wb6pHP1VTZ9JcNCYgQjEUMFPlqJgCwRk1YXKg="; @@ -27,7 +27,7 @@ public class ProjectsControllerTest : IClassFixture, IAsy private string _email = null!; private SecretsManagerOrganizationHelper _organizationHelper = null!; - public ProjectsControllerTest(ApiApplicationFactory factory) + public ProjectsControllerTests(ApiApplicationFactory factory) { _factory = factory; _client = _factory.CreateClient(); @@ -361,7 +361,7 @@ public class ProjectsControllerTest : IClassFixture, IAsy results!.Data.Select(x => x.Id).OrderBy(x => x)); Assert.DoesNotContain(results.Data, x => x.Error != null); - var projects = await _projectRepository.GetManyByIds(projectIds); + var projects = await _projectRepository.GetManyWithSecretsByIds(projectIds); Assert.Empty(projects); } diff --git a/test/Api.IntegrationTest/SecretsManager/Controllers/SecretsControllerTest.cs b/test/Api.IntegrationTest/SecretsManager/Controllers/SecretsControllerTests.cs similarity index 81% rename from test/Api.IntegrationTest/SecretsManager/Controllers/SecretsControllerTest.cs rename to test/Api.IntegrationTest/SecretsManager/Controllers/SecretsControllerTests.cs index 8bb74bedac..1ea7c4049b 100644 --- a/test/Api.IntegrationTest/SecretsManager/Controllers/SecretsControllerTest.cs +++ b/test/Api.IntegrationTest/SecretsManager/Controllers/SecretsControllerTests.cs @@ -13,7 +13,7 @@ using Xunit; namespace Bit.Api.IntegrationTest.SecretsManager.Controllers; -public class SecretsControllerTest : IClassFixture, IAsyncLifetime +public class SecretsControllerTests : IClassFixture, IAsyncLifetime { private readonly string _mockEncryptedString = "2.3Uk+WNBIoU5xzmVFNcoWzz==|1MsPIYuRfdOHfu/0uY6H2Q==|/98sp4wb6pHP1VTZ9JcNCYgQjEUMFPlqJgCwRk1YXKg="; @@ -27,7 +27,7 @@ public class SecretsControllerTest : IClassFixture, IAsyn private string _email = null!; private SecretsManagerOrganizationHelper _organizationHelper = null!; - public SecretsControllerTest(ApiApplicationFactory factory) + public SecretsControllerTests(ApiApplicationFactory factory) { _factory = factory; _client = _factory.CreateClient(); @@ -244,7 +244,8 @@ public class SecretsControllerTest : IClassFixture, IAsyn secretResponse.EnsureSuccessStatusCode(); var secretResult = await secretResponse.Content.ReadFromJsonAsync(); - var secret = (await _secretRepository.GetManyByProjectIdAsync(project.Id, orgUserId, accessType)).First(); + var result = (await _secretRepository.GetManyByProjectIdAsync(project.Id, orgUserId, accessType)).First(); + var secret = result.Secret; Assert.NotNull(secretResult); Assert.Equal(secret.Id.ToString(), secretResult!.Id); @@ -331,6 +332,108 @@ public class SecretsControllerTest : IClassFixture, IAsyn Assert.Equal(secret.CreationDate, result.CreationDate); } + [Theory] + [InlineData(false, false)] + [InlineData(true, false)] + [InlineData(false, true)] + public async Task GetSecretsByProject_SmNotEnabled_NotFound(bool useSecrets, bool accessSecrets) + { + var (org, _) = await _organizationHelper.Initialize(useSecrets, accessSecrets); + await LoginAsync(_email); + + var project = await _projectRepository.CreateAsync(new Project + { + OrganizationId = org.Id, + Name = _mockEncryptedString, + }); + + var response = await _client.GetAsync($"/projects/{project.Id}/secrets"); + Assert.Equal(HttpStatusCode.NotFound, response.StatusCode); + } + + [Fact] + public async Task GetSecretsByProject_UserWithNoPermission_EmptyList() + { + var (org, _) = await _organizationHelper.Initialize(true, true); + var (email, orgUser) = await _organizationHelper.CreateNewUser(OrganizationUserType.User, true); + await LoginAsync(email); + + var project = await _projectRepository.CreateAsync(new Project() + { + Id = new Guid(), + OrganizationId = org.Id, + Name = _mockEncryptedString + }); + + var secret = await _secretRepository.CreateAsync(new Secret + { + OrganizationId = org.Id, + Key = _mockEncryptedString, + Value = _mockEncryptedString, + Note = _mockEncryptedString, + Projects = new List { project }, + }); + + var response = await _client.GetAsync($"/projects/{project.Id}/secrets"); + response.EnsureSuccessStatusCode(); + var result = await response.Content.ReadFromJsonAsync(); + Assert.NotNull(result); + Assert.Empty(result!.Secrets); + Assert.Empty(result!.Projects); + } + + [Theory] + [InlineData(PermissionType.RunAsAdmin)] + [InlineData(PermissionType.RunAsUserWithPermission)] + public async Task GetSecretsByProject_Success(PermissionType permissionType) + { + var (org, _) = await _organizationHelper.Initialize(true, true); + await LoginAsync(_email); + + var project = await _projectRepository.CreateAsync(new Project() + { + Id = new Guid(), + OrganizationId = org.Id, + Name = _mockEncryptedString + }); + + if (permissionType == PermissionType.RunAsUserWithPermission) + { + var (email, orgUser) = await _organizationHelper.CreateNewUser(OrganizationUserType.User, true); + await LoginAsync(email); + + var accessPolicies = new List + { + new UserProjectAccessPolicy + { + GrantedProjectId = project.Id, OrganizationUserId = orgUser.Id, Read = true, Write = true, + }, + }; + await _accessPolicyRepository.CreateManyAsync(accessPolicies); + } + + var secret = await _secretRepository.CreateAsync(new Secret + { + OrganizationId = org.Id, + Key = _mockEncryptedString, + Value = _mockEncryptedString, + Note = _mockEncryptedString, + Projects = new List { project }, + }); + + var response = await _client.GetAsync($"/projects/{project.Id}/secrets"); + response.EnsureSuccessStatusCode(); + var result = await response.Content.ReadFromJsonAsync(); + Assert.NotEmpty(result!.Secrets); + Assert.Equal(secret.Id.ToString(), result.Secrets.First().Id); + Assert.Equal(secret.OrganizationId.ToString(), result.Secrets.First().OrganizationId); + Assert.Equal(secret.Key, result.Secrets.First().Key); + Assert.Equal(secret.CreationDate, result.Secrets.First().CreationDate); + Assert.Equal(secret.RevisionDate, result.Secrets.First().RevisionDate); + Assert.Equal(secret.Projects!.First().Id, result.Projects.First().Id); + Assert.Equal(secret.Projects!.First().Name, result.Projects.First().Name); + } + [Theory] [InlineData(false, false)] [InlineData(true, false)] diff --git a/test/Api.IntegrationTest/SecretsManager/Controllers/SecretsManagerPortingControllerTests.cs b/test/Api.IntegrationTest/SecretsManager/Controllers/SecretsManagerPortingControllerTests.cs new file mode 100644 index 0000000000..d4697711aa --- /dev/null +++ b/test/Api.IntegrationTest/SecretsManager/Controllers/SecretsManagerPortingControllerTests.cs @@ -0,0 +1,79 @@ +using System.Net; +using System.Net.Http.Headers; +using Bit.Api.IntegrationTest.Factories; +using Bit.Api.SecretsManager.Models.Request; +using Bit.Core.SecretsManager.Repositories; +using Xunit; + +namespace Bit.Api.IntegrationTest.SecretsManager.Controllers; + +public class SecretsManagerPortingControllerTests : IClassFixture, IAsyncLifetime +{ + private readonly string _mockEncryptedString = + "2.3Uk+WNBIoU5xzmVFNcoWzz==|1MsPIYuRfdOHfu/0uY6H2Q==|/98sp4wb6pHP1VTZ9JcNCYgQjEUMFPlqJgCwRk1YXKg="; + + private readonly HttpClient _client; + private readonly ApiApplicationFactory _factory; + private readonly IProjectRepository _projectRepository; + private readonly IAccessPolicyRepository _accessPolicyRepository; + + private string _email = null!; + private SecretsManagerOrganizationHelper _organizationHelper = null!; + + public SecretsManagerPortingControllerTests(ApiApplicationFactory factory) + { + _factory = factory; + _client = _factory.CreateClient(); + _projectRepository = _factory.GetService(); + _accessPolicyRepository = _factory.GetService(); + } + + public async Task InitializeAsync() + { + _email = $"integration-test{Guid.NewGuid()}@bitwarden.com"; + await _factory.LoginWithNewAccount(_email); + _organizationHelper = new SecretsManagerOrganizationHelper(_factory, _email); + } + + public Task DisposeAsync() + { + _client.Dispose(); + return Task.CompletedTask; + } + + private async Task LoginAsync(string email) + { + var tokens = await _factory.LoginAsync(email); + _client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokens.Token); + } + + [Theory] + [InlineData(false, false)] + [InlineData(true, false)] + [InlineData(false, true)] + public async Task Import_SmNotEnabled_NotFound(bool useSecrets, bool accessSecrets) + { + var (org, _) = await _organizationHelper.Initialize(useSecrets, accessSecrets); + await LoginAsync(_email); + + var projectsList = new List(); + var secretsList = new List(); + var request = new SMImportRequestModel { Projects = projectsList, Secrets = secretsList }; + + var response = await _client.PostAsJsonAsync($"sm/{org.Id}/import", request); + Assert.Equal(HttpStatusCode.NotFound, response.StatusCode); + } + + [Theory] + [InlineData(false, false)] + [InlineData(true, false)] + [InlineData(false, true)] + public async Task Export_SmNotEnabled_NotFound(bool useSecrets, bool accessSecrets) + { + var (org, _) = await _organizationHelper.Initialize(useSecrets, accessSecrets); + await LoginAsync(_email); + + var response = await _client.GetAsync($"sm/{org.Id}/export"); + Assert.Equal(HttpStatusCode.NotFound, response.StatusCode); + } +} diff --git a/test/Api.IntegrationTest/SecretsManager/Controllers/SecretsTrashControllerTest.cs b/test/Api.IntegrationTest/SecretsManager/Controllers/SecretsTrashControllerTests.cs similarity index 97% rename from test/Api.IntegrationTest/SecretsManager/Controllers/SecretsTrashControllerTest.cs rename to test/Api.IntegrationTest/SecretsManager/Controllers/SecretsTrashControllerTests.cs index 97dd827a8c..9160213ba1 100644 --- a/test/Api.IntegrationTest/SecretsManager/Controllers/SecretsTrashControllerTest.cs +++ b/test/Api.IntegrationTest/SecretsManager/Controllers/SecretsTrashControllerTests.cs @@ -9,7 +9,7 @@ using Secret = Bit.Core.SecretsManager.Entities.Secret; namespace Bit.Api.IntegrationTest.SecretsManager.Controllers; -public class SecretsTrashControllerTest : IClassFixture, IAsyncLifetime +public class SecretsTrashControllerTests : IClassFixture, IAsyncLifetime { private readonly string _mockEncryptedString = "2.3Uk+WNBIoU5xzmVFNcoWzz==|1MsPIYuRfdOHfu/0uY6H2Q==|/98sp4wb6pHP1VTZ9JcNCYgQjEUMFPlqJgCwRk1YXKg="; @@ -21,7 +21,7 @@ public class SecretsTrashControllerTest : IClassFixture, private string _email = null!; private SecretsManagerOrganizationHelper _organizationHelper = null!; - public SecretsTrashControllerTest(ApiApplicationFactory factory) + public SecretsTrashControllerTests(ApiApplicationFactory factory) { _factory = factory; _client = _factory.CreateClient(); diff --git a/test/Api.IntegrationTest/SecretsManager/Controllers/ServiceAccountsControllerTests.cs b/test/Api.IntegrationTest/SecretsManager/Controllers/ServiceAccountsControllerTests.cs index bf7a837043..2fca7ab61a 100644 --- a/test/Api.IntegrationTest/SecretsManager/Controllers/ServiceAccountsControllerTests.cs +++ b/test/Api.IntegrationTest/SecretsManager/Controllers/ServiceAccountsControllerTests.cs @@ -14,7 +14,7 @@ using Xunit; namespace Bit.Api.IntegrationTest.SecretsManager.Controllers; -public class ServiceAccountsControllerTest : IClassFixture, IAsyncLifetime +public class ServiceAccountsControllerTests : IClassFixture, IAsyncLifetime { private const string _mockEncryptedString = "2.3Uk+WNBIoU5xzmVFNcoWzz==|1MsPIYuRfdOHfu/0uY6H2Q==|/98sp4wb6pHP1VTZ9JcNCYgQjEUMFPlqJgCwRk1YXKg="; @@ -32,7 +32,7 @@ public class ServiceAccountsControllerTest : IClassFixture { + new UserServiceAccountAccessPolicy + { + GrantedServiceAccountId = serviceAccount.Id, + OrganizationUserId = orgUser.Id, + Write = true, + Read = true, + }, + }); + } + + var response = await _client.GetAsync($"/service-accounts/{serviceAccount.Id}"); + response.EnsureSuccessStatusCode(); + var result = await response.Content.ReadFromJsonAsync(); + Assert.NotNull(result); + Assert.Equal(serviceAccount.Id.ToString(), result!.Id); + Assert.Equal(serviceAccount.OrganizationId.ToString(), result.OrganizationId); + Assert.Equal(serviceAccount.Name, result.Name); + Assert.Equal(serviceAccount.CreationDate, result.CreationDate); + Assert.Equal(serviceAccount.RevisionDate, result.RevisionDate); + } + [Theory] [InlineData(false, false)] [InlineData(true, false)] @@ -361,6 +438,99 @@ public class ServiceAccountsControllerTest : IClassFixture { + new UserServiceAccountAccessPolicy + { + GrantedServiceAccountId = serviceAccount.Id, + OrganizationUserId = orgUser.Id, + Write = true, + Read = true, + }, + }); + } + + var accessToken = await _apiKeyRepository.CreateAsync(new ApiKey + { + ServiceAccountId = serviceAccount.Id, + Name = _mockEncryptedString, + ExpireAt = DateTime.UtcNow.AddDays(30), + }); + + + var response = await _client.GetAsync($"/service-accounts/{serviceAccount.Id}/access-tokens"); + response.EnsureSuccessStatusCode(); + var results = await response.Content.ReadFromJsonAsync>(); + Assert.NotEmpty(results!.Data); + Assert.Equal(accessToken.Id, results.Data.First().Id); + Assert.Equal(accessToken.Name, results.Data.First().Name); + Assert.Equal(accessToken.GetScopes(), results.Data.First().Scopes); + Assert.Equal(accessToken.ExpireAt, results.Data.First().ExpireAt); + Assert.Equal(accessToken.CreationDate, results.Data.First().CreationDate); + Assert.Equal(accessToken.RevisionDate, results.Data.First().RevisionDate); + } + [Theory] [InlineData(false, false)] [InlineData(true, false)] @@ -626,7 +796,7 @@ public class ServiceAccountsControllerTest : IClassFixture + var collections = new List { new CollectionDetails { @@ -170,8 +170,8 @@ public class CollectionsControllerTests .UserId .Returns(user.Id); - sutProvider.GetDependency() - .GetManyByUserIdAsync(user.Id) + sutProvider.GetDependency() + .GetOrganizationCollections(orgId) .Returns(collections); // Act @@ -219,7 +219,7 @@ public class CollectionsControllerTests OrganizationId = orgId.ToString() }; - var collections = new List + var collections = new List { new CollectionDetails { @@ -236,8 +236,8 @@ public class CollectionsControllerTests .UserId .Returns(user.Id); - sutProvider.GetDependency() - .GetManyByUserIdAsync(user.Id) + sutProvider.GetDependency() + .GetOrganizationCollections(orgId) .Returns(collections); // Act diff --git a/test/Api.Test/Controllers/ConfigControllerTests.cs b/test/Api.Test/Controllers/ConfigControllerTests.cs new file mode 100644 index 0000000000..d9b857194c --- /dev/null +++ b/test/Api.Test/Controllers/ConfigControllerTests.cs @@ -0,0 +1,47 @@ +using AutoFixture.Xunit2; +using Bit.Api.Controllers; +using Bit.Core.Context; +using Bit.Core.Services; +using Bit.Core.Settings; +using NSubstitute; +using Xunit; + +namespace Bit.Api.Test.Controllers; + +public class ConfigControllerTests : IDisposable +{ + private readonly ConfigController _sut; + private readonly GlobalSettings _globalSettings; + private readonly IFeatureService _featureService; + private readonly ICurrentContext _currentContext; + + public ConfigControllerTests() + { + _globalSettings = new GlobalSettings(); + _currentContext = Substitute.For(); + _featureService = Substitute.For(); + + _sut = new ConfigController( + _globalSettings, + _currentContext, + _featureService + ); + } + + public void Dispose() + { + _sut?.Dispose(); + } + + [Theory, AutoData] + public void GetConfigs_WithFeatureStates(Dictionary featureStates) + { + _featureService.GetAll(_currentContext).Returns(featureStates); + + var response = _sut.GetConfigs(); + + Assert.NotNull(response); + Assert.NotNull(response.FeatureStates); + Assert.Equal(featureStates, response.FeatureStates); + } +} diff --git a/test/Api.Test/SecretsManager/Controllers/ProjectsControllerTests.cs b/test/Api.Test/SecretsManager/Controllers/ProjectsControllerTests.cs index e216c9b78f..42ae51f952 100644 --- a/test/Api.Test/SecretsManager/Controllers/ProjectsControllerTests.cs +++ b/test/Api.Test/SecretsManager/Controllers/ProjectsControllerTests.cs @@ -6,7 +6,6 @@ using Bit.Core.Enums; using Bit.Core.Exceptions; using Bit.Core.SecretsManager.Commands.Projects.Interfaces; using Bit.Core.SecretsManager.Entities; -using Bit.Core.SecretsManager.Models.Data; using Bit.Core.SecretsManager.Repositories; using Bit.Core.Services; using Bit.Core.Test.SecretsManager.AutoFixture.ProjectsFixture; @@ -199,13 +198,16 @@ public class ProjectsControllerTests break; } - sutProvider.GetDependency().GetPermissionDetailsByIdAsync(Arg.Is(data), Arg.Any()) - .ReturnsForAnyArgs(new ProjectPermissionDetails() { Id = data, OrganizationId = orgId, Read = true, Write = true }); + sutProvider.GetDependency().GetByIdAsync(Arg.Is(data)) + .ReturnsForAnyArgs(new Project { Id = data, OrganizationId = orgId }); + + sutProvider.GetDependency().AccessToProjectAsync(default, default, default) + .ReturnsForAnyArgs((true, false)); await sutProvider.Sut.GetAsync(data); await sutProvider.GetDependency().Received(1) - .GetPermissionDetailsByIdAsync(Arg.Is(data), Arg.Any()); + .GetByIdAsync(Arg.Is(data)); } [Theory] diff --git a/test/Api.Test/SecretsManager/Controllers/SecretsControllerTests.cs b/test/Api.Test/SecretsManager/Controllers/SecretsControllerTests.cs index ab020f7514..6877c28719 100644 --- a/test/Api.Test/SecretsManager/Controllers/SecretsControllerTests.cs +++ b/test/Api.Test/SecretsManager/Controllers/SecretsControllerTests.cs @@ -6,6 +6,7 @@ using Bit.Core.Enums; using Bit.Core.Exceptions; using Bit.Core.SecretsManager.Commands.Secrets.Interfaces; using Bit.Core.SecretsManager.Entities; +using Bit.Core.SecretsManager.Models.Data; using Bit.Core.SecretsManager.Repositories; using Bit.Core.Services; using Bit.Core.Test.SecretsManager.AutoFixture.SecretsFixture; @@ -45,7 +46,11 @@ public class SecretsControllerTests public async void GetSecretsByOrganization_Success(PermissionType permissionType, SutProvider sutProvider, Core.SecretsManager.Entities.Secret resultSecret, Guid organizationId, Guid userId, Core.SecretsManager.Entities.Project mockProject, AccessClientType accessType) { sutProvider.GetDependency().AccessSecretsManager(default).ReturnsForAnyArgs(true); - sutProvider.GetDependency().GetManyByOrganizationIdAsync(default, default, default).ReturnsForAnyArgs(new List { resultSecret }); + sutProvider.GetDependency().GetManyByOrganizationIdAsync(default, default, default) + .ReturnsForAnyArgs(new List + { + new() { Secret = resultSecret, Read = true, Write = true }, + }); sutProvider.GetDependency().GetProperUserId(default).ReturnsForAnyArgs(userId); if (permissionType == PermissionType.RunAsAdmin) @@ -95,6 +100,8 @@ public class SecretsControllerTests resultSecret.OrganizationId = organizationId; sutProvider.GetDependency().GetByIdAsync(default).ReturnsForAnyArgs(resultSecret); + sutProvider.GetDependency().AccessToSecretAsync(default, default, default) + .ReturnsForAnyArgs(Task.FromResult((true, true))); if (permissionType == PermissionType.RunAsAdmin) { @@ -107,7 +114,7 @@ public class SecretsControllerTests sutProvider.GetDependency().UserHasReadAccessToProject(mockProject.Id, userId).Returns(true); } - var result = await sutProvider.Sut.GetAsync(resultSecret.Id); + await sutProvider.Sut.GetAsync(resultSecret.Id); await sutProvider.GetDependency().Received(1) .GetByIdAsync(Arg.Is(AssertHelper.AssertPropertyEqual(resultSecret.Id))); diff --git a/test/Api.Test/packages.lock.json b/test/Api.Test/packages.lock.json index 9b8a73427b..b0abeb354a 100644 --- a/test/Api.Test/packages.lock.json +++ b/test/Api.Test/packages.lock.json @@ -3086,122 +3086,122 @@ "api": { "type": "Project", "dependencies": { - "Azure.Messaging.EventGrid": "[4.10.0, )", - "Commercial.Core": "[2023.2.0, )", - "Commercial.Infrastructure.EntityFramework": "[2023.2.0, )", - "Core": "[2023.2.0, )", - "SharedWeb": "[2023.2.0, )", - "Swashbuckle.AspNetCore": "[6.5.0, )" + "Azure.Messaging.EventGrid": "4.10.0", + "Commercial.Core": "2023.2.2", + "Commercial.Infrastructure.EntityFramework": "2023.2.2", + "Core": "2023.2.2", + "SharedWeb": "2023.2.2", + "Swashbuckle.AspNetCore": "6.5.0" } }, "commercial.core": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )" + "Core": "2023.2.2" } }, "commercial.infrastructure.entityframework": { "type": "Project", "dependencies": { - "AutoMapper.Extensions.Microsoft.DependencyInjection": "[11.0.0, )", - "Core": "[2023.2.0, )", - "Infrastructure.EntityFramework": "[2023.2.0, )" + "AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0", + "Core": "2023.2.2", + "Infrastructure.EntityFramework": "2023.2.2" } }, "common": { "type": "Project", "dependencies": { - "AutoFixture.AutoNSubstitute": "[4.17.0, )", - "AutoFixture.Xunit2": "[4.17.0, )", - "Core": "[2023.2.0, )", - "Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )", - "Microsoft.NET.Test.Sdk": "[17.1.0, )", - "NSubstitute": "[4.3.0, )", - "xunit": "[2.4.1, )" + "AutoFixture.AutoNSubstitute": "4.17.0", + "AutoFixture.Xunit2": "4.17.0", + "Core": "2023.2.2", + "Kralizek.AutoFixture.Extensions.MockHttp": "1.2.0", + "Microsoft.NET.Test.Sdk": "17.1.0", + "NSubstitute": "4.3.0", + "xunit": "2.4.1" } }, "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } }, "core.test": { "type": "Project", "dependencies": { - "AutoFixture.AutoNSubstitute": "[4.17.0, )", - "AutoFixture.Xunit2": "[4.17.0, )", - "Common": "[2023.2.0, )", - "Core": "[2023.2.0, )", - "Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )", - "Microsoft.NET.Test.Sdk": "[17.1.0, )", - "Moq": "[4.17.2, )", - "NSubstitute": "[4.3.0, )", - "xunit": "[2.4.1, )" + "AutoFixture.AutoNSubstitute": "4.17.0", + "AutoFixture.Xunit2": "4.17.0", + "Common": "2023.2.2", + "Core": "2023.2.2", + "Kralizek.AutoFixture.Extensions.MockHttp": "1.2.0", + "Microsoft.NET.Test.Sdk": "17.1.0", + "Moq": "4.17.2", + "NSubstitute": "4.3.0", + "xunit": "2.4.1" } }, "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Dapper": "[2.0.123, )" + "Core": "2023.2.2", + "Dapper": "2.0.123" } }, "infrastructure.entityframework": { "type": "Project", "dependencies": { - "AutoMapper.Extensions.Microsoft.DependencyInjection": "[11.0.0, )", - "Core": "[2023.2.0, )", - "Microsoft.EntityFrameworkCore.Relational": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.SqlServer": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.Sqlite": "[6.0.12, )", - "Npgsql.EntityFrameworkCore.PostgreSQL": "[6.0.8, )", - "Pomelo.EntityFrameworkCore.MySql": "[6.0.2, )", - "linq2db.EntityFrameworkCore": "[6.11.0, )" + "AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0", + "Core": "2023.2.2", + "Microsoft.EntityFrameworkCore.Relational": "6.0.12", + "Microsoft.EntityFrameworkCore.SqlServer": "6.0.12", + "Microsoft.EntityFrameworkCore.Sqlite": "6.0.12", + "Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.8", + "Pomelo.EntityFrameworkCore.MySql": "6.0.2", + "linq2db.EntityFrameworkCore": "6.11.0" } }, "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Infrastructure.Dapper": "[2023.2.0, )", - "Infrastructure.EntityFramework": "[2023.2.0, )" + "Core": "2023.2.2", + "Infrastructure.Dapper": "2023.2.2", + "Infrastructure.EntityFramework": "2023.2.2" } } } diff --git a/test/Billing.Test/packages.lock.json b/test/Billing.Test/packages.lock.json index fc08d7de4f..415c0217b6 100644 --- a/test/Billing.Test/packages.lock.json +++ b/test/Billing.Test/packages.lock.json @@ -285,14 +285,6 @@ "Microsoft.CSharp": "4.7.0" } }, - "Humanizer.Core": { - "type": "Transitive", - "resolved": "2.2.0", - "contentHash": "rsYXB7+iUPP8AHgQ8JP2UZI2xK2KhjcdGr9E6zX3CsZaTLCaw8M35vaAJRo1rfxeaZEVMuXeaquLVCkZ7JcZ5Q==", - "dependencies": { - "NETStandard.Library": "1.6.1" - } - }, "IdentityModel": { "type": "Transitive", "resolved": "4.4.0", @@ -427,30 +419,6 @@ "MimeKit": "3.2.0" } }, - "MessagePack": { - "type": "Transitive", - "resolved": "2.1.152", - "contentHash": "PlJ31qf42uGuJfwc61x/Pt4hJi01xh1rrBofj1MJSLzEot/2UAIRdSgxEHN/8qou5CV8OBeDM9HXKPi1Oj8rpQ==", - "dependencies": { - "MessagePack.Annotations": "2.1.152", - "Microsoft.Bcl.AsyncInterfaces": "1.0.0", - "System.Memory": "4.5.3", - "System.Reflection.Emit": "4.6.0", - "System.Reflection.Emit.Lightweight": "4.6.0", - "System.Runtime.CompilerServices.Unsafe": "4.5.2", - "System.Threading.Tasks.Extensions": "4.5.3" - } - }, - "MessagePack.Annotations": { - "type": "Transitive", - "resolved": "2.1.152", - "contentHash": "RONktDA/HA641ds/2bfOqYSVew8o8EJMcQ1P4M1J77QGgbzWiWt3nBHvCAwlx0VfO6K9S8xq4b5OLD2CUnhtCg==" - }, - "MessagePackAnalyzer": { - "type": "Transitive", - "resolved": "2.1.152", - "contentHash": "uJhZlGMkXDaFYsH8V9S6o1EyvsUqB9mpU4DVBXNr0DXZVzZMhuLP1IkLj5xK3EKlaAcvkFkZv3eSvuz360wb3Q==" - }, "Microsoft.AspNetCore.Authentication.JwtBearer": { "type": "Transitive", "resolved": "6.0.4", @@ -537,11 +505,6 @@ "Microsoft.Extensions.Primitives": "2.1.0" } }, - "Microsoft.AspNetCore.Razor.Language": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "yCtBr1GSGzJrrp1NJUb4ltwFYMKHw/tJLnIDvg9g/FnkGIEzmE19tbCQqXARIJv5kdtBgsoVIdGLL+zmjxvM/A==" - }, "Microsoft.Azure.Amqp": { "type": "Transitive", "resolved": "2.4.11", @@ -636,196 +599,14 @@ }, "Microsoft.Bcl.AsyncInterfaces": { "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "W8DPQjkMScOMTtJbPwmPyj9c3zYSFGawDW3jwlBOOsnY+EzZFLgNQ/UMkK35JmkNOVPdCyPr2Tw7Vv9N+KA3ZQ==" + "resolved": "1.1.1", + "contentHash": "yuvf07qFWFqtK3P/MRkEKLhn5r2UbSpVueRziSqj0yJQIKFwG1pq9mOayK3zE5qZCTs0CbrwL9M6R8VwqyGy2w==" }, "Microsoft.Bcl.HashCode": { "type": "Transitive", "resolved": "1.1.0", "contentHash": "J2G1k+u5unBV+aYcwxo94ip16Rkp65pgWFb0R6zwJipzWNMgvqlWeuI7/+R+e8bob66LnSG+llLJ+z8wI94cHg==" }, - "Microsoft.Build": { - "type": "Transitive", - "resolved": "17.0.0", - "contentHash": "hCs9OzyCD/TYRid1LxPgghvUDqgXf+tEvV4qd8tBfOyp3zxAk+/rssgxtJnKLMZIu0CEZi3JegvfenaIXjEacQ==", - "dependencies": { - "Microsoft.Build.Framework": "17.0.0", - "Microsoft.NET.StringTools": "1.0.0", - "Microsoft.Win32.Registry": "4.3.0", - "System.Collections.Immutable": "5.0.0", - "System.Configuration.ConfigurationManager": "4.7.0", - "System.Reflection.Metadata": "1.6.0", - "System.Security.Principal.Windows": "4.7.0", - "System.Text.Encoding.CodePages": "4.0.1", - "System.Text.Json": "5.0.2", - "System.Threading.Tasks.Dataflow": "4.9.0" - } - }, - "Microsoft.Build.Framework": { - "type": "Transitive", - "resolved": "17.0.0", - "contentHash": "XbFA0z+6Ws2pNeRXYcDF3lKlNgRoSGMm2Q5HKzZD+EbwYMKPKrl/BJnnkMuDJHU0KravYHfhzBnLLJpPeZ3E7A==", - "dependencies": { - "System.Security.Permissions": "4.7.0" - } - }, - "Microsoft.Build.Locator": { - "type": "Transitive", - "resolved": "1.4.1", - "contentHash": "UfyGaxNTjw/r3uWMX/Cv1CPKELo7TCrR5VIahaSKL0WyqmbDT6og9pyjwuhyyUkxC9gk2ElB7oOEySL1OzTZ1g==" - }, - "Microsoft.CodeAnalysis.Analyzers": { - "type": "Transitive", - "resolved": "3.3.2", - "contentHash": "7xt6zTlIEizUgEsYAIgm37EbdkiMmr6fP6J9pDoKEpiGM4pi32BCPGr/IczmSJI9Zzp0a6HOzpr9OvpMP+2veA==" - }, - "Microsoft.CodeAnalysis.AnalyzerUtilities": { - "type": "Transitive", - "resolved": "3.3.0", - "contentHash": "gyQ70pJ4T7hu/s0+QnEaXtYfeG/JrttGnxHJlrhpxsQjRIUGuRhVwNBtkHHYOrUAZ/l47L98/NiJX6QmTwAyrg==" - }, - "Microsoft.CodeAnalysis.Common": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "d02ybMhUJl1r/dI6SkJPHrTiTzXBYCZeJdOLMckV+jyoMU/GGkjqFX/sRbv1K0QmlpwwKuLTiYVQvfYC+8ox2g==", - "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "3.3.2", - "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": "4.0.0", - "contentHash": "2UVTGtyQGgTCazvnT6t82f+7AV2L+kqJdyb61rT9GQed4yK+tVh5IkaKcsm70VqyZQhBbDqsfZFNHnY65xhrRw==", - "dependencies": { - "Microsoft.CodeAnalysis.Common": "[4.0.0]" - } - }, - "Microsoft.CodeAnalysis.CSharp.Features": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "WOTeKJN0I4/AzylA+VuTtB7V7VvnM41GXqnyiiDRNa3QtKFAzJbQ7CwLG97pcme+oQLz708z+s4Nzd9g0irytw==", - "dependencies": { - "Humanizer.Core": "2.2.0", - "Microsoft.CodeAnalysis.CSharp": "[4.0.0]", - "Microsoft.CodeAnalysis.CSharp.Workspaces": "[4.0.0]", - "Microsoft.CodeAnalysis.Common": "[4.0.0]", - "Microsoft.CodeAnalysis.Features": "[4.0.0]", - "Microsoft.CodeAnalysis.Workspaces.Common": "[4.0.0]" - } - }, - "Microsoft.CodeAnalysis.CSharp.Scripting": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "Z8Y8Ye2snCqVQLLx7K6FcEs0hcvdPi4nTG2RDWdPpOfMH8ed1yxTabt252qAd4TH0jpyruuCnBfW4s6DXliMYg==", - "dependencies": { - "Microsoft.CSharp": "4.3.0", - "Microsoft.CodeAnalysis.CSharp": "[4.0.0]", - "Microsoft.CodeAnalysis.Common": "[4.0.0]", - "Microsoft.CodeAnalysis.Scripting.Common": "[4.0.0]" - } - }, - "Microsoft.CodeAnalysis.CSharp.Workspaces": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "RQMc1+2cIRdOvY8vp6ygkzfBrvlYphnbmhhluKNh9+X+PpprQDKlbPrn9fLn6v9RlCsfa87joS3zJyGBEeWTXQ==", - "dependencies": { - "Humanizer.Core": "2.2.0", - "Microsoft.CodeAnalysis.CSharp": "[4.0.0]", - "Microsoft.CodeAnalysis.Common": "[4.0.0]", - "Microsoft.CodeAnalysis.Workspaces.Common": "[4.0.0]" - } - }, - "Microsoft.CodeAnalysis.Features": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "ci4pgjEgihb+fu2i1E12iOMGXU6GisYR3YrNd2aqt55ijjzLNqPV/+zt+cV3Qc0n08rJrIY2Bf6cTTMPY0bwJQ==", - "dependencies": { - "Microsoft.CodeAnalysis.AnalyzerUtilities": "3.3.0", - "Microsoft.CodeAnalysis.Common": "[4.0.0]", - "Microsoft.CodeAnalysis.Scripting.Common": "[4.0.0]", - "Microsoft.CodeAnalysis.Workspaces.Common": "[4.0.0]", - "Microsoft.DiaSymReader": "1.3.0", - "Microsoft.VisualStudio.Debugger.Contracts": "17.2.0", - "System.Threading.Tasks.Extensions": "4.5.4" - } - }, - "Microsoft.CodeAnalysis.Razor": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "uqdzuQXxD7XrJCbIbbwpI/LOv0PBJ9VIR0gdvANTHOfK5pjTaCir+XcwvYvBZ5BIzd0KGzyiamzlEWw1cK1q0w==", - "dependencies": { - "Microsoft.AspNetCore.Razor.Language": "6.0.0", - "Microsoft.CodeAnalysis.CSharp": "4.0.0", - "Microsoft.CodeAnalysis.Common": "4.0.0" - } - }, - "Microsoft.CodeAnalysis.Scripting.Common": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "jU/ncoHSFnXU/L2iju9AFlOwmsAYByIxhCCpeLPNTguXwosJp1o13mtrboJOfkDhi7ebvzQmvcZ++yBu8cF4Sw==", - "dependencies": { - "Microsoft.CodeAnalysis.Common": "[4.0.0]" - } - }, - "Microsoft.CodeAnalysis.VisualBasic": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "FK+OGUMUh9O6/GCwyIy4c/sOrarF36/yEY07BbXVYMql1qCqHGWfyWXyCQKQ6m/KqReCqW6aO4cK7kK/AYBpyA==", - "dependencies": { - "Microsoft.CodeAnalysis.Common": "[4.0.0]" - } - }, - "Microsoft.CodeAnalysis.VisualBasic.Features": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "GEJsXFcMd7o+D6OYCLPui2ZvNsonTmdPSluGK0wC3EXVB+gnrro7Lr/sjtTSOwVeiXPlhXgprRuO7zJiMn1uzw==", - "dependencies": { - "Microsoft.CodeAnalysis.Common": "[4.0.0]", - "Microsoft.CodeAnalysis.Features": "[4.0.0]", - "Microsoft.CodeAnalysis.VisualBasic": "[4.0.0]", - "Microsoft.CodeAnalysis.VisualBasic.Workspaces": "[4.0.0]", - "Microsoft.CodeAnalysis.Workspaces.Common": "[4.0.0]" - } - }, - "Microsoft.CodeAnalysis.VisualBasic.Workspaces": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "ozmB/thXGX5MoP/oiV9w5ZVGS08mz7fK3lRXiRSHHBeuiXZW1ZCGARwG2YkhylzAl1LlEwSQmlgrr8Irlu+3qQ==", - "dependencies": { - "Microsoft.CodeAnalysis.Common": "[4.0.0]", - "Microsoft.CodeAnalysis.VisualBasic": "[4.0.0]", - "Microsoft.CodeAnalysis.Workspaces.Common": "[4.0.0]" - } - }, - "Microsoft.CodeAnalysis.Workspaces.Common": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "bEfHzx8PLmEN6aogVYHWmViHCWfms8emI43w9nNX+C8MLgtynOmVL/OJ4hbuONVp+4OuDAy5BDj69n5MnXQX8g==", - "dependencies": { - "Humanizer.Core": "2.2.0", - "Microsoft.Bcl.AsyncInterfaces": "5.0.0", - "Microsoft.CodeAnalysis.Common": "[4.0.0]", - "System.Composition": "1.0.31", - "System.IO.Pipelines": "5.0.1" - } - }, - "Microsoft.CodeAnalysis.Workspaces.MSBuild": { - "type": "Transitive", - "resolved": "4.0.0", - "contentHash": "0LYNKESZPK4AQmAXwn8l2e8UF/rYpT0pvceEhiTVjurjQ9Y7pGdUZ5E30r8knxYtT5/9ZESR7wKf/AU00r95Mw==", - "dependencies": { - "Microsoft.Build.Framework": "16.5.0", - "Microsoft.CodeAnalysis.Common": "[4.0.0]", - "Microsoft.CodeAnalysis.Workspaces.Common": "[4.0.0]", - "System.Text.Json": "4.7.0" - } - }, "Microsoft.CodeCoverage": { "type": "Transitive", "resolved": "17.1.0", @@ -873,32 +654,6 @@ "SQLitePCLRaw.core": "2.1.2" } }, - "Microsoft.DiaSymReader": { - "type": "Transitive", - "resolved": "1.3.0", - "contentHash": "/fn1Tfo7j7k/slViPlM8azJuxQmri7FZ8dQ+gTeLbI29leN/1VK0U/BFcRdJNctsRCUgyKJ2q+I0Tjq07Rc1/Q==", - "dependencies": { - "NETStandard.Library": "1.6.1" - } - }, - "Microsoft.DotNet.Scaffolding.Shared": { - "type": "Transitive", - "resolved": "6.0.3", - "contentHash": "MHPcl+Vm8tEyvCA0dSEMDd/DfEYW2VtkGs7DXEJBbeRToBmHoK/5djIQws4XWcdqcpuJNo1WqX+C35h7Y5G26w==", - "dependencies": { - "Microsoft.CodeAnalysis.CSharp.Features": "4.0.0", - "Microsoft.CodeAnalysis.CSharp.Scripting": "4.0.0", - "Microsoft.CodeAnalysis.CSharp.Workspaces": "4.0.0", - "Microsoft.CodeAnalysis.Features": "4.0.0", - "Microsoft.CodeAnalysis.VisualBasic.Features": "4.0.0", - "Microsoft.CodeAnalysis.VisualBasic.Workspaces": "4.0.0", - "Microsoft.CodeAnalysis.Workspaces.MSBuild": "4.0.0", - "Newtonsoft.Json": "13.0.1", - "NuGet.ProjectModel": "5.11.0", - "System.Collections.Immutable": "6.0.0", - "System.Private.Uri": "4.3.2" - } - }, "Microsoft.EntityFrameworkCore": { "type": "Transitive", "resolved": "6.0.12", @@ -1271,15 +1026,6 @@ "System.Security.Cryptography.Cng": "4.5.0" } }, - "Microsoft.NET.StringTools": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "ZYVcoDM0LnSyT5nWoRGfShYdOecCw2sOXWwP6j1Z0u48Xq3+BVvZ+EiPCX9/8Gz439giW+O1H1kWF9Eb/w6rVg==", - "dependencies": { - "System.Memory": "4.5.4", - "System.Runtime.CompilerServices.Unsafe": "5.0.0" - } - }, "Microsoft.NETCore.Platforms": { "type": "Transitive", "resolved": "5.0.0", @@ -1287,8 +1033,8 @@ }, "Microsoft.NETCore.Targets": { "type": "Transitive", - "resolved": "1.1.3", - "contentHash": "3Wrmi0kJDzClwAC+iBdUBpEKmEle8FQNsCs77fkiOIw/9oYA07bL1EZNX0kQ2OMN3xpwvl0vAtOCYY3ndDNlhQ==" + "resolved": "1.1.0", + "contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==" }, "Microsoft.OData.Core": { "type": "Transitive", @@ -1332,95 +1078,6 @@ "Newtonsoft.Json": "9.0.1" } }, - "Microsoft.VisualStudio.Debugger.Contracts": { - "type": "Transitive", - "resolved": "17.2.0", - "contentHash": "br/qV/aHqLqVlqtcMKglCC8MHMMLey0yMkKSplnMl58F5gKjwnh7wjs8+g0j/vf4T6h4KK7JWrC0+oN70pbugg==", - "dependencies": { - "MessagePack": "2.1.152", - "MessagePackAnalyzer": "2.1.152", - "Microsoft.Bcl.AsyncInterfaces": "1.1.1", - "System.Collections.Immutable": "5.0.0" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration": { - "type": "Transitive", - "resolved": "6.0.3", - "contentHash": "rD1Lj6LljO7iEeZJuGtEp0O9rZHvr+tAZJx8QgwdmlrMReaYA0+KQCH/woEdcmBo+ifnwUUyNgG+9NUECYTT9g==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection": "6.0.0", - "Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore": "6.0.3", - "System.Collections.Immutable": "6.0.0", - "System.Private.Uri": "4.3.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration.Core": { - "type": "Transitive", - "resolved": "6.0.3", - "contentHash": "o+rN2+WrG4NTU4dzcExaMAGpQk84+SJMC8D3v7pe35f6DJQIXC3lc9V9npgNtiiD19aP+Pdto8L5nuwQ83dgTw==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection": "6.0.0", - "Microsoft.VisualStudio.Web.CodeGeneration.Templating": "6.0.3", - "Newtonsoft.Json": "13.0.1", - "System.Private.Uri": "4.3.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration.Design": { - "type": "Transitive", - "resolved": "6.0.3", - "contentHash": "cqxm2k5KF7T0KejRlxt71aizeR+2a/9qk94c1p7/CCOjns4cgwL92IxyrhhpILn0U+kylslBE2O/AJoi28wkSA==", - "dependencies": { - "Microsoft.Build.Locator": "1.4.1", - "Microsoft.DotNet.Scaffolding.Shared": "6.0.3", - "Microsoft.VisualStudio.Web.CodeGenerators.Mvc": "6.0.3", - "System.Private.Uri": "4.3.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore": { - "type": "Transitive", - "resolved": "6.0.3", - "contentHash": "Mg0HpwFZyOJQHtW04gbCLekZ8Lt3VSs9s9JqgGm6DXoeTbAbaHhJGZohuT296Z+0MuFJgl9mD1/j1Zof8hPgcA==", - "dependencies": { - "Microsoft.DotNet.Scaffolding.Shared": "6.0.3", - "Microsoft.VisualStudio.Web.CodeGeneration.Core": "6.0.3", - "System.Private.Uri": "4.3.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration.Templating": { - "type": "Transitive", - "resolved": "6.0.3", - "contentHash": "TMV1xzJSjNpiWCGkw6/8/XHmYF0HiimH/8kmPZfT/J+WBKABn4DRbZNpgTYNKmcuYxg4mKySFPVpblQ0XMf9Tg==", - "dependencies": { - "Microsoft.AspNetCore.Razor.Language": "6.0.0", - "Microsoft.CodeAnalysis.CSharp": "4.0.0", - "Microsoft.CodeAnalysis.Razor": "6.0.0", - "Microsoft.VisualStudio.Web.CodeGeneration.Utils": "6.0.3", - "System.Private.Uri": "4.3.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGeneration.Utils": { - "type": "Transitive", - "resolved": "6.0.3", - "contentHash": "M8k06jnZ0l7031mPYDbLaiiz20ju1MP+FJlpDKVilkAPOQVITSFRDm8Hhd2Pyd+BSj+nCzDC1ZMglK8z+lJ5ig==", - "dependencies": { - "Microsoft.Build": "17.0.0", - "Microsoft.Build.Locator": "1.4.1", - "Microsoft.CodeAnalysis.CSharp.Workspaces": "4.0.0", - "Microsoft.DotNet.Scaffolding.Shared": "6.0.3", - "Newtonsoft.Json": "13.0.1", - "System.Private.Uri": "4.3.2" - } - }, - "Microsoft.VisualStudio.Web.CodeGenerators.Mvc": { - "type": "Transitive", - "resolved": "6.0.3", - "contentHash": "Oe3QkXildc2AFM33rN9WSLj53kzuQAPLAv7aduz+bnYc86SFBPA/qpYZ2ZJhlKYbrJUpztRqoWvLqGfDT6XkUw==", - "dependencies": { - "Microsoft.DotNet.Scaffolding.Shared": "6.0.3", - "Microsoft.VisualStudio.Web.CodeGeneration": "6.0.3", - "System.Private.Uri": "4.3.2" - } - }, "Microsoft.Win32.Primitives": { "type": "Transitive", "resolved": "4.3.0", @@ -1542,79 +1199,11 @@ "libsodium": "[1.0.18.2, 1.0.19)" } }, - "NuGet.Common": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "WCHexQBfSqBDRqP3PSDSUw7YM+PwuvMHGAkT/sXI5UHze4T41yLE+VB/km2Fe0z9y3m2mudcr2djFZezivjMJw==", - "dependencies": { - "NuGet.Frameworks": "5.11.0" - } - }, - "NuGet.Configuration": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "NqsQe198CTHoo7NMrKQL8utd6n9yVb9CPgJmpyF6kpEsLFo/9r0wqGL3ln8Mtcz8yuJpOPWFQEoOlzDzu3LfUg==", - "dependencies": { - "NuGet.Common": "5.11.0", - "System.Security.Cryptography.ProtectedData": "4.4.0" - } - }, - "NuGet.DependencyResolver.Core": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "kkWhU0msuCRyiIJeoL95j6bXUQMc1mTk8wZ3mMxl+0VzOf39eXSObmxKuJ7eh+6zOMQyzd0TAXU5u5aQSxOVSg==", - "dependencies": { - "NuGet.LibraryModel": "5.11.0", - "NuGet.Protocol": "5.11.0" - } - }, "NuGet.Frameworks": { "type": "Transitive", "resolved": "5.11.0", "contentHash": "eaiXkUjC4NPcquGWzAGMXjuxvLwc6XGKMptSyOGQeT0X70BUZObuybJFZLA0OfTdueLd3US23NBPTBb6iF3V1Q==" }, - "NuGet.LibraryModel": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "Iq0tbX3Rsl4837VlWy90fliA7T2+g2FPdz/s/lK6H9g/5RCta/7AZADV0l/A/f0HDCDlMxBN2ha1hsmgxe1sGQ==", - "dependencies": { - "NuGet.Common": "5.11.0", - "NuGet.Versioning": "5.11.0" - } - }, - "NuGet.Packaging": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "knlpQuqTL8BEXUHTdZ9Wlz3pjck5nv0OYsCpSkaQAukl7fFcX4apAs8cwJgxHiEZjfWNG1npZOzpYdHG59v5xQ==", - "dependencies": { - "Newtonsoft.Json": "9.0.1", - "NuGet.Configuration": "5.11.0", - "NuGet.Versioning": "5.11.0", - "System.Security.Cryptography.Cng": "5.0.0", - "System.Security.Cryptography.Pkcs": "5.0.0" - } - }, - "NuGet.ProjectModel": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "8q7mAwHHP1/Ua1r3FQDg+kXcFvRgBmCCXQeqTkTVQoO5t3G/AwxzJVt7Jii0eNrM17Wzm975U0gnkNqlp+gdsw==", - "dependencies": { - "NuGet.DependencyResolver.Core": "5.11.0" - } - }, - "NuGet.Protocol": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "eS/sJLqMzPz6gonD1zaXIcpDME/1DuKqv0Hlag8RuJcboZJliA15qjfg7UvuQB8/ineOleaEvrTzMjpKE0FdbQ==", - "dependencies": { - "NuGet.Packaging": "5.11.0" - } - }, - "NuGet.Versioning": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "mCv/GzvMk5iatWoZY41PoIShEbwVxq9CDCc1fV/uqPFKZ4DD/1JuKZ5AL/FJJRsTanvMR3EOXKYCLdQ7PFYn8Q==" - }, "Otp.NET": { "type": "Transitive", "resolved": "1.2.2", @@ -2131,102 +1720,6 @@ "System.Threading": "4.3.0" } }, - "System.Composition": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "I+D26qpYdoklyAVUdqwUBrEIckMNjAYnuPJy/h9dsQItpQwVREkDFs4b4tkBza0kT2Yk48Lcfsv2QQ9hWsh9Iw==", - "dependencies": { - "System.Composition.AttributedModel": "1.0.31", - "System.Composition.Convention": "1.0.31", - "System.Composition.Hosting": "1.0.31", - "System.Composition.Runtime": "1.0.31", - "System.Composition.TypedParts": "1.0.31" - } - }, - "System.Composition.AttributedModel": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "NHWhkM3ZkspmA0XJEsKdtTt1ViDYuojgSND3yHhTzwxepiwqZf+BCWuvCbjUt4fe0NxxQhUDGJ5km6sLjo9qnQ==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Composition.Convention": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "GLjh2Ju71k6C0qxMMtl4efHa68NmWeIUYh4fkUI8xbjQrEBvFmRwMDFcylT8/PR9SQbeeL48IkFxU/+gd0nYEQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Composition.AttributedModel": "1.0.31", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Composition.Hosting": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "fN1bT4RX4vUqjbgoyuJFVUizAl2mYF5VAb+bVIxIYZSSc0BdnX+yGAxcavxJuDDCQ1K+/mdpgyEFc8e9ikjvrg==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Composition.Runtime": "1.0.31", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.ObjectModel": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Composition.Runtime": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "0LEJN+2NVM89CE4SekDrrk5tHV5LeATltkp+9WNYrR+Huiyt0vaCqHbbHtVAjPyeLWIc8dOz/3kthRBj32wGQg==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.Linq": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Composition.TypedParts": { - "type": "Transitive", - "resolved": "1.0.31", - "contentHash": "0Zae/FtzeFgDBBuILeIbC/T9HMYbW4olAmi8XqqAGosSOWvXfiQLfARZEhiGd0LVXaYgXr0NhxiU1LldRP1fpQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Composition.AttributedModel": "1.0.31", - "System.Composition.Hosting": "1.0.31", - "System.Composition.Runtime": "1.0.31", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0" - } - }, "System.Configuration.ConfigurationManager": { "type": "Transitive", "resolved": "6.0.0", @@ -2829,15 +2322,6 @@ "System.Xml.XmlSerializer": "4.0.11" } }, - "System.Private.Uri": { - "type": "Transitive", - "resolved": "4.3.2", - "contentHash": "o1+7RJnu3Ik3PazR7Z7tJhjPdE000Eq2KGLLWhqJJKXj04wrS8lwb1OFtDF9jzXXADhUuZNJZlPc98uwwqmpFA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.1", - "Microsoft.NETCore.Targets": "1.1.3" - } - }, "System.Reflection": { "type": "Transitive", "resolved": "4.3.0", @@ -2852,8 +2336,15 @@ }, "System.Reflection.Emit": { "type": "Transitive", - "resolved": "4.6.0", - "contentHash": "qAo4jyXtC9i71iElngX7P2r+zLaiHzxKwf66sc3X91tL5Ks6fnQ1vxL04o7ZSm3sYfLExySL7GN8aTpNYpU1qw==" + "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", @@ -2867,8 +2358,14 @@ }, "System.Reflection.Emit.Lightweight": { "type": "Transitive", - "resolved": "4.6.0", - "contentHash": "j/V5HVvxvBQ7uubYD0PptQW2KGsi1Pc2kZ9yfwLixv3ADdjL/4M78KyC5e+ymW612DY8ZE4PFoZmWpoNmN2mqg==" + "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", @@ -2883,8 +2380,8 @@ }, "System.Reflection.Metadata": { "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "5NecZgXktdGg34rh1OenY1rFNDCI8xSjFr+Z4OU4cU06AQHUdRnIIEeWENu3Wl4YowbzkymAIMvi3WyK9U53pQ==" + "resolved": "1.6.0", + "contentHash": "COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ==" }, "System.Reflection.Primitives": { "type": "Transitive", @@ -3312,11 +2809,6 @@ "System.Runtime": "4.3.0" } }, - "System.Threading.Tasks.Dataflow": { - "type": "Transitive", - "resolved": "4.9.0", - "contentHash": "dTS+3D/GtG2/Pvc3E5YzVvAa7aQJgLDlZDIzukMOJjYudVOQOUXEU68y6Zi3Nn/jqIeB5kOCwrGbQFAKHVzXEQ==" - }, "System.Threading.Tasks.Extensions": { "type": "Transitive", "resolved": "4.5.4", @@ -3533,91 +3025,90 @@ "billing": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Microsoft.VisualStudio.Web.CodeGeneration.Design": "[6.0.3, )", - "SharedWeb": "[2023.2.0, )" + "Core": "2023.2.2", + "SharedWeb": "2023.2.2" } }, "common": { "type": "Project", "dependencies": { - "AutoFixture.AutoNSubstitute": "[4.17.0, )", - "AutoFixture.Xunit2": "[4.17.0, )", - "Core": "[2023.2.0, )", - "Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )", - "Microsoft.NET.Test.Sdk": "[17.1.0, )", - "NSubstitute": "[4.3.0, )", - "xunit": "[2.4.1, )" + "AutoFixture.AutoNSubstitute": "4.17.0", + "AutoFixture.Xunit2": "4.17.0", + "Core": "2023.2.2", + "Kralizek.AutoFixture.Extensions.MockHttp": "1.2.0", + "Microsoft.NET.Test.Sdk": "17.1.0", + "NSubstitute": "4.3.0", + "xunit": "2.4.1" } }, "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } }, "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Dapper": "[2.0.123, )" + "Core": "2023.2.2", + "Dapper": "2.0.123" } }, "infrastructure.entityframework": { "type": "Project", "dependencies": { - "AutoMapper.Extensions.Microsoft.DependencyInjection": "[11.0.0, )", - "Core": "[2023.2.0, )", - "Microsoft.EntityFrameworkCore.Relational": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.SqlServer": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.Sqlite": "[6.0.12, )", - "Npgsql.EntityFrameworkCore.PostgreSQL": "[6.0.8, )", - "Pomelo.EntityFrameworkCore.MySql": "[6.0.2, )", - "linq2db.EntityFrameworkCore": "[6.11.0, )" + "AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0", + "Core": "2023.2.2", + "Microsoft.EntityFrameworkCore.Relational": "6.0.12", + "Microsoft.EntityFrameworkCore.SqlServer": "6.0.12", + "Microsoft.EntityFrameworkCore.Sqlite": "6.0.12", + "Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.8", + "Pomelo.EntityFrameworkCore.MySql": "6.0.2", + "linq2db.EntityFrameworkCore": "6.11.0" } }, "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Infrastructure.Dapper": "[2023.2.0, )", - "Infrastructure.EntityFramework": "[2023.2.0, )" + "Core": "2023.2.2", + "Infrastructure.Dapper": "2023.2.2", + "Infrastructure.EntityFramework": "2023.2.2" } } } diff --git a/test/Common/packages.lock.json b/test/Common/packages.lock.json index 3eb93b4fcc..d673034e04 100644 --- a/test/Common/packages.lock.json +++ b/test/Common/packages.lock.json @@ -2844,43 +2844,43 @@ "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } } } diff --git a/test/Core.Test/Services/LaunchDarklyFeatureServiceTests.cs b/test/Core.Test/Services/LaunchDarklyFeatureServiceTests.cs index efc84bd784..84055cd929 100644 --- a/test/Core.Test/Services/LaunchDarklyFeatureServiceTests.cs +++ b/test/Core.Test/Services/LaunchDarklyFeatureServiceTests.cs @@ -91,4 +91,18 @@ public class LaunchDarklyFeatureServiceTests Assert.Null(sutProvider.Sut.GetStringVariation(FeatureFlagKeys.SecretsManager, currentContext)); } + + [Fact(Skip = "For local development")] + public void GetAll() + { + var sutProvider = GetSutProvider(new Core.Settings.GlobalSettings()); + + var currentContext = Substitute.For(); + currentContext.UserId.Returns(Guid.NewGuid()); + + var results = sutProvider.Sut.GetAll(currentContext); + + Assert.NotNull(results); + Assert.NotEmpty(results); + } } diff --git a/test/Core.Test/Services/OrganizationServiceTests.cs b/test/Core.Test/Services/OrganizationServiceTests.cs index 6bc60b85e2..ee8fdc8fb9 100644 --- a/test/Core.Test/Services/OrganizationServiceTests.cs +++ b/test/Core.Test/Services/OrganizationServiceTests.cs @@ -64,7 +64,7 @@ public class OrganizationServiceTests .CreateManyAsync(Arg.Is>(users => users.Count() == expectedNewUsersCount)); await sutProvider.GetDependency().Received(1) .BulkSendOrganizationInviteEmailAsync(org.Name, - Arg.Is>(messages => messages.Count() == expectedNewUsersCount)); + Arg.Is>(messages => messages.Count() == expectedNewUsersCount), org.PlanType == PlanType.Free); // Send events await sutProvider.GetDependency().Received(1) @@ -122,7 +122,7 @@ public class OrganizationServiceTests .CreateManyAsync(Arg.Is>(users => users.Count() == expectedNewUsersCount)); await sutProvider.GetDependency().Received(1) .BulkSendOrganizationInviteEmailAsync(org.Name, - Arg.Is>(messages => messages.Count() == expectedNewUsersCount)); + Arg.Is>(messages => messages.Count() == expectedNewUsersCount), org.PlanType == PlanType.Free); // Sent events await sutProvider.GetDependency().Received(1) @@ -217,7 +217,7 @@ public class OrganizationServiceTests await sutProvider.GetDependency().Received(1) .BulkSendOrganizationInviteEmailAsync(organization.Name, - Arg.Is>(v => v.Count() == invite.Emails.Distinct().Count())); + Arg.Is>(v => v.Count() == invite.Emails.Distinct().Count()), organization.PlanType == PlanType.Free); } [Theory] @@ -460,7 +460,7 @@ public class OrganizationServiceTests await sutProvider.GetDependency().Received(1) .BulkSendOrganizationInviteEmailAsync(organization.Name, - Arg.Is>(v => v.Count() == invites.SelectMany(i => i.invite.Emails).Count())); + Arg.Is>(v => v.Count() == invites.SelectMany(i => i.invite.Emails).Count()), organization.PlanType == PlanType.Free); await sutProvider.GetDependency().Received(1).LogOrganizationUserEventsAsync(Arg.Any>()); } @@ -494,7 +494,7 @@ public class OrganizationServiceTests await sutProvider.GetDependency().Received(1) .BulkSendOrganizationInviteEmailAsync(organization.Name, - Arg.Is>(v => v.Count() == invites.SelectMany(i => i.invite.Emails).Count())); + Arg.Is>(v => v.Count() == invites.SelectMany(i => i.invite.Emails).Count()), organization.PlanType == PlanType.Free); await sutProvider.GetDependency().Received(1).LogOrganizationUserEventsAsync(Arg.Any>()); } diff --git a/test/Core.Test/packages.lock.json b/test/Core.Test/packages.lock.json index 327a197e54..606589472b 100644 --- a/test/Core.Test/packages.lock.json +++ b/test/Core.Test/packages.lock.json @@ -2860,55 +2860,55 @@ "common": { "type": "Project", "dependencies": { - "AutoFixture.AutoNSubstitute": "[4.17.0, )", - "AutoFixture.Xunit2": "[4.17.0, )", - "Core": "[2023.2.0, )", - "Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )", - "Microsoft.NET.Test.Sdk": "[17.1.0, )", - "NSubstitute": "[4.3.0, )", - "xunit": "[2.4.1, )" + "AutoFixture.AutoNSubstitute": "4.17.0", + "AutoFixture.Xunit2": "4.17.0", + "Core": "2023.2.2", + "Kralizek.AutoFixture.Extensions.MockHttp": "1.2.0", + "Microsoft.NET.Test.Sdk": "17.1.0", + "NSubstitute": "4.3.0", + "xunit": "2.4.1" } }, "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } } } diff --git a/test/Icons.Test/packages.lock.json b/test/Icons.Test/packages.lock.json index 478c923df3..629734e979 100644 --- a/test/Icons.Test/packages.lock.json +++ b/test/Icons.Test/packages.lock.json @@ -2966,79 +2966,79 @@ "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } }, "icons": { "type": "Project", "dependencies": { - "AngleSharp": "[0.16.1, )", - "Core": "[2023.2.0, )", - "SharedWeb": "[2023.2.0, )" + "AngleSharp": "0.16.1", + "Core": "2023.2.2", + "SharedWeb": "2023.2.2" } }, "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Dapper": "[2.0.123, )" + "Core": "2023.2.2", + "Dapper": "2.0.123" } }, "infrastructure.entityframework": { "type": "Project", "dependencies": { - "AutoMapper.Extensions.Microsoft.DependencyInjection": "[11.0.0, )", - "Core": "[2023.2.0, )", - "Microsoft.EntityFrameworkCore.Relational": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.SqlServer": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.Sqlite": "[6.0.12, )", - "Npgsql.EntityFrameworkCore.PostgreSQL": "[6.0.8, )", - "Pomelo.EntityFrameworkCore.MySql": "[6.0.2, )", - "linq2db.EntityFrameworkCore": "[6.11.0, )" + "AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0", + "Core": "2023.2.2", + "Microsoft.EntityFrameworkCore.Relational": "6.0.12", + "Microsoft.EntityFrameworkCore.SqlServer": "6.0.12", + "Microsoft.EntityFrameworkCore.Sqlite": "6.0.12", + "Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.8", + "Pomelo.EntityFrameworkCore.MySql": "6.0.2", + "linq2db.EntityFrameworkCore": "6.11.0" } }, "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Infrastructure.Dapper": "[2023.2.0, )", - "Infrastructure.EntityFramework": "[2023.2.0, )" + "Core": "2023.2.2", + "Infrastructure.Dapper": "2023.2.2", + "Infrastructure.EntityFramework": "2023.2.2" } } } diff --git a/test/Identity.IntegrationTest/packages.lock.json b/test/Identity.IntegrationTest/packages.lock.json index 46ed51957f..02a89dae3f 100644 --- a/test/Identity.IntegrationTest/packages.lock.json +++ b/test/Identity.IntegrationTest/packages.lock.json @@ -3179,101 +3179,101 @@ "common": { "type": "Project", "dependencies": { - "AutoFixture.AutoNSubstitute": "[4.17.0, )", - "AutoFixture.Xunit2": "[4.17.0, )", - "Core": "[2023.2.0, )", - "Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )", - "Microsoft.NET.Test.Sdk": "[17.1.0, )", - "NSubstitute": "[4.3.0, )", - "xunit": "[2.4.1, )" + "AutoFixture.AutoNSubstitute": "4.17.0", + "AutoFixture.Xunit2": "4.17.0", + "Core": "2023.2.2", + "Kralizek.AutoFixture.Extensions.MockHttp": "1.2.0", + "Microsoft.NET.Test.Sdk": "17.1.0", + "NSubstitute": "4.3.0", + "xunit": "2.4.1" } }, "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } }, "identity": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "SharedWeb": "[2023.2.0, )", - "Swashbuckle.AspNetCore.SwaggerGen": "[6.5.0, )" + "Core": "2023.2.2", + "SharedWeb": "2023.2.2", + "Swashbuckle.AspNetCore.SwaggerGen": "6.5.0" } }, "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Dapper": "[2.0.123, )" + "Core": "2023.2.2", + "Dapper": "2.0.123" } }, "infrastructure.entityframework": { "type": "Project", "dependencies": { - "AutoMapper.Extensions.Microsoft.DependencyInjection": "[11.0.0, )", - "Core": "[2023.2.0, )", - "Microsoft.EntityFrameworkCore.Relational": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.SqlServer": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.Sqlite": "[6.0.12, )", - "Npgsql.EntityFrameworkCore.PostgreSQL": "[6.0.8, )", - "Pomelo.EntityFrameworkCore.MySql": "[6.0.2, )", - "linq2db.EntityFrameworkCore": "[6.11.0, )" + "AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0", + "Core": "2023.2.2", + "Microsoft.EntityFrameworkCore.Relational": "6.0.12", + "Microsoft.EntityFrameworkCore.SqlServer": "6.0.12", + "Microsoft.EntityFrameworkCore.Sqlite": "6.0.12", + "Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.8", + "Pomelo.EntityFrameworkCore.MySql": "6.0.2", + "linq2db.EntityFrameworkCore": "6.11.0" } }, "integrationtestcommon": { "type": "Project", "dependencies": { - "Common": "[2023.2.0, )", - "Identity": "[2023.2.0, )", - "Microsoft.AspNetCore.Mvc.Testing": "[6.0.5, )", - "Microsoft.EntityFrameworkCore.InMemory": "[6.0.5, )", - "Microsoft.Extensions.Configuration": "[6.0.1, )" + "Common": "2023.2.2", + "Identity": "2023.2.2", + "Microsoft.AspNetCore.Mvc.Testing": "6.0.5", + "Microsoft.EntityFrameworkCore.InMemory": "6.0.5", + "Microsoft.Extensions.Configuration": "6.0.1" } }, "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Infrastructure.Dapper": "[2023.2.0, )", - "Infrastructure.EntityFramework": "[2023.2.0, )" + "Core": "2023.2.2", + "Infrastructure.Dapper": "2023.2.2", + "Infrastructure.EntityFramework": "2023.2.2" } } } diff --git a/test/Identity.Test/packages.lock.json b/test/Identity.Test/packages.lock.json index c4392c5417..2e24001ff4 100644 --- a/test/Identity.Test/packages.lock.json +++ b/test/Identity.Test/packages.lock.json @@ -3046,91 +3046,91 @@ "common": { "type": "Project", "dependencies": { - "AutoFixture.AutoNSubstitute": "[4.17.0, )", - "AutoFixture.Xunit2": "[4.17.0, )", - "Core": "[2023.2.0, )", - "Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )", - "Microsoft.NET.Test.Sdk": "[17.1.0, )", - "NSubstitute": "[4.3.0, )", - "xunit": "[2.4.1, )" + "AutoFixture.AutoNSubstitute": "4.17.0", + "AutoFixture.Xunit2": "4.17.0", + "Core": "2023.2.2", + "Kralizek.AutoFixture.Extensions.MockHttp": "1.2.0", + "Microsoft.NET.Test.Sdk": "17.1.0", + "NSubstitute": "4.3.0", + "xunit": "2.4.1" } }, "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } }, "identity": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "SharedWeb": "[2023.2.0, )", - "Swashbuckle.AspNetCore.SwaggerGen": "[6.5.0, )" + "Core": "2023.2.2", + "SharedWeb": "2023.2.2", + "Swashbuckle.AspNetCore.SwaggerGen": "6.5.0" } }, "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Dapper": "[2.0.123, )" + "Core": "2023.2.2", + "Dapper": "2.0.123" } }, "infrastructure.entityframework": { "type": "Project", "dependencies": { - "AutoMapper.Extensions.Microsoft.DependencyInjection": "[11.0.0, )", - "Core": "[2023.2.0, )", - "Microsoft.EntityFrameworkCore.Relational": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.SqlServer": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.Sqlite": "[6.0.12, )", - "Npgsql.EntityFrameworkCore.PostgreSQL": "[6.0.8, )", - "Pomelo.EntityFrameworkCore.MySql": "[6.0.2, )", - "linq2db.EntityFrameworkCore": "[6.11.0, )" + "AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0", + "Core": "2023.2.2", + "Microsoft.EntityFrameworkCore.Relational": "6.0.12", + "Microsoft.EntityFrameworkCore.SqlServer": "6.0.12", + "Microsoft.EntityFrameworkCore.Sqlite": "6.0.12", + "Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.8", + "Pomelo.EntityFrameworkCore.MySql": "6.0.2", + "linq2db.EntityFrameworkCore": "6.11.0" } }, "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Infrastructure.Dapper": "[2023.2.0, )", - "Infrastructure.EntityFramework": "[2023.2.0, )" + "Core": "2023.2.2", + "Infrastructure.Dapper": "2023.2.2", + "Infrastructure.EntityFramework": "2023.2.2" } } } diff --git a/test/Infrastructure.EFIntegration.Test/Repositories/EqualityComparers/AuthRequestCompare.cs b/test/Infrastructure.EFIntegration.Test/Repositories/EqualityComparers/AuthRequestCompare.cs index bbe2b14e88..c881662dbd 100644 --- a/test/Infrastructure.EFIntegration.Test/Repositories/EqualityComparers/AuthRequestCompare.cs +++ b/test/Infrastructure.EFIntegration.Test/Repositories/EqualityComparers/AuthRequestCompare.cs @@ -12,8 +12,7 @@ public class AuthRequestCompare : IEqualityComparer x.PublicKey == y.PublicKey && x.RequestDeviceIdentifier == y.RequestDeviceIdentifier && x.RequestDeviceType == y.RequestDeviceType && - x.RequestIpAddress == y.RequestIpAddress && - x.RequestFingerprint == y.RequestFingerprint; + x.RequestIpAddress == y.RequestIpAddress; } public int GetHashCode([DisallowNull] AuthRequest obj) diff --git a/test/Infrastructure.EFIntegration.Test/packages.lock.json b/test/Infrastructure.EFIntegration.Test/packages.lock.json index fbfc4eeeac..7acbf801e9 100644 --- a/test/Infrastructure.EFIntegration.Test/packages.lock.json +++ b/test/Infrastructure.EFIntegration.Test/packages.lock.json @@ -3036,89 +3036,89 @@ "common": { "type": "Project", "dependencies": { - "AutoFixture.AutoNSubstitute": "[4.17.0, )", - "AutoFixture.Xunit2": "[4.17.0, )", - "Core": "[2023.2.0, )", - "Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )", - "Microsoft.NET.Test.Sdk": "[17.1.0, )", - "NSubstitute": "[4.3.0, )", - "xunit": "[2.4.1, )" + "AutoFixture.AutoNSubstitute": "4.17.0", + "AutoFixture.Xunit2": "4.17.0", + "Core": "2023.2.2", + "Kralizek.AutoFixture.Extensions.MockHttp": "1.2.0", + "Microsoft.NET.Test.Sdk": "17.1.0", + "NSubstitute": "4.3.0", + "xunit": "2.4.1" } }, "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } }, "core.test": { "type": "Project", "dependencies": { - "AutoFixture.AutoNSubstitute": "[4.17.0, )", - "AutoFixture.Xunit2": "[4.17.0, )", - "Common": "[2023.2.0, )", - "Core": "[2023.2.0, )", - "Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )", - "Microsoft.NET.Test.Sdk": "[17.1.0, )", - "Moq": "[4.17.2, )", - "NSubstitute": "[4.3.0, )", - "xunit": "[2.4.1, )" + "AutoFixture.AutoNSubstitute": "4.17.0", + "AutoFixture.Xunit2": "4.17.0", + "Common": "2023.2.2", + "Core": "2023.2.2", + "Kralizek.AutoFixture.Extensions.MockHttp": "1.2.0", + "Microsoft.NET.Test.Sdk": "17.1.0", + "Moq": "4.17.2", + "NSubstitute": "4.3.0", + "xunit": "2.4.1" } }, "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Dapper": "[2.0.123, )" + "Core": "2023.2.2", + "Dapper": "2.0.123" } }, "infrastructure.entityframework": { "type": "Project", "dependencies": { - "AutoMapper.Extensions.Microsoft.DependencyInjection": "[11.0.0, )", - "Core": "[2023.2.0, )", - "Microsoft.EntityFrameworkCore.Relational": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.SqlServer": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.Sqlite": "[6.0.12, )", - "Npgsql.EntityFrameworkCore.PostgreSQL": "[6.0.8, )", - "Pomelo.EntityFrameworkCore.MySql": "[6.0.2, )", - "linq2db.EntityFrameworkCore": "[6.11.0, )" + "AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0", + "Core": "2023.2.2", + "Microsoft.EntityFrameworkCore.Relational": "6.0.12", + "Microsoft.EntityFrameworkCore.SqlServer": "6.0.12", + "Microsoft.EntityFrameworkCore.Sqlite": "6.0.12", + "Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.8", + "Pomelo.EntityFrameworkCore.MySql": "6.0.2", + "linq2db.EntityFrameworkCore": "6.11.0" } } } diff --git a/test/Infrastructure.IntegrationTest/DatabaseDataAttribute.cs b/test/Infrastructure.IntegrationTest/DatabaseDataAttribute.cs index 0f47a0e693..15d13db1c4 100644 --- a/test/Infrastructure.IntegrationTest/DatabaseDataAttribute.cs +++ b/test/Infrastructure.IntegrationTest/DatabaseDataAttribute.cs @@ -2,6 +2,7 @@ using Bit.Core.Enums; using Bit.Core.Settings; using Bit.Infrastructure.Dapper; +using Bit.Infrastructure.EntityFramework; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; diff --git a/test/Infrastructure.IntegrationTest/packages.lock.json b/test/Infrastructure.IntegrationTest/packages.lock.json index c69c91304c..e809cd71b8 100644 --- a/test/Infrastructure.IntegrationTest/packages.lock.json +++ b/test/Infrastructure.IntegrationTest/packages.lock.json @@ -2896,63 +2896,63 @@ "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } }, "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Dapper": "[2.0.123, )" + "Core": "2023.2.2", + "Dapper": "2.0.123" } }, "infrastructure.entityframework": { "type": "Project", "dependencies": { - "AutoMapper.Extensions.Microsoft.DependencyInjection": "[11.0.0, )", - "Core": "[2023.2.0, )", - "Microsoft.EntityFrameworkCore.Relational": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.SqlServer": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.Sqlite": "[6.0.12, )", - "Npgsql.EntityFrameworkCore.PostgreSQL": "[6.0.8, )", - "Pomelo.EntityFrameworkCore.MySql": "[6.0.2, )", - "linq2db.EntityFrameworkCore": "[6.11.0, )" + "AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0", + "Core": "2023.2.2", + "Microsoft.EntityFrameworkCore.Relational": "6.0.12", + "Microsoft.EntityFrameworkCore.SqlServer": "6.0.12", + "Microsoft.EntityFrameworkCore.Sqlite": "6.0.12", + "Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.8", + "Pomelo.EntityFrameworkCore.MySql": "6.0.2", + "linq2db.EntityFrameworkCore": "6.11.0" } } } diff --git a/test/IntegrationTestCommon/packages.lock.json b/test/IntegrationTestCommon/packages.lock.json index 80b81c6521..3d45a0388d 100644 --- a/test/IntegrationTestCommon/packages.lock.json +++ b/test/IntegrationTestCommon/packages.lock.json @@ -3165,91 +3165,91 @@ "common": { "type": "Project", "dependencies": { - "AutoFixture.AutoNSubstitute": "[4.17.0, )", - "AutoFixture.Xunit2": "[4.17.0, )", - "Core": "[2023.2.0, )", - "Kralizek.AutoFixture.Extensions.MockHttp": "[1.2.0, )", - "Microsoft.NET.Test.Sdk": "[17.1.0, )", - "NSubstitute": "[4.3.0, )", - "xunit": "[2.4.1, )" + "AutoFixture.AutoNSubstitute": "4.17.0", + "AutoFixture.Xunit2": "4.17.0", + "Core": "2023.2.2", + "Kralizek.AutoFixture.Extensions.MockHttp": "1.2.0", + "Microsoft.NET.Test.Sdk": "17.1.0", + "NSubstitute": "4.3.0", + "xunit": "2.4.1" } }, "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } }, "identity": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "SharedWeb": "[2023.2.0, )", - "Swashbuckle.AspNetCore.SwaggerGen": "[6.5.0, )" + "Core": "2023.2.2", + "SharedWeb": "2023.2.2", + "Swashbuckle.AspNetCore.SwaggerGen": "6.5.0" } }, "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Dapper": "[2.0.123, )" + "Core": "2023.2.2", + "Dapper": "2.0.123" } }, "infrastructure.entityframework": { "type": "Project", "dependencies": { - "AutoMapper.Extensions.Microsoft.DependencyInjection": "[11.0.0, )", - "Core": "[2023.2.0, )", - "Microsoft.EntityFrameworkCore.Relational": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.SqlServer": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.Sqlite": "[6.0.12, )", - "Npgsql.EntityFrameworkCore.PostgreSQL": "[6.0.8, )", - "Pomelo.EntityFrameworkCore.MySql": "[6.0.2, )", - "linq2db.EntityFrameworkCore": "[6.11.0, )" + "AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0", + "Core": "2023.2.2", + "Microsoft.EntityFrameworkCore.Relational": "6.0.12", + "Microsoft.EntityFrameworkCore.SqlServer": "6.0.12", + "Microsoft.EntityFrameworkCore.Sqlite": "6.0.12", + "Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.8", + "Pomelo.EntityFrameworkCore.MySql": "6.0.2", + "linq2db.EntityFrameworkCore": "6.11.0" } }, "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Infrastructure.Dapper": "[2023.2.0, )", - "Infrastructure.EntityFramework": "[2023.2.0, )" + "Core": "2023.2.2", + "Infrastructure.Dapper": "2023.2.2", + "Infrastructure.EntityFramework": "2023.2.2" } } } diff --git a/util/Migrator/DbScripts/2023-03-15_AuthRequestRemoveFingerprintPhrase.sql b/util/Migrator/DbScripts/2023-03-15_AuthRequestRemoveFingerprintPhrase.sql new file mode 100644 index 0000000000..883f0836fd --- /dev/null +++ b/util/Migrator/DbScripts/2023-03-15_AuthRequestRemoveFingerprintPhrase.sql @@ -0,0 +1,140 @@ +-- Description: Remove RequestFingerprint column from AuthRequest table and recreate view and stored procedures without it. +IF COL_LENGTH('[dbo].[AuthRequest]', 'RequestFingerprint') IS NOT NULL + BEGIN + ALTER TABLE + [dbo].[AuthRequest] + DROP COLUMN + [RequestFingerprint] + END +GO + +-- Drop and recreate view +IF EXISTS(SELECT * FROM sys.views WHERE [Name] = 'AuthRequestView') + BEGIN + DROP VIEW [dbo].[AuthRequestView] + END +GO + +CREATE VIEW [dbo].[AuthRequestView] +AS +SELECT + * +FROM + [dbo].[AuthRequest] +GO + +--Drop existing SPROC +IF OBJECT_ID('[dbo].[AuthRequest_Update]') IS NOT NULL + BEGIN + DROP PROCEDURE [dbo].[AuthRequest_Update] + END +GO + +--Create SPROC without RequestFingerprint column +CREATE PROCEDURE [dbo].[AuthRequest_Update] + @Id UNIQUEIDENTIFIER OUTPUT, + @UserId UNIQUEIDENTIFIER, + @Type SMALLINT, + @RequestDeviceIdentifier NVARCHAR(50), + @RequestDeviceType SMALLINT, + @RequestIpAddress VARCHAR(50), + @ResponseDeviceId UNIQUEIDENTIFIER, + @AccessCode VARCHAR(25), + @PublicKey VARCHAR(MAX), + @Key VARCHAR(MAX), + @MasterPasswordHash VARCHAR(MAX), + @Approved BIT, + @CreationDate DATETIME2 (7), + @ResponseDate DATETIME2 (7), + @AuthenticationDate DATETIME2 (7) +AS +BEGIN + SET NOCOUNT ON + +UPDATE + [dbo].[AuthRequest] +SET + [UserId] = @UserId, + [Type] = @Type, + [RequestDeviceIdentifier] = @RequestDeviceIdentifier, + [RequestDeviceType] = @RequestDeviceType, + [RequestIpAddress] = @RequestIpAddress, + [ResponseDeviceId] = @ResponseDeviceId, + [AccessCode] = @AccessCode, + [PublicKey] = @PublicKey, + [Key] = @Key, + [MasterPasswordHash] = @MasterPasswordHash, + [Approved] = @Approved, + [CreationDate] = @CreationDate, + [ResponseDate] = @ResponseDate, + [AuthenticationDate] = @AuthenticationDate +WHERE + [Id] = @Id +END +GO + +--Drop existing SPROC +IF OBJECT_ID('[dbo].[AuthRequest_Create]') IS NOT NULL +BEGIN + DROP PROCEDURE [dbo].[AuthRequest_Create] +END +GO + +--Create SPROC without RequestFingerprint column +CREATE PROCEDURE [dbo].[AuthRequest_Create] + @Id UNIQUEIDENTIFIER OUTPUT, + @UserId UNIQUEIDENTIFIER, + @Type TINYINT, + @RequestDeviceIdentifier NVARCHAR(50), + @RequestDeviceType TINYINT, + @RequestIpAddress VARCHAR(50), + @ResponseDeviceId UNIQUEIDENTIFIER, + @AccessCode VARCHAR(25), + @PublicKey VARCHAR(MAX), + @Key VARCHAR(MAX), + @MasterPasswordHash VARCHAR(MAX), + @Approved BIT, + @CreationDate DATETIME2(7), + @ResponseDate DATETIME2(7), + @AuthenticationDate DATETIME2(7) +AS +BEGIN + SET NOCOUNT ON + + INSERT INTO [dbo].[AuthRequest] + ( + [Id], + [UserId], + [Type], + [RequestDeviceIdentifier], + [RequestDeviceType], + [RequestIpAddress], + [ResponseDeviceId], + [AccessCode], + [PublicKey], + [Key], + [MasterPasswordHash], + [Approved], + [CreationDate], + [ResponseDate], + [AuthenticationDate] + ) + VALUES + ( + @Id, + @UserId, + @Type, + @RequestDeviceIdentifier, + @RequestDeviceType, + @RequestIpAddress, + @ResponseDeviceId, + @AccessCode, + @PublicKey, + @Key, + @MasterPasswordHash, + @Approved, + @CreationDate, + @ResponseDate, + @AuthenticationDate + ) +END \ No newline at end of file diff --git a/util/Migrator/packages.lock.json b/util/Migrator/packages.lock.json index d4d5971108..06fdab8bfe 100644 --- a/util/Migrator/packages.lock.json +++ b/util/Migrator/packages.lock.json @@ -2695,43 +2695,43 @@ "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } } } diff --git a/util/MsSqlMigratorUtility/MsSqlMigratorUtility.csproj b/util/MsSqlMigratorUtility/MsSqlMigratorUtility.csproj index 8fc5fcaeb1..0e423b150d 100644 --- a/util/MsSqlMigratorUtility/MsSqlMigratorUtility.csproj +++ b/util/MsSqlMigratorUtility/MsSqlMigratorUtility.csproj @@ -2,6 +2,7 @@ Exe + true @@ -12,4 +13,5 @@ + diff --git a/util/MsSqlMigratorUtility/packages.lock.json b/util/MsSqlMigratorUtility/packages.lock.json index 3ee9a8fc95..5959ca3b9c 100644 --- a/util/MsSqlMigratorUtility/packages.lock.json +++ b/util/MsSqlMigratorUtility/packages.lock.json @@ -2724,51 +2724,51 @@ "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } }, "migrator": { "type": "Project", "dependencies": { - "Core": "[2023.2.1, )", - "Microsoft.Extensions.Logging": "[6.0.0, )", - "dbup-sqlserver": "[5.0.8, )" + "Core": "2023.2.2", + "Microsoft.Extensions.Logging": "6.0.0", + "dbup-sqlserver": "5.0.8" } } } diff --git a/util/MySqlMigrations/packages.lock.json b/util/MySqlMigrations/packages.lock.json index 7273cd36ef..167d63318f 100644 --- a/util/MySqlMigrations/packages.lock.json +++ b/util/MySqlMigrations/packages.lock.json @@ -2791,56 +2791,56 @@ "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } }, "infrastructure.entityframework": { "type": "Project", "dependencies": { - "AutoMapper.Extensions.Microsoft.DependencyInjection": "[11.0.0, )", - "Core": "[2023.2.0, )", - "Microsoft.EntityFrameworkCore.Relational": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.SqlServer": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.Sqlite": "[6.0.12, )", - "Npgsql.EntityFrameworkCore.PostgreSQL": "[6.0.8, )", - "Pomelo.EntityFrameworkCore.MySql": "[6.0.2, )", - "linq2db.EntityFrameworkCore": "[6.11.0, )" + "AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0", + "Core": "2023.2.2", + "Microsoft.EntityFrameworkCore.Relational": "6.0.12", + "Microsoft.EntityFrameworkCore.SqlServer": "6.0.12", + "Microsoft.EntityFrameworkCore.Sqlite": "6.0.12", + "Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.8", + "Pomelo.EntityFrameworkCore.MySql": "6.0.2", + "linq2db.EntityFrameworkCore": "6.11.0" } } } diff --git a/util/PostgresMigrations/Migrations/20230315121250_AuthRequestRemoveFingerprintPhrase.Designer.cs b/util/PostgresMigrations/Migrations/20230315121250_AuthRequestRemoveFingerprintPhrase.Designer.cs new file mode 100644 index 0000000000..5b89796a47 --- /dev/null +++ b/util/PostgresMigrations/Migrations/20230315121250_AuthRequestRemoveFingerprintPhrase.Designer.cs @@ -0,0 +1,2198 @@ +// +using System; +using Bit.Infrastructure.EntityFramework.Repositories; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace Bit.PostgresMigrations.Migrations +{ + [DbContext(typeof(DatabaseContext))] + [Migration("20230315121250_AuthRequestRemoveFingerprintPhrase")] + partial class AuthRequestRemoveFingerprintPhrase + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:CollationDefinition:postgresIndetermanisticCollation", "en-u-ks-primary,en-u-ks-primary,icu,False") + .HasAnnotation("ProductVersion", "6.0.12") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.AuthRequest", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccessCode") + .HasMaxLength(25) + .HasColumnType("character varying(25)"); + + b.Property("Approved") + .HasColumnType("boolean"); + + b.Property("AuthenticationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Key") + .HasColumnType("text"); + + b.Property("MasterPasswordHash") + .HasColumnType("text"); + + b.Property("PublicKey") + .HasColumnType("text"); + + b.Property("RequestDeviceIdentifier") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("RequestDeviceType") + .HasColumnType("smallint"); + + b.Property("RequestIpAddress") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("ResponseDate") + .HasColumnType("timestamp with time zone"); + + b.Property("ResponseDeviceId") + .HasColumnType("uuid"); + + b.Property("Type") + .HasColumnType("smallint"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("ResponseDeviceId"); + + b.HasIndex("UserId"); + + b.ToTable("AuthRequest", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Collection", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("ExternalId") + .HasMaxLength(300) + .HasColumnType("character varying(300)"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("OrganizationId") + .HasColumnType("uuid"); + + b.Property("RevisionDate") + .HasColumnType("timestamp with time zone"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.ToTable("Collection", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.CollectionCipher", b => + { + b.Property("CollectionId") + .HasColumnType("uuid"); + + b.Property("CipherId") + .HasColumnType("uuid"); + + b.HasKey("CollectionId", "CipherId"); + + b.HasIndex("CipherId"); + + b.ToTable("CollectionCipher", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.CollectionGroup", b => + { + b.Property("CollectionId") + .HasColumnType("uuid"); + + b.Property("GroupId") + .HasColumnType("uuid"); + + b.Property("HidePasswords") + .HasColumnType("boolean"); + + b.Property("ReadOnly") + .HasColumnType("boolean"); + + b.HasKey("CollectionId", "GroupId"); + + b.HasIndex("GroupId"); + + b.ToTable("CollectionGroups"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.CollectionUser", b => + { + b.Property("CollectionId") + .HasColumnType("uuid"); + + b.Property("OrganizationUserId") + .HasColumnType("uuid"); + + b.Property("HidePasswords") + .HasColumnType("boolean"); + + b.Property("ReadOnly") + .HasColumnType("boolean"); + + b.HasKey("CollectionId", "OrganizationUserId"); + + b.HasIndex("OrganizationUserId"); + + b.ToTable("CollectionUsers"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Device", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Identifier") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("Name") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("PushToken") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("RevisionDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Type") + .HasColumnType("smallint"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("Device", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.EmergencyAccess", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Email") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("GranteeId") + .HasColumnType("uuid"); + + b.Property("GrantorId") + .HasColumnType("uuid"); + + b.Property("KeyEncrypted") + .HasColumnType("text"); + + b.Property("LastNotificationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("RecoveryInitiatedDate") + .HasColumnType("timestamp with time zone"); + + b.Property("RevisionDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Status") + .HasColumnType("smallint"); + + b.Property("Type") + .HasColumnType("smallint"); + + b.Property("WaitTimeDays") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("GranteeId"); + + b.HasIndex("GrantorId"); + + b.ToTable("EmergencyAccess", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Event", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ActingUserId") + .HasColumnType("uuid"); + + b.Property("CipherId") + .HasColumnType("uuid"); + + b.Property("CollectionId") + .HasColumnType("uuid"); + + b.Property("Date") + .HasColumnType("timestamp with time zone"); + + b.Property("DeviceType") + .HasColumnType("smallint"); + + b.Property("DomainName") + .HasColumnType("text"); + + b.Property("GroupId") + .HasColumnType("uuid"); + + b.Property("InstallationId") + .HasColumnType("uuid"); + + b.Property("IpAddress") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("OrganizationId") + .HasColumnType("uuid"); + + b.Property("OrganizationUserId") + .HasColumnType("uuid"); + + b.Property("PolicyId") + .HasColumnType("uuid"); + + b.Property("ProviderId") + .HasColumnType("uuid"); + + b.Property("ProviderOrganizationId") + .HasColumnType("uuid"); + + b.Property("ProviderUserId") + .HasColumnType("uuid"); + + b.Property("SecretId") + .HasColumnType("uuid"); + + b.Property("ServiceAccountId") + .HasColumnType("uuid"); + + b.Property("SystemUser") + .HasColumnType("smallint"); + + b.Property("Type") + .HasColumnType("integer"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.ToTable("Event", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Grant", b => + { + b.Property("Key") + .HasMaxLength(200) + .HasColumnType("character varying(200)"); + + b.Property("ClientId") + .HasMaxLength(200) + .HasColumnType("character varying(200)"); + + b.Property("ConsumedDate") + .HasColumnType("timestamp with time zone"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Data") + .HasColumnType("text"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("character varying(200)"); + + b.Property("ExpirationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("SessionId") + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("SubjectId") + .HasMaxLength(200) + .HasColumnType("character varying(200)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.HasKey("Key"); + + b.ToTable("Grant", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Group", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccessAll") + .HasColumnType("boolean"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("ExternalId") + .HasMaxLength(300) + .HasColumnType("character varying(300)"); + + b.Property("Name") + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("OrganizationId") + .HasColumnType("uuid"); + + b.Property("RevisionDate") + .HasColumnType("timestamp with time zone"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.ToTable("Group", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.GroupUser", b => + { + b.Property("GroupId") + .HasColumnType("uuid"); + + b.Property("OrganizationUserId") + .HasColumnType("uuid"); + + b.HasKey("GroupId", "OrganizationUserId"); + + b.HasIndex("OrganizationUserId"); + + b.ToTable("GroupUser", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Installation", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Email") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("Enabled") + .HasColumnType("boolean"); + + b.Property("Key") + .HasMaxLength(150) + .HasColumnType("character varying(150)"); + + b.HasKey("Id"); + + b.ToTable("Installation", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Organization", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("BillingEmail") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("BusinessAddress1") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("BusinessAddress2") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("BusinessAddress3") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("BusinessCountry") + .HasMaxLength(2) + .HasColumnType("character varying(2)"); + + b.Property("BusinessName") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("BusinessTaxNumber") + .HasMaxLength(30) + .HasColumnType("character varying(30)"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Enabled") + .HasColumnType("boolean"); + + b.Property("ExpirationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Gateway") + .HasColumnType("smallint"); + + b.Property("GatewayCustomerId") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("GatewaySubscriptionId") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("Identifier") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .UseCollation("postgresIndetermanisticCollation"); + + b.Property("LicenseKey") + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("MaxAutoscaleSeats") + .HasColumnType("integer"); + + b.Property("MaxCollections") + .HasColumnType("smallint"); + + b.Property("MaxStorageGb") + .HasColumnType("smallint"); + + b.Property("Name") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("OwnersNotifiedOfAutoscaling") + .HasColumnType("timestamp with time zone"); + + b.Property("Plan") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("PlanType") + .HasColumnType("smallint"); + + b.Property("PrivateKey") + .HasColumnType("text"); + + b.Property("PublicKey") + .HasColumnType("text"); + + b.Property("ReferenceData") + .HasColumnType("text"); + + b.Property("RevisionDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Seats") + .HasColumnType("integer"); + + b.Property("SelfHost") + .HasColumnType("boolean"); + + b.Property("Storage") + .HasColumnType("bigint"); + + b.Property("TwoFactorProviders") + .HasColumnType("text"); + + b.Property("Use2fa") + .HasColumnType("boolean"); + + b.Property("UseApi") + .HasColumnType("boolean"); + + b.Property("UseCustomPermissions") + .HasColumnType("boolean"); + + b.Property("UseDirectory") + .HasColumnType("boolean"); + + b.Property("UseEvents") + .HasColumnType("boolean"); + + b.Property("UseGroups") + .HasColumnType("boolean"); + + b.Property("UseKeyConnector") + .HasColumnType("boolean"); + + b.Property("UsePolicies") + .HasColumnType("boolean"); + + b.Property("UseResetPassword") + .HasColumnType("boolean"); + + b.Property("UseScim") + .HasColumnType("boolean"); + + b.Property("UseSecretsManager") + .HasColumnType("boolean"); + + b.Property("UseSso") + .HasColumnType("boolean"); + + b.Property("UseTotp") + .HasColumnType("boolean"); + + b.Property("UsersGetPremium") + .HasColumnType("boolean"); + + b.HasKey("Id"); + + b.ToTable("Organization", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationApiKey", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApiKey") + .HasMaxLength(30) + .HasColumnType("character varying(30)"); + + b.Property("OrganizationId") + .HasColumnType("uuid"); + + b.Property("RevisionDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Type") + .HasColumnType("smallint"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.ToTable("OrganizationApiKey", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationConnection", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Config") + .HasColumnType("text"); + + b.Property("Enabled") + .HasColumnType("boolean"); + + b.Property("OrganizationId") + .HasColumnType("uuid"); + + b.Property("Type") + .HasColumnType("smallint"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.ToTable("OrganizationConnection", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationDomain", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("DomainName") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("JobRunCount") + .HasColumnType("integer"); + + b.Property("LastCheckedDate") + .HasColumnType("timestamp with time zone"); + + b.Property("NextRunDate") + .HasColumnType("timestamp with time zone"); + + b.Property("OrganizationId") + .HasColumnType("uuid"); + + b.Property("Txt") + .HasColumnType("text"); + + b.Property("VerifiedDate") + .HasColumnType("timestamp with time zone"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.ToTable("OrganizationDomain", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationSponsorship", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("FriendlyName") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("LastSyncDate") + .HasColumnType("timestamp with time zone"); + + b.Property("OfferedToEmail") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("PlanSponsorshipType") + .HasColumnType("smallint"); + + b.Property("SponsoredOrganizationId") + .HasColumnType("uuid"); + + b.Property("SponsoringOrganizationId") + .HasColumnType("uuid"); + + b.Property("SponsoringOrganizationUserId") + .HasColumnType("uuid"); + + b.Property("ToDelete") + .HasColumnType("boolean"); + + b.Property("ValidUntil") + .HasColumnType("timestamp with time zone"); + + b.HasKey("Id"); + + b.HasIndex("SponsoredOrganizationId"); + + b.HasIndex("SponsoringOrganizationId"); + + b.ToTable("OrganizationSponsorship", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationUser", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccessAll") + .HasColumnType("boolean"); + + b.Property("AccessSecretsManager") + .HasColumnType("boolean"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Email") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExternalId") + .HasMaxLength(300) + .HasColumnType("character varying(300)"); + + b.Property("Key") + .HasColumnType("text"); + + b.Property("OrganizationId") + .HasColumnType("uuid"); + + b.Property("Permissions") + .HasColumnType("text"); + + b.Property("ResetPasswordKey") + .HasColumnType("text"); + + b.Property("RevisionDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Status") + .HasColumnType("smallint"); + + b.Property("Type") + .HasColumnType("smallint"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("UserId"); + + b.ToTable("OrganizationUser", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Policy", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Data") + .HasColumnType("text"); + + b.Property("Enabled") + .HasColumnType("boolean"); + + b.Property("OrganizationId") + .HasColumnType("uuid"); + + b.Property("RevisionDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Type") + .HasColumnType("smallint"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.ToTable("Policy", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Provider", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("BillingEmail") + .HasColumnType("text"); + + b.Property("BillingPhone") + .HasColumnType("text"); + + b.Property("BusinessAddress1") + .HasColumnType("text"); + + b.Property("BusinessAddress2") + .HasColumnType("text"); + + b.Property("BusinessAddress3") + .HasColumnType("text"); + + b.Property("BusinessCountry") + .HasColumnType("text"); + + b.Property("BusinessName") + .HasColumnType("text"); + + b.Property("BusinessTaxNumber") + .HasColumnType("text"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Enabled") + .HasColumnType("boolean"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("RevisionDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Status") + .HasColumnType("smallint"); + + b.Property("Type") + .HasColumnType("smallint"); + + b.Property("UseEvents") + .HasColumnType("boolean"); + + b.HasKey("Id"); + + b.ToTable("Provider", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.ProviderOrganization", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Key") + .HasColumnType("text"); + + b.Property("OrganizationId") + .HasColumnType("uuid"); + + b.Property("ProviderId") + .HasColumnType("uuid"); + + b.Property("RevisionDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Settings") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("ProviderId"); + + b.ToTable("ProviderOrganization", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.ProviderUser", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Email") + .HasColumnType("text"); + + b.Property("Key") + .HasColumnType("text"); + + b.Property("Permissions") + .HasColumnType("text"); + + b.Property("ProviderId") + .HasColumnType("uuid"); + + b.Property("RevisionDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Status") + .HasColumnType("smallint"); + + b.Property("Type") + .HasColumnType("smallint"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("ProviderId"); + + b.HasIndex("UserId"); + + b.ToTable("ProviderUser", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Send", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccessCount") + .HasColumnType("integer"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Data") + .HasColumnType("text"); + + b.Property("DeletionDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Disabled") + .HasColumnType("boolean"); + + b.Property("ExpirationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("HideEmail") + .HasColumnType("boolean"); + + b.Property("Key") + .HasColumnType("text"); + + b.Property("MaxAccessCount") + .HasColumnType("integer"); + + b.Property("OrganizationId") + .HasColumnType("uuid"); + + b.Property("Password") + .HasMaxLength(300) + .HasColumnType("character varying(300)"); + + b.Property("RevisionDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Type") + .HasColumnType("smallint"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("UserId"); + + b.ToTable("Send", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.SsoConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Data") + .HasColumnType("text"); + + b.Property("Enabled") + .HasColumnType("boolean"); + + b.Property("OrganizationId") + .HasColumnType("uuid"); + + b.Property("RevisionDate") + .HasColumnType("timestamp with time zone"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.ToTable("SsoConfig", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.SsoUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("ExternalId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .UseCollation("postgresIndetermanisticCollation"); + + b.Property("OrganizationId") + .HasColumnType("uuid"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("UserId"); + + b.ToTable("SsoUser", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.TaxRate", b => + { + b.Property("Id") + .HasMaxLength(40) + .HasColumnType("character varying(40)"); + + b.Property("Active") + .HasColumnType("boolean"); + + b.Property("Country") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("PostalCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)"); + + b.Property("Rate") + .HasColumnType("numeric"); + + b.Property("State") + .HasMaxLength(2) + .HasColumnType("character varying(2)"); + + b.HasKey("Id"); + + b.ToTable("TaxRate", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Transaction", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Amount") + .HasColumnType("numeric"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Details") + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("Gateway") + .HasColumnType("smallint"); + + b.Property("GatewayId") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("OrganizationId") + .HasColumnType("uuid"); + + b.Property("PaymentMethodType") + .HasColumnType("smallint"); + + b.Property("Refunded") + .HasColumnType("boolean"); + + b.Property("RefundedAmount") + .HasColumnType("numeric"); + + b.Property("Type") + .HasColumnType("smallint"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("UserId"); + + b.ToTable("Transaction", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.User", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccountRevisionDate") + .HasColumnType("timestamp with time zone"); + + b.Property("ApiKey") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("character varying(30)"); + + b.Property("AvatarColor") + .HasMaxLength(7) + .HasColumnType("character varying(7)"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Culture") + .HasMaxLength(10) + .HasColumnType("character varying(10)"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .UseCollation("postgresIndetermanisticCollation"); + + b.Property("EmailVerified") + .HasColumnType("boolean"); + + b.Property("EquivalentDomains") + .HasColumnType("text"); + + b.Property("ExcludedGlobalEquivalentDomains") + .HasColumnType("text"); + + b.Property("FailedLoginCount") + .HasColumnType("integer"); + + b.Property("ForcePasswordReset") + .HasColumnType("boolean"); + + b.Property("Gateway") + .HasColumnType("smallint"); + + b.Property("GatewayCustomerId") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("GatewaySubscriptionId") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("Kdf") + .HasColumnType("smallint"); + + b.Property("KdfIterations") + .HasColumnType("integer"); + + b.Property("KdfMemory") + .HasColumnType("integer"); + + b.Property("KdfParallelism") + .HasColumnType("integer"); + + b.Property("Key") + .HasColumnType("text"); + + b.Property("LastEmailChangeDate") + .HasColumnType("timestamp with time zone"); + + b.Property("LastFailedLoginDate") + .HasColumnType("timestamp with time zone"); + + b.Property("LastKdfChangeDate") + .HasColumnType("timestamp with time zone"); + + b.Property("LastKeyRotationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("LastPasswordChangeDate") + .HasColumnType("timestamp with time zone"); + + b.Property("LicenseKey") + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("MasterPassword") + .HasMaxLength(300) + .HasColumnType("character varying(300)"); + + b.Property("MasterPasswordHint") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("MaxStorageGb") + .HasColumnType("smallint"); + + b.Property("Name") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("Premium") + .HasColumnType("boolean"); + + b.Property("PremiumExpirationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("PrivateKey") + .HasColumnType("text"); + + b.Property("PublicKey") + .HasColumnType("text"); + + b.Property("ReferenceData") + .HasColumnType("text"); + + b.Property("RenewalReminderDate") + .HasColumnType("timestamp with time zone"); + + b.Property("RevisionDate") + .HasColumnType("timestamp with time zone"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("Storage") + .HasColumnType("bigint"); + + b.Property("TwoFactorProviders") + .HasColumnType("text"); + + b.Property("TwoFactorRecoveryCode") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("UsesKeyConnector") + .HasColumnType("boolean"); + + b.HasKey("Id"); + + b.ToTable("User", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.AccessPolicy", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Discriminator") + .IsRequired() + .HasColumnType("text"); + + b.Property("Read") + .HasColumnType("boolean"); + + b.Property("RevisionDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Write") + .HasColumnType("boolean"); + + b.HasKey("Id") + .HasAnnotation("SqlServer:Clustered", true); + + b.ToTable("AccessPolicy", (string)null); + + b.HasDiscriminator("Discriminator").HasValue("AccessPolicy"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ApiKey", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClientSecret") + .HasMaxLength(30) + .HasColumnType("character varying(30)"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("EncryptedPayload") + .HasMaxLength(4000) + .HasColumnType("character varying(4000)"); + + b.Property("ExpireAt") + .HasColumnType("timestamp with time zone"); + + b.Property("Key") + .HasColumnType("text"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("character varying(200)"); + + b.Property("RevisionDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Scope") + .HasMaxLength(4000) + .HasColumnType("character varying(4000)"); + + b.Property("ServiceAccountId") + .HasColumnType("uuid"); + + b.HasKey("Id") + .HasAnnotation("SqlServer:Clustered", true); + + b.HasIndex("ServiceAccountId") + .HasAnnotation("SqlServer:Clustered", false); + + b.ToTable("ApiKey", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Project", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("DeletedDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("OrganizationId") + .HasColumnType("uuid"); + + b.Property("RevisionDate") + .HasColumnType("timestamp with time zone"); + + b.HasKey("Id") + .HasAnnotation("SqlServer:Clustered", true); + + b.HasIndex("DeletedDate") + .HasAnnotation("SqlServer:Clustered", false); + + b.HasIndex("OrganizationId") + .HasAnnotation("SqlServer:Clustered", false); + + b.ToTable("Project", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Secret", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("DeletedDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Key") + .HasColumnType("text"); + + b.Property("Note") + .HasColumnType("text"); + + b.Property("OrganizationId") + .HasColumnType("uuid"); + + b.Property("RevisionDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Value") + .HasColumnType("text"); + + b.HasKey("Id") + .HasAnnotation("SqlServer:Clustered", true); + + b.HasIndex("DeletedDate") + .HasAnnotation("SqlServer:Clustered", false); + + b.HasIndex("OrganizationId") + .HasAnnotation("SqlServer:Clustered", false); + + b.ToTable("Secret", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccount", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("OrganizationId") + .HasColumnType("uuid"); + + b.Property("RevisionDate") + .HasColumnType("timestamp with time zone"); + + b.HasKey("Id") + .HasAnnotation("SqlServer:Clustered", true); + + b.HasIndex("OrganizationId") + .HasAnnotation("SqlServer:Clustered", false); + + b.ToTable("ServiceAccount", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Vault.Models.Cipher", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Attachments") + .HasColumnType("text"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Data") + .HasColumnType("text"); + + b.Property("DeletedDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Favorites") + .HasColumnType("text"); + + b.Property("Folders") + .HasColumnType("text"); + + b.Property("OrganizationId") + .HasColumnType("uuid"); + + b.Property("Reprompt") + .HasColumnType("smallint"); + + b.Property("RevisionDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Type") + .HasColumnType("smallint"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("UserId"); + + b.ToTable("Cipher", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Vault.Models.Folder", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("RevisionDate") + .HasColumnType("timestamp with time zone"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("Folder", (string)null); + }); + + modelBuilder.Entity("ProjectSecret", b => + { + b.Property("ProjectsId") + .HasColumnType("uuid"); + + b.Property("SecretsId") + .HasColumnType("uuid"); + + b.HasKey("ProjectsId", "SecretsId"); + + b.HasIndex("SecretsId"); + + b.ToTable("ProjectSecret"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.GroupProjectAccessPolicy", b => + { + b.HasBaseType("Bit.Infrastructure.EntityFramework.SecretsManager.Models.AccessPolicy"); + + b.Property("GrantedProjectId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("uuid") + .HasColumnName("GrantedProjectId"); + + b.Property("GroupId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("uuid") + .HasColumnName("GroupId"); + + b.HasIndex("GrantedProjectId"); + + b.HasIndex("GroupId"); + + b.HasDiscriminator().HasValue("group_project"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.GroupServiceAccountAccessPolicy", b => + { + b.HasBaseType("Bit.Infrastructure.EntityFramework.SecretsManager.Models.AccessPolicy"); + + b.Property("GrantedServiceAccountId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("uuid") + .HasColumnName("GrantedServiceAccountId"); + + b.Property("GroupId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("uuid") + .HasColumnName("GroupId"); + + b.HasIndex("GrantedServiceAccountId"); + + b.HasIndex("GroupId"); + + b.HasDiscriminator().HasValue("group_service_account"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccountProjectAccessPolicy", b => + { + b.HasBaseType("Bit.Infrastructure.EntityFramework.SecretsManager.Models.AccessPolicy"); + + b.Property("GrantedProjectId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("uuid") + .HasColumnName("GrantedProjectId"); + + b.Property("ServiceAccountId") + .HasColumnType("uuid") + .HasColumnName("ServiceAccountId"); + + b.HasIndex("GrantedProjectId"); + + b.HasIndex("ServiceAccountId"); + + b.HasDiscriminator().HasValue("service_account_project"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.UserProjectAccessPolicy", b => + { + b.HasBaseType("Bit.Infrastructure.EntityFramework.SecretsManager.Models.AccessPolicy"); + + b.Property("GrantedProjectId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("uuid") + .HasColumnName("GrantedProjectId"); + + b.Property("OrganizationUserId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("uuid") + .HasColumnName("OrganizationUserId"); + + b.HasIndex("GrantedProjectId"); + + b.HasIndex("OrganizationUserId"); + + b.HasDiscriminator().HasValue("user_project"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.UserServiceAccountAccessPolicy", b => + { + b.HasBaseType("Bit.Infrastructure.EntityFramework.SecretsManager.Models.AccessPolicy"); + + b.Property("GrantedServiceAccountId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("uuid") + .HasColumnName("GrantedServiceAccountId"); + + b.Property("OrganizationUserId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("uuid") + .HasColumnName("OrganizationUserId"); + + b.HasIndex("GrantedServiceAccountId"); + + b.HasIndex("OrganizationUserId"); + + b.HasDiscriminator().HasValue("user_service_account"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.AuthRequest", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Device", "ResponseDevice") + .WithMany() + .HasForeignKey("ResponseDeviceId"); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ResponseDevice"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Collection", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany("Collections") + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Organization"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.CollectionCipher", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Vault.Models.Cipher", "Cipher") + .WithMany("CollectionCiphers") + .HasForeignKey("CipherId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Collection", "Collection") + .WithMany("CollectionCiphers") + .HasForeignKey("CollectionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Cipher"); + + b.Navigation("Collection"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.CollectionGroup", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Collection", "Collection") + .WithMany("CollectionGroups") + .HasForeignKey("CollectionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Group", "Group") + .WithMany() + .HasForeignKey("GroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Collection"); + + b.Navigation("Group"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.CollectionUser", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Collection", "Collection") + .WithMany("CollectionUsers") + .HasForeignKey("CollectionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.OrganizationUser", "OrganizationUser") + .WithMany("CollectionUsers") + .HasForeignKey("OrganizationUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Collection"); + + b.Navigation("OrganizationUser"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Device", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.EmergencyAccess", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "Grantee") + .WithMany() + .HasForeignKey("GranteeId"); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "Grantor") + .WithMany() + .HasForeignKey("GrantorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Grantee"); + + b.Navigation("Grantor"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Group", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany("Groups") + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Organization"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.GroupUser", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Group", "Group") + .WithMany("GroupUsers") + .HasForeignKey("GroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.OrganizationUser", "OrganizationUser") + .WithMany("GroupUsers") + .HasForeignKey("OrganizationUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Group"); + + b.Navigation("OrganizationUser"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationApiKey", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany("ApiKeys") + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Organization"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationConnection", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany("Connections") + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Organization"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationDomain", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany("Domains") + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Organization"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationSponsorship", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "SponsoredOrganization") + .WithMany() + .HasForeignKey("SponsoredOrganizationId"); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "SponsoringOrganization") + .WithMany() + .HasForeignKey("SponsoringOrganizationId"); + + b.Navigation("SponsoredOrganization"); + + b.Navigation("SponsoringOrganization"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationUser", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany("OrganizationUsers") + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") + .WithMany("OrganizationUsers") + .HasForeignKey("UserId"); + + b.Navigation("Organization"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Policy", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany("Policies") + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Organization"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.ProviderOrganization", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany() + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Provider", "Provider") + .WithMany() + .HasForeignKey("ProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Organization"); + + b.Navigation("Provider"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.ProviderUser", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Provider", "Provider") + .WithMany() + .HasForeignKey("ProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") + .WithMany() + .HasForeignKey("UserId"); + + b.Navigation("Provider"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Send", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany() + .HasForeignKey("OrganizationId"); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") + .WithMany() + .HasForeignKey("UserId"); + + b.Navigation("Organization"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.SsoConfig", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany("SsoConfigs") + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Organization"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.SsoUser", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany("SsoUsers") + .HasForeignKey("OrganizationId"); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") + .WithMany("SsoUsers") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Organization"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Transaction", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany("Transactions") + .HasForeignKey("OrganizationId"); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") + .WithMany("Transactions") + .HasForeignKey("UserId"); + + b.Navigation("Organization"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ApiKey", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccount", "ServiceAccount") + .WithMany() + .HasForeignKey("ServiceAccountId"); + + b.Navigation("ServiceAccount"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Project", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany() + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Organization"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Secret", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany() + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Organization"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccount", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany() + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Organization"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Vault.Models.Cipher", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany("Ciphers") + .HasForeignKey("OrganizationId"); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") + .WithMany("Ciphers") + .HasForeignKey("UserId"); + + b.Navigation("Organization"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Vault.Models.Folder", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") + .WithMany("Folders") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("ProjectSecret", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Project", null) + .WithMany() + .HasForeignKey("ProjectsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Secret", null) + .WithMany() + .HasForeignKey("SecretsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.GroupProjectAccessPolicy", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Project", "GrantedProject") + .WithMany("GroupAccessPolicies") + .HasForeignKey("GrantedProjectId"); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Group", "Group") + .WithMany() + .HasForeignKey("GroupId"); + + b.Navigation("GrantedProject"); + + b.Navigation("Group"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.GroupServiceAccountAccessPolicy", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccount", "GrantedServiceAccount") + .WithMany("GroupAccessPolicies") + .HasForeignKey("GrantedServiceAccountId"); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Group", "Group") + .WithMany() + .HasForeignKey("GroupId"); + + b.Navigation("GrantedServiceAccount"); + + b.Navigation("Group"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccountProjectAccessPolicy", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Project", "GrantedProject") + .WithMany("ServiceAccountAccessPolicies") + .HasForeignKey("GrantedProjectId"); + + b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccount", "ServiceAccount") + .WithMany() + .HasForeignKey("ServiceAccountId"); + + b.Navigation("GrantedProject"); + + b.Navigation("ServiceAccount"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.UserProjectAccessPolicy", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Project", "GrantedProject") + .WithMany("UserAccessPolicies") + .HasForeignKey("GrantedProjectId"); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.OrganizationUser", "OrganizationUser") + .WithMany() + .HasForeignKey("OrganizationUserId"); + + b.Navigation("GrantedProject"); + + b.Navigation("OrganizationUser"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.UserServiceAccountAccessPolicy", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccount", "GrantedServiceAccount") + .WithMany("UserAccessPolicies") + .HasForeignKey("GrantedServiceAccountId"); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.OrganizationUser", "OrganizationUser") + .WithMany() + .HasForeignKey("OrganizationUserId"); + + b.Navigation("GrantedServiceAccount"); + + b.Navigation("OrganizationUser"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Collection", b => + { + b.Navigation("CollectionCiphers"); + + b.Navigation("CollectionGroups"); + + b.Navigation("CollectionUsers"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Group", b => + { + b.Navigation("GroupUsers"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Organization", b => + { + b.Navigation("ApiKeys"); + + b.Navigation("Ciphers"); + + b.Navigation("Collections"); + + b.Navigation("Connections"); + + b.Navigation("Domains"); + + b.Navigation("Groups"); + + b.Navigation("OrganizationUsers"); + + b.Navigation("Policies"); + + b.Navigation("SsoConfigs"); + + b.Navigation("SsoUsers"); + + b.Navigation("Transactions"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationUser", b => + { + b.Navigation("CollectionUsers"); + + b.Navigation("GroupUsers"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.User", b => + { + b.Navigation("Ciphers"); + + b.Navigation("Folders"); + + b.Navigation("OrganizationUsers"); + + b.Navigation("SsoUsers"); + + b.Navigation("Transactions"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Project", b => + { + b.Navigation("GroupAccessPolicies"); + + b.Navigation("ServiceAccountAccessPolicies"); + + b.Navigation("UserAccessPolicies"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccount", b => + { + b.Navigation("GroupAccessPolicies"); + + b.Navigation("UserAccessPolicies"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Vault.Models.Cipher", b => + { + b.Navigation("CollectionCiphers"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/util/PostgresMigrations/Migrations/20230315121250_AuthRequestRemoveFingerprintPhrase.cs b/util/PostgresMigrations/Migrations/20230315121250_AuthRequestRemoveFingerprintPhrase.cs new file mode 100644 index 0000000000..dab264bda6 --- /dev/null +++ b/util/PostgresMigrations/Migrations/20230315121250_AuthRequestRemoveFingerprintPhrase.cs @@ -0,0 +1,24 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Bit.PostgresMigrations.Migrations; + +public partial class AuthRequestRemoveFingerprintPhrase : Migration +{ + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "RequestFingerprint", + table: "AuthRequest"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "RequestFingerprint", + table: "AuthRequest", + type: "text", + nullable: true); + } +} diff --git a/util/PostgresMigrations/Migrations/DatabaseContextModelSnapshot.cs b/util/PostgresMigrations/Migrations/DatabaseContextModelSnapshot.cs index 061e59f3db..fa9895de25 100644 --- a/util/PostgresMigrations/Migrations/DatabaseContextModelSnapshot.cs +++ b/util/PostgresMigrations/Migrations/DatabaseContextModelSnapshot.cs @@ -57,9 +57,6 @@ namespace Bit.PostgresMigrations.Migrations b.Property("RequestDeviceType") .HasColumnType("smallint"); - b.Property("RequestFingerprint") - .HasColumnType("text"); - b.Property("RequestIpAddress") .HasMaxLength(50) .HasColumnType("character varying(50)"); @@ -85,53 +82,6 @@ namespace Bit.PostgresMigrations.Migrations b.ToTable("AuthRequest", (string)null); }); - modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Cipher", b => - { - b.Property("Id") - .HasColumnType("uuid"); - - b.Property("Attachments") - .HasColumnType("text"); - - b.Property("CreationDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Data") - .HasColumnType("text"); - - b.Property("DeletedDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Favorites") - .HasColumnType("text"); - - b.Property("Folders") - .HasColumnType("text"); - - b.Property("OrganizationId") - .HasColumnType("uuid"); - - b.Property("Reprompt") - .HasColumnType("smallint"); - - b.Property("RevisionDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Type") - .HasColumnType("smallint"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("UserId"); - - b.ToTable("Cipher", (string)null); - }); - modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Collection", b => { b.Property("Id") @@ -373,30 +323,6 @@ namespace Bit.PostgresMigrations.Migrations b.ToTable("Event", (string)null); }); - modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Folder", b => - { - b.Property("Id") - .HasColumnType("uuid"); - - b.Property("CreationDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Name") - .HasColumnType("text"); - - b.Property("RevisionDate") - .HasColumnType("timestamp with time zone"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("Folder", (string)null); - }); - modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Grant", b => { b.Property("Key") @@ -1527,6 +1453,77 @@ namespace Bit.PostgresMigrations.Migrations b.ToTable("ServiceAccount", (string)null); }); + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Vault.Models.Cipher", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Attachments") + .HasColumnType("text"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Data") + .HasColumnType("text"); + + b.Property("DeletedDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Favorites") + .HasColumnType("text"); + + b.Property("Folders") + .HasColumnType("text"); + + b.Property("OrganizationId") + .HasColumnType("uuid"); + + b.Property("Reprompt") + .HasColumnType("smallint"); + + b.Property("RevisionDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Type") + .HasColumnType("smallint"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("UserId"); + + b.ToTable("Cipher", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Vault.Models.Folder", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("RevisionDate") + .HasColumnType("timestamp with time zone"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("Folder", (string)null); + }); + modelBuilder.Entity("ProjectSecret", b => { b.Property("ProjectsId") @@ -1663,25 +1660,10 @@ namespace Bit.PostgresMigrations.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Cipher", b => - { - b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") - .WithMany("Ciphers") - .HasForeignKey("OrganizationId"); - - b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") - .WithMany("Ciphers") - .HasForeignKey("UserId"); - - b.Navigation("Organization"); - - b.Navigation("User"); - }); - modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Collection", b => { b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") - .WithMany() + .WithMany("Collections") .HasForeignKey("OrganizationId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); @@ -1691,7 +1673,7 @@ namespace Bit.PostgresMigrations.Migrations modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.CollectionCipher", b => { - b.HasOne("Bit.Infrastructure.EntityFramework.Models.Cipher", "Cipher") + b.HasOne("Bit.Infrastructure.EntityFramework.Vault.Models.Cipher", "Cipher") .WithMany("CollectionCiphers") .HasForeignKey("CipherId") .OnDelete(DeleteBehavior.Cascade) @@ -1774,17 +1756,6 @@ namespace Bit.PostgresMigrations.Migrations b.Navigation("Grantor"); }); - modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Folder", b => - { - b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") - .WithMany("Folders") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - }); - modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Group", b => { b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") @@ -2027,6 +1998,32 @@ namespace Bit.PostgresMigrations.Migrations b.Navigation("Organization"); }); + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Vault.Models.Cipher", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany("Ciphers") + .HasForeignKey("OrganizationId"); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") + .WithMany("Ciphers") + .HasForeignKey("UserId"); + + b.Navigation("Organization"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Vault.Models.Folder", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") + .WithMany("Folders") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + modelBuilder.Entity("ProjectSecret", b => { b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Project", null) @@ -2117,11 +2114,6 @@ namespace Bit.PostgresMigrations.Migrations b.Navigation("OrganizationUser"); }); - modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Cipher", b => - { - b.Navigation("CollectionCiphers"); - }); - modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Collection", b => { b.Navigation("CollectionCiphers"); @@ -2142,6 +2134,8 @@ namespace Bit.PostgresMigrations.Migrations b.Navigation("Ciphers"); + b.Navigation("Collections"); + b.Navigation("Connections"); b.Navigation("Domains"); @@ -2194,6 +2188,11 @@ namespace Bit.PostgresMigrations.Migrations b.Navigation("UserAccessPolicies"); }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Vault.Models.Cipher", b => + { + b.Navigation("CollectionCiphers"); + }); #pragma warning restore 612, 618 } } diff --git a/util/PostgresMigrations/packages.lock.json b/util/PostgresMigrations/packages.lock.json index 7273cd36ef..167d63318f 100644 --- a/util/PostgresMigrations/packages.lock.json +++ b/util/PostgresMigrations/packages.lock.json @@ -2791,56 +2791,56 @@ "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } }, "infrastructure.entityframework": { "type": "Project", "dependencies": { - "AutoMapper.Extensions.Microsoft.DependencyInjection": "[11.0.0, )", - "Core": "[2023.2.0, )", - "Microsoft.EntityFrameworkCore.Relational": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.SqlServer": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.Sqlite": "[6.0.12, )", - "Npgsql.EntityFrameworkCore.PostgreSQL": "[6.0.8, )", - "Pomelo.EntityFrameworkCore.MySql": "[6.0.2, )", - "linq2db.EntityFrameworkCore": "[6.11.0, )" + "AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0", + "Core": "2023.2.2", + "Microsoft.EntityFrameworkCore.Relational": "6.0.12", + "Microsoft.EntityFrameworkCore.SqlServer": "6.0.12", + "Microsoft.EntityFrameworkCore.Sqlite": "6.0.12", + "Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.8", + "Pomelo.EntityFrameworkCore.MySql": "6.0.2", + "linq2db.EntityFrameworkCore": "6.11.0" } } } diff --git a/util/Setup/packages.lock.json b/util/Setup/packages.lock.json index 52bae7539a..c7909246c2 100644 --- a/util/Setup/packages.lock.json +++ b/util/Setup/packages.lock.json @@ -2701,51 +2701,51 @@ "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } }, "migrator": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Microsoft.Extensions.Logging": "[6.0.0, )", - "dbup-sqlserver": "[5.0.8, )" + "Core": "2023.2.2", + "Microsoft.Extensions.Logging": "6.0.0", + "dbup-sqlserver": "5.0.8" } } } diff --git a/util/SqlServerEFScaffold/packages.lock.json b/util/SqlServerEFScaffold/packages.lock.json index ff5ef22ebd..65ba90bb5e 100644 --- a/util/SqlServerEFScaffold/packages.lock.json +++ b/util/SqlServerEFScaffold/packages.lock.json @@ -2848,96 +2848,96 @@ "api": { "type": "Project", "dependencies": { - "Azure.Messaging.EventGrid": "[4.10.0, )", - "Commercial.Core": "[2023.2.0, )", - "Commercial.Infrastructure.EntityFramework": "[2023.2.0, )", - "Core": "[2023.2.0, )", - "SharedWeb": "[2023.2.0, )", - "Swashbuckle.AspNetCore": "[6.5.0, )" + "Azure.Messaging.EventGrid": "4.10.0", + "Commercial.Core": "2023.2.2", + "Commercial.Infrastructure.EntityFramework": "2023.2.2", + "Core": "2023.2.2", + "SharedWeb": "2023.2.2", + "Swashbuckle.AspNetCore": "6.5.0" } }, "commercial.core": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )" + "Core": "2023.2.2" } }, "commercial.infrastructure.entityframework": { "type": "Project", "dependencies": { - "AutoMapper.Extensions.Microsoft.DependencyInjection": "[11.0.0, )", - "Core": "[2023.2.0, )", - "Infrastructure.EntityFramework": "[2023.2.0, )" + "AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0", + "Core": "2023.2.2", + "Infrastructure.EntityFramework": "2023.2.2" } }, "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } }, "infrastructure.dapper": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Dapper": "[2.0.123, )" + "Core": "2023.2.2", + "Dapper": "2.0.123" } }, "infrastructure.entityframework": { "type": "Project", "dependencies": { - "AutoMapper.Extensions.Microsoft.DependencyInjection": "[11.0.0, )", - "Core": "[2023.2.0, )", - "Microsoft.EntityFrameworkCore.Relational": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.SqlServer": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.Sqlite": "[6.0.12, )", - "Npgsql.EntityFrameworkCore.PostgreSQL": "[6.0.8, )", - "Pomelo.EntityFrameworkCore.MySql": "[6.0.2, )", - "linq2db.EntityFrameworkCore": "[6.11.0, )" + "AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0", + "Core": "2023.2.2", + "Microsoft.EntityFrameworkCore.Relational": "6.0.12", + "Microsoft.EntityFrameworkCore.SqlServer": "6.0.12", + "Microsoft.EntityFrameworkCore.Sqlite": "6.0.12", + "Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.8", + "Pomelo.EntityFrameworkCore.MySql": "6.0.2", + "linq2db.EntityFrameworkCore": "6.11.0" } }, "sharedweb": { "type": "Project", "dependencies": { - "Core": "[2023.2.0, )", - "Infrastructure.Dapper": "[2023.2.0, )", - "Infrastructure.EntityFramework": "[2023.2.0, )" + "Core": "2023.2.2", + "Infrastructure.Dapper": "2023.2.2", + "Infrastructure.EntityFramework": "2023.2.2" } } } diff --git a/util/SqliteMigrations/Migrations/20230315121314_AuthRequestRemoveFingerprintPhrase.Designer.cs b/util/SqliteMigrations/Migrations/20230315121314_AuthRequestRemoveFingerprintPhrase.Designer.cs new file mode 100644 index 0000000000..159fb5a376 --- /dev/null +++ b/util/SqliteMigrations/Migrations/20230315121314_AuthRequestRemoveFingerprintPhrase.Designer.cs @@ -0,0 +1,2185 @@ +// +using System; +using Bit.Infrastructure.EntityFramework.Repositories; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Bit.SqliteMigrations.Migrations +{ + [DbContext(typeof(DatabaseContext))] + [Migration("20230315121314_AuthRequestRemoveFingerprintPhrase")] + partial class AuthRequestRemoveFingerprintPhrase + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "6.0.12"); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.AuthRequest", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("AccessCode") + .HasMaxLength(25) + .HasColumnType("TEXT"); + + b.Property("Approved") + .HasColumnType("INTEGER"); + + b.Property("AuthenticationDate") + .HasColumnType("TEXT"); + + b.Property("CreationDate") + .HasColumnType("TEXT"); + + b.Property("Key") + .HasColumnType("TEXT"); + + b.Property("MasterPasswordHash") + .HasColumnType("TEXT"); + + b.Property("PublicKey") + .HasColumnType("TEXT"); + + b.Property("RequestDeviceIdentifier") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("RequestDeviceType") + .HasColumnType("INTEGER"); + + b.Property("RequestIpAddress") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("ResponseDate") + .HasColumnType("TEXT"); + + b.Property("ResponseDeviceId") + .HasColumnType("TEXT"); + + b.Property("Type") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ResponseDeviceId"); + + b.HasIndex("UserId"); + + b.ToTable("AuthRequest", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Collection", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("CreationDate") + .HasColumnType("TEXT"); + + b.Property("ExternalId") + .HasMaxLength(300) + .HasColumnType("TEXT"); + + b.Property("Name") + .HasColumnType("TEXT"); + + b.Property("OrganizationId") + .HasColumnType("TEXT"); + + b.Property("RevisionDate") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.ToTable("Collection", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.CollectionCipher", b => + { + b.Property("CollectionId") + .HasColumnType("TEXT"); + + b.Property("CipherId") + .HasColumnType("TEXT"); + + b.HasKey("CollectionId", "CipherId"); + + b.HasIndex("CipherId"); + + b.ToTable("CollectionCipher", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.CollectionGroup", b => + { + b.Property("CollectionId") + .HasColumnType("TEXT"); + + b.Property("GroupId") + .HasColumnType("TEXT"); + + b.Property("HidePasswords") + .HasColumnType("INTEGER"); + + b.Property("ReadOnly") + .HasColumnType("INTEGER"); + + b.HasKey("CollectionId", "GroupId"); + + b.HasIndex("GroupId"); + + b.ToTable("CollectionGroups"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.CollectionUser", b => + { + b.Property("CollectionId") + .HasColumnType("TEXT"); + + b.Property("OrganizationUserId") + .HasColumnType("TEXT"); + + b.Property("HidePasswords") + .HasColumnType("INTEGER"); + + b.Property("ReadOnly") + .HasColumnType("INTEGER"); + + b.HasKey("CollectionId", "OrganizationUserId"); + + b.HasIndex("OrganizationUserId"); + + b.ToTable("CollectionUsers"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Device", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreationDate") + .HasColumnType("TEXT"); + + b.Property("Identifier") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("Name") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("PushToken") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("RevisionDate") + .HasColumnType("TEXT"); + + b.Property("Type") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("Device", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.EmergencyAccess", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("CreationDate") + .HasColumnType("TEXT"); + + b.Property("Email") + .HasMaxLength(256) + .HasColumnType("TEXT"); + + b.Property("GranteeId") + .HasColumnType("TEXT"); + + b.Property("GrantorId") + .HasColumnType("TEXT"); + + b.Property("KeyEncrypted") + .HasColumnType("TEXT"); + + b.Property("LastNotificationDate") + .HasColumnType("TEXT"); + + b.Property("RecoveryInitiatedDate") + .HasColumnType("TEXT"); + + b.Property("RevisionDate") + .HasColumnType("TEXT"); + + b.Property("Status") + .HasColumnType("INTEGER"); + + b.Property("Type") + .HasColumnType("INTEGER"); + + b.Property("WaitTimeDays") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("GranteeId"); + + b.HasIndex("GrantorId"); + + b.ToTable("EmergencyAccess", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Event", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("ActingUserId") + .HasColumnType("TEXT"); + + b.Property("CipherId") + .HasColumnType("TEXT"); + + b.Property("CollectionId") + .HasColumnType("TEXT"); + + b.Property("Date") + .HasColumnType("TEXT"); + + b.Property("DeviceType") + .HasColumnType("INTEGER"); + + b.Property("DomainName") + .HasColumnType("TEXT"); + + b.Property("GroupId") + .HasColumnType("TEXT"); + + b.Property("InstallationId") + .HasColumnType("TEXT"); + + b.Property("IpAddress") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("OrganizationId") + .HasColumnType("TEXT"); + + b.Property("OrganizationUserId") + .HasColumnType("TEXT"); + + b.Property("PolicyId") + .HasColumnType("TEXT"); + + b.Property("ProviderId") + .HasColumnType("TEXT"); + + b.Property("ProviderOrganizationId") + .HasColumnType("TEXT"); + + b.Property("ProviderUserId") + .HasColumnType("TEXT"); + + b.Property("SecretId") + .HasColumnType("TEXT"); + + b.Property("ServiceAccountId") + .HasColumnType("TEXT"); + + b.Property("SystemUser") + .HasColumnType("INTEGER"); + + b.Property("Type") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.ToTable("Event", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Grant", b => + { + b.Property("Key") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("ClientId") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("ConsumedDate") + .HasColumnType("TEXT"); + + b.Property("CreationDate") + .HasColumnType("TEXT"); + + b.Property("Data") + .HasColumnType("TEXT"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("ExpirationDate") + .HasColumnType("TEXT"); + + b.Property("SessionId") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("SubjectId") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.HasKey("Key"); + + b.ToTable("Grant", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Group", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("AccessAll") + .HasColumnType("INTEGER"); + + b.Property("CreationDate") + .HasColumnType("TEXT"); + + b.Property("ExternalId") + .HasMaxLength(300) + .HasColumnType("TEXT"); + + b.Property("Name") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("OrganizationId") + .HasColumnType("TEXT"); + + b.Property("RevisionDate") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.ToTable("Group", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.GroupUser", b => + { + b.Property("GroupId") + .HasColumnType("TEXT"); + + b.Property("OrganizationUserId") + .HasColumnType("TEXT"); + + b.HasKey("GroupId", "OrganizationUserId"); + + b.HasIndex("OrganizationUserId"); + + b.ToTable("GroupUser", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Installation", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("CreationDate") + .HasColumnType("TEXT"); + + b.Property("Email") + .HasMaxLength(256) + .HasColumnType("TEXT"); + + b.Property("Enabled") + .HasColumnType("INTEGER"); + + b.Property("Key") + .HasMaxLength(150) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.ToTable("Installation", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Organization", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("BillingEmail") + .HasMaxLength(256) + .HasColumnType("TEXT"); + + b.Property("BusinessAddress1") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("BusinessAddress2") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("BusinessAddress3") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("BusinessCountry") + .HasMaxLength(2) + .HasColumnType("TEXT"); + + b.Property("BusinessName") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("BusinessTaxNumber") + .HasMaxLength(30) + .HasColumnType("TEXT"); + + b.Property("CreationDate") + .HasColumnType("TEXT"); + + b.Property("Enabled") + .HasColumnType("INTEGER"); + + b.Property("ExpirationDate") + .HasColumnType("TEXT"); + + b.Property("Gateway") + .HasColumnType("INTEGER"); + + b.Property("GatewayCustomerId") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("GatewaySubscriptionId") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("Identifier") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("LicenseKey") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("MaxAutoscaleSeats") + .HasColumnType("INTEGER"); + + b.Property("MaxCollections") + .HasColumnType("INTEGER"); + + b.Property("MaxStorageGb") + .HasColumnType("INTEGER"); + + b.Property("Name") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("OwnersNotifiedOfAutoscaling") + .HasColumnType("TEXT"); + + b.Property("Plan") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("PlanType") + .HasColumnType("INTEGER"); + + b.Property("PrivateKey") + .HasColumnType("TEXT"); + + b.Property("PublicKey") + .HasColumnType("TEXT"); + + b.Property("ReferenceData") + .HasColumnType("TEXT"); + + b.Property("RevisionDate") + .HasColumnType("TEXT"); + + b.Property("Seats") + .HasColumnType("INTEGER"); + + b.Property("SelfHost") + .HasColumnType("INTEGER"); + + b.Property("Storage") + .HasColumnType("INTEGER"); + + b.Property("TwoFactorProviders") + .HasColumnType("TEXT"); + + b.Property("Use2fa") + .HasColumnType("INTEGER"); + + b.Property("UseApi") + .HasColumnType("INTEGER"); + + b.Property("UseCustomPermissions") + .HasColumnType("INTEGER"); + + b.Property("UseDirectory") + .HasColumnType("INTEGER"); + + b.Property("UseEvents") + .HasColumnType("INTEGER"); + + b.Property("UseGroups") + .HasColumnType("INTEGER"); + + b.Property("UseKeyConnector") + .HasColumnType("INTEGER"); + + b.Property("UsePolicies") + .HasColumnType("INTEGER"); + + b.Property("UseResetPassword") + .HasColumnType("INTEGER"); + + b.Property("UseScim") + .HasColumnType("INTEGER"); + + b.Property("UseSecretsManager") + .HasColumnType("INTEGER"); + + b.Property("UseSso") + .HasColumnType("INTEGER"); + + b.Property("UseTotp") + .HasColumnType("INTEGER"); + + b.Property("UsersGetPremium") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.ToTable("Organization", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationApiKey", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("ApiKey") + .HasMaxLength(30) + .HasColumnType("TEXT"); + + b.Property("OrganizationId") + .HasColumnType("TEXT"); + + b.Property("RevisionDate") + .HasColumnType("TEXT"); + + b.Property("Type") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.ToTable("OrganizationApiKey", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationConnection", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("Config") + .HasColumnType("TEXT"); + + b.Property("Enabled") + .HasColumnType("INTEGER"); + + b.Property("OrganizationId") + .HasColumnType("TEXT"); + + b.Property("Type") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.ToTable("OrganizationConnection", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationDomain", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("CreationDate") + .HasColumnType("TEXT"); + + b.Property("DomainName") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("JobRunCount") + .HasColumnType("INTEGER"); + + b.Property("LastCheckedDate") + .HasColumnType("TEXT"); + + b.Property("NextRunDate") + .HasColumnType("TEXT"); + + b.Property("OrganizationId") + .HasColumnType("TEXT"); + + b.Property("Txt") + .HasColumnType("TEXT"); + + b.Property("VerifiedDate") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.ToTable("OrganizationDomain", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationSponsorship", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("FriendlyName") + .HasMaxLength(256) + .HasColumnType("TEXT"); + + b.Property("LastSyncDate") + .HasColumnType("TEXT"); + + b.Property("OfferedToEmail") + .HasMaxLength(256) + .HasColumnType("TEXT"); + + b.Property("PlanSponsorshipType") + .HasColumnType("INTEGER"); + + b.Property("SponsoredOrganizationId") + .HasColumnType("TEXT"); + + b.Property("SponsoringOrganizationId") + .HasColumnType("TEXT"); + + b.Property("SponsoringOrganizationUserId") + .HasColumnType("TEXT"); + + b.Property("ToDelete") + .HasColumnType("INTEGER"); + + b.Property("ValidUntil") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("SponsoredOrganizationId"); + + b.HasIndex("SponsoringOrganizationId"); + + b.ToTable("OrganizationSponsorship", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationUser", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("AccessAll") + .HasColumnType("INTEGER"); + + b.Property("AccessSecretsManager") + .HasColumnType("INTEGER"); + + b.Property("CreationDate") + .HasColumnType("TEXT"); + + b.Property("Email") + .HasMaxLength(256) + .HasColumnType("TEXT"); + + b.Property("ExternalId") + .HasMaxLength(300) + .HasColumnType("TEXT"); + + b.Property("Key") + .HasColumnType("TEXT"); + + b.Property("OrganizationId") + .HasColumnType("TEXT"); + + b.Property("Permissions") + .HasColumnType("TEXT"); + + b.Property("ResetPasswordKey") + .HasColumnType("TEXT"); + + b.Property("RevisionDate") + .HasColumnType("TEXT"); + + b.Property("Status") + .HasColumnType("INTEGER"); + + b.Property("Type") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("UserId"); + + b.ToTable("OrganizationUser", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Policy", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("CreationDate") + .HasColumnType("TEXT"); + + b.Property("Data") + .HasColumnType("TEXT"); + + b.Property("Enabled") + .HasColumnType("INTEGER"); + + b.Property("OrganizationId") + .HasColumnType("TEXT"); + + b.Property("RevisionDate") + .HasColumnType("TEXT"); + + b.Property("Type") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.ToTable("Policy", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Provider", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("BillingEmail") + .HasColumnType("TEXT"); + + b.Property("BillingPhone") + .HasColumnType("TEXT"); + + b.Property("BusinessAddress1") + .HasColumnType("TEXT"); + + b.Property("BusinessAddress2") + .HasColumnType("TEXT"); + + b.Property("BusinessAddress3") + .HasColumnType("TEXT"); + + b.Property("BusinessCountry") + .HasColumnType("TEXT"); + + b.Property("BusinessName") + .HasColumnType("TEXT"); + + b.Property("BusinessTaxNumber") + .HasColumnType("TEXT"); + + b.Property("CreationDate") + .HasColumnType("TEXT"); + + b.Property("Enabled") + .HasColumnType("INTEGER"); + + b.Property("Name") + .HasColumnType("TEXT"); + + b.Property("RevisionDate") + .HasColumnType("TEXT"); + + b.Property("Status") + .HasColumnType("INTEGER"); + + b.Property("Type") + .HasColumnType("INTEGER"); + + b.Property("UseEvents") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.ToTable("Provider", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.ProviderOrganization", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("CreationDate") + .HasColumnType("TEXT"); + + b.Property("Key") + .HasColumnType("TEXT"); + + b.Property("OrganizationId") + .HasColumnType("TEXT"); + + b.Property("ProviderId") + .HasColumnType("TEXT"); + + b.Property("RevisionDate") + .HasColumnType("TEXT"); + + b.Property("Settings") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("ProviderId"); + + b.ToTable("ProviderOrganization", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.ProviderUser", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("CreationDate") + .HasColumnType("TEXT"); + + b.Property("Email") + .HasColumnType("TEXT"); + + b.Property("Key") + .HasColumnType("TEXT"); + + b.Property("Permissions") + .HasColumnType("TEXT"); + + b.Property("ProviderId") + .HasColumnType("TEXT"); + + b.Property("RevisionDate") + .HasColumnType("TEXT"); + + b.Property("Status") + .HasColumnType("INTEGER"); + + b.Property("Type") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("ProviderId"); + + b.HasIndex("UserId"); + + b.ToTable("ProviderUser", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Send", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("AccessCount") + .HasColumnType("INTEGER"); + + b.Property("CreationDate") + .HasColumnType("TEXT"); + + b.Property("Data") + .HasColumnType("TEXT"); + + b.Property("DeletionDate") + .HasColumnType("TEXT"); + + b.Property("Disabled") + .HasColumnType("INTEGER"); + + b.Property("ExpirationDate") + .HasColumnType("TEXT"); + + b.Property("HideEmail") + .HasColumnType("INTEGER"); + + b.Property("Key") + .HasColumnType("TEXT"); + + b.Property("MaxAccessCount") + .HasColumnType("INTEGER"); + + b.Property("OrganizationId") + .HasColumnType("TEXT"); + + b.Property("Password") + .HasMaxLength(300) + .HasColumnType("TEXT"); + + b.Property("RevisionDate") + .HasColumnType("TEXT"); + + b.Property("Type") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("UserId"); + + b.ToTable("Send", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.SsoConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("CreationDate") + .HasColumnType("TEXT"); + + b.Property("Data") + .HasColumnType("TEXT"); + + b.Property("Enabled") + .HasColumnType("INTEGER"); + + b.Property("OrganizationId") + .HasColumnType("TEXT"); + + b.Property("RevisionDate") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.ToTable("SsoConfig", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.SsoUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("CreationDate") + .HasColumnType("TEXT"); + + b.Property("ExternalId") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("OrganizationId") + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("UserId"); + + b.ToTable("SsoUser", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.TaxRate", b => + { + b.Property("Id") + .HasMaxLength(40) + .HasColumnType("TEXT"); + + b.Property("Active") + .HasColumnType("INTEGER"); + + b.Property("Country") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("PostalCode") + .HasMaxLength(10) + .HasColumnType("TEXT"); + + b.Property("Rate") + .HasColumnType("TEXT"); + + b.Property("State") + .HasMaxLength(2) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.ToTable("TaxRate", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Transaction", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("Amount") + .HasColumnType("TEXT"); + + b.Property("CreationDate") + .HasColumnType("TEXT"); + + b.Property("Details") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("Gateway") + .HasColumnType("INTEGER"); + + b.Property("GatewayId") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("OrganizationId") + .HasColumnType("TEXT"); + + b.Property("PaymentMethodType") + .HasColumnType("INTEGER"); + + b.Property("Refunded") + .HasColumnType("INTEGER"); + + b.Property("RefundedAmount") + .HasColumnType("TEXT"); + + b.Property("Type") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("UserId"); + + b.ToTable("Transaction", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.User", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("AccountRevisionDate") + .HasColumnType("TEXT"); + + b.Property("ApiKey") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("TEXT"); + + b.Property("AvatarColor") + .HasMaxLength(7) + .HasColumnType("TEXT"); + + b.Property("CreationDate") + .HasColumnType("TEXT"); + + b.Property("Culture") + .HasMaxLength(10) + .HasColumnType("TEXT"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("TEXT"); + + b.Property("EmailVerified") + .HasColumnType("INTEGER"); + + b.Property("EquivalentDomains") + .HasColumnType("TEXT"); + + b.Property("ExcludedGlobalEquivalentDomains") + .HasColumnType("TEXT"); + + b.Property("FailedLoginCount") + .HasColumnType("INTEGER"); + + b.Property("ForcePasswordReset") + .HasColumnType("INTEGER"); + + b.Property("Gateway") + .HasColumnType("INTEGER"); + + b.Property("GatewayCustomerId") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("GatewaySubscriptionId") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("Kdf") + .HasColumnType("INTEGER"); + + b.Property("KdfIterations") + .HasColumnType("INTEGER"); + + b.Property("KdfMemory") + .HasColumnType("INTEGER"); + + b.Property("KdfParallelism") + .HasColumnType("INTEGER"); + + b.Property("Key") + .HasColumnType("TEXT"); + + b.Property("LastEmailChangeDate") + .HasColumnType("TEXT"); + + b.Property("LastFailedLoginDate") + .HasColumnType("TEXT"); + + b.Property("LastKdfChangeDate") + .HasColumnType("TEXT"); + + b.Property("LastKeyRotationDate") + .HasColumnType("TEXT"); + + b.Property("LastPasswordChangeDate") + .HasColumnType("TEXT"); + + b.Property("LicenseKey") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("MasterPassword") + .HasMaxLength(300) + .HasColumnType("TEXT"); + + b.Property("MasterPasswordHint") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("MaxStorageGb") + .HasColumnType("INTEGER"); + + b.Property("Name") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("Premium") + .HasColumnType("INTEGER"); + + b.Property("PremiumExpirationDate") + .HasColumnType("TEXT"); + + b.Property("PrivateKey") + .HasColumnType("TEXT"); + + b.Property("PublicKey") + .HasColumnType("TEXT"); + + b.Property("ReferenceData") + .HasColumnType("TEXT"); + + b.Property("RenewalReminderDate") + .HasColumnType("TEXT"); + + b.Property("RevisionDate") + .HasColumnType("TEXT"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("Storage") + .HasColumnType("INTEGER"); + + b.Property("TwoFactorProviders") + .HasColumnType("TEXT"); + + b.Property("TwoFactorRecoveryCode") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("UsesKeyConnector") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.ToTable("User", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.AccessPolicy", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("CreationDate") + .HasColumnType("TEXT"); + + b.Property("Discriminator") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Read") + .HasColumnType("INTEGER"); + + b.Property("RevisionDate") + .HasColumnType("TEXT"); + + b.Property("Write") + .HasColumnType("INTEGER"); + + b.HasKey("Id") + .HasAnnotation("SqlServer:Clustered", true); + + b.ToTable("AccessPolicy", (string)null); + + b.HasDiscriminator("Discriminator").HasValue("AccessPolicy"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ApiKey", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("ClientSecret") + .HasMaxLength(30) + .HasColumnType("TEXT"); + + b.Property("CreationDate") + .HasColumnType("TEXT"); + + b.Property("EncryptedPayload") + .HasMaxLength(4000) + .HasColumnType("TEXT"); + + b.Property("ExpireAt") + .HasColumnType("TEXT"); + + b.Property("Key") + .HasColumnType("TEXT"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("RevisionDate") + .HasColumnType("TEXT"); + + b.Property("Scope") + .HasMaxLength(4000) + .HasColumnType("TEXT"); + + b.Property("ServiceAccountId") + .HasColumnType("TEXT"); + + b.HasKey("Id") + .HasAnnotation("SqlServer:Clustered", true); + + b.HasIndex("ServiceAccountId") + .HasAnnotation("SqlServer:Clustered", false); + + b.ToTable("ApiKey", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Project", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("CreationDate") + .HasColumnType("TEXT"); + + b.Property("DeletedDate") + .HasColumnType("TEXT"); + + b.Property("Name") + .HasColumnType("TEXT"); + + b.Property("OrganizationId") + .HasColumnType("TEXT"); + + b.Property("RevisionDate") + .HasColumnType("TEXT"); + + b.HasKey("Id") + .HasAnnotation("SqlServer:Clustered", true); + + b.HasIndex("DeletedDate") + .HasAnnotation("SqlServer:Clustered", false); + + b.HasIndex("OrganizationId") + .HasAnnotation("SqlServer:Clustered", false); + + b.ToTable("Project", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Secret", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("CreationDate") + .HasColumnType("TEXT"); + + b.Property("DeletedDate") + .HasColumnType("TEXT"); + + b.Property("Key") + .HasColumnType("TEXT"); + + b.Property("Note") + .HasColumnType("TEXT"); + + b.Property("OrganizationId") + .HasColumnType("TEXT"); + + b.Property("RevisionDate") + .HasColumnType("TEXT"); + + b.Property("Value") + .HasColumnType("TEXT"); + + b.HasKey("Id") + .HasAnnotation("SqlServer:Clustered", true); + + b.HasIndex("DeletedDate") + .HasAnnotation("SqlServer:Clustered", false); + + b.HasIndex("OrganizationId") + .HasAnnotation("SqlServer:Clustered", false); + + b.ToTable("Secret", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccount", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("CreationDate") + .HasColumnType("TEXT"); + + b.Property("Name") + .HasColumnType("TEXT"); + + b.Property("OrganizationId") + .HasColumnType("TEXT"); + + b.Property("RevisionDate") + .HasColumnType("TEXT"); + + b.HasKey("Id") + .HasAnnotation("SqlServer:Clustered", true); + + b.HasIndex("OrganizationId") + .HasAnnotation("SqlServer:Clustered", false); + + b.ToTable("ServiceAccount", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Vault.Models.Cipher", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("Attachments") + .HasColumnType("TEXT"); + + b.Property("CreationDate") + .HasColumnType("TEXT"); + + b.Property("Data") + .HasColumnType("TEXT"); + + b.Property("DeletedDate") + .HasColumnType("TEXT"); + + b.Property("Favorites") + .HasColumnType("TEXT"); + + b.Property("Folders") + .HasColumnType("TEXT"); + + b.Property("OrganizationId") + .HasColumnType("TEXT"); + + b.Property("Reprompt") + .HasColumnType("INTEGER"); + + b.Property("RevisionDate") + .HasColumnType("TEXT"); + + b.Property("Type") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("UserId"); + + b.ToTable("Cipher", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Vault.Models.Folder", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("CreationDate") + .HasColumnType("TEXT"); + + b.Property("Name") + .HasColumnType("TEXT"); + + b.Property("RevisionDate") + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("Folder", (string)null); + }); + + modelBuilder.Entity("ProjectSecret", b => + { + b.Property("ProjectsId") + .HasColumnType("TEXT"); + + b.Property("SecretsId") + .HasColumnType("TEXT"); + + b.HasKey("ProjectsId", "SecretsId"); + + b.HasIndex("SecretsId"); + + b.ToTable("ProjectSecret"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.GroupProjectAccessPolicy", b => + { + b.HasBaseType("Bit.Infrastructure.EntityFramework.SecretsManager.Models.AccessPolicy"); + + b.Property("GrantedProjectId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("TEXT") + .HasColumnName("GrantedProjectId"); + + b.Property("GroupId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("TEXT") + .HasColumnName("GroupId"); + + b.HasIndex("GrantedProjectId"); + + b.HasIndex("GroupId"); + + b.HasDiscriminator().HasValue("group_project"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.GroupServiceAccountAccessPolicy", b => + { + b.HasBaseType("Bit.Infrastructure.EntityFramework.SecretsManager.Models.AccessPolicy"); + + b.Property("GrantedServiceAccountId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("TEXT") + .HasColumnName("GrantedServiceAccountId"); + + b.Property("GroupId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("TEXT") + .HasColumnName("GroupId"); + + b.HasIndex("GrantedServiceAccountId"); + + b.HasIndex("GroupId"); + + b.HasDiscriminator().HasValue("group_service_account"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccountProjectAccessPolicy", b => + { + b.HasBaseType("Bit.Infrastructure.EntityFramework.SecretsManager.Models.AccessPolicy"); + + b.Property("GrantedProjectId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("TEXT") + .HasColumnName("GrantedProjectId"); + + b.Property("ServiceAccountId") + .HasColumnType("TEXT") + .HasColumnName("ServiceAccountId"); + + b.HasIndex("GrantedProjectId"); + + b.HasIndex("ServiceAccountId"); + + b.HasDiscriminator().HasValue("service_account_project"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.UserProjectAccessPolicy", b => + { + b.HasBaseType("Bit.Infrastructure.EntityFramework.SecretsManager.Models.AccessPolicy"); + + b.Property("GrantedProjectId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("TEXT") + .HasColumnName("GrantedProjectId"); + + b.Property("OrganizationUserId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("TEXT") + .HasColumnName("OrganizationUserId"); + + b.HasIndex("GrantedProjectId"); + + b.HasIndex("OrganizationUserId"); + + b.HasDiscriminator().HasValue("user_project"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.UserServiceAccountAccessPolicy", b => + { + b.HasBaseType("Bit.Infrastructure.EntityFramework.SecretsManager.Models.AccessPolicy"); + + b.Property("GrantedServiceAccountId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("TEXT") + .HasColumnName("GrantedServiceAccountId"); + + b.Property("OrganizationUserId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("TEXT") + .HasColumnName("OrganizationUserId"); + + b.HasIndex("GrantedServiceAccountId"); + + b.HasIndex("OrganizationUserId"); + + b.HasDiscriminator().HasValue("user_service_account"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.AuthRequest", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Device", "ResponseDevice") + .WithMany() + .HasForeignKey("ResponseDeviceId"); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ResponseDevice"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Collection", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany("Collections") + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Organization"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.CollectionCipher", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Vault.Models.Cipher", "Cipher") + .WithMany("CollectionCiphers") + .HasForeignKey("CipherId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Collection", "Collection") + .WithMany("CollectionCiphers") + .HasForeignKey("CollectionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Cipher"); + + b.Navigation("Collection"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.CollectionGroup", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Collection", "Collection") + .WithMany("CollectionGroups") + .HasForeignKey("CollectionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Group", "Group") + .WithMany() + .HasForeignKey("GroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Collection"); + + b.Navigation("Group"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.CollectionUser", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Collection", "Collection") + .WithMany("CollectionUsers") + .HasForeignKey("CollectionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.OrganizationUser", "OrganizationUser") + .WithMany("CollectionUsers") + .HasForeignKey("OrganizationUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Collection"); + + b.Navigation("OrganizationUser"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Device", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.EmergencyAccess", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "Grantee") + .WithMany() + .HasForeignKey("GranteeId"); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "Grantor") + .WithMany() + .HasForeignKey("GrantorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Grantee"); + + b.Navigation("Grantor"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Group", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany("Groups") + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Organization"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.GroupUser", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Group", "Group") + .WithMany("GroupUsers") + .HasForeignKey("GroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.OrganizationUser", "OrganizationUser") + .WithMany("GroupUsers") + .HasForeignKey("OrganizationUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Group"); + + b.Navigation("OrganizationUser"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationApiKey", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany("ApiKeys") + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Organization"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationConnection", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany("Connections") + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Organization"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationDomain", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany("Domains") + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Organization"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationSponsorship", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "SponsoredOrganization") + .WithMany() + .HasForeignKey("SponsoredOrganizationId"); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "SponsoringOrganization") + .WithMany() + .HasForeignKey("SponsoringOrganizationId"); + + b.Navigation("SponsoredOrganization"); + + b.Navigation("SponsoringOrganization"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationUser", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany("OrganizationUsers") + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") + .WithMany("OrganizationUsers") + .HasForeignKey("UserId"); + + b.Navigation("Organization"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Policy", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany("Policies") + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Organization"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.ProviderOrganization", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany() + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Provider", "Provider") + .WithMany() + .HasForeignKey("ProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Organization"); + + b.Navigation("Provider"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.ProviderUser", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Provider", "Provider") + .WithMany() + .HasForeignKey("ProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") + .WithMany() + .HasForeignKey("UserId"); + + b.Navigation("Provider"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Send", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany() + .HasForeignKey("OrganizationId"); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") + .WithMany() + .HasForeignKey("UserId"); + + b.Navigation("Organization"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.SsoConfig", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany("SsoConfigs") + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Organization"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.SsoUser", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany("SsoUsers") + .HasForeignKey("OrganizationId"); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") + .WithMany("SsoUsers") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Organization"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Transaction", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany("Transactions") + .HasForeignKey("OrganizationId"); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") + .WithMany("Transactions") + .HasForeignKey("UserId"); + + b.Navigation("Organization"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ApiKey", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccount", "ServiceAccount") + .WithMany() + .HasForeignKey("ServiceAccountId"); + + b.Navigation("ServiceAccount"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Project", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany() + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Organization"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Secret", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany() + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Organization"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccount", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany() + .HasForeignKey("OrganizationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Organization"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Vault.Models.Cipher", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany("Ciphers") + .HasForeignKey("OrganizationId"); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") + .WithMany("Ciphers") + .HasForeignKey("UserId"); + + b.Navigation("Organization"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Vault.Models.Folder", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") + .WithMany("Folders") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("ProjectSecret", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Project", null) + .WithMany() + .HasForeignKey("ProjectsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Secret", null) + .WithMany() + .HasForeignKey("SecretsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.GroupProjectAccessPolicy", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Project", "GrantedProject") + .WithMany("GroupAccessPolicies") + .HasForeignKey("GrantedProjectId"); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Group", "Group") + .WithMany() + .HasForeignKey("GroupId"); + + b.Navigation("GrantedProject"); + + b.Navigation("Group"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.GroupServiceAccountAccessPolicy", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccount", "GrantedServiceAccount") + .WithMany("GroupAccessPolicies") + .HasForeignKey("GrantedServiceAccountId"); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Group", "Group") + .WithMany() + .HasForeignKey("GroupId"); + + b.Navigation("GrantedServiceAccount"); + + b.Navigation("Group"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccountProjectAccessPolicy", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Project", "GrantedProject") + .WithMany("ServiceAccountAccessPolicies") + .HasForeignKey("GrantedProjectId"); + + b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccount", "ServiceAccount") + .WithMany() + .HasForeignKey("ServiceAccountId"); + + b.Navigation("GrantedProject"); + + b.Navigation("ServiceAccount"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.UserProjectAccessPolicy", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Project", "GrantedProject") + .WithMany("UserAccessPolicies") + .HasForeignKey("GrantedProjectId"); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.OrganizationUser", "OrganizationUser") + .WithMany() + .HasForeignKey("OrganizationUserId"); + + b.Navigation("GrantedProject"); + + b.Navigation("OrganizationUser"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.UserServiceAccountAccessPolicy", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccount", "GrantedServiceAccount") + .WithMany("UserAccessPolicies") + .HasForeignKey("GrantedServiceAccountId"); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.OrganizationUser", "OrganizationUser") + .WithMany() + .HasForeignKey("OrganizationUserId"); + + b.Navigation("GrantedServiceAccount"); + + b.Navigation("OrganizationUser"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Collection", b => + { + b.Navigation("CollectionCiphers"); + + b.Navigation("CollectionGroups"); + + b.Navigation("CollectionUsers"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Group", b => + { + b.Navigation("GroupUsers"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Organization", b => + { + b.Navigation("ApiKeys"); + + b.Navigation("Ciphers"); + + b.Navigation("Collections"); + + b.Navigation("Connections"); + + b.Navigation("Domains"); + + b.Navigation("Groups"); + + b.Navigation("OrganizationUsers"); + + b.Navigation("Policies"); + + b.Navigation("SsoConfigs"); + + b.Navigation("SsoUsers"); + + b.Navigation("Transactions"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationUser", b => + { + b.Navigation("CollectionUsers"); + + b.Navigation("GroupUsers"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.User", b => + { + b.Navigation("Ciphers"); + + b.Navigation("Folders"); + + b.Navigation("OrganizationUsers"); + + b.Navigation("SsoUsers"); + + b.Navigation("Transactions"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Project", b => + { + b.Navigation("GroupAccessPolicies"); + + b.Navigation("ServiceAccountAccessPolicies"); + + b.Navigation("UserAccessPolicies"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccount", b => + { + b.Navigation("GroupAccessPolicies"); + + b.Navigation("UserAccessPolicies"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Vault.Models.Cipher", b => + { + b.Navigation("CollectionCiphers"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/util/SqliteMigrations/Migrations/20230315121314_AuthRequestRemoveFingerprintPhrase.cs b/util/SqliteMigrations/Migrations/20230315121314_AuthRequestRemoveFingerprintPhrase.cs new file mode 100644 index 0000000000..4fcd2963fa --- /dev/null +++ b/util/SqliteMigrations/Migrations/20230315121314_AuthRequestRemoveFingerprintPhrase.cs @@ -0,0 +1,24 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Bit.SqliteMigrations.Migrations; + +public partial class AuthRequestRemoveFingerprintPhrase : Migration +{ + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "RequestFingerprint", + table: "AuthRequest"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "RequestFingerprint", + table: "AuthRequest", + type: "TEXT", + nullable: true); + } +} diff --git a/util/SqliteMigrations/Migrations/DatabaseContextModelSnapshot.cs b/util/SqliteMigrations/Migrations/DatabaseContextModelSnapshot.cs index 8995e903cb..0952d3c8ac 100644 --- a/util/SqliteMigrations/Migrations/DatabaseContextModelSnapshot.cs +++ b/util/SqliteMigrations/Migrations/DatabaseContextModelSnapshot.cs @@ -51,9 +51,6 @@ namespace Bit.SqliteMigrations.Migrations b.Property("RequestDeviceType") .HasColumnType("INTEGER"); - b.Property("RequestFingerprint") - .HasColumnType("TEXT"); - b.Property("RequestIpAddress") .HasMaxLength(50) .HasColumnType("TEXT"); @@ -79,53 +76,6 @@ namespace Bit.SqliteMigrations.Migrations b.ToTable("AuthRequest", (string)null); }); - modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Cipher", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Attachments") - .HasColumnType("TEXT"); - - b.Property("CreationDate") - .HasColumnType("TEXT"); - - b.Property("Data") - .HasColumnType("TEXT"); - - b.Property("DeletedDate") - .HasColumnType("TEXT"); - - b.Property("Favorites") - .HasColumnType("TEXT"); - - b.Property("Folders") - .HasColumnType("TEXT"); - - b.Property("OrganizationId") - .HasColumnType("TEXT"); - - b.Property("Reprompt") - .HasColumnType("INTEGER"); - - b.Property("RevisionDate") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("UserId"); - - b.ToTable("Cipher", (string)null); - }); - modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Collection", b => { b.Property("Id") @@ -367,30 +317,6 @@ namespace Bit.SqliteMigrations.Migrations b.ToTable("Event", (string)null); }); - modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Folder", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CreationDate") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("RevisionDate") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("Folder", (string)null); - }); - modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Grant", b => { b.Property("Key") @@ -1514,6 +1440,77 @@ namespace Bit.SqliteMigrations.Migrations b.ToTable("ServiceAccount", (string)null); }); + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Vault.Models.Cipher", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("Attachments") + .HasColumnType("TEXT"); + + b.Property("CreationDate") + .HasColumnType("TEXT"); + + b.Property("Data") + .HasColumnType("TEXT"); + + b.Property("DeletedDate") + .HasColumnType("TEXT"); + + b.Property("Favorites") + .HasColumnType("TEXT"); + + b.Property("Folders") + .HasColumnType("TEXT"); + + b.Property("OrganizationId") + .HasColumnType("TEXT"); + + b.Property("Reprompt") + .HasColumnType("INTEGER"); + + b.Property("RevisionDate") + .HasColumnType("TEXT"); + + b.Property("Type") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("OrganizationId"); + + b.HasIndex("UserId"); + + b.ToTable("Cipher", (string)null); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Vault.Models.Folder", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("CreationDate") + .HasColumnType("TEXT"); + + b.Property("Name") + .HasColumnType("TEXT"); + + b.Property("RevisionDate") + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("Folder", (string)null); + }); + modelBuilder.Entity("ProjectSecret", b => { b.Property("ProjectsId") @@ -1650,21 +1647,6 @@ namespace Bit.SqliteMigrations.Migrations b.Navigation("User"); }); - modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Cipher", b => - { - b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") - .WithMany("Ciphers") - .HasForeignKey("OrganizationId"); - - b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") - .WithMany("Ciphers") - .HasForeignKey("UserId"); - - b.Navigation("Organization"); - - b.Navigation("User"); - }); - modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Collection", b => { b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") @@ -1678,7 +1660,7 @@ namespace Bit.SqliteMigrations.Migrations modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.CollectionCipher", b => { - b.HasOne("Bit.Infrastructure.EntityFramework.Models.Cipher", "Cipher") + b.HasOne("Bit.Infrastructure.EntityFramework.Vault.Models.Cipher", "Cipher") .WithMany("CollectionCiphers") .HasForeignKey("CipherId") .OnDelete(DeleteBehavior.Cascade) @@ -1761,17 +1743,6 @@ namespace Bit.SqliteMigrations.Migrations b.Navigation("Grantor"); }); - modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Folder", b => - { - b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") - .WithMany("Folders") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - }); - modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Group", b => { b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") @@ -2014,6 +1985,32 @@ namespace Bit.SqliteMigrations.Migrations b.Navigation("Organization"); }); + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Vault.Models.Cipher", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.Organization", "Organization") + .WithMany("Ciphers") + .HasForeignKey("OrganizationId"); + + b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") + .WithMany("Ciphers") + .HasForeignKey("UserId"); + + b.Navigation("Organization"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Vault.Models.Folder", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") + .WithMany("Folders") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + modelBuilder.Entity("ProjectSecret", b => { b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Project", null) @@ -2104,11 +2101,6 @@ namespace Bit.SqliteMigrations.Migrations b.Navigation("OrganizationUser"); }); - modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Cipher", b => - { - b.Navigation("CollectionCiphers"); - }); - modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Collection", b => { b.Navigation("CollectionCiphers"); @@ -2183,6 +2175,11 @@ namespace Bit.SqliteMigrations.Migrations b.Navigation("UserAccessPolicies"); }); + + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Vault.Models.Cipher", b => + { + b.Navigation("CollectionCiphers"); + }); #pragma warning restore 612, 618 } } diff --git a/util/SqliteMigrations/packages.lock.json b/util/SqliteMigrations/packages.lock.json index 7273cd36ef..167d63318f 100644 --- a/util/SqliteMigrations/packages.lock.json +++ b/util/SqliteMigrations/packages.lock.json @@ -2791,56 +2791,56 @@ "core": { "type": "Project", "dependencies": { - "AWSSDK.SQS": "[3.7.2.47, )", - "AWSSDK.SimpleEmail": "[3.7.0.150, )", - "AspNetCoreRateLimit": "[4.0.2, )", - "AspNetCoreRateLimit.Redis": "[1.0.1, )", - "Azure.Extensions.AspNetCore.DataProtection.Blobs": "[1.2.1, )", - "Azure.Storage.Blobs": "[12.14.1, )", - "Azure.Storage.Queues": "[12.12.0, )", - "BitPay.Light": "[1.0.1907, )", - "Braintree": "[5.12.0, )", - "DnsClient": "[1.7.0, )", - "Fido2.AspNet": "[3.0.1, )", - "Handlebars.Net": "[2.1.2, )", - "IdentityServer4": "[4.1.2, )", - "IdentityServer4.AccessTokenValidation": "[3.0.1, )", - "LaunchDarkly.ServerSdk": "[7.0.0, )", - "MailKit": "[3.2.0, )", - "Microsoft.AspNetCore.Authentication.JwtBearer": "[6.0.4, )", - "Microsoft.Azure.Cosmos.Table": "[1.0.8, )", - "Microsoft.Azure.NotificationHubs": "[4.1.0, )", - "Microsoft.Azure.ServiceBus": "[5.2.0, )", - "Microsoft.Data.SqlClient": "[5.0.1, )", - "Microsoft.Extensions.Caching.StackExchangeRedis": "[6.0.6, )", - "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, )", - "Otp.NET": "[1.2.2, )", - "Quartz": "[3.4.0, )", - "SendGrid": "[9.27.0, )", - "Sentry.Serilog": "[3.16.0, )", - "Serilog.AspNetCore": "[5.0.0, )", - "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, )", - "Stripe.net": "[40.0.0, )", - "YubicoDotNetClient": "[1.2.0, )" + "AWSSDK.SQS": "3.7.2.47", + "AWSSDK.SimpleEmail": "3.7.0.150", + "AspNetCoreRateLimit": "4.0.2", + "AspNetCoreRateLimit.Redis": "1.0.1", + "Azure.Extensions.AspNetCore.DataProtection.Blobs": "1.2.1", + "Azure.Storage.Blobs": "12.14.1", + "Azure.Storage.Queues": "12.12.0", + "BitPay.Light": "1.0.1907", + "Braintree": "5.12.0", + "DnsClient": "1.7.0", + "Fido2.AspNet": "3.0.1", + "Handlebars.Net": "2.1.2", + "IdentityServer4": "4.1.2", + "IdentityServer4.AccessTokenValidation": "3.0.1", + "LaunchDarkly.ServerSdk": "7.0.0", + "MailKit": "3.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "6.0.4", + "Microsoft.Azure.Cosmos.Table": "1.0.8", + "Microsoft.Azure.NotificationHubs": "4.1.0", + "Microsoft.Azure.ServiceBus": "5.2.0", + "Microsoft.Data.SqlClient": "5.0.1", + "Microsoft.Extensions.Caching.StackExchangeRedis": "6.0.6", + "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", + "Otp.NET": "1.2.2", + "Quartz": "3.4.0", + "SendGrid": "9.27.0", + "Sentry.Serilog": "3.16.0", + "Serilog.AspNetCore": "5.0.0", + "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", + "Stripe.net": "40.0.0", + "YubicoDotNetClient": "1.2.0" } }, "infrastructure.entityframework": { "type": "Project", "dependencies": { - "AutoMapper.Extensions.Microsoft.DependencyInjection": "[11.0.0, )", - "Core": "[2023.2.0, )", - "Microsoft.EntityFrameworkCore.Relational": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.SqlServer": "[6.0.12, )", - "Microsoft.EntityFrameworkCore.Sqlite": "[6.0.12, )", - "Npgsql.EntityFrameworkCore.PostgreSQL": "[6.0.8, )", - "Pomelo.EntityFrameworkCore.MySql": "[6.0.2, )", - "linq2db.EntityFrameworkCore": "[6.11.0, )" + "AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0", + "Core": "2023.2.2", + "Microsoft.EntityFrameworkCore.Relational": "6.0.12", + "Microsoft.EntityFrameworkCore.SqlServer": "6.0.12", + "Microsoft.EntityFrameworkCore.Sqlite": "6.0.12", + "Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.8", + "Pomelo.EntityFrameworkCore.MySql": "6.0.2", + "linq2db.EntityFrameworkCore": "6.11.0" } } }