SURFnet / rd-sram-integration

Research Drive / SURF Research Access Management Integration
2 stars 3 forks source link

Notification can't be sent via email #242

Closed michielbdejong closed 1 year ago

michielbdejong commented 1 year ago

We were seeing this error in the deployed tests:

{"reqId":"ZO8Mj2E5gAgsVyRXz03srwAAAAc","level":0,"time":"30\/Aug\/2023:11:31:59","remoteAddr":"10.234.3.96","user":"--","app":"no app in context","method":"POST","url":"\/index.php\/apps\/federatedfilesharing\/shares","message":"[OCM] Controller Constructor"}
{"reqId":"ZO8Mj2E5gAgsVyRXz03srwAAAAc","level":0,"time":"30\/Aug\/2023:11:31:59","remoteAddr":"10.234.3.96","user":"--","app":"no app in context","method":"POST","url":"\/index.php\/apps\/federatedfilesharing\/shares","message":"[OCM] createShare"}
{"reqId":"ZO8Mj2E5gAgsVyRXz03srwAAAAc","level":0,"time":"30\/Aug\/2023:11:31:59","remoteAddr":"10.234.3.96","user":"--","app":"no app in context","method":"POST","url":"\/index.php\/apps\/federatedfilesharing\/shares","message":"[OCM] checks passed"}
{"reqId":"ZO8Mj2E5gAgsVyRXz03srwAAAAc","level":1,"time":"30\/Aug\/2023:11:31:59","remoteAddr":"10.234.3.96","user":"--","app":"admin_audit","method":"POST","url":"\/index.php\/apps\/federatedfilesharing\/shares","message":"IP 10.234.3.96 received federated share UploadTest from remote target tomw@https:\/\/tst-miskatonic.data.surfsara.nl","action":"federated_share_received","name":"UploadTest","targetuser":"tomw@https:\/\/tst-miskatonic.data.surfsara.nl","shareType":"remote","CLI":false,"userAgent":"ownCloud Server Crawler","auditGroups":[],"auditUsers":[],"actor":"IP 10.234.3.96"}
{"reqId":"ZO8Mj2E5gAgsVyRXz03srwAAAAc","level":2,"time":"30\/Aug\/2023:11:31:59","remoteAddr":"10.234.3.96","user":"--","app":"notifications","method":"POST","url":"\/index.php\/apps\/federatedfilesharing\/shares","message":"notification remote_share#10 can't be sent to Demo Test (SRAM CO) via email: the user is missing"}
yasharpm commented 1 year ago

I could not reproduce this issue. Couldn't figure out how to get these messages. Also text search on OC sources could not fine the error message.

grep -Rn '.' -e 't be sent to'
michielbdejong commented 1 year ago

notification remote_share#10 can't be sent to Demo Test (SRAM CO) via email: the user is missing

This sounds like an email is sent to a user when they receive an incoming share via OCM. This process apparently assumes that shareWith is a user. But now it's a group, so that's why the email can't be sent. We could just ignore this error, but it would be nice to find a way to stop it from trying to find an email address for the group each time an OCM-to-group share comes in! :)

Moving this issue to the OCM app.

michielbdejong commented 1 year ago

Continued in https://github.com/pondersource/oc-opencloudmesh/issues/44