Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2130924

Summary: Creating a host with parmetres as a user who does not have correct permissions ends in 500 Server Error: Internal Server Error for url: https://sat.sysmgmt.lan/api/hosts"
Product: Red Hat Satellite Reporter: Stefan Nemeth <snemeth>
Component: APIAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.12.0CC: apatel, aruzicka
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-02 17:22:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Stefan Nemeth 2022-09-29 13:15:22 UTC
Description of problem:

If user used for api call or ansible playbook execution which creates or edits host with parametres does have only edit hosts role, run will end in

"Error while performing create on hosts: 500 Server Error: Internal Server Error for url: https://sat.sysmgmt.lan/api/hosts"}"

instead of permission related error. 

User also needs to have role with filter -> resource type -> parametre -> edit_params, create_params

Version-Release number of selected component (if applicable):

6.11.1

How reproducible:

100%

Steps to Reproduce:
1. create user with edit hosts role, but without role which has resource type Parametres create_params, edit_params permission/filter

2. try to run ansible playbook 

- name: create test host on Satellite in VLAN 2
  delegate_to: localhost
  redhat.satellite.host:
    username: "{{ satellite_tower_user }}"
    password: "{{ satellite_tower_password }}"
    server_url: "https://{{ satellite_hostname }}"
    organization: default
    location: default_location
    name: "{{ hostname }}.{{ location_domain }}"
    build: yes
    hostgroup: "{{ hostgroup }}"
    ip: "{{ ip_address }}"
    mac: "{{ mac_address }}"
    domain: "{{ location_domain }}"
    subnet: "{{ satellite_vlan }}"
    comment: "{{ comment }}"
    parameters:
    - name: test
       value: "{{ hello world }}"


Actual results:

TASK [create mqm host on Satellite in VLAN 209] ********************************
fatal: [localhost]: FAILED! => {"changed": false, "error": {"message": "resource have no errors"}, "msg": "Error while performing update on hosts: 500 Server Error: Internal Server Error for url: https://sat.sysmgmt.lan/api/hosts/8871"}

Expected results:

get permission denied related error

Additional info:
Api call to create host, with parametres fails as well

Comment 3 Brad Buckingham 2023-10-04 21:43:14 UTC
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in a month. This message may be a repeat of a previous update and the bug is again being considered to be closed. If you have any concerns about this, please contact your Red Hat Account team.  Thank you.

Comment 4 Brad Buckingham 2023-11-02 17:22:44 UTC
Thank you for your interest in Red Hat Satellite. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this feel free to contact your Red Hat Account Team. Thank you.