#[non_exhaustive]pub enum GhostkeyScope {
ReadPublic,
Sign,
Export,
Delete,
Admin,
}Expand description
What an authorised caller is allowed to do with a ghostkey.
A grant carries a set of scopes. The vault auto-grants itself every
scope when it imports a key. Third-party apps can request access via
RequestAnyAccess, which (on user approval) grants only
{ReadPublic, Sign} – enough to read the public certificate and sign
messages, but not enough to extract the private key or destroy the
identity. Apps that need higher privileges are deliberately routed
through the vault, where the user is rendering the management UI.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ReadPublic
Read public certificate and metadata. Granted alongside Sign
because every signing UI also wants to display the public cert.
Sign
Sign messages with the private key. Implies ReadPublic in
practice (a verifier needs the cert), but gating is per-scope so
the grant intent is explicit.
Export
Export the private signing key. Catastrophic if granted to a third-party app – the recipient becomes able to sign as the user offline. Only ever granted to the vault.
Delete
Delete the ghostkey or rewrite its label. Only ever granted to the vault.
Admin
Manage permissions for this ghostkey: grant/revoke other apps’
access. The vault gets this on import; third-party apps never
get it via RequestAnyAccess.
Trait Implementations§
Source§impl Clone for GhostkeyScope
impl Clone for GhostkeyScope
Source§fn clone(&self) -> GhostkeyScope
fn clone(&self) -> GhostkeyScope
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more