Skip to content
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

fix notification email encrypt/decrypt implementation #571

Merged
merged 7 commits into from
Oct 6, 2023

Conversation

fmigneault
Copy link
Collaborator

@fmigneault fmigneault commented Oct 6, 2023

Changes

  • Add utility methods for Job to easily retrieve its various URLs.
  • Add weaver.wps_email_notify_timeout setting (default 10s) to avoid SMTP server deadlock on failing connection.
  • Modify the encrypt_email function to use an alternate strategy allowing decrypt_email on Job completed.
  • Remove notification_email from GET /jobs query parameters.
    Due to the nature of the encryption strategy, this cannot be supported anymore.

Fixes

  • Fix Job submitted with a notification_email not reversible from its encrypted value to retrieve the original
    email on Job completion to send the notification (fixes Weaver tries to send e-mail to hashed notification_email #568).
  • Fix example Mako Template for email notification using an unavailable property ${logs}.
    Instead, the new utility methods job.[...]_url should be used to retrieve relevant locations.

@fmigneault fmigneault self-assigned this Oct 6, 2023
@fmigneault fmigneault added triage/security Issue related to authorization or general security vulnerability feature/job Issues related to job execution, reporting and logging. labels Oct 6, 2023
@github-actions github-actions bot added feature/db Related to database or datatype manipulation. ci/doc Issue related to documentation of the package ci/tests Tests of the package and features labels Oct 6, 2023
@fmigneault fmigneault changed the title [wip] fix notification email encrypt/decrypt implementation fix notification email encrypt/decrypt implementation Oct 6, 2023
@github-actions github-actions bot added feature/oas Issues related to OpenAPI specifications. process/wps3 Issue related to WPS 3.x (REST-JSON) processes support labels Oct 6, 2023
@codecov
Copy link

codecov bot commented Oct 6, 2023

Codecov Report

Merging #571 (4b50015) into master (3680c5d) will increase coverage by 0.15%.
The diff coverage is 91.66%.

@@            Coverage Diff             @@
##           master     #571      +/-   ##
==========================================
+ Coverage   84.55%   84.71%   +0.15%     
==========================================
  Files          79       79              
  Lines       17793    17828      +35     
  Branches     2709     2708       -1     
==========================================
+ Hits        15045    15103      +58     
+ Misses       2020     1992      -28     
- Partials      728      733       +5     
Files Coverage Δ
weaver/store/base.py 100.00% <ø> (ø)
weaver/store/mongodb.py 78.31% <100.00%> (-0.07%) ⬇️
weaver/wps_restapi/jobs/jobs.py 89.63% <ø> (-0.11%) ⬇️
weaver/wps_restapi/swagger_definitions.py 99.82% <ø> (-0.01%) ⬇️
weaver/notify.py 80.64% <97.43%> (+43.14%) ⬆️
weaver/datatype.py 79.08% <88.23%> (+0.26%) ⬆️
weaver/processes/execution.py 84.33% <33.33%> (-0.20%) ⬇️

@fmigneault fmigneault merged commit f6bdbfc into master Oct 6, 2023
46 checks passed
@fmigneault fmigneault deleted the fix-email-notify branch October 6, 2023 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/doc Issue related to documentation of the package ci/tests Tests of the package and features feature/db Related to database or datatype manipulation. feature/job Issues related to job execution, reporting and logging. feature/oas Issues related to OpenAPI specifications. process/wps3 Issue related to WPS 3.x (REST-JSON) processes support triage/security Issue related to authorization or general security vulnerability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Weaver tries to send e-mail to hashed notification_email
1 participant