-
Notifications
You must be signed in to change notification settings - Fork 54
[PLGN-611] Duo Admin Task Handle 403 errors and allow configuration of event and log gathering #2100
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
Merged
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
22612f0
to
df893f9
Compare
rbowden-r7
approved these changes
Nov 7, 2023
895703b
to
9c3505f
Compare
ablakley-r7
approved these changes
Nov 7, 2023
igorski-r7
approved these changes
Nov 7, 2023
igorski-r7
pushed a commit
that referenced
this pull request
Nov 9, 2023
…f event and log gathering (#2100) * Adding in handling for task 403 errors * Adding in handling for task 403 errors * Removed unnecessary debug * Updated to allow optional collection of events and logs for task * Updated to allow optional collection of events and logs for task * Updated to allow optional collection of events and logs for task * Reverted unnecessary changes to help.md * Fixed return code check for 403 in task * Fixed return code check for 403 in task * Fixed return code check for 403 in task * Updated linting * Updated unit tests due to change in response handling for task 403 * Removed unnecessary pylint ignore statement * Update task inputs and outputs in help.md file --------- Co-authored-by: Dympna Laverty <dympna_laverty@rapid7.com>
dlaverty-r7
added a commit
that referenced
this pull request
Nov 9, 2023
…f event and log gathering (#2100) * Adding in handling for task 403 errors * Adding in handling for task 403 errors * Removed unnecessary debug * Updated to allow optional collection of events and logs for task * Updated to allow optional collection of events and logs for task * Updated to allow optional collection of events and logs for task * Reverted unnecessary changes to help.md * Fixed return code check for 403 in task * Fixed return code check for 403 in task * Fixed return code check for 403 in task * Updated linting * Updated unit tests due to change in response handling for task 403 * Removed unnecessary pylint ignore statement * Update task inputs and outputs in help.md file --------- Co-authored-by: Dympna Laverty <dympna_laverty@rapid7.com>
igorski-r7
pushed a commit
that referenced
this pull request
Nov 10, 2023
…f event and log gathering (#2100) (#2107) * Adding in handling for task 403 errors * Removed unnecessary debug * Updated to allow optional collection of events and logs for task * Updated to allow optional collection of events and logs for task * Updated to allow optional collection of events and logs for task * Reverted unnecessary changes to help.md * Fixed return code check for 403 in task * Fixed return code check for 403 in task * Fixed return code check for 403 in task * Updated linting * Updated unit tests due to change in response handling for task 403 * Removed unnecessary pylint ignore statement * Update task inputs and outputs in help.md file --------- Co-authored-by: Dympna Laverty <dympna_laverty@rapid7.com>
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.
Proposed Changes
Description
Background and Solution
Currently the Duo Admin task assume that the user has access to admin logs and trust monitor events. However this will depend on the level of licensing. If a 403 error is received from either of these endpoints, an error should be logged and then continue on to gather data which they have access to e.g. auth logs.
Also add in boolean task inputs so that the UI can be updated to allow the collection of trust monitor events and admin logs to be configurable. This has been coded so that these default to True currently so that the code will function as normal until the UI is updated.
Testing
Tested locally using Postman calls against the task with and without task inputs for the collect logs and events. Mocked the 403 failures by changing out error code looked for to a 401 and ensuring correct behaviour (unable to reproduce the 403 as we have the level of license required to get all the events and logs).
NOTE: Unit tests outside of the task ones needed to be updated as the response returned is handled based on whether it is a Response instance.