pub struct ServerOptions {
pub tls: Option<TlsOptions>,
pub bearer_token: Option<String>,
pub bearer_tokens: Vec<String>,
pub basic_auth: Option<(String, String)>,
pub authorizer: Authorizer,
}Expand description
TLS and authentication options for run_server_with.
All three auth methods compose: e.g. mTLS for transport identity and a bearer/Basic header for application identity.
Fields§
§tls: Option<TlsOptions>PEM-encoded server certificate chain + private key (and, for mTLS, the client CA). When set, the server only accepts TLS connections.
bearer_token: Option<String>When set, requests may authenticate with authorization: Bearer <token>.
Also the token handed back by the Flight handshake after a Basic login.
For zero-downtime rotation, list more than one in bearer_tokens.
bearer_tokens: Vec<String>A set of accepted bearer tokens for zero-downtime rotation — any one
authenticates, the first is issued by the handshake. Merged with
(after) bearer_token. Empty by default; leave it so to keep the
single-token behavior unchanged.
basic_auth: Option<(String, String)>When set, requests may authenticate with authorization: Basic <b64>
(username:password) — what Power BI’s ADBC connector and the Flight
SQL ODBC driver send. (username, password).
Per-query authorization policy. Default Authorizer::AllowAll permits
every identity to run every query (no behavior change).
Trait Implementations§
Source§impl Clone for ServerOptions
impl Clone for ServerOptions
Source§fn clone(&self) -> ServerOptions
fn clone(&self) -> ServerOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ServerOptions
impl Debug for ServerOptions
Source§impl Default for ServerOptions
impl Default for ServerOptions
Source§fn default() -> ServerOptions
fn default() -> ServerOptions
Auto Trait Implementations§
impl !RefUnwindSafe for ServerOptions
impl !UnwindSafe for ServerOptions
impl Freeze for ServerOptions
impl Send for ServerOptions
impl Sync for ServerOptions
impl Unpin for ServerOptions
impl UnsafeUnpin for ServerOptions
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request