Struct RemoteSigner

Source
pub struct RemoteSigner {
    pub endpoint: Url,
    pub address: Address,
    pub client_cert: Option<ClientCert>,
    pub ca_cert: Option<PathBuf>,
    pub headers: HeaderMap,
}
Expand description

Configuration for the remote signer client

This configuration supports various TLS/certificate scenarios:

  1. Basic HTTPS: Only endpoint and address are required.
  2. Custom CA: Provide ca_cert to verify servers with custom/self-signed certificates.
  3. Mutual TLS (mTLS): Provide both client_cert and client_key for client authentication.
  4. Full mTLS with custom CA: Combine all certificate options for maximum security.

Certificate formats supported:

  • PEM format for all certificates and keys
  • Certificates should be provided as file paths.

By default, the process will watch for changes in the client certificate files and reload the client automatically.

Fields§

§endpoint: Url

The URL of the remote signer endpoint

§address: Address

The address of the signer.

§client_cert: Option<ClientCert>

Optional client certificate for mTLS (PEM format)

§ca_cert: Option<PathBuf>

Optional CA certificate for server verification (PEM format)

§headers: HeaderMap

Headers to pass to the remote signer.

Implementations§

Source§

impl RemoteSigner

Source

pub async fn start(self) -> Result<RemoteSignerHandler, RemoteSignerStartError>

Creates a new remote signer with the given configuration

If client certificates are configured, this will automatically start a certificate watcher that monitors the certificate files for changes. When certificates are updated (e.g., by cert-manager in Kubernetes), the TLS client will be automatically reloaded with the new certificates without requiring a restart.

§Certificate Watching

The certificate watcher monitors:

  • Client certificate file (if mTLS is configured)
  • Client private key file (if mTLS is configured)
  • CA certificate file (if custom CA is configured)

When any of these files are modified, the watcher will:

  1. Log the certificate change event
  2. Reload the certificate files from disk
  3. Rebuild the HTTP client with the new TLS configuration
  4. Replace the existing client atomically

This enables zero-downtime certificate rotation in production environments.

Trait Implementations§

Source§

impl Clone for RemoteSigner

Source§

fn clone(&self) -> RemoteSigner

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RemoteSigner

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<RemoteSigner> for BlockSigner

Source§

fn from(value: RemoteSigner) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit #126799)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> TryClone for T
where T: Clone,

Source§

fn try_clone(&self) -> Result<T, Error>

Clones self, possibly returning an error.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,