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

agent: accept registration entries with RevisionNumber 0 #5680

Conversation

sorindumitru
Copy link
Contributor

When using the SyncAuthorizedEntries API we verify that the RevisionNumber of the entries is at least 1. Unfortunately, the RevisionNumber as assigned by spire-server starts at 0, leading to the following error:

WARN[0004] Received malformed entry revision from SPIRE server; are the server and agent versions compatible?  entry_id=f1a26ecf-1043-4905-b5d9-789e60f88695 revision_number=0 subsystem_name=manager

I'm guessing the check is there in the unlikely case of a wrap-around, so I'm keeping it and verifying that the RevisionNumber is positive.

No tests here, but I'm working on adding some general tests for the feature in a follow-up PR.

@sorindumitru sorindumitru changed the title agent: Accept registration entries with RevisionNumber 0 agent: accept registration entries with RevisionNumber 0 Dec 5, 2024
When using the SyncAuthorizedEntries API we verify that the
RevisionNumber of the entries is at least 1. Unfortunately,
the RevisionNumber as assigned by spire-server starts at 0,
leading to the following error:
```
WARN[0004] Received malformed entry revision from SPIRE server; are the server and agent versions compatible?  entry_id=f1a26ecf-1043-4905-b5d9-789e60f88695 revision_number=0 subsystem_name=manager
````

I'm guessing the check is there in the unlikely case of a wrap-around,
so I'm keeping it and verifying that the RevisionNumber is positive.

Signed-off-by: Sorin Dumitru <sdumitru@bloomberg.net>
@sorindumitru sorindumitru force-pushed the sync-authorized-entries-revision-number branch from 0404c75 to ce63fcc Compare December 5, 2024 10:39
@amartinezfayo amartinezfayo added this to the 1.11.1 milestone Dec 5, 2024
@amartinezfayo amartinezfayo merged commit 683f59a into spiffe:main Dec 5, 2024
34 checks passed
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