pub struct SshKeyset {
primary: SshKeypair,
secondary: SshKeypair,
}
Available on crate feature
ssh
only.Expand description
A keyset including two SSH keypairs, used to support key rotation.
When a keyset is rotated, the secondary keypair becomes the new primary keypair, and a new secondary keypair is generated.
Fields
primary: SshKeypair
secondary: SshKeypair
Implementations
sourceimpl SshKeyset
impl SshKeyset
sourcepub fn rotate(&self) -> Result<SshKeyset>
pub fn rotate(&self) -> Result<SshKeyset>
Return a rotated keyset.
The rotation works by promoting the secondary keypair to primary, and generating a new random secondary keypair.
sourcepub fn public_keys(&self) -> (String, String)
pub fn public_keys(&self) -> (String, String)
Return the pair of public keys
sourcepub fn primary(&self) -> &SshKeypair
pub fn primary(&self) -> &SshKeypair
Return the primary keypair
sourcepub fn secondary(&self) -> &SshKeypair
pub fn secondary(&self) -> &SshKeypair
Return the secondary keypair
sourcepub fn from_bytes(data: &[u8]) -> Result<SshKeyset>
pub fn from_bytes(data: &[u8]) -> Result<SshKeyset>
Deserialize via JSON
Trait Implementations
sourceimpl<'de> Deserialize<'de> for SshKeyset
impl<'de> Deserialize<'de> for SshKeyset
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SshKeyset
impl StructuralEq for SshKeyset
impl StructuralPartialEq for SshKeyset
Auto Trait Implementations
impl RefUnwindSafe for SshKeyset
impl Send for SshKeyset
impl Sync for SshKeyset
impl Unpin for SshKeyset
impl UnwindSafe for SshKeyset
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.sourceimpl<T> FutureExt for T
impl<T> FutureExt for T
sourcefn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
sourcefn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request