artifact paths with backslash give "bad mac" rather than a 401

RESOLVED FIXED

Status

Taskcluster
Authentication
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: dustin, Assigned: dustin)

Tracking

Details

(Assignee)

Description

2 years ago
https://queue.taskcluster.net/v1/task/J_-xTHDHQHSc9efrMVXerA/runs/0/artifacts/public%5Clogs%5Ccommand_000000.log?bewit=cmVkLXRlYW1cMTQ0OTg1MTY4OVxtcC9GU0d5d2NRclFsL2FwYTFRVHhneFBicmNKbElPZnU4ZUdXc3cvRlhrPVw

Is this some bug in the Hawk authentication.
(Assignee)

Updated

2 years ago
Assignee: nobody → dustin
(Assignee)

Comment 1

2 years ago
https://queue.taskcluster.net/v1/task/J_-xTHDHQHSc9efrMVXerA/runs/0/artifacts/public/logs%5Ccommand_000000.log?bewit=cmVkLXRlYW1cMTQ0OTg1MTY4OVxtcC9GU0d5d2NRclFsL2FwYTFRVHhneFBicmNKbElPZnU4ZUdXc3cvRlhrPVw

..works fine (artifact not found).  The check is against public/, so public\ doesn't match.

The error message for public\ is a little weird, though:

Unauthorized: Access expired
----
errorCode:  AuthenticationFailed
statusCode: 401
requestInfo:
  method:   getArtifact
  params:   {"0":"public\\logs\\command_000000.log","taskId":"J_-xTHDHQHSc9efrMVXerA","runId":"0","name":"public\\logs\\command_000000.log"}
  payload:  {}
  time:     2016-03-29T23:15:44.918Z
details:
{
  "status": "auth-failed",
  "message": "Unauthorized: Access expired"
}

both the "0" key in params, and the "Access Expired" vs. any kind of scope error.
(Assignee)

Comment 2

2 years ago
Oh, duh, I didn't notice the bewit hanging out there at the end.

https://queue.taskcluster.net/v1/task/J_-xTHDHQHSc9efrMVXerA/runs/0/artifacts/public%5Clogs%5Ccommand_000000.log

gives the expected 

  "requestInfo": {
    "method": "getArtifact",
    "params": {
      "0": "public\\x\\y",
      "taskId": "J_-xTHDHQHSc9efrMVXerA",
      "runId": "0",
      "name": "public\\x\\y"
    },
    "payload": {},
    "time": "2016-03-29T23:21:18.085Z"
  },
  "details": {
    "scopesets": [
      [
        "queue:get-artifact:public\\x\\y"
      ]
    ],
    "scopes": []
  }

aside from that pesky "0".
(Assignee)

Comment 3

2 years ago
Ah, the "0" comes from the "(*)" in the route -- express / path-to-regexp must be doing that.  Not a big deal.
Group: mozilla-employee-confidential
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.