Class SecurityMetadataType

Namespace
Cratis.Chronicle.Confidentiality
Assembly
Cratis.Chronicle.dll

Represents a type of security metadata.

public record SecurityMetadataType : ConceptAs<string>, IComparable<ConceptAs<string>>, IComparable<string>, IComparable, IEquatable<ConceptAs<string>>, IEquatable<SecurityMetadataType>
Inheritance
SecurityMetadataType
Implements
Inherited Members
Extension Methods

Remarks

This is the security counterpart to ComplianceMetadataType - a deliberately separate type, not a shared one, because security and compliance answer different questions about a value and are governed by different rules. See SchemaMetadataCategory for why the two are never allowed to mix.

Constructors

SecurityMetadataType(SecurityMetadataType)

protected SecurityMetadataType(SecurityMetadataType original)

Parameters

original SecurityMetadataType

SecurityMetadataType(string)

Represents a type of security metadata.

public SecurityMetadataType(string Value)

Parameters

Value string

Underlying value.

Remarks

This is the security counterpart to ComplianceMetadataType - a deliberately separate type, not a shared one, because security and compliance answer different questions about a value and are governed by different rules. See SchemaMetadataCategory for why the two are never allowed to mix.

Fields

EncryptedGlobal

A value that is globally-scoped, plain-confidentiality encryption. One key protects every value marked this way across the whole installation - every event store, every namespace. Marked with [Encrypted(EncryptionScope.Global)] on the client; never erasable, and never the same key a [PII] value uses - [PII] is always subject-scoped and never gains this scope.

public static readonly SecurityMetadataType EncryptedGlobal

Field Value

SecurityMetadataType

EncryptedNamespace

A value that is namespace-scoped, plain-confidentiality encryption. One key protects every value marked this way in a given namespace, regardless of which document it came from. Marked with [Encrypted(EncryptionScope.Namespace)] on the client; never erasable, and never the same key a [PII] value uses - [PII] is always subject-scoped and never gains this scope.

public static readonly SecurityMetadataType EncryptedNamespace

Field Value

SecurityMetadataType

EncryptedSubject

A value that is subject-scoped, plain-confidentiality encryption - a security measure, not a compliance one. Marked with [Encrypted] on the client rather than [PII]; the encryption key it is provisioned under is never erasable and is never the same key a [PII] value for the same subject uses.

public static readonly SecurityMetadataType EncryptedSubject

Field Value

SecurityMetadataType

Properties

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

Methods

Deconstruct(out string)

public void Deconstruct(out string Value)

Parameters

Value string

Equals(SecurityMetadataType?)

public virtual bool Equals(SecurityMetadataType? other)

Parameters

other SecurityMetadataType

Returns

bool

Equals(ConceptAs<string>?)

public override sealed bool Equals(ConceptAs<string>? other)

Parameters

other ConceptAs<string>

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected override bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

Operators

operator ==(SecurityMetadataType?, SecurityMetadataType?)

public static bool operator ==(SecurityMetadataType? left, SecurityMetadataType? right)

Parameters

left SecurityMetadataType
right SecurityMetadataType

Returns

bool

implicit operator string(SecurityMetadataType)

Convert from SecurityMetadataType to string.

public static implicit operator string(SecurityMetadataType value)

Parameters

value SecurityMetadataType

SecurityMetadataType to convert from.

Returns

string

implicit operator SecurityMetadataType(string)

Convert from a string to SecurityMetadataType.

public static implicit operator SecurityMetadataType(string value)

Parameters

value string

string to convert from.

Returns

SecurityMetadataType

operator !=(SecurityMetadataType?, SecurityMetadataType?)

public static bool operator !=(SecurityMetadataType? left, SecurityMetadataType? right)

Parameters

left SecurityMetadataType
right SecurityMetadataType

Returns

bool