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

KBS: fix session status #376

Merged
merged 1 commit into from
Apr 25, 2024
Merged

Conversation

Xynnn007
Copy link
Member

When an attested session sends a new attest request, the session should not do anything else but only return the old token if it is still valid.

Close #374

When an attested session sends a new attest request, the session should
not do anything else but only return the old token if it is still valid

Close confidential-containers#374

Signed-off-by: Xynnn007 <[email protected]>
Copy link
Member

@fitzthum fitzthum left a comment

Choose a reason for hiding this comment

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

Changes look fine, but why are we calling the /attest endpoint multiple times in the first place? Shouldn't this only happen once per guest/token?

@Xynnn007
Copy link
Member Author

Changes look fine, but why are we calling the /attest endpoint multiple times in the first place? Shouldn't this only happen once per guest/token?

Yes. For normal cases, attest endpoint would be called only once. But due to network error, retry from client (async) or some unexpected reason, one or more duplicated requests could reach. The error reported by @ChengyuZhu6 is caught when doing performance test, but I think it should be treated more gerenicly. We should better promote the robust of the code.

Copy link
Member

@ChengyuZhu6 ChengyuZhu6 left a comment

Choose a reason for hiding this comment

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

LGTM ! Thanks for the fix @Xynnn007 ! I have tested the patch on my local machine and it worked as expected.

@Xynnn007 Xynnn007 merged commit 65ee7e1 into confidential-containers:main Apr 25, 2024
15 checks passed
@Xynnn007 Xynnn007 deleted the fix-session branch April 25, 2024 02:42
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.

KBS: session panic
3 participants