Table of Contents

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

MigrationPolicy

DeprecatedAlgorithms

Gets or sets the deprecated algorithms that require migration.

public IReadOnlySet<EncryptionAlgorithm>? DeprecatedAlgorithms { get; init; }

Property Value

IReadOnlySet<EncryptionAlgorithm>

DeprecatedKeyIds

Gets or sets the key IDs that require migration.

public IReadOnlySet<string>? DeprecatedKeyIds { get; init; }

Property Value

IReadOnlySet<string>

EncryptedBefore

Gets or sets a value indicating whether to migrate data encrypted before a specific date.

public DateTimeOffset? EncryptedBefore { get; init; }

Property Value

DateTimeOffset?

MaxKeyAge

Gets or sets the maximum age of keys before migration is required.

public TimeSpan? MaxKeyAge { get; init; }

Property Value

TimeSpan?

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

bool

TargetAlgorithm

Gets or sets the target encryption algorithm (data using other algorithms requires migration).

public EncryptionAlgorithm? TargetAlgorithm { get; init; }

Property Value

EncryptionAlgorithm?

TenantIds

Gets or sets tenant IDs to scope the migration to.

public IReadOnlySet<string>? TenantIds { get; init; }

Property Value

IReadOnlySet<string>

Methods

ForAlgorithm(EncryptionAlgorithm)

Creates a policy that migrates to a specific algorithm.

public static MigrationPolicy ForAlgorithm(EncryptionAlgorithm algorithm)

Parameters

algorithm EncryptionAlgorithm

The 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

keyIds string[]

The deprecated key IDs.

Returns

MigrationPolicy

A migration policy for key migration.