Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support filters in entry & agent command #52

Merged
merged 2 commits into from
Mar 1, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add filters
Signed-off-by: FedeNQ <fedenahuel07@gmail.com>
FedeNQ committed Jan 12, 2024

Verified

This commit was signed with the committer’s verified signature.
FedeNQ Federico Nahuel Quijada
commit 42a83e0f5750c137489d3888b3e9a4005e658e34
613 changes: 380 additions & 233 deletions proto/spire/api/server/agent/v1/agent.pb.go

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions proto/spire/api/server/agent/v1/agent.proto
Original file line number Diff line number Diff line change
@@ -68,6 +68,25 @@ service Agent {
}

message CountAgentsRequest {
message Filter {
// Filters agents to those matching the attestation type.
string by_attestation_type = 1;

// Filters agents to those satisfying the selector match.
spire.api.types.SelectorMatch by_selector_match = 2;

// Filters agents to those that are banned.
google.protobuf.BoolValue by_banned = 3;

// Filters agents that can re-attest.
google.protobuf.BoolValue by_can_reattest = 4;

// Filters agents by those expires before.
string by_expires_before = 5;
}

// Filters the agents returned by the list operation.
Filter filter = 1;
}

message CountAgentsResponse {
@@ -87,6 +106,9 @@ message ListAgentsRequest {

// Filters agents that can re-attest.
google.protobuf.BoolValue by_can_reattest = 4;

// Filters agents by those expires before.
string by_expires_before = 5;
}

// Filters the agents returned by the list operation.
695 changes: 428 additions & 267 deletions proto/spire/api/server/entry/v1/entry.pb.go

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions proto/spire/api/server/entry/v1/entry.proto
Original file line number Diff line number Diff line change
@@ -68,6 +68,17 @@ service Entry {
}

message CountEntriesRequest {
message Filter {
spire.api.types.SPIFFEID by_spiffe_id = 1;
spire.api.types.SPIFFEID by_parent_id = 2;
spire.api.types.SelectorMatch by_selectors = 3;
spire.api.types.FederatesWithMatch by_federates_with = 4;
google.protobuf.StringValue by_hint = 5;
google.protobuf.BoolValue by_downstream = 6;
}

// Filters the entries returned in the response.
Filter filter = 1;
}

message CountEntriesResponse {
@@ -81,6 +92,7 @@ message ListEntriesRequest {
spire.api.types.SelectorMatch by_selectors = 3;
spire.api.types.FederatesWithMatch by_federates_with = 4;
google.protobuf.StringValue by_hint = 5;
google.protobuf.BoolValue by_downstream = 6;
}

// Filters the entries returned in the response.