2025-07-08 10:25:59 -04:00
|
|
|
|
// FIXME: Update this file to be null safe and then delete the line below
|
|
|
|
|
|
#nullable disable
|
|
|
|
|
|
|
|
|
|
|
|
using System.Reflection;
|
2023-03-10 08:11:11 -05:00
|
|
|
|
|
|
|
|
|
|
namespace Bit.Core;
|
2022-08-29 16:06:55 -04:00
|
|
|
|
|
2018-08-15 10:54:15 -04:00
|
|
|
|
public static class Constants
|
|
|
|
|
|
{
|
|
|
|
|
|
public const int BypassFiltersEventId = 12482444;
|
2023-10-30 08:40:06 -05:00
|
|
|
|
public const int FailedSecretVerificationDelay = 2000;
|
2021-08-04 09:00:30 +10:00
|
|
|
|
|
2025-09-10 10:08:22 -05:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Self-hosted max storage limit in GB (10 TB).
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public const short SelfHostedMaxStorageGb = 10240;
|
|
|
|
|
|
|
2021-08-04 09:00:30 +10:00
|
|
|
|
// File size limits - give 1 MB extra for cushion.
|
|
|
|
|
|
// Note: if request size limits are changed, 'client_max_body_size'
|
|
|
|
|
|
// in nginx/proxy.conf may also need to be updated accordingly.
|
|
|
|
|
|
public const long FileSize101mb = 101L * 1024L * 1024L;
|
|
|
|
|
|
public const long FileSize501mb = 501L * 1024L * 1024L;
|
2023-01-18 13:16:57 -05:00
|
|
|
|
public const string DatabaseFieldProtectorPurpose = "DatabaseFieldProtection";
|
|
|
|
|
|
public const string DatabaseFieldProtectedPrefix = "P|";
|
2023-05-15 07:38:41 -07:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Default number of days an organization has to apply an updated license to their self-hosted installation after
|
|
|
|
|
|
/// their subscription has expired.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public const int OrganizationSelfHostSubscriptionGracePeriodDays = 60;
|
2023-09-28 08:45:13 -04:00
|
|
|
|
|
2023-10-17 18:17:13 +02:00
|
|
|
|
public const string Fido2KeyCipherMinimumVersion = "2023.10.0";
|
2024-11-05 20:25:06 +01:00
|
|
|
|
public const string SSHKeyCipherMinimumVersion = "2024.12.0";
|
2025-06-02 22:04:01 +02:00
|
|
|
|
public const string DenyLegacyUserMinimumVersion = "2025.6.0";
|
2023-10-17 18:17:13 +02:00
|
|
|
|
|
2023-11-20 15:55:31 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Used by IdentityServer to identify our own provider.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public const string IdentityProvider = "bitwarden";
|
2023-12-20 22:54:45 +01:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Date identifier used in ProviderService to determine if a provider was created before Nov 6, 2023.
|
|
|
|
|
|
/// If true, the organization plan assigned to that provider is updated to a 2020 plan.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public static readonly DateTime ProviderCreatedPriorNov62023 = new DateTime(2023, 11, 6);
|
2024-02-13 20:28:14 +01:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// When you set the ProrationBehavior to create_prorations,
|
|
|
|
|
|
/// Stripe will automatically create prorations for any changes made to the subscription,
|
|
|
|
|
|
/// such as changing the plan, adding or removing quantities, or applying discounts.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public const string CreateProrations = "create_prorations";
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// When you set the ProrationBehavior to always_invoice,
|
|
|
|
|
|
/// Stripe will always generate an invoice when a subscription update occurs,
|
|
|
|
|
|
/// regardless of whether there is a proration or not.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public const string AlwaysInvoice = "always_invoice";
|
2025-09-03 10:03:49 -05:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Used primarily to determine whether a customer's business is inside or outside the United States
|
|
|
|
|
|
/// for billing purposes.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public static class CountryAbbreviations
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Abbreviation for The United States.
|
|
|
|
|
|
/// This value must match what Stripe uses for the `Country` field value for the United States.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public const string UnitedStates = "US";
|
|
|
|
|
|
}
|
2025-10-06 16:15:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Constants for our browser extensions IDs
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public static class BrowserExtensions
|
|
|
|
|
|
{
|
|
|
|
|
|
public const string ChromeId = "chrome-extension://nngceckbapebfimnlniiiahkandclblb/";
|
|
|
|
|
|
public const string EdgeId = "chrome-extension://jbkfoedolllekgbhcbcoahefnbanhhlh/";
|
|
|
|
|
|
public const string OperaId = "chrome-extension://ccnckbpmaceehanjmeomladnmlffdjgn/";
|
|
|
|
|
|
}
|
2018-08-15 10:54:15 -04:00
|
|
|
|
}
|
2020-08-26 14:12:04 -04:00
|
|
|
|
|
2023-12-05 17:21:46 +01:00
|
|
|
|
public static class AuthConstants
|
|
|
|
|
|
{
|
|
|
|
|
|
public static readonly RangeConstant PBKDF2_ITERATIONS = new(600_000, 2_000_000, 600_000);
|
|
|
|
|
|
|
|
|
|
|
|
public static readonly RangeConstant ARGON2_ITERATIONS = new(2, 10, 3);
|
|
|
|
|
|
public static readonly RangeConstant ARGON2_MEMORY = new(15, 1024, 64);
|
|
|
|
|
|
public static readonly RangeConstant ARGON2_PARALLELISM = new(1, 16, 4);
|
2024-12-17 08:59:39 -08:00
|
|
|
|
public static readonly string NewDeviceVerificationExceptionCacheKeyFormat = "NewDeviceVerificationException_{0}";
|
2023-12-05 17:21:46 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class RangeConstant
|
|
|
|
|
|
{
|
|
|
|
|
|
public int Default { get; }
|
|
|
|
|
|
public int Min { get; }
|
|
|
|
|
|
public int Max { get; }
|
|
|
|
|
|
|
|
|
|
|
|
public RangeConstant(int min, int max, int defaultValue)
|
|
|
|
|
|
{
|
|
|
|
|
|
Default = defaultValue;
|
|
|
|
|
|
Min = min;
|
|
|
|
|
|
Max = max;
|
|
|
|
|
|
|
|
|
|
|
|
if (Min > Max)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw new ArgumentOutOfRangeException($"{Min} is larger than {Max}.");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!InsideRange(defaultValue))
|
|
|
|
|
|
{
|
|
|
|
|
|
throw new ArgumentOutOfRangeException($"{Default} is outside allowed range of {Min}-{Max}.");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public bool InsideRange(int number)
|
|
|
|
|
|
{
|
|
|
|
|
|
return Min <= number && number <= Max;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-08-26 14:12:04 -04:00
|
|
|
|
public static class TokenPurposes
|
|
|
|
|
|
{
|
|
|
|
|
|
public const string LinkSso = "LinkSso";
|
|
|
|
|
|
}
|
2021-01-11 11:03:46 -05:00
|
|
|
|
|
|
|
|
|
|
public static class AuthenticationSchemes
|
|
|
|
|
|
{
|
|
|
|
|
|
public const string BitwardenExternalCookieAuthenticationScheme = "bw.external";
|
2018-08-15 10:54:15 -04:00
|
|
|
|
}
|
2023-03-07 13:46:52 -05:00
|
|
|
|
|
|
|
|
|
|
public static class FeatureFlagKeys
|
|
|
|
|
|
{
|
2025-01-23 00:04:08 +10:00
|
|
|
|
/* Admin Console Team */
|
2025-02-14 21:05:49 +10:00
|
|
|
|
public const string PolicyRequirements = "pm-14439-policy-requirements";
|
2025-04-07 09:14:10 -05:00
|
|
|
|
public const string ScimInviteUserOptimization = "pm-16811-optimize-invite-user-flow-to-fail-fast";
|
2025-06-17 12:20:22 +01:00
|
|
|
|
public const string CreateDefaultLocation = "pm-19467-create-default-location";
|
2025-10-20 07:27:18 -05:00
|
|
|
|
public const string AutomaticConfirmUsers = "pm-19934-auto-confirm-organization-users";
|
2025-09-12 13:44:19 -04:00
|
|
|
|
public const string PM23845_VNextApplicationCache = "pm-24957-refactor-memory-application-cache";
|
2025-11-19 20:25:50 -05:00
|
|
|
|
public const string BlockClaimedDomainAccountCreation = "pm-28297-block-uninvited-claimed-domain-registration";
|
2025-11-24 11:41:01 +00:00
|
|
|
|
public const string IncreaseBulkReinviteLimitForCloud = "pm-28251-increase-bulk-reinvite-limit-for-cloud";
|
2026-01-28 09:05:29 -06:00
|
|
|
|
public const string DefaultUserCollectionRestore = "pm-30883-my-items-restored-users";
|
2026-01-14 12:21:49 -06:00
|
|
|
|
public const string PremiumAccessQuery = "pm-29495-refactor-premium-interface";
|
2026-01-22 11:23:18 -06:00
|
|
|
|
public const string RefactorMembersComponent = "pm-29503-refactor-members-inheritance";
|
2025-01-23 00:04:08 +10:00
|
|
|
|
|
2025-11-07 11:04:27 +01:00
|
|
|
|
/* Architecture */
|
|
|
|
|
|
public const string DesktopMigrationMilestone1 = "desktop-ui-migration-milestone-1";
|
|
|
|
|
|
public const string DesktopMigrationMilestone2 = "desktop-ui-migration-milestone-2";
|
|
|
|
|
|
public const string DesktopMigrationMilestone3 = "desktop-ui-migration-milestone-3";
|
2026-01-26 16:36:10 +01:00
|
|
|
|
public const string DesktopMigrationMilestone4 = "desktop-ui-migration-milestone-4";
|
2025-11-07 11:04:27 +01:00
|
|
|
|
|
2025-03-19 15:27:51 -04:00
|
|
|
|
/* Auth Team */
|
2025-03-31 14:27:09 -04:00
|
|
|
|
public const string TwoFactorExtensionDataPersistence = "pm-9115-two-factor-extension-data-persistence";
|
2024-04-30 12:43:12 -04:00
|
|
|
|
public const string EmailVerification = "email-verification";
|
2025-05-16 09:50:32 -04:00
|
|
|
|
public const string BrowserExtensionLoginApproval = "pm-14938-browser-extension-login-approvals";
|
2025-03-30 16:03:09 -04:00
|
|
|
|
public const string SetInitialPasswordRefactor = "pm-16117-set-initial-password-refactor";
|
|
|
|
|
|
public const string ChangeExistingPasswordRefactor = "pm-16117-change-existing-password-refactor";
|
2025-07-14 10:23:30 -04:00
|
|
|
|
public const string Otp6Digits = "pm-18612-otp-6-digits";
|
2025-10-27 14:21:24 -04:00
|
|
|
|
public const string PM24579_PreventSsoOnExistingNonCompliantUsers = "pm-24579-prevent-sso-on-existing-non-compliant-users";
|
2025-09-24 15:30:43 -04:00
|
|
|
|
public const string DisableAlternateLoginMethods = "pm-22110-disable-alternate-login-methods";
|
2025-10-22 15:13:31 -04:00
|
|
|
|
public const string MJMLBasedEmailTemplates = "mjml-based-email-templates";
|
2026-01-26 16:18:42 +01:00
|
|
|
|
public const string PM2035PasskeyUnlock = "pm-2035-passkey-unlock";
|
2025-11-20 14:51:38 -05:00
|
|
|
|
public const string MjmlWelcomeEmailTemplates = "pm-21741-mjml-welcome-email";
|
2026-01-06 16:43:36 -05:00
|
|
|
|
public const string OrganizationConfirmationEmail = "pm-28402-update-confirmed-to-org-email-template";
|
2025-11-17 11:25:22 -08:00
|
|
|
|
public const string MarketingInitiatedPremiumFlow = "pm-26140-marketing-initiated-premium-flow";
|
2026-01-07 17:28:34 -05:00
|
|
|
|
public const string PrefetchPasswordPrelogin = "pm-23801-prefetch-password-prelogin";
|
2026-01-27 14:26:07 -05:00
|
|
|
|
public const string SafariAccountSwitching = "pm-5594-safari-account-switching";
|
2026-01-15 06:00:31 -08:00
|
|
|
|
public const string PM27086_UpdateAuthenticationApisForInputPassword = "pm-27086-update-authentication-apis-for-input-password";
|
2025-03-30 16:03:09 -04:00
|
|
|
|
|
|
|
|
|
|
/* Autofill Team */
|
|
|
|
|
|
public const string SSHAgent = "ssh-agent";
|
2025-10-22 01:11:40 +02:00
|
|
|
|
public const string SSHAgentV2 = "ssh-agent-v2";
|
2025-03-30 16:03:09 -04:00
|
|
|
|
public const string SSHVersionCheckQAOverride = "ssh-version-check-qa-override";
|
2025-01-14 15:47:35 -05:00
|
|
|
|
public const string NotificationRefresh = "notification-refresh";
|
2024-11-28 09:49:09 +01:00
|
|
|
|
public const string MacOsNativeCredentialSync = "macos-native-credential-sync";
|
2025-06-20 14:02:48 -04:00
|
|
|
|
public const string WindowsDesktopAutotype = "windows-desktop-autotype";
|
2025-12-17 13:29:06 -07:00
|
|
|
|
public const string WindowsDesktopAutotypeGA = "windows-desktop-autotype-ga";
|
2026-01-23 09:05:58 -05:00
|
|
|
|
public const string NotificationUndeterminedCipherScenarioLogic = "undetermined-cipher-scenario-logic";
|
2025-03-30 16:03:09 -04:00
|
|
|
|
|
|
|
|
|
|
/* Billing Team */
|
|
|
|
|
|
public const string TrialPayment = "PM-8163-trial-payment";
|
2025-10-13 10:49:55 -05:00
|
|
|
|
public const string PM25379_UseNewOrganizationMetadataStructure = "pm-25379-use-new-organization-metadata-structure";
|
2025-10-07 09:09:04 -05:00
|
|
|
|
public const string PM24032_NewNavigationPremiumUpgradeButton = "pm-24032-new-navigation-premium-upgrade-button";
|
2025-10-07 16:08:02 -05:00
|
|
|
|
public const string PM23713_PremiumBadgeOpensNewPremiumUpgradeDialog = "pm-23713-premium-badge-opens-new-premium-upgrade-dialog";
|
2025-10-22 14:13:16 -05:00
|
|
|
|
public const string PM26793_FetchPremiumPriceFromPricingService = "pm-26793-fetch-premium-price-from-pricing-service";
|
2025-10-29 13:12:16 -04:00
|
|
|
|
public const string PM23341_Milestone_2 = "pm-23341-milestone-2";
|
2025-11-10 11:51:00 -06:00
|
|
|
|
public const string PM26462_Milestone_3 = "pm-26462-milestone-3";
|
2025-11-24 16:11:52 -06:00
|
|
|
|
public const string PM28265_EnableReconcileAdditionalStorageJob = "pm-28265-enable-reconcile-additional-storage-job";
|
|
|
|
|
|
public const string PM28265_ReconcileAdditionalStorageJobEnableLiveMode = "pm-28265-reconcile-additional-storage-job-enable-live-mode";
|
2026-01-05 17:52:52 +01:00
|
|
|
|
public const string PM29594_UpdateIndividualSubscriptionPage = "pm-29594-update-individual-subscription-page";
|
2025-03-30 16:03:09 -04:00
|
|
|
|
|
|
|
|
|
|
/* Key Management Team */
|
|
|
|
|
|
public const string PrivateKeyRegeneration = "pm-12241-private-key-regeneration";
|
|
|
|
|
|
public const string Argon2Default = "argon2-default";
|
|
|
|
|
|
public const string SSHKeyItemVaultItem = "ssh-key-vault-item";
|
[PM-21034] Feature Branch - "User Crypto V2" (#5982)
* [PM-21034] Database changes for signature keypairs (#5906)
* Add signing key repositories, models, and sql migration scripts
* Rename UserSigningKeys table to UserSigningKey
* Rename signedpublickeyownershipclaim to signedpublickey
* Move signedPublicKey to last parameter
* Add newline at end of file
* Rename to signature key pair
* Further rename to signaturekeypair
* Rename to UserSignatureKeyPairRepository
* Add newline
* Rename more instances to UserSignatureKeyPair
* Update parameter order
* Fix order
* Add more renames
* Cleanup
* Fix sql
* Add ef migrations
* Fix difference in SQL SP compared to migration SP
* Fix difference in SQL SP vs migration
* Fix difference in SQL SP vs migration
* Attempt to fix sql
* Rename migration to start later
* Address feedback
* Move UserSignatureKeyPair to KM codeownership
* Fix build
* Fix build
* Fix build
* Move out entitytypeconfiguration
* Use view for reading usersignaturekeypairs
* Fix migration script
* Fix migration script
* Drop view if exists
* Enable nullable
* Replace with create or alter view
* Switch go generatecomb
* Switch to generatecomb
* Move signature algorithm
* Move useresignaturekeypairentitytypeconfiguration to km ownership
* Move userSignatureKeyPair model
* Unswap file names
* Move sql files to km ownership
* Add index on userid for signature keys
* Fix wrong filename
* Remove string length limit
* Regenerate EF migrations
* Undo changes to program.cs
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Rename dbset to plural
* Update src/Infrastructure.EntityFramework/KeyManagement/Repositories/UserSignatureKeyPairRepository.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
---------
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* [PM-21034] Implement api changes to retreive signing keys (#5932)
* Add signing key repositories, models, and sql migration scripts
* Rename UserSigningKeys table to UserSigningKey
* Rename signedpublickeyownershipclaim to signedpublickey
* Move signedPublicKey to last parameter
* Add newline at end of file
* Rename to signature key pair
* Further rename to signaturekeypair
* Rename to UserSignatureKeyPairRepository
* Add newline
* Rename more instances to UserSignatureKeyPair
* Update parameter order
* Fix order
* Add more renames
* Cleanup
* Fix sql
* Add ef migrations
* Fix difference in SQL SP compared to migration SP
* Fix difference in SQL SP vs migration
* Fix difference in SQL SP vs migration
* Attempt to fix sql
* Rename migration to start later
* Address feedback
* Move UserSignatureKeyPair to KM codeownership
* Fix build
* Fix build
* Fix build
* Move out entitytypeconfiguration
* Use view for reading usersignaturekeypairs
* Fix migration script
* Fix migration script
* Add initial get keys endpoint
* Add sync response
* Cleanup
* Add query and fix types
* Add tests and cleanup
* Fix test
* Drop view if exists
* Add km queries
* Cleanup
* Enable nullable
* Cleanup
* Cleanup
* Enable nullable
* Fix incorrect namespace
* Remove unused using
* Fix test build
* Fix build error
* Fix build
* Attempt to fix tests
* Attempt to fix tests
* Replace with create or alter view
* Attempt to fix tests
* Attempt to fix build
* Rename to include async suffix
* Fix test
* Rename repo
* Attempt to fix tests
* Cleanup
* Test
* Undo test
* Fix tests
* Fix test
* Switch go generatecomb
* Switch to generatecomb
* Move signature algorithm
* Move useresignaturekeypairentitytypeconfiguration to km ownership
* Move userSignatureKeyPair model
* Unswap file names
* Move sql files to km ownership
* Add index on userid for signature keys
* Fix wrong filename
* Fix build
* Remove string length limit
* Regenerate EF migrations
* Undo changes to program.cs
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Rename dbset to plural
* Update src/Infrastructure.EntityFramework/KeyManagement/Repositories/UserSignatureKeyPairRepository.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Api/KeyManagement/Models/Response/PrivateKeysResponseModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Api/KeyManagement/Controllers/UsersController.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Cleanup and move query to core
* Fix test
* Fix build
* Fix tests
* Update src/Api/KeyManagement/Models/Response/PrivateKeysResponseModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Switch away from primary constructor
* Use argumentNullException
* Add test
* Pass user account keys directly to profileresponsemodel
* Move registration to core
* Update src/Api/Startup.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Api/Startup.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Remove empty line
* Apply suggestions
* Fix tests
* Fix tests
---------
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* [PM-22384] Implement key-rotation based enrollment to user-crypto v2 (#5934)
* Add signing key repositories, models, and sql migration scripts
* Rename UserSigningKeys table to UserSigningKey
* Rename signedpublickeyownershipclaim to signedpublickey
* Move signedPublicKey to last parameter
* Add newline at end of file
* Rename to signature key pair
* Further rename to signaturekeypair
* Rename to UserSignatureKeyPairRepository
* Add newline
* Rename more instances to UserSignatureKeyPair
* Update parameter order
* Fix order
* Add more renames
* Cleanup
* Fix sql
* Add ef migrations
* Fix difference in SQL SP compared to migration SP
* Fix difference in SQL SP vs migration
* Fix difference in SQL SP vs migration
* Attempt to fix sql
* Rename migration to start later
* Address feedback
* Move UserSignatureKeyPair to KM codeownership
* Fix build
* Fix build
* Fix build
* Move out entitytypeconfiguration
* Use view for reading usersignaturekeypairs
* Fix migration script
* Fix migration script
* Add initial get keys endpoint
* Add sync response
* Cleanup
* Add query and fix types
* Add tests and cleanup
* Fix test
* Drop view if exists
* Add km queries
* Cleanup
* Enable nullable
* Cleanup
* Cleanup
* Enable nullable
* Fix incorrect namespace
* Remove unused using
* Fix test build
* Fix build error
* Fix build
* Attempt to fix tests
* Attempt to fix tests
* Replace with create or alter view
* Attempt to fix tests
* Attempt to fix build
* Rename to include async suffix
* Fix test
* Rename repo
* Attempt to fix tests
* Cleanup
* Test
* Undo test
* Fix tests
* Fix test
* Switch go generatecomb
* Switch to generatecomb
* Move signature algorithm
* Move useresignaturekeypairentitytypeconfiguration to km ownership
* Move userSignatureKeyPair model
* Unswap file names
* Move sql files to km ownership
* Add index on userid for signature keys
* Fix wrong filename
* Fix build
* Remove string length limit
* Regenerate EF migrations
* Undo changes to program.cs
* Cleanup
* Add migration to user encryption v2
* Fix build
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Rename dbset to plural
* Cleanup
* Cleanup
* Fix build
* Fix test
* Add validation
* Fix test
* Apply fixes
* Fix tests
* Improve tests
* Add tests
* Add error message validation
* Fix tests
* Fix tests
* Fix test
* Add test
* Fix tests and errors
* Update src/Infrastructure.EntityFramework/KeyManagement/Repositories/UserSignatureKeyPairRepository.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Api/KeyManagement/Models/Response/PrivateKeysResponseModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Api/KeyManagement/Controllers/UsersController.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Cleanup and move query to core
* Fix test
* Fix build
* Fix tests
* Update src/Api/KeyManagement/Models/Response/PrivateKeysResponseModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Switch away from primary constructor
* Use argumentNullException
* Add test
* Pass user account keys directly to profileresponsemodel
* Fix build
* Fix namespace
* Make signedpublickey optional
* Remove unused file
* Fix cases for request data conversion
* Revert constructor change
* Undo comments change
* Apply fixes
* Move registration to core
* Update src/Api/Startup.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Api/Startup.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Remove empty line
* Apply suggestions
* Fix tests
* Fix tests
* Fix build of integration tests
* Attempt to fix tests
* Add test
* Move v2 encryption user async below public functions
* Add todo
* Rename to have async suffix
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
* Address feedback
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
* Add test coverage
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
* Split up validation from rotation
* Fix tests
* Increase test coverage
* Rename tests
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
* Add test for no signature keypair data
* Fix build
* Enable nullable
* Fix build
* Clean up data model
* Fix tests
* Cleanup
---------
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
* Fix build
* [PM-22862] Account security version (#5995)
* Add signing key repositories, models, and sql migration scripts
* Rename UserSigningKeys table to UserSigningKey
* Rename signedpublickeyownershipclaim to signedpublickey
* Move signedPublicKey to last parameter
* Add newline at end of file
* Rename to signature key pair
* Further rename to signaturekeypair
* Rename to UserSignatureKeyPairRepository
* Add newline
* Rename more instances to UserSignatureKeyPair
* Update parameter order
* Fix order
* Add more renames
* Cleanup
* Fix sql
* Add ef migrations
* Fix difference in SQL SP compared to migration SP
* Fix difference in SQL SP vs migration
* Fix difference in SQL SP vs migration
* Attempt to fix sql
* Rename migration to start later
* Address feedback
* Move UserSignatureKeyPair to KM codeownership
* Fix build
* Fix build
* Fix build
* Move out entitytypeconfiguration
* Use view for reading usersignaturekeypairs
* Fix migration script
* Fix migration script
* Add initial get keys endpoint
* Add sync response
* Cleanup
* Add query and fix types
* Add tests and cleanup
* Fix test
* Drop view if exists
* Add km queries
* Cleanup
* Enable nullable
* Cleanup
* Cleanup
* Enable nullable
* Fix incorrect namespace
* Remove unused using
* Fix test build
* Fix build error
* Fix build
* Attempt to fix tests
* Attempt to fix tests
* Replace with create or alter view
* Attempt to fix tests
* Attempt to fix build
* Rename to include async suffix
* Fix test
* Rename repo
* Attempt to fix tests
* Cleanup
* Test
* Undo test
* Fix tests
* Fix test
* Switch go generatecomb
* Switch to generatecomb
* Move signature algorithm
* Move useresignaturekeypairentitytypeconfiguration to km ownership
* Move userSignatureKeyPair model
* Unswap file names
* Move sql files to km ownership
* Add index on userid for signature keys
* Fix wrong filename
* Fix build
* Remove string length limit
* Regenerate EF migrations
* Undo changes to program.cs
* Cleanup
* Add migration to user encryption v2
* Fix build
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Rename dbset to plural
* Cleanup
* Cleanup
* Fix build
* Fix test
* Add validation
* Fix test
* Apply fixes
* Fix tests
* Improve tests
* Add tests
* Add error message validation
* Fix tests
* Fix tests
* Fix test
* Add test
* Fix tests and errors
* Update src/Infrastructure.EntityFramework/KeyManagement/Repositories/UserSignatureKeyPairRepository.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Api/KeyManagement/Models/Response/PrivateKeysResponseModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Api/KeyManagement/Controllers/UsersController.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Cleanup and move query to core
* Fix test
* Fix build
* Fix tests
* Update src/Api/KeyManagement/Models/Response/PrivateKeysResponseModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Switch away from primary constructor
* Use argumentNullException
* Add test
* Pass user account keys directly to profileresponsemodel
* Fix build
* Fix namespace
* Make signedpublickey optional
* Remove unused file
* Fix cases for request data conversion
* Revert constructor change
* Undo comments change
* Apply fixes
* Move registration to core
* Update src/Api/Startup.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Api/Startup.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Remove empty line
* Apply suggestions
* Fix tests
* Fix tests
* Fix build of integration tests
* Attempt to fix tests
* Add test
* Move v2 encryption user async below public functions
* Add todo
* Rename to have async suffix
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
* Address feedback
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
* Add test coverage
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
* Split up validation from rotation
* Fix tests
* Increase test coverage
* Rename tests
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
* Add test for no signature keypair data
* Fix build
* Enable nullable
* Fix build
* Clean up data model
* Fix tests
* Merge branch 'km/signing-upgrade-rotation' into km/account-security-version
* Add security state to rotation
* Update tests
* Update tests and check for security state in v2 model
* Cleanup
* Add tests
* Add security state data to integration test
* Re-sort and remove limit
* Update migrations
* Fix sql
* Fix sql
* Fix sql
* Fix fixture
* Fix test
* Fix test
* Fix test
---------
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
* [PM-22853] Add feature flag (#6090)
* Add signing key repositories, models, and sql migration scripts
* Rename UserSigningKeys table to UserSigningKey
* Rename signedpublickeyownershipclaim to signedpublickey
* Move signedPublicKey to last parameter
* Add newline at end of file
* Rename to signature key pair
* Further rename to signaturekeypair
* Rename to UserSignatureKeyPairRepository
* Add newline
* Rename more instances to UserSignatureKeyPair
* Update parameter order
* Fix order
* Add more renames
* Cleanup
* Fix sql
* Add ef migrations
* Fix difference in SQL SP compared to migration SP
* Fix difference in SQL SP vs migration
* Fix difference in SQL SP vs migration
* Attempt to fix sql
* Rename migration to start later
* Address feedback
* Move UserSignatureKeyPair to KM codeownership
* Fix build
* Fix build
* Fix build
* Move out entitytypeconfiguration
* Use view for reading usersignaturekeypairs
* Fix migration script
* Fix migration script
* Add initial get keys endpoint
* Add sync response
* Cleanup
* Add query and fix types
* Add tests and cleanup
* Fix test
* Drop view if exists
* Add km queries
* Cleanup
* Enable nullable
* Cleanup
* Cleanup
* Enable nullable
* Fix incorrect namespace
* Remove unused using
* Fix test build
* Fix build error
* Fix build
* Attempt to fix tests
* Attempt to fix tests
* Replace with create or alter view
* Attempt to fix tests
* Attempt to fix build
* Rename to include async suffix
* Fix test
* Rename repo
* Attempt to fix tests
* Cleanup
* Test
* Undo test
* Fix tests
* Fix test
* Switch go generatecomb
* Switch to generatecomb
* Move signature algorithm
* Move useresignaturekeypairentitytypeconfiguration to km ownership
* Move userSignatureKeyPair model
* Unswap file names
* Move sql files to km ownership
* Add index on userid for signature keys
* Fix wrong filename
* Fix build
* Remove string length limit
* Regenerate EF migrations
* Undo changes to program.cs
* Cleanup
* Add migration to user encryption v2
* Fix build
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Rename dbset to plural
* Cleanup
* Cleanup
* Fix build
* Fix test
* Add validation
* Fix test
* Apply fixes
* Fix tests
* Improve tests
* Add tests
* Add error message validation
* Fix tests
* Fix tests
* Fix test
* Add test
* Fix tests and errors
* Update src/Infrastructure.EntityFramework/KeyManagement/Repositories/UserSignatureKeyPairRepository.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Api/KeyManagement/Models/Response/PrivateKeysResponseModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Api/KeyManagement/Controllers/UsersController.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Cleanup and move query to core
* Fix test
* Fix build
* Fix tests
* Update src/Api/KeyManagement/Models/Response/PrivateKeysResponseModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Switch away from primary constructor
* Use argumentNullException
* Add test
* Pass user account keys directly to profileresponsemodel
* Fix build
* Fix namespace
* Make signedpublickey optional
* Remove unused file
* Fix cases for request data conversion
* Revert constructor change
* Undo comments change
* Apply fixes
* Move registration to core
* Update src/Api/Startup.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Api/Startup.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Remove empty line
* Apply suggestions
* Fix tests
* Fix tests
* Fix build of integration tests
* Attempt to fix tests
* Add test
* Move v2 encryption user async below public functions
* Add todo
* Rename to have async suffix
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
* Address feedback
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
* Add test coverage
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
* Split up validation from rotation
* Fix tests
* Increase test coverage
* Rename tests
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
* Add test for no signature keypair data
* Fix build
* Enable nullable
* Fix build
* Clean up data model
* Fix tests
* Merge branch 'km/signing-upgrade-rotation' into km/account-security-version
* Add security state to rotation
* Update tests
* Add feature flag
* Update tests and check for security state in v2 model
* Cleanup
* Add tests
* Add security state data to integration test
* Re-sort and remove limit
* Update migrations
* Fix sql
* Fix sql
* Fix sql
* Fix fixture
* Fix test
* Fix test
* Fix test
---------
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
* [PM-23222] Update revision date on key rotation (#6038)
* Add signing key repositories, models, and sql migration scripts
* Rename UserSigningKeys table to UserSigningKey
* Rename signedpublickeyownershipclaim to signedpublickey
* Move signedPublicKey to last parameter
* Add newline at end of file
* Rename to signature key pair
* Further rename to signaturekeypair
* Rename to UserSignatureKeyPairRepository
* Add newline
* Rename more instances to UserSignatureKeyPair
* Update parameter order
* Fix order
* Add more renames
* Cleanup
* Fix sql
* Add ef migrations
* Fix difference in SQL SP compared to migration SP
* Fix difference in SQL SP vs migration
* Fix difference in SQL SP vs migration
* Attempt to fix sql
* Rename migration to start later
* Address feedback
* Move UserSignatureKeyPair to KM codeownership
* Fix build
* Fix build
* Fix build
* Move out entitytypeconfiguration
* Use view for reading usersignaturekeypairs
* Fix migration script
* Fix migration script
* Add initial get keys endpoint
* Add sync response
* Cleanup
* Add query and fix types
* Add tests and cleanup
* Fix test
* Drop view if exists
* Add km queries
* Cleanup
* Enable nullable
* Cleanup
* Cleanup
* Enable nullable
* Fix incorrect namespace
* Remove unused using
* Fix test build
* Fix build error
* Fix build
* Attempt to fix tests
* Attempt to fix tests
* Replace with create or alter view
* Attempt to fix tests
* Attempt to fix build
* Rename to include async suffix
* Fix test
* Rename repo
* Attempt to fix tests
* Cleanup
* Test
* Undo test
* Fix tests
* Fix test
* Switch go generatecomb
* Switch to generatecomb
* Move signature algorithm
* Move useresignaturekeypairentitytypeconfiguration to km ownership
* Move userSignatureKeyPair model
* Unswap file names
* Move sql files to km ownership
* Add index on userid for signature keys
* Fix wrong filename
* Fix build
* Remove string length limit
* Regenerate EF migrations
* Undo changes to program.cs
* Cleanup
* Add migration to user encryption v2
* Fix build
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Rename dbset to plural
* Cleanup
* Cleanup
* Fix build
* Fix test
* Add validation
* Fix test
* Apply fixes
* Fix tests
* Improve tests
* Add tests
* Add error message validation
* Fix tests
* Fix tests
* Fix test
* Add test
* Fix tests and errors
* Update src/Infrastructure.EntityFramework/KeyManagement/Repositories/UserSignatureKeyPairRepository.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Api/KeyManagement/Models/Response/PrivateKeysResponseModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Api/KeyManagement/Controllers/UsersController.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Cleanup and move query to core
* Fix test
* Fix build
* Fix tests
* Update src/Api/KeyManagement/Models/Response/PrivateKeysResponseModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Switch away from primary constructor
* Use argumentNullException
* Add test
* Pass user account keys directly to profileresponsemodel
* Fix build
* Fix namespace
* Make signedpublickey optional
* Remove unused file
* Fix cases for request data conversion
* Revert constructor change
* Undo comments change
* Apply fixes
* Move registration to core
* Update src/Api/Startup.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Api/Startup.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Remove empty line
* Apply suggestions
* Fix tests
* Fix tests
* Fix build of integration tests
* Attempt to fix tests
* Add test
* Move v2 encryption user async below public functions
* Add todo
* Rename to have async suffix
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
* Address feedback
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
* Add test coverage
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
* Split up validation from rotation
* Fix tests
* Increase test coverage
* Rename tests
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
* Add test for no signature keypair data
* Fix build
* Enable nullable
* Fix build
* Clean up data model
* Fix tests
* Merge branch 'km/signing-upgrade-rotation' into km/account-security-version
* Add security state to rotation
* Update tests
* Update revision date on key rotation
* Update tests and check for security state in v2 model
* Cleanup
* Add tests
* Add security state data to integration test
* Re-sort and remove limit
* Update migrations
* Fix sql
* Fix sql
* Fix sql
* Fix fixture
* Fix test
* Fix test
* Fix test
* Add test for change date
---------
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
* Fix signing keys
* Update sql migrations
* Fix tests
* Add keys to identity token response
* Fix tests
* Fix tests
* Fix formatting
* Update src/Infrastructure.EntityFramework/KeyManagement/Repositories/UserSignatureKeyPairRepository.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Infrastructure.Dapper/KeyManagement/Repositories/UserSignatureKeyPairRepository.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Api/KeyManagement/Controllers/UsersController.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Api/KeyManagement/Models/Requests/SignatureKeyPairRequestModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Api/KeyManagement/Models/Requests/PublicKeyEncryptionKeyPairRequestModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Core/KeyManagement/Entities/UserSignatureKeyPair.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Core/KeyManagement/Repositories/IUserSignatureKeyPairRepository.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Core/KeyManagement/Queries/UserAccountKeysQuery.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Core/KeyManagement/Models/Data/PublicKeyEncryptionKeyPairData.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Core/KeyManagement/Entities/UserSignatureKeyPair.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Core/KeyManagement/Models/Data/RotateUserAccountKeysData.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Core/KeyManagement/Models/Data/SignatureKeyPairData.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Core/KeyManagement/Models/Data/SecurityStateData.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Core/KeyManagement/Models/Data/UserAccountKeysData.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Core/KeyManagement/Models/Request/SecurityStateModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Core/KeyManagement/Models/Response/PrivateKeysResponseModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Core/KeyManagement/Models/Response/PublicKeysResponseModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Core/KeyManagement/Models/Response/PublicKeyEncryptionKeyPairResponseModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Core/KeyManagement/Queries/Interfaces/IUserAcountKeysQuery.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Update src/Core/KeyManagement/Models/Response/SignatureKeyPairResponseModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Remove unnecessary file
* Add eof spacing
* Move models
* Fix build
* Move models to API subdirectory
* Rename model
* Remove migrations
* Add new ef migrations
* Remove empty line
* Only query account keys if the user has keys
* Dotnet format
* Fix test
* Update test/Identity.Test/IdentityServer/BaseRequestValidatorTests.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Apply suggestion
* Fix whitespace
* Force camel case on response models
* Address feedback for sql files
* Fix build
* Make index unique
* Add contstraints
* Fix sql
* Fix order
* Cleanup
* Fix build
* Update migrations
* Update EF migrations
* Change parameters to nvarchar
* Update to Varchar
* Apply feedback
* Move refresh view
* Attempt to fix build
* Undo sql changes
* Apply feedback about varchar
* Apply feedback about refresh view
* Apply feedback about new lines
* Address SQL feedback
* Re-sort columns
* Fix build
* Fix order
* Fix build
---------
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
2025-10-20 12:51:08 +02:00
|
|
|
|
public const string EnrollAeadOnKeyRotation = "enroll-aead-on-key-rotation";
|
2025-07-15 16:12:09 +02:00
|
|
|
|
public const string ForceUpdateKDFSettings = "pm-18021-force-update-kdf-settings";
|
2025-09-02 15:02:02 -05:00
|
|
|
|
public const string UnlockWithMasterPasswordUnlockData = "pm-23246-unlock-with-master-password-unlock-data";
|
2025-09-22 11:05:16 -05:00
|
|
|
|
public const string WindowsBiometricsV2 = "pm-25373-windows-biometrics-v2";
|
2025-10-14 17:41:27 +02:00
|
|
|
|
public const string LinuxBiometricsV2 = "pm-26340-linux-biometrics-v2";
|
2025-09-29 21:00:09 +02:00
|
|
|
|
public const string NoLogoutOnKdfChange = "pm-23995-no-logout-on-kdf-change";
|
2025-10-15 14:36:51 +02:00
|
|
|
|
public const string DisableType0Decryption = "pm-25174-disable-type-0-decryption";
|
2025-10-20 17:52:38 +02:00
|
|
|
|
public const string ConsolidatedSessionTimeoutComponent = "pm-26056-consolidated-session-timeout-component";
|
2025-12-15 17:48:37 +01:00
|
|
|
|
public const string V2RegistrationTDEJIT = "pm-27279-v2-registration-tde-jit";
|
2025-12-03 19:19:46 +01:00
|
|
|
|
public const string DataRecoveryTool = "pm-28813-data-recovery-tool";
|
2025-12-18 19:43:03 +01:00
|
|
|
|
public const string EnableAccountEncryptionV2KeyConnectorRegistration = "enable-account-encryption-v2-key-connector-registration";
|
2026-01-13 15:47:22 +01:00
|
|
|
|
public const string SdkKeyRotation = "pm-30144-sdk-key-rotation";
|
2026-01-09 09:17:45 +01:00
|
|
|
|
public const string EnableAccountEncryptionV2JitPasswordRegistration = "enable-account-encryption-v2-jit-password-registration";
|
2025-03-30 16:03:09 -04:00
|
|
|
|
|
|
|
|
|
|
/* Mobile Team */
|
|
|
|
|
|
public const string AndroidImportLoginsFlow = "import-logins-flow";
|
|
|
|
|
|
public const string AndroidMutualTls = "mutual-tls";
|
2025-01-28 13:39:19 -05:00
|
|
|
|
public const string SingleTapPasskeyCreation = "single-tap-passkey-creation";
|
|
|
|
|
|
public const string SingleTapPasskeyAuthentication = "single-tap-passkey-authentication";
|
2025-02-12 10:21:12 -05:00
|
|
|
|
public const string PM3503_MobileAnonAddySelfHostAlias = "anon-addy-self-host-alias";
|
2025-03-14 13:22:22 -04:00
|
|
|
|
public const string PM3553_MobileSimpleLoginSelfHostAlias = "simple-login-self-host-alias";
|
2025-04-09 12:17:04 -04:00
|
|
|
|
public const string MobileErrorReporting = "mobile-error-reporting";
|
2025-04-18 12:47:54 -04:00
|
|
|
|
public const string AndroidChromeAutofill = "android-chrome-autofill";
|
2025-06-17 10:48:11 -04:00
|
|
|
|
public const string UserManagedPrivilegedApps = "pm-18970-user-managed-privileged-apps";
|
2025-08-13 18:38:00 -04:00
|
|
|
|
public const string SendAccess = "pm-19394-send-access-control";
|
2025-09-15 20:57:13 +01:00
|
|
|
|
public const string CxpImportMobile = "cxp-import-mobile";
|
|
|
|
|
|
public const string CxpExportMobile = "cxp-export-mobile";
|
2025-03-30 16:03:09 -04:00
|
|
|
|
|
|
|
|
|
|
/* Platform Team */
|
2025-12-26 16:44:34 -06:00
|
|
|
|
public const string WebPush = "web-push";
|
2026-01-28 08:25:46 -05:00
|
|
|
|
public const string ContentScriptIpcFramework = "content-script-ipc-channel-framework";
|
2025-07-10 20:07:57 -04:00
|
|
|
|
public const string PushNotificationsWhenLocked = "pm-19388-push-notifications-when-locked";
|
2025-09-02 12:44:28 -04:00
|
|
|
|
public const string PushNotificationsWhenInactive = "pm-25130-receive-push-notifications-for-inactive-users";
|
2026-01-27 16:46:43 -05:00
|
|
|
|
public const string WebAuthnRelatedOrigins = "pm-30529-webauthn-related-origins";
|
2025-03-30 16:03:09 -04:00
|
|
|
|
|
|
|
|
|
|
/* Tools Team */
|
2025-12-31 15:37:42 -05:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Enable this flag to share the send view used by the web and browser clients
|
|
|
|
|
|
/// on the desktop client.
|
|
|
|
|
|
/// </summary>
|
2025-07-15 07:38:14 -04:00
|
|
|
|
public const string UseSdkPasswordGenerators = "pm-19976-use-sdk-password-generators";
|
2025-10-31 18:40:54 +01:00
|
|
|
|
public const string UseChromiumImporter = "pm-23982-chromium-importer";
|
2025-10-17 20:44:04 +02:00
|
|
|
|
public const string ChromiumImporterWithABE = "pm-25855-chromium-importer-abe";
|
2025-12-09 10:37:09 -05:00
|
|
|
|
public const string SendUIRefresh = "pm-28175-send-ui-refresh";
|
2025-12-18 14:12:56 -05:00
|
|
|
|
public const string SendEmailOTP = "pm-19051-send-email-verification";
|
2025-03-30 16:03:09 -04:00
|
|
|
|
|
|
|
|
|
|
/* Vault Team */
|
|
|
|
|
|
public const string CipherKeyEncryption = "cipher-key-encryption";
|
2025-04-10 14:55:40 -04:00
|
|
|
|
public const string PM19941MigrateCipherDomainToSdk = "pm-19941-migrate-cipher-domain-to-sdk";
|
2025-04-30 11:03:59 -04:00
|
|
|
|
public const string PhishingDetection = "phishing-detection";
|
2025-06-18 09:29:48 -05:00
|
|
|
|
public const string PM22134SdkCipherListView = "pm-22134-sdk-cipher-list-view";
|
2025-07-09 08:26:49 -07:00
|
|
|
|
public const string PM22136_SdkCipherEncryption = "pm-22136-sdk-cipher-encryption";
|
2025-10-24 06:42:10 -07:00
|
|
|
|
public const string PM23904_RiskInsightsForPremium = "pm-23904-risk-insights-for-premium";
|
2025-10-28 15:08:03 -07:00
|
|
|
|
public const string PM25083_AutofillConfirmFromSearch = "pm-25083-autofill-confirm-from-search";
|
2025-11-11 14:29:55 -06:00
|
|
|
|
public const string VaultLoadingSkeletons = "pm-25081-vault-skeleton-loaders";
|
2025-12-05 11:06:09 -08:00
|
|
|
|
public const string BrowserPremiumSpotlight = "pm-23384-browser-premium-spotlight";
|
2025-12-08 22:08:23 -05:00
|
|
|
|
public const string MigrateMyVaultToMyItems = "pm-20558-migrate-myvault-to-myitems";
|
2026-01-06 14:26:32 -08:00
|
|
|
|
public const string PM27632_CipherCrudOperationsToSdk = "pm-27632-cipher-crud-operations-to-sdk";
|
2024-08-30 16:45:38 -04:00
|
|
|
|
|
2025-09-12 13:24:30 -04:00
|
|
|
|
/* Innovation Team */
|
|
|
|
|
|
public const string ArchiveVaultItems = "pm-19148-innovation-archive";
|
|
|
|
|
|
|
2025-09-22 10:36:19 -05:00
|
|
|
|
/* DIRT Team */
|
2025-10-22 10:10:44 -05:00
|
|
|
|
public const string EventManagementForDataDogAndCrowdStrike = "event-management-for-datadog-and-crowdstrike";
|
2025-10-31 14:47:22 -04:00
|
|
|
|
public const string EventDiagnosticLogging = "pm-27666-siem-event-log-debugging";
|
2026-01-23 13:36:27 -06:00
|
|
|
|
public const string EventManagementForHuntress = "event-management-for-huntress";
|
2026-01-28 13:57:06 -06:00
|
|
|
|
public const string Milestone11AppPageImprovements = "pm-30538-dirt-milestone-11-app-page-improvements";
|
2025-09-22 10:36:19 -05:00
|
|
|
|
|
2025-11-25 13:13:36 -05:00
|
|
|
|
/* UIF Team */
|
|
|
|
|
|
public const string RouterFocusManagement = "router-focus-management";
|
|
|
|
|
|
|
2026-01-07 11:42:10 -05:00
|
|
|
|
/* Secrets Manager Team */
|
|
|
|
|
|
public const string SM1719_RemoveSecretsManagerAds = "sm-1719-remove-secrets-manager-ads";
|
|
|
|
|
|
|
2023-03-10 08:11:11 -05:00
|
|
|
|
public static List<string> 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();
|
|
|
|
|
|
}
|
2023-09-01 07:06:21 -04:00
|
|
|
|
|
|
|
|
|
|
public static Dictionary<string, string> GetLocalOverrideFlagValues()
|
|
|
|
|
|
{
|
|
|
|
|
|
// place overriding values when needed locally (offline), or return null
|
2025-04-21 12:36:38 -04:00
|
|
|
|
return null;
|
2023-09-01 07:06:21 -04:00
|
|
|
|
}
|
2023-03-07 13:46:52 -05:00
|
|
|
|
}
|