Skip to content

Commit

Permalink
Update spire-api dependencies (#77)
Browse files Browse the repository at this point in the history
Update spire-api dependencies

Signed-off-by: Max Lambrecht <[email protected]>
  • Loading branch information
maxlambrecht authored Mar 7, 2024
1 parent 68f5dc6 commit fb82b65
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 29 deletions.
22 changes: 10 additions & 12 deletions spire-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,23 @@ categories = ["cryptography"]
keywords = ["SPIFFE", "SPIRE"]

[dependencies]
spiffe = { version = "0.4.0", default-features = false, features = ["spiffe-types"] }
spiffe = { version = "0.4.0", path = "../spiffe", default-features = false, features = ["spiffe-types"] }
bytes = { version = "1", features = ["serde"] }
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"]}
tonic = { version = "0.11", default-features = false, features = ["prost", "codegen", "transport"]}
prost = { version = "0.12"}
prost-types = {version = "0.12"}
tokio = { "version" = "1", features = ["net"]}
tokio-stream = "0.1"
tower = { version = "0.4", features = ["util"] }

[dev-dependencies]
once_cell = "1.18"
tokio = { version = "1", features = ["macros"] }
once_cell = "1"

[build-dependencies]
tonic-build = { version = "0.9", default-features = false, features = ["prost"] }
prost-build = "0.11"
anyhow = "1.0.65"
tonic-build = { version = "0.11", default-features = false, features = ["prost"] }
prost-build = "0.12"
anyhow = "1"

[features]
integration-tests = []

[patch.crates-io]
spiffe = { path = "../spiffe" }
27 changes: 20 additions & 7 deletions spire-api/src/proto/spire.api.agent.delegatedidentity.v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ pub mod delegated_identity_server {
#[async_trait]
pub trait DelegatedIdentity: Send + Sync + 'static {
/// Server streaming response type for the SubscribeToX509SVIDs method.
type SubscribeToX509SVIDsStream: futures_core::Stream<
type SubscribeToX509SVIDsStream: tonic::codegen::tokio_stream::Stream<
Item = std::result::Result<
super::SubscribeToX509sviDsResponse,
tonic::Status,
Expand All @@ -325,7 +325,7 @@ pub mod delegated_identity_server {
tonic::Status,
>;
/// Server streaming response type for the SubscribeToX509Bundles method.
type SubscribeToX509BundlesStream: futures_core::Stream<
type SubscribeToX509BundlesStream: tonic::codegen::tokio_stream::Stream<
Item = std::result::Result<
super::SubscribeToX509BundlesResponse,
tonic::Status,
Expand All @@ -352,7 +352,7 @@ pub mod delegated_identity_server {
tonic::Status,
>;
/// Server streaming response type for the SubscribeToJWTBundles method.
type SubscribeToJWTBundlesStream: futures_core::Stream<
type SubscribeToJWTBundlesStream: tonic::codegen::tokio_stream::Stream<
Item = std::result::Result<
super::SubscribeToJwtBundlesResponse,
tonic::Status,
Expand Down Expand Up @@ -478,7 +478,11 @@ pub mod delegated_identity_server {
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).subscribe_to_x509svi_ds(request).await
<T as DelegatedIdentity>::subscribe_to_x509svi_ds(
&inner,
request,
)
.await
};
Box::pin(fut)
}
Expand Down Expand Up @@ -526,7 +530,11 @@ pub mod delegated_identity_server {
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).subscribe_to_x509_bundles(request).await
<T as DelegatedIdentity>::subscribe_to_x509_bundles(
&inner,
request,
)
.await
};
Box::pin(fut)
}
Expand Down Expand Up @@ -572,7 +580,8 @@ pub mod delegated_identity_server {
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).fetch_jwtsvi_ds(request).await
<T as DelegatedIdentity>::fetch_jwtsvi_ds(&inner, request)
.await
};
Box::pin(fut)
}
Expand Down Expand Up @@ -620,7 +629,11 @@ pub mod delegated_identity_server {
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).subscribe_to_jwt_bundles(request).await
<T as DelegatedIdentity>::subscribe_to_jwt_bundles(
&inner,
request,
)
.await
};
Box::pin(fut)
}
Expand Down
20 changes: 10 additions & 10 deletions spire-api/src/proto/spire.api.types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,20 @@ pub mod selector_match {
/// candidate selectors, independent of ordering.
/// Example:
/// Given:
/// - 'e1 { Selectors: ["a:1", "b:2", "c:3"]}'
/// - 'e2 { Selectors: ["a:1", "b:2"]}'
/// - 'e1 { Selectors: \["a:1", "b:2", "c:3"\]}'
/// - 'e2 { Selectors: \["a:1", "b:2"\]}'
/// - 'e3 { Selectors: \["a:1"\]}'
/// Operation:
/// - MATCH_EXACT ["a:1", "b:2"]
/// - MATCH_EXACT \["a:1", "b:2"\]
/// Entries that match:
/// - 'e2'
MatchExact = 0,
/// Indicates that all candidates which have a non-empty subset
/// of the provided set of selectors will match.
/// Example:
/// Given:
/// - 'e1 { Selectors: ["a:1", "b:2", "c:3"]}'
/// - 'e2 { Selectors: ["a:1", "b:2"]}'
/// - 'e1 { Selectors: \["a:1", "b:2", "c:3"\]}'
/// - 'e2 { Selectors: \["a:1", "b:2"\]}'
/// - 'e3 { Selectors: \["a:1"\]}'
/// Operation:
/// - MATCH_SUBSET \["a:1"\]
Expand All @@ -62,11 +62,11 @@ pub mod selector_match {
/// of the provided selectors will match.
/// Example:
/// Given:
/// - 'e1 { Selectors: ["a:1", "b:2", "c:3"]}'
/// - 'e2 { Selectors: ["a:1", "b:2"]}'
/// - 'e1 { Selectors: \["a:1", "b:2", "c:3"\]}'
/// - 'e2 { Selectors: \["a:1", "b:2"\]}'
/// - 'e3 { Selectors: \["a:1"\]}'
/// Operation:
/// - MATCH_SUPERSET ["a:1", "b:2"]
/// - MATCH_SUPERSET \["a:1", "b:2"\]
/// Entries that match:
/// - 'e1'
/// - 'e2'
Expand All @@ -75,8 +75,8 @@ pub mod selector_match {
/// of the provided set of selectors will match.
/// Example:
/// Given:
/// - 'e1 { Selectors: ["a:1", "b:2", "c:3"]}'
/// - 'e2 { Selectors: ["a:1", "b:2"]}'
/// - 'e1 { Selectors: \["a:1", "b:2", "c:3"\]}'
/// - 'e2 { Selectors: \["a:1", "b:2"\]}'
/// - 'e3 { Selectors: \["a:1"\]}'
/// Operation:
/// - MATCH_ANY \["a:1"\]
Expand Down

0 comments on commit fb82b65

Please sign in to comment.