-
Notifications
You must be signed in to change notification settings - Fork 795
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
Implement Agent login via OTP #3196
Conversation
monkey/monkey_island/cc/services/authentication_service/flask_resources/agent_otp_login.py
Outdated
Show resolved
Hide resolved
monkey/monkey_island/cc/services/authentication_service/flask_resources/agent_otp_login.py
Outdated
Show resolved
Hide resolved
monkey/monkey_island/cc/services/authentication_service/flask_resources/agent_otp_login.py
Outdated
Show resolved
Hide resolved
monkey/monkey_island/cc/services/authentication_service/flask_resources/agent_otp_login.py
Outdated
Show resolved
Hide resolved
monkey/monkey_island/cc/services/authentication_service/flask_resources/agent_otp_login.py
Outdated
Show resolved
Hide resolved
9cc0376
to
f42db0e
Compare
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## develop #3196 +/- ##
===========================================
+ Coverage 72.93% 72.97% +0.04%
===========================================
Files 471 471
Lines 13496 13538 +42
===========================================
+ Hits 9843 9880 +37
- Misses 3653 3658 +5 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. |
return make_response(f"Missing argument {err}", HTTPStatus.BAD_REQUEST) | ||
except TypeError: | ||
return make_response("Could not parse the login request", HTTPStatus.BAD_REQUEST) | ||
|
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.
TODO: Verify that AgentID exists in the agent repository.
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.
We can't do that because Agent registration happens after the login.
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.
Good call. We'll need to add a cleanup step to ensure that if agents fail to register their users get cleaned up.
c231470
to
cedef47
Compare
cedef47
to
93fc73a
Compare
monkey/monkey_island/cc/services/authentication_service/flask_resources/agent_otp_login.py
Outdated
Show resolved
Hide resolved
It's probably a bad idea to include certain whitespace characters in the password field. Even though this password should never be used, I'm not sure whether or not Flask Security or Flask Login would be expecting such inputs.
What does this PR do?
Fixes a part of #3078
PR Checklist
Was the CHANGELOG.md updated to reflect the changes?Was the documentation framework updated to reflect the changes?Testing Checklist
Added relevant unit tests?Do all end-to-end tests pass?If applicable, add screenshots or log transcripts of the feature working