Kogoshvili.Temporal.Codec
1.0.3
dotnet add package Kogoshvili.Temporal.Codec --version 1.0.3
NuGet\Install-Package Kogoshvili.Temporal.Codec -Version 1.0.3
<PackageReference Include="Kogoshvili.Temporal.Codec" Version="1.0.3" />
<PackageVersion Include="Kogoshvili.Temporal.Codec" Version="1.0.3" />
<PackageReference Include="Kogoshvili.Temporal.Codec" />
paket add Kogoshvili.Temporal.Codec --version 1.0.3
#r "nuget: Kogoshvili.Temporal.Codec, 1.0.3"
#:package Kogoshvili.Temporal.Codec@1.0.3
#addin nuget:?package=Kogoshvili.Temporal.Codec&version=1.0.3
#tool nuget:?package=Kogoshvili.Temporal.Codec&version=1.0.3
Kogoshvili.Temporal.Codec
Composable payload codecs for the Temporal .NET SDK,
built on Temporalio.Converters.IPayloadCodec. Plug one into a DataConverter
and it runs on both the client and workers — encryption and claim-checking
happen before anything is sent to the Temporal service.
Minimal setup
A single EncryptionCodec AES-GCM encrypts every payload. The key must be
exactly 16, 24, or 32 ASCII bytes (the string overload is for demos; prefer
the byte[] overload for production key material).
using Kogoshvili.Temporal.Codec;
using Temporalio.Client;
using Temporalio.Converters;
var codec = new EncryptionCodec("test-key-16bytes");
var client = await TemporalClient.ConnectAsync(new("localhost:7233")
{
DataConverter = DataConverter.Default with { PayloadCodec = codec },
});
The codec records a key id ("default" by default) in each payload's metadata
so the decode side can detect key rotation.
Configuration
This library is code-only — there is no appsettings.json section. Ordering is
expressed via CompositePayloadCodec, which chains codecs left-to-right on
encode and right-to-left on decode:
using Kogoshvili.Temporal.Codec;
var codec = new CompositePayloadCodec(
new EncryptionCodec("test-key-16bytes"),
new ClaimCheckCodec(new FileSystemClaimCheckStore("/tmp/claim-check")));
new CompositePayloadCodec(encryption, claimCheck) produces
serialize -> encrypt -> offload on encode and
fetch -> decrypt -> deserialize on decode, so the blobs in the store are
ciphertext.
Full configuration
The remaining pieces compose on top of the minimal codec.
Claim-checking offloads payloads larger than a threshold (default 1 MiB) to
an IClaimCheckStore, leaving a small reference in the workflow history:
using Kogoshvili.Temporal.Codec;
var store = new FileSystemClaimCheckStore("/tmp/claim-check");
var claimCheck = new ClaimCheckCodec(store, thresholdBytes: 512 * 1024);
The filesystem store is built directly. Cloud-backed stores (Azure Blob, AWS
S3) ship in Kogoshvili.Temporal.Cloud and are built from a
ClaimCheckStoreSettings record through an IClaimCheckStoreFactory, keeping
this package free of cloud SDK dependencies.
Per-field secrets encrypt a single field (an SSN, an access token) so it
stays unreadable even after the surrounding payload is decrypted — for example
by the Temporal UI's codec server. Use Secret<T> for the field and pair it
with a SecretEncryptionInterceptor, keyed from an ISecretResolver:
using Kogoshvili.Temporal.Codec;
using Temporalio.Client;
class Patient
{
public string Name { get; set; }
public Secret<string> Ssn { get; set; }
}
var interceptor = new SecretEncryptionInterceptor(
resolver, secretId: "ssn-key", keyId: "ssn-v1");
var client = await TemporalClient.ConnectAsync(new("localhost:7233")
{
Interceptors = new[] { interceptor },
});
A Secret<T> is carried opaquely through a workflow — construct it on the
client with plaintext and let the interceptor encrypt it; read .Value in an
activity after the interceptor has decrypted it. Its serialized form is the
same { encoding, encryption-key-id, data } shape the encryption codec emits,
so it is indistinguishable from an encrypted payload in the UI.
Secret<T> implements the non-generic ISecret marker interface, and its JSON
form is produced by SecretJsonConverterFactory (a
System.Text.Json.JsonConverterFactory). The converter fails loudly if asked
to serialize a Secret<T> still holding plaintext — encryption happens in the
interceptor before serialization, so plaintext never reaches the wire.
Azure Blob and AWS S3 stores are provided by Kogoshvili.Temporal.Cloud, and a
ready-made HTTP codec server (for the Temporal UI / CLI) by
Kogoshvili.Temporal.CodecServer.
Not affiliated with or endorsed by Temporal Technologies.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Temporalio (>= 1.18.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Kogoshvili.Temporal.Codec:
| Package | Downloads |
|---|---|
|
Kogoshvili.Temporal.Cloud
Part of the Kogoshvili.Temporal tool suite — Azure and AWS integration for the Temporal .NET SDK: credential resolution and claim-check payload stores backed by Azure Blob Storage and Amazon S3. Not affiliated with or endorsed by Temporal Technologies. |
|
|
Kogoshvili.Temporal.Hosting
Part of the Kogoshvili.Temporal tool suite — generic-host worker starter for the Temporal .NET SDK. Adds client/worker hosting, convention-based workflow/activity auto-discovery, a metrics interceptor, and a test-server toggle on top of Temporalio.Extensions.Hosting. Not affiliated with or endorsed by Temporal Technologies. |
|
|
Kogoshvili.Temporal.CodecServer
Part of the Kogoshvili.Temporal tool suite — a ready-made HTTP codec server for the Temporal .NET SDK. Exposes the /encode and /decode endpoints used by the Temporal Web UI and CLI, with optional JWT-bearer (pass access token) and OAuth2 authorization-code (cross-origin credentials) auth. Not affiliated with or endorsed by Temporal Technologies. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.3 | 143 | 9/4/2026 |
| 1.0.2 | 144 | 9/3/2026 |
| 1.0.1 | 138 | 9/1/2026 |
| 1.0.0 | 134 | 8/31/2026 |
| 1.0.0-beta.10 | 78 | 8/28/2026 |
| 1.0.0-beta.9 | 71 | 8/28/2026 |
Composable Temporal payload codecs: AES-GCM encryption, claim-check offloading, ordered chains, and per-field Secret<T> encryption.