Table of Contents

Class ObjectStorageCredential

Namespace
MailFathom.Infrastructure.ObjectStorage
Assembly
MailFathom.Infrastructure.dll

The access key one request to the object-storage endpoint is signed with, already resolved from the references that declared it.

public sealed class ObjectStorageCredential : IDisposable
Inheritance
ObjectStorageCredential
Implements
Inherited Members

Remarks

The instance is owned by the operation that resolved it and released when that operation ends, which bounds the window in which a process dump could hold the access key to one call rather than to process uptime. A key rotated behind an unchanged reference is therefore picked up by the next operation, with no cache to invalidate.

Both halves are secret-bearing, which is why the identifier is resolved the same way the secret is rather than written into an appsettings file beside it: an access key identifier names an identity at the endpoint, it is one half of what an attacker needs, and every provider that issues one issues it together with its secret from the same place. This type owns both buffers and erases them together, so neither can be released while the other is still held.

Properties

AccessKeyId

Gets the resolved access key identifier the request is signed as.

SecretAccessKey

Gets the resolved secret the request's signature is derived from.

Methods

Create(ResolvedSecret, ResolvedSecret)

Builds a credential from resolved material, taking ownership of both buffers.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.