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
originalSecurityMetadataType
SecurityMetadataType(string)
Represents a type of security metadata.
public SecurityMetadataType(string Value)
Parameters
ValuestringUnderlying 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
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
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
Properties
EqualityContract
protected override Type EqualityContract { get; }
Property Value
Methods
Deconstruct(out string)
public void Deconstruct(out string Value)
Parameters
Valuestring
Equals(SecurityMetadataType?)
public virtual bool Equals(SecurityMetadataType? other)
Parameters
otherSecurityMetadataType
Returns
Equals(ConceptAs<string>?)
public override sealed bool Equals(ConceptAs<string>? other)
Parameters
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected override bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
Operators
operator ==(SecurityMetadataType?, SecurityMetadataType?)
public static bool operator ==(SecurityMetadataType? left, SecurityMetadataType? right)
Parameters
leftSecurityMetadataTyperightSecurityMetadataType
Returns
implicit operator string(SecurityMetadataType)
Convert from SecurityMetadataType to string.
public static implicit operator string(SecurityMetadataType value)
Parameters
valueSecurityMetadataTypeSecurityMetadataType to convert from.
Returns
implicit operator SecurityMetadataType(string)
Convert from a string to SecurityMetadataType.
public static implicit operator SecurityMetadataType(string value)
Parameters
Returns
operator !=(SecurityMetadataType?, SecurityMetadataType?)
public static bool operator !=(SecurityMetadataType? left, SecurityMetadataType? right)
Parameters
leftSecurityMetadataTyperightSecurityMetadataType