Requires #335. This PR updates the job schema include a new job_priority field. In order for a job to specify a job_priority, the client needs to include a signed JWT that gives them the permission to push a job to the specified queue at their specified priority level. This PR includes validation of the attached JWT with jobs that specify priority. After token validation, job priority is added to the job structure in the database.
Description
Requires #335. This PR updates the job schema include a new job_priority field. In order for a job to specify a job_priority, the client needs to include a signed JWT that gives them the permission to push a job to the specified queue at their specified priority level. This PR includes validation of the attached JWT with jobs that specify priority. After token validation, job priority is added to the job structure in the database.
Resolved issues
Resolves https://warthogs.atlassian.net/browse/CERTTF-371
Documentation
Job schema docs were updated to reflect addition of job_priority field.
Web service API changes
POST /v1/job endpoint updated to include token validation
Tests
Unit tests were added to test_v1.py.