Skip to main content

Definition

Assembly: Microsoft.OData.Mcp.Core.dll Namespace: Microsoft.OData.Mcp.Core.Configuration Inheritance: System.Object

Syntax

Microsoft.OData.Mcp.Core.Configuration.DataProtectionConfiguration

Summary

Configuration for data protection and encryption settings.

Remarks

Data protection configuration controls how sensitive data is encrypted and protected within the MCP server. This includes encryption keys, rotation periods, and encryption policies for different data types.

Constructors

.ctor

Syntax

public DataProtectionConfiguration()

.ctor Inherited

Inherited from object

Syntax

public Object()

Properties

EncryptionKey

Gets or sets the encryption key used for data protection.

Syntax

public string EncryptionKey { get; set; }

Property Value

Type: string The base64-encoded encryption key.

Remarks

This key is used for encrypting and decrypting sensitive data. It should be a strong, randomly generated key and kept secure. Consider using key management services in production environments.

EncryptSensitiveData

Gets or sets a value indicating whether sensitive data should be encrypted.

Syntax

public bool EncryptSensitiveData { get; set; }

Property Value

Type: bool true to encrypt sensitive data; otherwise, false.

Remarks

When enabled, sensitive data such as authentication tokens, API keys, and user credentials will be encrypted before storage or transmission.

KeyRotationPeriod

Gets or sets the period after which encryption keys should be rotated.

Syntax

public System.TimeSpan KeyRotationPeriod { get; set; }

Property Value

Type: System.TimeSpan The time span between key rotations.

Remarks

Regular key rotation is a security best practice that limits the exposure window if a key is compromised. Shorter rotation periods provide better security but require more frequent key management.

Methods

Clone

Creates a copy of this data protection configuration.

Syntax

public Microsoft.OData.Mcp.Core.Configuration.DataProtectionConfiguration Clone()

Returns

Type: Microsoft.OData.Mcp.Core.Configuration.DataProtectionConfiguration A new instance with the same settings.

Equals Inherited Virtual

Inherited from object

Syntax

public virtual bool Equals(object obj)

Parameters

NameTypeDescription
objobject?-

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

public static bool Equals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

ForProduction

Creates a data protection configuration optimized for production environments.

Syntax

public static Microsoft.OData.Mcp.Core.Configuration.DataProtectionConfiguration ForProduction()

Returns

Type: Microsoft.OData.Mcp.Core.Configuration.DataProtectionConfiguration A data protection configuration suitable for production use.

GetHashCode Inherited Virtual

Inherited from object

Syntax

public virtual int GetHashCode()

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

public System.Type GetType()

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

protected internal object MemberwiseClone()

Returns

Type: object

MergeWith

Merges another data protection configuration into this one.

Syntax

public void MergeWith(Microsoft.OData.Mcp.Core.Configuration.DataProtectionConfiguration other)

Parameters

NameTypeDescription
otherMicrosoft.OData.Mcp.Core.Configuration.DataProtectionConfigurationThe configuration to merge into this one.

ReferenceEquals Inherited

Inherited from object

Syntax

public static bool ReferenceEquals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

public virtual string ToString()

Returns

Type: string?

Validate

Validates the data protection configuration.

Syntax

public System.Collections.Generic.IEnumerable<string> Validate()

Returns

Type: System.Collections.Generic.IEnumerable<string> A collection of validation errors, or empty if the configuration is valid.