pub struct AuthGenerator {
pub gen_type: AuthGenType,
pub command: Option<String>,
pub args: Vec<String>,
pub interpreter: Option<String>,
pub script: Option<String>,
pub cache_ttl_secs: u64,
pub output_format: AuthOutputFormat,
pub env: HashMap<String, String>,
pub inject: HashMap<String, InjectTarget>,
pub timeout_secs: u64,
}Expand description
Dynamic auth generator configuration — produces short-lived credentials at call time.
Two types:
command: runs an external command, captures stdout as the credentialscript: writes an inline script to a temp file and runs it via an interpreter
Variable expansion in args and env values:
${key_name}→ keyring lookup${JWT_SUB}→ agent’s JWTsubclaim${JWT_SCOPE}→ agent’s JWTscopeclaim${TOOL_NAME}→ tool being invoked${TIMESTAMP}→ current unix timestamp
Fields§
§gen_type: AuthGenType§command: Option<String>Command to run (for type = "command")
args: Vec<String>Arguments for the command
interpreter: Option<String>Interpreter for inline script (for type = "script", e.g. “python3”)
script: Option<String>Inline script body (for type = "script")
cache_ttl_secs: u64TTL for cached credentials (0 = no cache)
output_format: AuthOutputFormatOutput format: “text” (trimmed stdout) or “json” (parsed, fields extracted via inject)
env: HashMap<String, String>Environment variables for the subprocess (values support ${key} expansion)
inject: HashMap<String, InjectTarget>For JSON output: map dot-notation JSON paths to injection targets
timeout_secs: u64Subprocess timeout in seconds (default: 30)
Trait Implementations§
Source§impl Clone for AuthGenerator
impl Clone for AuthGenerator
Source§fn clone(&self) -> AuthGenerator
fn clone(&self) -> AuthGenerator
Returns a duplicate of the value. Read more
1.0.0 · 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 AuthGenerator
impl Debug for AuthGenerator
Source§impl<'de> Deserialize<'de> for AuthGenerator
impl<'de> Deserialize<'de> for AuthGenerator
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 AuthGenerator
impl RefUnwindSafe for AuthGenerator
impl Send for AuthGenerator
impl Sync for AuthGenerator
impl Unpin for AuthGenerator
impl UnsafeUnpin for AuthGenerator
impl UnwindSafe for AuthGenerator
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