eyra / mono

Next platform repo
https://eyra.co
GNU Affero General Public License v3.0
7 stars 5 forks source link

Remove credentials for storage credentials from logs #929

Closed TjerkNan closed 4 months ago

TjerkNan commented 4 months ago

Describe the bug While throubleshooting https://github.com/eyra/mono/issues/928 I noticed that credentials are logged in the crash report.

To Reproduce Steps to reproduce the behavior:

  1. Observe local error log or Grafana

Expected behavior No username/password and service url? in log?

Screenshots See referred issue

mellelieuwes commented 4 months ago

Ah ja goed punt

mellelieuwes commented 4 months ago

@TjerkNan is het voldoende om alleen het password te verwijderen uit de logs? Dat is wel wat we op andere plekken doen.

TjerkNan commented 4 months ago

@TjerkNan is het voldoende om alleen het password te verwijderen uit de logs? Dat is wel wat we op andere plekken doen.

@emielvdveen zou ook username weghalen op zijn minst 🤷‍♀️

mellelieuwes commented 4 months ago
11:54:35.424 [error] ** (FunctionClauseError) no function clause matching in Systems.Storage.Yoda.Backend.store/3
    (core 0.1.0) systems/storage/yoda/backend.ex:8: Systems.Storage.Yoda.Backend.store(%{"password" => "************", "url" => "https://fsw.data.uu.nl/research-d3i-data-donation/boerenkool", "user" => "************"}, "[{\"zip_content\":[{\"filename\":\"Next liggend.png\",\"compressed size\":\"1777\",\"size\":\"1772\"},{\"filename\":\"__MACOSX/._Next liggend.png\",\"compressed size\":\"84\",\"size\":\"163\"},{\"filename\":\"Next liggend@3x.png\",\"compressed size\":\"4460\",\"size\":\"4527\"},{\"filename\":\"__MACOSX/._Next liggend@3x.png\",\"compressed size\":\"84\",\"size\":\"163\"},{\"filename\":\"Next liggend@2x.png\",\"compressed size\":\"3140\",\"size\":\"3160\"},{\"filename\":\"__MACOSX/._Next liggend@2x.png\",\"compressed size\":\"84\",\"size\":\"163\"}]},{\"log_messages\":[{\"type\":\"debug\",\"message\":\"zip-contents-example: start\"},{\"type\":\"debug\",\"message\":\"zip-contents-example: prompt file\"},{\"type\":\"debug\",\"message\":\"zip-contents-example: extracting file\"},{\"type\":\"debug\",\"message\":\"zip-contents-example: extraction successful, go to consent form\"},{\"type\":\"debug\",\"message\":\"zip-contents-example: prompt consent\"}]},{\"user_omissions\":\"[]\"}]", %{"identifier" => [["assignment", 35], ["task", 56], ["participant", "preview"], ["source", "Netflix"], ["key", "1721469239856-zip-contents-example"]], "panel_info" => %{"embedded?" => false, "panel" => "generic", "participant" => "preview", "query_string" => %{"entry" => "participate", "id" => "35", "participant" => "preview"}}, "remote_ip" => "127.0.0.1"})
    (core 0.1.0) systems/storage/delivery.ex:34: Systems.Storage.Delivery.deliver/4
    (core 0.1.0) systems/storage/delivery.ex:18: Systems.Storage.Delivery.perform/1
    (oban 2.13.6) lib/oban/queue/executor.ex:129: Oban.Queue.Executor.perform/1
    (oban 2.13.6) lib/oban/queue/executor.ex:74: Oban.Queue.Executor.call/1
    (elixir 1.14.0) lib/task/supervised.ex:89: Task.Supervised.invoke_mfa/2
    (elixir 1.14.0) lib/task/supervised.ex:34: Task.Supervised.reply/4
    (stdlib 4.0.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
TjerkNan commented 4 months ago

Only possible for me to validate is to recreate the crash but since that's also fixed, I'm going to trust the 'screenshot'.