Skip to content

[SOAR-19380] Mimecast v2 - Modified status code returned by task when receiving 'Unauthorized Request' and 'token_verification_failed' fail codes | Updated SDK to the latest version (6.3.3) #3412

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
merged 1 commit into from
May 19, 2025

Conversation

igorski-r7
Copy link
Collaborator

Proposed Changes

Description

Describe the proposed changes:

  • Modified status code returned by task when receiving 'Unauthorized Request' and 'token_verification_failed' fail codes
  • Updated SDK to the latest version (6.3.3)

PR Requirements

Developers, verify you have completed the following items by checking them off:

Testing

Unit Tests

Review our documentation on generating and writing plugin unit tests

  • Unit tests written for any new or updated code

In-Product Tests

If you are an InsightConnect customer or have access to an InsightConnect instance, the following in-product tests should be done:

  • Screenshot of job output with the plugin changes
  • Screenshot of the changed connection, actions, or triggers input within the InsightConnect workflow builder

Style

Review the style guide

  • For dependencies, pin OS package and Python package versions
  • For security, set least privileged account with USER nobody in the Dockerfile when possible
  • For size, use the slim SDK images when possible: rapid7/insightconnect-python-3-38-slim-plugin:{sdk-version-num} and rapid7/insightconnect-python-3-38-plugin:{sdk-version-num}
  • For error handling, use of PluginException and ConnectionTestException
  • For logging, use self.logger
  • For docs, use changelog style
  • For docs, validate markdown with insight-plugin validate which calls icon_validate to lint help.md

Functional Checklist

  • Work fully completed
  • Functional
    • Any new actions/triggers include JSON test files in the tests/ directory created with insight-plugin samples
    • Tests should all pass unless it's a negative test. Negative tests have a naming convention of tests/$action_bad.json
    • Unsuccessful tests should fail by raising an exception causing the plugin to die and an object should be returned on successful test
    • Add functioning test results to PR, sanitize any output if necessary
      • Single action/trigger insight-plugin run -T tests/example.json --debug --jq
      • All actions/triggers shortcut insight-plugin run -T all --debug --jq (use PR format at end)
    • Add functioning run results to PR, sanitize any output if necessary
      • Single action/trigger insight-plugin run -R tests/example.json --debug --jq
      • All actions/triggers shortcut insight-plugin run --debug --jq (use PR format at end)

Assessment

You must validate your work to reviewers:

  1. Run insight-plugin validate and make sure everything passes
  2. Run the assessment tool: insight-plugin run -A. For single action validation: insight-plugin run tests/{file}.json -A
  3. Copy (insight-plugin ... | pbcopy) and paste the output in a new post on this PR
  4. Add required screenshots from the In-Product Tests section

@igorski-r7 igorski-r7 self-assigned this May 16, 2025
@igorski-r7 igorski-r7 requested a review from a team as a code owner May 16, 2025 14:29
@simonirwin-r7
Copy link
Contributor

simonirwin-r7 commented May 16, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

code/snyk check is complete. No issues have been found. (View Details)

Copy link
Collaborator

@ablakley-r7 ablakley-r7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Is there any chance we can log the request header from the response in the event of an error so we can troubleshoot with Mimecast?

x-request-id

@igorski-r7 igorski-r7 force-pushed the SOAR-19380_Mimecast_v2 branch from c835394 to 720efd5 Compare May 16, 2025 14:54
@igorski-r7 igorski-r7 requested a review from ablakley-r7 May 16, 2025 14:54
@igorski-r7 igorski-r7 force-pushed the SOAR-19380_Mimecast_v2 branch from 720efd5 to a475439 Compare May 19, 2025 10:05
@igorski-r7 igorski-r7 requested a review from ablakley-r7 May 19, 2025 10:05
@igorski-r7 igorski-r7 force-pushed the SOAR-19380_Mimecast_v2 branch from a475439 to 768ef2e Compare May 19, 2025 11:09
…iving 'Unauthorized Request' and 'token_verification_failed' fail codes | Updated SDK to the latest version (6.3.3)
@igorski-r7 igorski-r7 force-pushed the SOAR-19380_Mimecast_v2 branch from 768ef2e to e0862a8 Compare May 19, 2025 11:53
@igorski-r7 igorski-r7 merged commit 0033fb9 into mimecast_v2-1.0.5-release May 19, 2025
11 of 12 checks passed
@igorski-r7 igorski-r7 deleted the SOAR-19380_Mimecast_v2 branch May 19, 2025 12:05
igorski-r7 added a commit that referenced this pull request May 20, 2025
…iving 'Unauthorized Request' and 'token_verification_failed' fail codes | Updated SDK to the latest version (6.3.3) (#3412)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants