SPIFFE Library Usage Examples
Writing code in your applications to create SPIFFE-enabled connections
You can use one of the following libraries to fetch SVIDs and trust bundles from within your applications. These libraries handle the work of interfacing with the SPIFFE Workload API to make your coding easier.
The following code samples demonstrate how to use the libraries to establish and maintain SPIFFE-enabled connections transparently between applications.
C, C++
See the c-spiffe library GitHub page for more information about a SPIFFE C/C++ library. This library is not yet part of the official SPIFFE repo and is still under development in June 2021. An earlier official c-spiffe library became out-of-date and was archived.
C#
See the csharp-spiffe library GitHub page for more information about the SPIFFE C# library. This library is not yet part of the official SPIFFE repo.
Go
See the go-spiffe library GitHub page for more information about the SPIFFE Go library.
Java
See the java-spiffe library GitHub page for more information about the SPIFFE Java library.
Python
See the spiffe and spiffe-tls for more information about the SPIFFE Python libraries. This libraries are not yet part of the official SPIFFE repo.
Rust
See spiffe for a Rust library that implements SPIFFE workload identity, providing support for X.509 SVIDs, JWT-SVIDs, and trust bundles through the SPIFFE Workload API.
For TLS and mTLS integrations, see
spiffe-rustls, which provides
SPIFFE-based authentication and identity integration for applications built on
rustls.
These libraries are not part of the official SPIFFE repository.