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:
- Basic HTTPS: Only
endpointandaddressare required. - Custom CA: Provide
ca_certto verify servers with custom/self-signed certificates. - Mutual TLS (mTLS): Provide both
client_certandclient_keyfor client authentication. - 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: UrlThe URL of the remote signer endpoint
address: AddressThe 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: HeaderMapHeaders to pass to the remote signer.
Implementations§
Source§impl RemoteSigner
impl RemoteSigner
Sourcepub async fn start(self) -> Result<RemoteSignerHandler, RemoteSignerStartError>
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:
- Log the certificate change event
- Reload the certificate files from disk
- Rebuild the HTTP client with the new TLS configuration
- Replace the existing client atomically
This enables zero-downtime certificate rotation in production environments.
Trait Implementations§
Source§impl Clone for RemoteSigner
impl Clone for RemoteSigner
Source§fn clone(&self) -> RemoteSigner
fn clone(&self) -> RemoteSigner
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RemoteSigner
impl Debug for RemoteSigner
Source§impl From<RemoteSigner> for BlockSigner
impl From<RemoteSigner> for BlockSigner
Source§fn from(value: RemoteSigner) -> Self
fn from(value: RemoteSigner) -> Self
Auto Trait Implementations§
impl Freeze for RemoteSigner
impl RefUnwindSafe for RemoteSigner
impl Send for RemoteSigner
impl Sync for RemoteSigner
impl Unpin for RemoteSigner
impl UnwindSafe for RemoteSigner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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