Add extended reservation checks in the server #428
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds support for extended reservation times in Testflinger Server. Certain users need longer reservation times than the maximum 6 hours, so this provides this ability for authorized clients. The server rejects jobs with higher than 6 hours of requested reservation time if they do not provide credentials or if their credentials do not provide them the authorization. The authentication flow is similar to that of job priority and restricted queues.
Resolved issues
Resolves https://warthogs.atlassian.net/browse/CERTTF-458
Documentation
Documentation was added to the docs/ folder.
Web service API changes
No new endpoints, but jobs that have longer than 6 hours requested of reservation times will be rejected without prior authorization.
Tests
Unit tests were added to test_v1_authorization.py