-
Notifications
You must be signed in to change notification settings - Fork 786
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
3137 new token pair endpoint #3181
Conversation
08e396a
to
7b68728
Compare
0806d84
to
c6c31ca
Compare
c6c31ca
to
1cf264a
Compare
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## develop #3181 +/- ##
===========================================
+ Coverage 72.50% 72.63% +0.13%
===========================================
Files 467 468 +1
Lines 13295 13344 +49
===========================================
+ Hits 9640 9693 +53
+ Misses 3655 3651 -4 see 10 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
monkey/monkey_island/cc/services/authentication_service/flask_resources/__init__.py
Outdated
Show resolved
Hide resolved
monkey/monkey_island/cc/services/authentication_service/token/token_validator.py
Outdated
Show resolved
Hide resolved
...ts/unit_tests/monkey_island/cc/services/authentication_service/token/test_token_validator.py
Outdated
Show resolved
Hide resolved
...s/unit_tests/monkey_island/cc/services/authentication_service/test_authentication_service.py
Outdated
Show resolved
Hide resolved
...s/unit_tests/monkey_island/cc/services/authentication_service/test_authentication_service.py
Outdated
Show resolved
Hide resolved
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 added the "needs registration" tests back in and they fail. These tests MUST be here and they MUST pass.
monkey/monkey_island/cc/services/authentication_service/flask_resources/token.py
Outdated
Show resolved
Hide resolved
...s/unit_tests/monkey_island/cc/services/authentication_service/test_authentication_service.py
Outdated
Show resolved
Hide resolved
360ad96
to
f9ad76b
Compare
...s/unit_tests/monkey_island/cc/services/authentication_service/test_authentication_service.py
Show resolved
Hide resolved
a95621c
to
17e2755
Compare
If a new refresh token is generated, even if the old token isn't expired yet, the new one should be invalidated. We shouldn't have two valid refresh tokens for a user.
These tests were removed in the previous commit, but test security-critical portions of the authentication system. They MUST exist and they MUST pass.
All ParsedToken objects are valid at the time of creation. They have a valid signature and not be expired. Since the token may expire sometime after the object is created, `is_expired()` is provided so that other components may check expiration at a later time.
Since TokenParser will not return an invalid token, there is no longer any need to call TokenValidator.validate_token().
315c23c
to
a2ce7d3
Compare
What does this PR do?
Fixes a part of #3137
PR Checklist
Was the documentation framework updated to reflect the changes?Testing Checklist
Do all end-to-end tests pass?If applicable, add screenshots or log transcripts of the feature working