Skip to content

policy_bundle

Structs

Traits

  • BundleParser - Parses policy bundle bytes into a policy evaluator snapshot.

firma_sidecar::authority_client::policy_bundle::BundleParser

Section titled “firma_sidecar::authority_client::policy_bundle::BundleParser”

Trait

Parses policy bundle bytes into a policy evaluator snapshot.

Methods:

  • parse: Parse a bundle into an evaluator, seeded with the bundle’s TTL

firma_sidecar::authority_client::policy_bundle::CedarBundleParser

Section titled “firma_sidecar::authority_client::policy_bundle::CedarBundleParser”

Struct

Production [BundleParser] that builds a [CedarPolicyEvaluator] from the bundle bytes pushed by the Authority.

Unit Struct

Trait Implementations:

  • BundleParser
    • fn parse(self: &Self, policies: &[u8], entity_schema: &[u8], ttl_seconds: u32, version: &str) -> Result<Box<dyn PolicyEvaluation>, String>
  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
  • Default
    • fn default() -> CedarBundleParser

firma_sidecar::authority_client::policy_bundle::PolicyBundleTask

Section titled “firma_sidecar::authority_client::policy_bundle::PolicyBundleTask”

Struct

Server-streaming task for policy bundle updates.

Fields:

  • channel: tonic::transport::Channel - Shared Authority channel.
  • swappable: std::sync::Arc<crate::authority_client::swappable_policy::SwappablePolicyEvaluation> - Swappable evaluator read by Stage 2.
  • readiness: std::sync::Arc<crate::authority_client::readiness::ReadinessFlag> - Readiness writer.
  • backoff: crate::authority_client::backoff::ExponentialBackoff - Reconnect backoff.
  • cancel: tokio_util::sync::CancellationToken - Shutdown token.
  • bundle_parser: std::sync::Arc<dyn BundleParser> - Bundle parser.

Methods:

  • fn run(self: Self) - Run the stream loop until cancelled.