forked from olympus-btc/ambrosia
-
Notifications
You must be signed in to change notification settings - Fork 0
Fix logout auth and token revocation #4
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c597ba9 to
6135ede
Compare
f3118cd to
4eb0bd4
Compare
6135ede to
e96a468
Compare
8db6050 to
da7ebfc
Compare
Owner
Author
|
Postpone this for after the workshop presentation! |
Fix/onboarding
…stall Functional Refactoring and Installation Robustness
…stall chore: refactor installation scripts
Solve lint problems in users, and add tests for users
Solve lint problems in products, and add tests for products
Increase user test coverage to 100%.
…stall chore: enhance uninstall script by clarifying symlink removal messages
2c56aa3 to
da7ebfc
Compare
da7ebfc to
ac119a6
Compare
…odal, add products on description in invoice
e50f95a to
1b83112
Compare
1b83112 to
50dca0b
Compare
- Add configurable access token expiration via `--jwt-access-token-expiration` CLI option (default: 60s)
- Wrap `/logout` in `authenticate("auth-jwt")` to require authentication and ensure token revocation
50dca0b to
f3abb3c
Compare
Owner
Author
|
Done. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Configurable access token expiration with optimized test speed
Added command-line configuration for access token expiration to enable
faster E2E tests while maintaining production defaults.
Server Changes (Kotlin)
TokenService.kt
accessTokenExpirationSecondsconfigurable via application configjwt.accessTokenExpirationSecondspropertyAmbrosia.kt
--jwt-access-token-expirationCLI option (default: "60")Authorize.kt
/loginand/refreshcookie expiration to usetokenService.accessTokenExpirationSecondsinstead of hardcoded 60s/logoutendpoint inauthenticate("auth-jwt")for properauthentication (security improvement)
Test Changes (Python)
test_server.py
--jwt-access-token-expiration 5for faster test runstest_auth_e2e.py
test_access_token_expires_after_one_minutetotest_access_token_expiration_and_refreshupdated the test to wait 8 secondsinstead of 65 seconds
test_logout_revokes_tokensto expect proper authenticationtest_routing_e2e.py
test_logout_revokes_tokensto verify server-side tokenrevocation (70 lines)
Results
Configuration
Production (default):
--jwt-access-token-expiration 60
Testing (E2E):
--jwt-access-token-expiration 5