Skip to main content

ConfigurePoolMemberAdapterTenantId

Namespace: Meshmakers.Octo.Sdk.Common.Adapters

Clears AdapterOptions.DedicatedTenantId on a process that is composed as an adapter pool member (AB#4924).

public sealed class ConfigurePoolMemberAdapterTenantId : IPostConfigureOptions<AdapterOptions>

Inheritance Object → ConfigurePoolMemberAdapterTenantId
Implements IPostConfigureOptions<AdapterOptions>

Remarks:

🔴 Three call sites in two repositories justify their safety with the sentence "it is null on a pool member", and without this type not one of them was true.AdapterOptions' constructor sets DedicatedTenantId = "meshTest", so a member that was given no tenant carried "meshTest", and the local runbook — until it was corrected alongside this fix — instructed the operator to set OCTO_ADAPTER__DEDICATEDTENANTID to the lending tenant, which made it carry the lender's id while executing a borrower's pipeline. The worst of the three reads is ServiceAccountTokenService.ResolveTenantId: a service-account configuration that names no tenant falls back to this value, so a leased execution would have acquired a token for the lender rather than declining.

The member's own connection credential is unaffected: it is derived from AdapterPoolMemberOptions.AdapterPoolTenantId by ConfigureAdapterAuthenticatorOptions, not from this property. Nothing else on a member reads it — AdapterHubClient and AdapterExecutionService, the two consumers that need a dedicated tenant, are not registered at all in the pool-member branch of either adapter builder.

Registered by AddAdapterPoolMember() and gated on AdapterPoolMemberOptions.IsEnabled rather than on the call, because a host may compose the member services while the configuration names no pool; that process is a dedicated adapter and must keep its tenant. It is the counterpart of ConfigureLegacyAdapterTenantId, which both builders already skip on a member.

Constructors​

ConfigurePoolMemberAdapterTenantId(IOptions<AdapterPoolMemberOptions>, ILogger<ConfigurePoolMemberAdapterTenantId>)​

Creates a new instance of ConfigurePoolMemberAdapterTenantId.

public ConfigurePoolMemberAdapterTenantId(IOptions<AdapterPoolMemberOptions> poolMemberOptions, ILogger<ConfigurePoolMemberAdapterTenantId> logger)

Parameters​

poolMemberOptions IOptions<AdapterPoolMemberOptions>

logger ILogger<ConfigurePoolMemberAdapterTenantId>

Methods​

PostConfigure(String, AdapterOptions)​

public void PostConfigure(string name, AdapterOptions options)

Parameters​

name String

options AdapterOptions