Project

Profile

Help

Story #5422

As a user Galaxy V3 user, I can submit expected_namespace, expected_name, expected_version and if the metadata doesn't match it fails

Added by bmbouter 3 months ago. Updated 3 months ago.

Status:
MODIFIED
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

100%

Platform Release:
Blocks Release:
Backwards Incompatible:
No
Groomed:
Yes
Sprint Candidate:
No
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 58

Description

Problem

There is a use case where the user is Galaxy and submitting data it received from a user it does not trust. The problem is that the actual metadata isn't known until the tarball is extracted, but by then regardless of what it is, it's imported and live.

Solution

Have the Galaxy v3/artifacts/collections/ endpoint take 3 optional arguments: 'expected_namespace', 'expected_name', 'expected_version'. If set, validate that the uploaded Collection is asserting these values.

If they do not match, fail the import task and delete the Artifact since it was not appropriate to be saved.

Associated revisions

Revision b2342c04 View on GitHub
Added by bmbouter 3 months ago

Add CollectionImport log handler and Validation

Add add_log_message() facility to the CollectionImport model. This is
called by the log handler which is auto-configured by pulp_ansible with
this commit.

The logger is 'pulp_ansible.app.tasks.collection.import_collection'.

Add validation feature to CollectionImport where the
`expected_namespace`, `expected_name`, and `expected_version` are
specified. When used the import will fail if the tarball does not
contain the same values. These are optional parameters and only
available in the Galaxy V3 API currently.

https://pulp.plan.io/issues/5366
closes #5366

https://pulp.plan.io/issues/5422
closes #5422

History

#1 Updated by bmbouter 3 months ago

  • Subject changed from As a user Galaxy V3 user, I can submit expected_namespace, expected_name, expected_version and if the metadata doisn't match it fails to As a user Galaxy V3 user, I can submit expected_namespace, expected_name, expected_version and if the metadata doesn't match it fails
  • Description updated (diff)

#2 Updated by bmbouter 3 months ago

  • Status changed from NEW to POST

#3 Updated by daviddavis 3 months ago

  • Groomed changed from No to Yes
  • Sprint set to Sprint 58

#4 Updated by bmbouter 3 months ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

Please register to edit this issue

Also available in: Atom PDF