SEAB-6448: Make various WorkflowResource endpoints refuse to update .dockstore.yml-based workflows #5905
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
As part of the investigation of https://ucsc-cgl.atlassian.net/browse/SEAB-6448 and https://ucsc-cgl.atlassian.net/browse/SEAB-6449 (see Slack thread https://ucsc-gi.slack.com/archives/C05EZH3RVNY/p1717540768164039), we found via testing that a workflow owner can restub .dockstore.yml-based workflows via the API, and probably update them via various other
WorkflowResource
endpoints intended only for use on STUB/FULL workflows. This PR changes these endpoints to gracefully refuse to update .dockstore.yml-based workflows.Review Instructions
Create a .dockstore.yml-based workflow on qa, then attempt to restub it via the API. The attempt should fail with a BAD_REQUEST response code and a useful error message.
Issue
https://ucsc-cgl.atlassian.net/browse/SEAB-6448
https://ucsc-cgl.atlassian.net/browse/SEAB-6449
Security and Privacy
e.g. Does this change...
Please make sure that you've checked the following before submitting your pull request. Thanks!
mvn clean install
@RolesAllowed
annotation