-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate library to using to
tonic
and prost
and enhance functiona…
…lity of the Workload API client (#33) Signed-off-by: Max Lambrecht <[email protected]>
- Loading branch information
1 parent
9f6c6cc
commit 23473fa
Showing
15 changed files
with
1,659 additions
and
3,020 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ name = "spiffe" | |
# When releasing to crates.io: | ||
# - Update CHANGELOG.md. | ||
# - Create a new tag | ||
version = "0.2.2" | ||
version = "0.3.0" | ||
authors = ["Max Lambrecht <[email protected]>"] | ||
description = "Rust client library implementation for SPIFFE" | ||
license = "Apache-2.0" | ||
|
@@ -15,8 +15,12 @@ categories = ["cryptography"] | |
keywords = ["SPIFFE", "X509", "JWT"] | ||
|
||
[dependencies] | ||
protobuf = "2.28" | ||
futures = "0.3" | ||
tonic = { version = "0.9", default-features = false, features = ["prost", "codegen", "transport"]} | ||
prost = { version = "0.11"} | ||
prost-types = {version = "0.11"} | ||
tokio = { "version" = "1", features = ["net", "test-util"]} | ||
tokio-stream = "0.1" | ||
tower = { version = "0.4", features = ["util"] } | ||
thiserror = "1.0" | ||
url = "2.2" | ||
asn1 = { package = "simple_asn1", version = "0.6" } | ||
|
@@ -28,13 +32,21 @@ serde = { version = "1.0", features = ["derive"] } | |
serde_json = "1.0" | ||
zeroize = { version = "1.6", features = ["zeroize_derive"] } | ||
time = "0.3" | ||
grpcio = { version = "0.12", default-features = false, features = ["protobuf-codec"] } | ||
|
||
|
||
[dev-dependencies] | ||
jsonwebkey = { version = "0.3", features = ["generate"] } | ||
tokio-test = "0.4" | ||
once_cell = "1.18" | ||
|
||
# used to verify in tests that the certificates bytes from the X.509 SVIDs and bundle authorities | ||
# are parseable as OpenSSL X.509 certificates. | ||
openssl = { version = "0.10", features = ["vendored"] } | ||
|
||
[build-dependencies] | ||
tonic-build = { version = "0.9", default-features = false, features = ["prost"] } | ||
prost-build = "0.11" | ||
anyhow = "1.0.65" | ||
|
||
[features] | ||
integration-tests = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
use std::fs; | ||
|
||
fn main() -> Result<(), anyhow::Error> { | ||
let mut proto_config = prost_build::Config::new(); | ||
proto_config.bytes(["."]); | ||
tonic_build::configure() | ||
.build_client(true) | ||
.out_dir("src/proto") | ||
.compile_with_config(proto_config, &["src/proto/workload.proto"], &["src/proto"])?; | ||
|
||
fs::rename("src/proto/_.rs", "src/proto/workload.rs")?; | ||
|
||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
pub(crate) mod workload; | ||
pub(crate) mod workload_grpc; |
Oops, something went wrong.