Class MigrationPolicy
- Namespace
- Excalibur.Compliance
- Assembly
- Excalibur.Compliance.Abstractions.dll
Defines the policy for determining when encrypted data requires migration.
public sealed record MigrationPolicy : IEquatable<MigrationPolicy>
- Inheritance
-
MigrationPolicy
- Implements
- Inherited Members
Properties
Default
Gets the default policy that triggers migration for keys older than 90 days.
public static MigrationPolicy Default { get; }
Property Value
DeprecatedAlgorithms
Gets or sets the deprecated algorithms that require migration.
public IReadOnlySet<EncryptionAlgorithm>? DeprecatedAlgorithms { get; init; }
Property Value
DeprecatedKeyIds
Gets or sets the key IDs that require migration.
public IReadOnlySet<string>? DeprecatedKeyIds { get; init; }
Property Value
EncryptedBefore
Gets or sets a value indicating whether to migrate data encrypted before a specific date.
public DateTimeOffset? EncryptedBefore { get; init; }
Property Value
MaxKeyAge
Gets or sets the maximum age of keys before migration is required.
public TimeSpan? MaxKeyAge { get; init; }
Property Value
MinKeyVersion
Gets or sets the minimum key version required (data with older versions requires migration).
public int? MinKeyVersion { get; init; }
Property Value
- int?
RequireFipsCompliance
Gets or sets a value indicating whether FIPS compliance is required.
public bool RequireFipsCompliance { get; init; }
Property Value
TargetAlgorithm
Gets or sets the target encryption algorithm (data using other algorithms requires migration).
public EncryptionAlgorithm? TargetAlgorithm { get; init; }
Property Value
TenantIds
Gets or sets tenant IDs to scope the migration to.
public IReadOnlySet<string>? TenantIds { get; init; }
Property Value
Methods
ForAlgorithm(EncryptionAlgorithm)
Creates a policy that migrates to a specific algorithm.
public static MigrationPolicy ForAlgorithm(EncryptionAlgorithm algorithm)
Parameters
algorithmEncryptionAlgorithmThe target algorithm.
Returns
- MigrationPolicy
A migration policy for algorithm migration.
ForDeprecatedKeys(params string[])
Creates a policy that migrates data using deprecated keys.
public static MigrationPolicy ForDeprecatedKeys(params string[] keyIds)
Parameters
keyIdsstring[]The deprecated key IDs.
Returns
- MigrationPolicy
A migration policy for key migration.