-
Notifications
You must be signed in to change notification settings - Fork 64
Fix misc findings from reaudit #376
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
Conversation
crates/signer/src/service.rs
Outdated
| jwts: Arc::new(RwLock::new(config.mod_signing_configs)), | ||
| admin_secret: Arc::new(RwLock::new(config.admin_secret)), | ||
| jwt_auth_failures: Arc::new(RwLock::new(HashMap::new())), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i dont think we should use tokio RwLock here, in general I'd much rather take a guard lock twice than hold it for long
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed offline and reverted in a29a366 due to performance reasons.
Co-authored-by: Manuel Iñaki Bilbao <manuel.bilbao@lambdaclass.com>
This reverts commit a9e2479.
Work In Progress
This fixes several smaller miscellaneous findings from the reaudit assessment.
CBST2-01
CBST2-04
handle_reload()now updates the state atomically once all of the code has succeeded, and doesn't update it at all if any failures occur.CBST2-06
Fixed a race that occurred due to differing locks on JWT auth failure reads and writes.This was reverted due to performance considerations with locking the auth check for each request.CBST2-14