systemprompt-security 0.67.0

Security infrastructure for systemprompt.io AI governance: JWT, OAuth2 token extraction, scope enforcement, ChaCha20-Poly1305 secret encryption, the four-layer tool-call governance pipeline, and the unified authz decision plane (deny-overrides resolver + AuthzDecisionHook) shared by gateway and MCP enforcement.
Documentation
//! Why a connector's machine token could not be minted.
//!
//! Copyright (c) systemprompt.io — Business Source License 1.1.
//! See <https://systemprompt.io> for licensing details.

use crate::credential::CredentialError;

#[derive(Debug, thiserror::Error)]
pub enum ConnectorGrantError {
    #[error(
        "MCP server '{server}': connector uses the authorization_code grant, not a machine grant"
    )]
    NotMachine { server: String },

    #[error("MCP server '{server}': connector {field} is not configured")]
    MissingField { server: String, field: &'static str },

    #[error("MCP server '{server}': connector secret `{secret}` is not configured")]
    MissingSecret { server: String, secret: String },

    #[error("secrets are unavailable: {0}")]
    Secrets(#[source] Box<dyn std::error::Error + Send + Sync>),

    #[error(transparent)]
    Credential(CredentialError),
}