Table of Contents

Class SigningProxyEndpoint

Namespace
The.RPC
Assembly
Instagile.dll

Proxies RPCs to another endpoint, vouching for each caller: an outer authenticator verifies the identity named by each ticket, and an inner one signs the ticket for the next endpoint.

public sealed class SigningProxyEndpoint : IEndpoint
Inheritance
SigningProxyEndpoint
Implements
Inherited Members

Remarks

Only the ticket's signature is replaced. Session tickets, session challenges and their answers, and all requests and responses pass through unchanged, so a session encrypted between the client and the next endpoint stays opaque to the proxy. The next endpoint should use VerifiedOperationsAndEncryptedSession with an EndpointSignedAuthentication.

Constructors

SigningProxyEndpoint(IEndpoint, IAuthentication, IAuthentication, IEnumerable<Procedure>?)

public SigningProxyEndpoint(IEndpoint inner, IAuthentication outerAuthentication, IAuthentication innerAuthentication, IEnumerable<Procedure>? procedures = null)

Parameters

inner IEndpoint

The endpoint to proxy to.

outerAuthentication IAuthentication

Verifies the caller's identity without credentials, such as WebAuthentication over Windows authentication.

innerAuthentication IAuthentication

Signs tickets for the inner endpoint without credentials, such as SharedSecretAuthentication.

procedures IEnumerable<Procedure>

Procedures that may be proxied; defaults to GetAll().

Properties

Description

Human-readable name.

public string Description { get; }

Property Value

string

Methods

ConnectAsync(byte[], CancellationToken)

Proves the client's identity to the server in exchange for a symmetric session key.

public Task<byte[]> ConnectAsync(byte[] ticketBuffer, CancellationToken cancellationToken)

Parameters

ticketBuffer byte[]
cancellationToken CancellationToken

Returns

Task<byte[]>

Serialised Response<T>.

ExecuteAsync(string, EndpointMessage, byte[]?, CancellationToken)

Calls an untyped procedure - this may involve local lookup, passthrough or decoration.

public Task<EndpointMessage> ExecuteAsync(string name, EndpointMessage request, byte[]? ticket, CancellationToken cancellationToken)

Parameters

name string
request EndpointMessage
ticket byte[]
cancellationToken CancellationToken

Returns

Task<EndpointMessage>

VisitAsync<T, U>(AnonymousProcedure<T, U>, EndpointMessage, CancellationToken)

Calls a typed procedure on a local or remote host.

public Task<EndpointMessage> VisitAsync<T, U>(AnonymousProcedure<T, U> proc, EndpointMessage request, CancellationToken token) where T : notnull

Parameters

proc AnonymousProcedure<T, U>
request EndpointMessage
token CancellationToken

Returns

Task<EndpointMessage>

Serialised Response<T>.

Type Parameters

T
U

VisitAsync<T, U>(Procedure<T, U>, EndpointMessage, byte[], CancellationToken)

Calls a typed procedure on a local or remote host.

public Task<EndpointMessage> VisitAsync<T, U>(Procedure<T, U> proc, EndpointMessage request, byte[] ticketBuffer, CancellationToken token) where T : notnull

Parameters

proc Procedure<T, U>
request EndpointMessage
ticketBuffer byte[]
token CancellationToken

Returns

Task<EndpointMessage>

Serialised Response<T>.

Type Parameters

T
U