Definition
Assembly: Microsoft.OData.Mcp.Core.dll Namespace: Microsoft.OData.Mcp.Core.Configuration Inheritance: System.ObjectSyntax
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
.ctor Inherited
Inherited from
objectSyntax
Properties
EncryptionKey
Gets or sets the encryption key used for data protection.Syntax
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
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
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
Returns
Type:Microsoft.OData.Mcp.Core.Configuration.DataProtectionConfiguration
A new instance with the same settings.
Equals Inherited Virtual
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
obj | object? | - |
Returns
Type:bool
Equals Inherited
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
objA | object? | - |
objB | object? | - |
Returns
Type:bool
ForProduction
Creates a data protection configuration optimized for production environments.Syntax
Returns
Type:Microsoft.OData.Mcp.Core.Configuration.DataProtectionConfiguration
A data protection configuration suitable for production use.
GetHashCode Inherited Virtual
Inherited from
objectSyntax
Returns
Type:int
GetType Inherited
Inherited from
objectSyntax
Returns
Type:System.Type
MemberwiseClone Inherited
Inherited from
objectSyntax
Returns
Type:object
MergeWith
Merges another data protection configuration into this one.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
other | Microsoft.OData.Mcp.Core.Configuration.DataProtectionConfiguration | The configuration to merge into this one. |
ReferenceEquals Inherited
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
objA | object? | - |
objB | object? | - |
Returns
Type:bool
ToString Inherited Virtual
Inherited from
objectSyntax
Returns
Type:string?
Validate
Validates the data protection configuration.Syntax
Returns
Type:System.Collections.Generic.IEnumerable<string>
A collection of validation errors, or empty if the configuration is valid.