neuron-secret 0.4.0

Secret resolution traits and types for neuron
Documentation

neuron-secret

Secret resolution traits and types for neuron

crates.io docs.rs license

Overview

neuron-secret defines the SecretResolver trait and associated types (SecretSource, SecretLease, SecretValue) that the neuron credential system is built on. Secret values are held in SecretValue, a zeroize-on-drop wrapper that prevents sensitive bytes from lingering in memory.

This crate contains no implementations — for concrete resolvers see the backend crates:

Backend Crate
Environment variable neuron-secret-env
HashiCorp Vault KV neuron-secret-vault
AWS Secrets Manager neuron-secret-aws
GCP Secret Manager neuron-secret-gcp
OS keystore neuron-secret-keystore
Kubernetes Secrets neuron-secret-k8s

Usage

[dependencies]
neuron-secret = "0.4"

Implementing a custom resolver

use neuron_secret::{SecretResolver, SecretSource, SecretLease};
use async_trait::async_trait;

pub struct MyVaultResolver { /* ... */ }

#[async_trait]
impl SecretResolver for MyVaultResolver {
    async fn resolve(&self, source: &SecretSource) -> Result<SecretLease, neuron_secret::SecretError> {
        // fetch from your secret store
        todo!()
    }
}

Part of the neuron workspace

neuron is a composable async agentic AI framework for Rust. See the book for architecture and guides.