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-04-28 08:20:47 -04:00
|
|
|
|
public const string EventBasedOrganizationIntegrations = "event-based-organization-integrations";
|
2025-05-29 10:57:50 -04:00
|
|
|
|
public const string SeparateCustomRolePermissions = "pm-19917-separate-custom-role-permissions";
|
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-03 13:32:09 -06:00
|
|
|
|
public const string AccountRecoveryCommand = "pm-25581-prevent-provider-account-recovery";
|
2025-11-06 11:35:07 +00:00
|
|
|
|
public const string PolicyValidatorsRefactor = "pm-26423-refactor-policy-side-effects";
|
2025-01-23 00:04:08 +10: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-08-11 16:39:43 -04:00
|
|
|
|
public const string FailedTwoFactorEmail = "pm-24425-send-2fa-failed-email";
|
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-09-25 13:37:36 -04:00
|
|
|
|
public const string PM23174ManageAccountRecoveryPermissionDrivesTheNeedToSetMasterPassword =
|
|
|
|
|
|
"pm-23174-manage-account-recovery-permission-drives-the-need-to-set-master-password";
|
2025-11-03 12:24:00 -05:00
|
|
|
|
public const string RecoveryCodeSupportForSsoRequiredUsers = "pm-21153-recovery-code-support-for-sso-required";
|
2025-10-22 15:13:31 -04:00
|
|
|
|
public const string MJMLBasedEmailTemplates = "mjml-based-email-templates";
|
2025-03-30 16:03:09 -04:00
|
|
|
|
|
|
|
|
|
|
/* Autofill Team */
|
|
|
|
|
|
public const string IdpAutoSubmitLogin = "idp-auto-submit-login";
|
|
|
|
|
|
public const string UseTreeWalkerApiForPageDetailsCollection = "use-tree-walker-api-for-page-details-collection";
|
|
|
|
|
|
public const string InlineMenuFieldQualification = "inline-menu-field-qualification";
|
|
|
|
|
|
public const string InlineMenuPositioningImprovements = "inline-menu-positioning-improvements";
|
|
|
|
|
|
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";
|
2024-08-05 12:04:23 -05:00
|
|
|
|
public const string GenerateIdentityFillScriptRefactor = "generate-identity-fill-script-refactor";
|
2024-08-07 10:42:00 -05:00
|
|
|
|
public const string DelayFido2PageScriptInitWithinMv2 = "delay-fido2-page-script-init-within-mv2";
|
2024-08-21 22:04:08 -05:00
|
|
|
|
public const string NotificationBarAddLoginImprovements = "notification-bar-add-login-improvements";
|
2025-01-08 18:36:18 -05:00
|
|
|
|
public const string BlockBrowserInjectionsByDomain = "block-browser-injections-by-domain";
|
2025-01-14 15:47:35 -05:00
|
|
|
|
public const string NotificationRefresh = "notification-refresh";
|
2024-09-04 13:43:59 -04:00
|
|
|
|
public const string EnableNewCardCombinedExpiryAutofill = "enable-new-card-combined-expiry-autofill";
|
2024-11-28 09:49:09 +01:00
|
|
|
|
public const string MacOsNativeCredentialSync = "macos-native-credential-sync";
|
2024-12-04 14:42:12 -05:00
|
|
|
|
public const string InlineMenuTotp = "inline-menu-totp";
|
2025-06-20 14:02:48 -04:00
|
|
|
|
public const string WindowsDesktopAutotype = "windows-desktop-autotype";
|
2025-03-30 16:03:09 -04:00
|
|
|
|
|
|
|
|
|
|
/* Billing Team */
|
|
|
|
|
|
public const string TrialPayment = "PM-8163-trial-payment";
|
2025-01-03 09:14:07 -06:00
|
|
|
|
public const string UsePricingService = "use-pricing-service";
|
2025-04-02 19:47:48 +02:00
|
|
|
|
public const string PM19422_AllowAutomaticTaxUpdates = "pm-19422-allow-automatic-tax-updates";
|
2025-07-23 08:25:37 -05:00
|
|
|
|
public const string PM21821_ProviderPortalTakeover = "pm-21821-provider-portal-takeover";
|
2025-08-18 09:42:51 -05:00
|
|
|
|
public const string PM22415_TaxIDWarnings = "pm-22415-tax-id-warnings";
|
2025-10-13 10:49:55 -05:00
|
|
|
|
public const string PM25379_UseNewOrganizationMetadataStructure = "pm-25379-use-new-organization-metadata-structure";
|
2025-10-02 16:11:04 +01:00
|
|
|
|
public const string PM24996ImplementUpgradeFromFreeDialog = "pm-24996-implement-upgrade-from-free-dialog";
|
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-13 13:14:49 +01:00
|
|
|
|
public const string PremiumUpgradeNewDesign = "pm-24033-updat-premium-subscription-page";
|
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-03-30 16:03:09 -04:00
|
|
|
|
|
|
|
|
|
|
/* Key Management Team */
|
|
|
|
|
|
public const string ReturnErrorOnExistingKeypair = "return-error-on-existing-keypair";
|
|
|
|
|
|
public const string PM4154BulkEncryptionService = "PM-4154-bulk-encryption-service";
|
|
|
|
|
|
public const string PrivateKeyRegeneration = "pm-12241-private-key-regeneration";
|
|
|
|
|
|
public const string Argon2Default = "argon2-default";
|
|
|
|
|
|
public const string UserkeyRotationV2 = "userkey-rotation-v2";
|
|
|
|
|
|
public const string SSHKeyItemVaultItem = "ssh-key-vault-item";
|
2025-04-15 12:03:06 -07:00
|
|
|
|
public const string UserSdkForDecryption = "use-sdk-for-decryption";
|
[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-04-14 12:48:52 -05:00
|
|
|
|
public const string PM17987_BlockType0 = "pm-17987-block-type-0";
|
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-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-04-09 09:14:57 +02:00
|
|
|
|
public const string IpcChannelFramework = "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";
|
2025-03-30 16:03:09 -04:00
|
|
|
|
|
|
|
|
|
|
/* Tools Team */
|
|
|
|
|
|
public const string DesktopSendUIRefresh = "desktop-send-ui-refresh";
|
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-03-30 16:03:09 -04:00
|
|
|
|
|
|
|
|
|
|
/* Vault Team */
|
|
|
|
|
|
public const string PM8851_BrowserOnboardingNudge = "pm-8851-browser-onboarding-nudge";
|
|
|
|
|
|
public const string PM9111ExtensionPersistAddEditForm = "pm-9111-extension-persist-add-edit-form";
|
|
|
|
|
|
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-16 15:38:09 -07:00
|
|
|
|
public const string EndUserNotifications = "pm-10609-end-user-notifications";
|
2025-04-30 11:03:59 -04:00
|
|
|
|
public const string PhishingDetection = "phishing-detection";
|
2025-05-28 10:37:10 -04:00
|
|
|
|
public const string RemoveCardItemTypePolicy = "pm-16442-remove-card-item-type-policy";
|
2025-06-18 09:29:48 -05:00
|
|
|
|
public const string PM22134SdkCipherListView = "pm-22134-sdk-cipher-list-view";
|
2025-06-24 13:02:07 -05:00
|
|
|
|
public const string PM19315EndUserActivationMvp = "pm-19315-end-user-activation-mvp";
|
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";
|
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 */
|
|
|
|
|
|
public const string PM22887_RiskInsightsActivityTab = "pm-22887-risk-insights-activity-tab";
|
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";
|
2025-09-22 10:36:19 -05:00
|
|
|
|
|
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
|
|
|
|
}
|