Skip to content

TenantSecurityEventTokenSigner Class

Signs a security event token with a signing key of the tenant serving the request, so a receiver verifies what a tenant transmits with that tenant's published keys alone.

C#
public sealed class TenantSecurityEventTokenSigner : Abblix.SecurityEvents.Abstractions.ISecurityEventTokenSigner

Inheritance System.Object → TenantSecurityEventTokenSigner

Implements ISecurityEventTokenSigner

Remarks

The key is the tenant's first signing key that performs an algorithm Abblix.Oidc.Server.Features.MultiTenancy.TenantSecurityEventTokenSigner.AlgorithmsFor(Abblix.Oidc.Server.Features.ClientInformation.SecurityProfileRequirements,Abblix.SecurityEvents.Infrastructure.SecurityEventsOptions) names: one the deployment allows (AllowedSigningAlgorithms) and the tenant's security profile permits, or, where the deployment sets no allowlist, one the profile admits in place of the RS256 that stands for: FAPI 1.0 Part 2 section 8.6, "For JWS, both clients and authorization servers shall use PS256 or ES256 algorithms", and FAPI 2.0 section 5.4.1, "Authorization servers, clients, and resource servers when creating or processing JWTs shall ... use PS256, ES256, or EdDSA (using the Ed25519 variant) algorithms". The profile is the tenant's own: a stream names its receiver by the identifier its credentials carry, not by a client of the tenant, so no client's profile is in force for what it is sent. Where no key qualifies the token is not signed at all, so a tenant held to a profile never sends one under an algorithm the profile refuses. A host transmitting security events registers this signer in place of the one AddSecurityEvents registers; startup refuses any other.

Constructors

TenantSecurityEventTokenSigner(IAuthServiceKeysProvider, ProfiledJwtIssuer, IOptions<SecurityEventsOptions>, ITenantAccessor, SigningAlgorithmsProvider) Constructor

Signs a security event token with a signing key of the tenant serving the request, so a receiver verifies what a tenant transmits with that tenant's published keys alone.

C#
public TenantSecurityEventTokenSigner(Abblix.Oidc.Server.Common.Interfaces.IAuthServiceKeysProvider keys, Abblix.Oidc.Server.Features.Tokens.Formatters.ProfiledJwtIssuer issuer, Microsoft.Extensions.Options.IOptions<Abblix.SecurityEvents.Infrastructure.SecurityEventsOptions> options, Abblix.Oidc.Server.Features.MultiTenancy.ITenantAccessor tenantAccessor, Abblix.Jwt.SigningAlgorithmsProvider signingAlgorithms);

Parameters

keys IAuthServiceKeysProvider

The signing keys of the tenant serving the request.

issuer ProfiledJwtIssuer

Signs the token once the tenant's profile admits its algorithm.

options Microsoft.Extensions.Options.IOptions<SecurityEventsOptions>

What the deployment allows to sign with.

tenantAccessor ITenantAccessor

Names the tenant the request is served at.

signingAlgorithms SigningAlgorithmsProvider

Tells which algorithms a key signs with.

Remarks

The key is the tenant's first signing key that performs an algorithm Abblix.Oidc.Server.Features.MultiTenancy.TenantSecurityEventTokenSigner.AlgorithmsFor(Abblix.Oidc.Server.Features.ClientInformation.SecurityProfileRequirements,Abblix.SecurityEvents.Infrastructure.SecurityEventsOptions) names: one the deployment allows (AllowedSigningAlgorithms) and the tenant's security profile permits, or, where the deployment sets no allowlist, one the profile admits in place of the RS256 that stands for: FAPI 1.0 Part 2 section 8.6, "For JWS, both clients and authorization servers shall use PS256 or ES256 algorithms", and FAPI 2.0 section 5.4.1, "Authorization servers, clients, and resource servers when creating or processing JWTs shall ... use PS256, ES256, or EdDSA (using the Ed25519 variant) algorithms". The profile is the tenant's own: a stream names its receiver by the identifier its credentials carry, not by a client of the tenant, so no client's profile is in force for what it is sent. Where no key qualifies the token is not signed at all, so a tenant held to a profile never sends one under an algorithm the profile refuses. A host transmitting security events registers this signer in place of the one AddSecurityEvents registers; startup refuses any other.

Methods

TenantSecurityEventTokenSigner.SignAsync(SecurityEventToken, CancellationToken) Method

Signs the SET and returns its compact serialization.

C#
public System.Threading.Tasks.Task<string> SignAsync(Abblix.SecurityEvents.SecurityEventToken token, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

token SecurityEventToken

The SET to sign.

cancellationToken System.Threading.CancellationToken

Cancels key retrieval or remote signing mid-flight.

Implements SignAsync(SecurityEventToken, CancellationToken)

Returns

System.Threading.Tasks.Task<System.String>
The compact JWS (or JWE-wrapped JWS) representation of the SET.