This crate provides a number of useful APIs to help Rust programs use Spire workload API:
-
SpiffeIDandSpiffeIDMatcherhelp parse a Spiffe ID and match against pre-defined patterns -
initfunction helps a workload talk to spire agent and fetch its identity -
make_client_configandmake_server_confighelps generaterustls::ClientConfigandrustls::ServerConfigrespectively. These configs support hot reloading of spire provided identites and verify spiffe ID during TLS handshake.
-
examples/dump.rsshows how to use spire-workload to dump current identities cached by spire agent -
examples/verify_jwt.rsshows how to verify a spire issued JWT token with spire agent.
Apache 2.0