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

New SyncAuthorizedEntries RPC #49

Merged
merged 3 commits into from
Nov 7, 2023

Conversation

azdagron
Copy link
Member

@azdagron azdagron commented Nov 5, 2023

No description provided.

Signed-off-by: Andrew Harding <[email protected]>
Comment on lines 49 to 50


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

@@ -46,6 +46,21 @@ service Entry {
// The caller must present an active agent X509-SVID. See the Agent
// AttestAgent/RenewAgent RPCs.
rpc GetAuthorizedEntries(GetAuthorizedEntriesRequest) returns (GetAuthorizedEntriesResponse);


// Syncs authorized entries down the caller. The caller controls which
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Syncs authorized entries down 'to' the caller.?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks :)

// entries the server sends down full details for. The flow is as follows:
// 1. Caller opens up sync stream
// 2. Server determines authorized entries for caller:
// - If there are less entries than a server-determined page size, go to (5).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is going to 5? or 4?
this means that we get full if we return entries < pagesize?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To (5). If there aren't many entries, it's not worth trying to do the "diff". The server just sends the full non-sparse set to the agent.
The outcome is that there is no noticeable difference from a network standpoint for existing deployments whose authorized entry sets are smaller than the page size.

Signed-off-by: Andrew Harding <[email protected]>
Signed-off-by: Andrew Harding <[email protected]>
Copy link
Collaborator

@MarcosDY MarcosDY left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good,
But I have a question, what happens when SyncAuthorizedEntriesRequest gets an ID that the agent is not authorized to return? is it ignored?

@azdagron
Copy link
Member Author

azdagron commented Nov 7, 2023

Ids not in the authorized set are ignored.

@azdagron azdagron merged commit ba57e0e into spiffe:next Nov 7, 2023
2 checks passed
@azdagron azdagron deleted the syncauthorizedentries branch November 7, 2023 16:11
amartinezfayo pushed a commit to amartinezfayo/spire-api-sdk that referenced this pull request Dec 21, 2023
* New SyncAuthorizedEntries RPC

Signed-off-by: Andrew Harding <[email protected]>

* Fix up comments

Signed-off-by: Andrew Harding <[email protected]>

* more comments

Signed-off-by: Andrew Harding <[email protected]>

---------

Signed-off-by: Andrew Harding <[email protected]>
amartinezfayo pushed a commit that referenced this pull request Dec 21, 2023
* New SyncAuthorizedEntries RPC

Signed-off-by: Andrew Harding <[email protected]>

* Fix up comments

Signed-off-by: Andrew Harding <[email protected]>

* more comments

Signed-off-by: Andrew Harding <[email protected]>

---------

Signed-off-by: Andrew Harding <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants