pub struct KeyEntryCfg {
pub virtual_key: String,
pub provider_key: String,
pub allowed_models: Vec<String>,
pub label: String,
}Expand description
One vault entry ([[llm.keys]]): a client-facing virtual key mapped to a real provider key and
an optional model egress allowlist. The provider key is injected into the upstream Authorization
and is never sent back to the client; the client only ever holds the virtual key.
Fields§
§virtual_key: StringThe secret the client presents (Authorization: Bearer <virtual_key>). Required.
provider_key: StringThe real upstream provider secret injected on the way out. Required. Prefer sourcing this from a pushed control-plane policy / secret store rather than committing it.
allowed_models: Vec<String>Allowed model names for this key (egress allowlist). Empty = unrestricted; non-empty = only
these models may be requested (others get 403).
label: StringOptional label for logs/metrics/audit (never the secret). Defaults to a positional id.
Trait Implementations§
Source§impl Clone for KeyEntryCfg
impl Clone for KeyEntryCfg
Source§fn clone(&self) -> KeyEntryCfg
fn clone(&self) -> KeyEntryCfg
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 moreSource§impl Debug for KeyEntryCfg
impl Debug for KeyEntryCfg
Source§impl Default for KeyEntryCfg
impl Default for KeyEntryCfg
Source§fn default() -> KeyEntryCfg
fn default() -> KeyEntryCfg
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for KeyEntryCfgwhere
KeyEntryCfg: Default,
impl<'de> Deserialize<'de> for KeyEntryCfgwhere
KeyEntryCfg: Default,
Source§fn 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
Auto Trait Implementations§
impl Freeze for KeyEntryCfg
impl RefUnwindSafe for KeyEntryCfg
impl Send for KeyEntryCfg
impl Sync for KeyEntryCfg
impl Unpin for KeyEntryCfg
impl UnsafeUnpin for KeyEntryCfg
impl UnwindSafe for KeyEntryCfg
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