Kogoshvili.Temporal.Configuration 1.0.3

dotnet add package Kogoshvili.Temporal.Configuration --version 1.0.3
                    
NuGet\Install-Package Kogoshvili.Temporal.Configuration -Version 1.0.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Kogoshvili.Temporal.Configuration" Version="1.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Kogoshvili.Temporal.Configuration" Version="1.0.3" />
                    
Directory.Packages.props
<PackageReference Include="Kogoshvili.Temporal.Configuration" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Kogoshvili.Temporal.Configuration --version 1.0.3
                    
#r "nuget: Kogoshvili.Temporal.Configuration, 1.0.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Kogoshvili.Temporal.Configuration@1.0.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Kogoshvili.Temporal.Configuration&version=1.0.3
                    
Install as a Cake Addin
#tool nuget:?package=Kogoshvili.Temporal.Configuration&version=1.0.3
                    
Install as a Cake Tool

Kogoshvili.Temporal.Configuration

Shared Temporal connection configuration for the Kogoshvili.Temporal tool suite. It centralizes the "how do I reach and authenticate against Temporal" logic so the hosting starter, the testing harness, and the temporal-sharp CLI all behave the same way.

Minimal setup

Add Temporal:TargetHost (and, for a non-default namespace, Temporal:Namespace) to appsettings.json:

{
  "Temporal": {
    "TargetHost": "my-namespace.a1b2c.tmprl.cloud:7233",
    "Namespace": "my-namespace.a1b2c"
  }
}

Then connect:

using Kogoshvili.Temporal.Configuration;
using Temporalio.Client;

ITemporalClient client = await TemporalConfig.ConnectAsync();

ConnectAsync() binds the Temporal section of appsettings.json (loaded from the current directory) merged with Temporal__* environment variables, and returns an authenticated ITemporalClient. When no section is present, TargetHost defaults to localhost:7233 and Namespace to default.

Configuration

All connection settings live under the Temporal section. Each group is optional; leave a group out to keep the SDK defaults.

{
  "Temporal": {
    "TargetHost": "my-namespace.a1b2c.tmprl.cloud:7233",
    "Namespace": "my-namespace.a1b2c",
    "ApiKey": "…",

    "Tls": {
      "Disabled": false,
      "Domain": null,
      "Source": "file",
      "ServerRootCACertPath": "/path/to/ca.pem",
      "ClientCertPath": "/path/to/client.pem",
      "ClientPrivateKeyPath": "/path/to/client.key"
    },

    "RpcRetry": {
      "InitialInterval": "00:00:00.100",
      "RandomizationFactor": 0.2,
      "Multiplier": 1.5,
      "MaxInterval": "00:00:05",
      "MaxElapsedTime": "00:00:10",
      "MaxRetries": 10
    },

    "KeepAlive": { "Interval": "00:00:30", "Timeout": "00:00:15" },

    "HttpConnectProxy": { "TargetHost": "proxy:8080", "Username": null, "Password": null },

    "DnsLoadBalancing": { "ResolutionInterval": "00:00:30" },

    "GrpcCompression": { "Mode": "gzip" }
  }
}

Top-level keys:

  • TargetHost — the server host:port. Default localhost:7233.
  • Namespace — the Temporal namespace. Default default.
  • ApiKey — API key sent on every call, or null for none.
  • Tls — mTLS settings; see below. null means no TLS.
  • RpcRetry — RPC retry policy: InitialInterval (100ms), RandomizationFactor (jitter, 0.2), Multiplier (1.5), MaxInterval (5s), MaxElapsedTime (10s, null for none), and MaxRetries (10). Durations bind as time-span strings.
  • KeepAlive — HTTP/2 keep-alive ping Interval (30s) and Timeout (15s).
  • HttpConnectProxy — HTTP CONNECT proxy. Set TargetHost to route through it; add Username/Password for basic auth. Omit the group to connect directly.
  • DnsLoadBalancing — when set, DNS is re-resolved periodically and connections load-balance across addresses. ResolutionInterval defaults to 30s.
  • GrpcCompression — transport gRPC compression Mode: "gzip" (default) or "none".

Full configuration

TLS sources

Tls:Source selects where certificates come from:

  • file (default) — PEM files at ServerRootCACertPath, ClientCertPath, and ClientPrivateKeyPath.

  • environment — inline ServerRootCACert / ClientCert / ClientPrivateKey strings, raw PEM or base64 (typically injected as environment variables):

    {
      "Temporal": {
        "Tls": {
          "Source": "environment",
          "ClientCert": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0t…",
          "ClientPrivateKey": "LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0t…"
        }
      }
    }
    
  • azureKeyVault — a PFX secret in Azure Key Vault, converted to PEM at startup:

    {
      "Temporal": {
        "Tls": {
          "Source": "azureKeyVault",
          "AzureKeyVault": {
            "VaultUri": "https://my-vault.vault.azure.net",
            "CertificateName": "temporal-client",
            "Password": null
          }
        }
      }
    }
    
  • awsSecretsManager — PEM text secrets in AWS Secrets Manager:

    {
      "Temporal": {
        "Tls": {
          "Source": "awsSecretsManager",
          "AwsSecretsManager": {
            "Region": "us-east-1",
            "CertificateSecretId": "temporal/client-cert",
            "PrivateKeySecretId": "temporal/client-key",
            "ServerRootCACertSecretId": null
          }
        }
      }
    }
    

Tls:Disabled skips TLS entirely, and Tls:Domain sets the expected server hostname/domain. Setting both a *Path and inline certificate content at once is rejected by TemporalTlsOptions.Validate().

Cloud TLS resolution

Important: TemporalConfig.ConnectAsync() and TemporalConfig.ToConnectOptions() resolve only the file and environment sources. If Tls:Source is azureKeyVault or awsSecretsManager, a client built through Kogoshvili.Temporal.Configuration alone connects without the configured client certificate — no error is raised. Use the cloud sources only through the hosting starter, or resolve the certificate material yourself (via an ITlsCertificateSource) and call ClientOptionsFactory.BuildTls(TlsCertificateMaterial, TemporalTlsOptions).

The file and environment sources are resolved synchronously by ClientOptionsFactory when the connect options are built. The cloud sources (azureKeyVault / awsSecretsManager) are asynchronous and are skipped there; the hosting starter resolves them via Kogoshvili.Temporal.Cloud's certificate loader, which calls ClientOptionsFactory.BuildTls(TlsCertificateMaterial, TemporalTlsOptions) with the pre-resolved material.

Environment-variable overrides

Environment variables override appsettings.json using the standard double-underscore convention: Temporal__TargetHost, Temporal__Namespace, Temporal__ApiKey, Temporal__Tls__ClientCertPath, and so on.

TemporalConfig API

TemporalConfig is the programmatic entry point:

using Kogoshvili.Temporal.Configuration;
using Temporalio.Client;

// Build appsettings.json + environment variables.
Microsoft.Extensions.Configuration.IConfigurationRoot config =
    TemporalConfig.BuildConfiguration(); // optional path overload

// Bind options from an existing configuration root.
TemporalConnectionOptions options = TemporalConfig.Load(config);

// Or load from the default file + env vars directly.
TemporalConnectionOptions options2 = TemporalConfig.Load();

// Map options to SDK connect options (applies TLS, retry, proxy, …).
TemporalClientConnectOptions connect = TemporalConfig.ToConnectOptions(options);

// Connect from options, or just connect with defaults.
ITemporalClient client = await TemporalConfig.ConnectAsync(options);
ITemporalClient client2 = await TemporalConfig.ConnectAsync();

ClientOptionsFactory.Apply(TemporalClientConnectOptions, TemporalConnectionOptions) is the lower-level routine that mutates a connect options instance in place from the resolved connection options.

Certificate material

ITlsCertificateSource plugs in a new certificate source: register an implementation in the service container and set Tls:Source to its Name. FileTlsCertificateSource and EnvironmentTlsCertificateSource ship for the file and environment sources, resolving to a TlsCertificateMaterial record (ServerRootCACert, ClientCert, ClientPrivateKey). TlsContent provides Decode (raw-PEM-or-base64 to bytes) and EncodePem (DER to PEM) helpers for inline material.

Not affiliated with or endorsed by Temporal Technologies.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Kogoshvili.Temporal.Configuration:

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.Testing

Part of the Kogoshvili.Temporal tool suite — replay/regression test harness for Temporal .NET workflows. Runs workflows against a real Temporal test environment, snapshots their event history, and replays it via WorkflowReplayer to catch non-determinism. 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 142 9/4/2026
1.0.2 147 9/3/2026
1.0.1 144 9/1/2026
1.0.0 139 8/31/2026
1.0.0-beta.10 91 8/28/2026
1.0.0-beta.9 74 8/28/2026

Shared Temporal connection configuration: build a TemporalClient from appsettings.json or Temporal__* environment variables.