pub struct ParentIdentity {
pub cert_der: Vec<u8>,
pub cert_pem: String,
pub key_pem: String,
pub key_der: Vec<u8>,
pub base64_cert: String,
}Expand description
Self-signed parent certificate generated for one Plugin spawn. Production: regenerate per-spawn (the cert is ephemeral, scoped to one provider session) so a leaked cert can’t compromise other providers spawned later.
The cert is generated with CA:true basic constraints because go-plugin’s server side uses the parent cert as a “trusted CA” in its rustls/Go-tls ClientCAs pool. A non-CA self-signed cert is rejected by webpki-style chain validation; with CA:true the cert can act as its own root for the single hop.
Fields§
§cert_der: Vec<u8>§cert_pem: String§key_pem: String§key_der: Vec<u8>§base64_cert: StringImplementations§
Source§impl ParentIdentity
impl ParentIdentity
Sourcepub fn generate() -> Result<Self, PluginError>
pub fn generate() -> Result<Self, PluginError>
Generate a fresh self-signed cert + key via rcgen. Cheap (<1ms on Apple Silicon). Called per Plugin::spawn.
Trait Implementations§
Source§impl Clone for ParentIdentity
impl Clone for ParentIdentity
Source§fn clone(&self) -> ParentIdentity
fn clone(&self) -> ParentIdentity
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ParentIdentity
impl RefUnwindSafe for ParentIdentity
impl Send for ParentIdentity
impl Sync for ParentIdentity
impl Unpin for ParentIdentity
impl UnsafeUnpin for ParentIdentity
impl UnwindSafe for ParentIdentity
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
Mutably borrows from an owned value. Read more
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request