Permission to modify repository content denied

Problem: Modify Repository Content returns 403 forbidden
Expected outcome: I am trying to use the pulp_ansible API to move a collection from the staging to the published repository in the Ansible Automation Hub.

Pulpcore version: 3.15.2

Pulp plugins installed and their versions:

  • container, version 2.8.3
  • ansible, version 0.10.1
  • galaxy, version 4.4.1

Operating system - distribution and version:
RHEL 8.5

Other relevant data:
Listing all repositories works as expected with:

http --verify no -a admin:my_password https://my_host/pulp/api/v3/repositories/

However, trying to modify the content of a repository with:

http --verify no -a admin:my_password POST  https://my_host/$REPO_HREF/modify/   add_content_units=$CONTENT_HREF   base_version=$BASE_VERSION

returns a 403 forbidden error.

Does somebody have any idea about what might be wrong? Thanks!

I see, you have galaxy installed. So i do believe this is the desired behavior. One is supposed to use the galaxy processes to promote their content.

Could you explain what you mean?

My final goal is to automate the approval step in a private Ansible Automation Hub (i.e. the step which is usually done in the GUI by clicking on “approve” next to a collection so that it is published). How would I use galaxy processes to do that?

Thanks!

HI Ottavia,

You can call /api/galaxy/v3/collections/{namespace}/{name}/versions/{version}/move/staging/published/ to move a collection from staging to published.

If you just want to make it so that collections automatically get sent to published if the upload succeeds you can also set GALAXY_REQUIRE_CONTENT_APPROVAL = False in /etc/pulp/settings.py

2 Likes

Thank you very much! That works perfectly!

4 Likes