Closed Bug 1452977 Opened 8 years ago Closed 8 years ago

authenticateHawk failing with validation error - port is not an integer

Categories

(Taskcluster :: Services, defect, P4)

defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: dustin, Unassigned)

Details

https://sentry.prod.mozaws.net/operations/taskcluster-queue/issues/3529548/events/20168999/ Error: Schema Validation Failed! Rejecting Schema: http://schemas.taskcluster.net/auth/v1/authenticate-hawk-request.json# Errors: * data.port should be integer ---- method: authenticateHawk errorCode: InputValidationError statusCode: 400 time: 2018-04-10T13:44:32.833Z ---- This is eventually returning a 500 to the caller, which retries and everything's OK. The caller looks like a legitimate worker (it's in EC2 and is uploading the usual-suspects of artifacts). https://github.com/taskcluster/taskcluster-lib-api/blob/c0f9ba7d9d79f5c63910fd6a5fe7c050daaf6e43/src/api.js#L426-L440 tc-lib-api uses parseInt to parse either the x-forwarded-port or host header to get the port number. That function returns `NaN` for non-integers, which is JSON-ified to `null`, which sentry's Python represents as `None`. So why is it getting bogus information? curl -v -H 'Host: auth.taskcluster.net:abc' https://auth.taskcluster.net/v1/clients results in a 400 bad request from Cowboy (the Heroku router). curl -v -H 'Host: aws-provisioner.taskcluster.net:123' https://aws-provisioner.taskcluster.net/v1/worker-type/gecko-1-b-linux results in an InsufficientScopes error, meaning that authenticateHawk completed successfully. Same with curl -v -H 'X-Forwarded-Port: abc' -H 'Host: aws-provisioner.taskcluster.net' https://aws-provisioner.taskcluster.net/v1/worker-type/gecko-1-b-linux
Note that bug 1452611 has a similar timeline..
Priority: -- → P4
Dustin, do you know if we're still experiencing this?
Flags: needinfo?(dustin)
QA Contact: jhford
It only happened those three times, according to Sentry. I suspect this was some variety of Heroku abuse..
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: needinfo?(dustin)
Resolution: --- → WORKSFORME
Component: Queue → Services
You need to log in before you can comment on or make changes to this bug.