Host in foreman can not be edited

Problem: When host is created via EC2 compute source, his attributes (fg hostgroup) can not be changed aftewards via hammer nor via UI Edit button. The error says: You are not authorized to perform this operation. When using hammer host update, it complains about missing provision method, when using the only one option “build”, it complains about provision method can not be changed after host is provisioned.

**Expected outcome:Host attributes can be modified

**Foreman and Proxy versions:Foreman 3.6.1 and Katello 4.8.3

Foreman and Proxy plugin versions:

**Distribution and version:RHEL8.8

*Other relevant data:

2023-08-02T12:27:56 [I|app|62e5b52e] Started GET "/hosts/mbczvl6altdoca1rh9.ux.mbid.cz/edit" for 10.53.123.84 at 2023-08-02 12:27:56 +0200
2023-08-02T12:27:56 [I|app|62e5b52e] Processing by HostsController#edit as HTML
2023-08-02T12:27:56 [I|app|62e5b52e]   Parameters: {"id"=>"mbczvl6altdoca1rh9.ux.mbid.cz"}
2023-08-02T12:27:56 [I|app|62e5b52e] Deface: [WARNING] No :original defined for 'add_execution_interface_js', you should change its definition to include:
 62e5b52e |  :original => 'ac3c64a7a3f555ffd6939179326e7666155bc5fc'
2023-08-02T12:27:56 [I|app|62e5b52e] Deface: [WARNING] No :original defined for 'ansible_roles_tab', you should change its definition to include:
 62e5b52e |  :original => '8c63c5282ee199068bfd65475e13066ee981089a'
2023-08-02T12:27:56 [I|app|62e5b52e] Deface: [WARNING] No :original defined for 'ansible_roles_tab_content', you should change its definition to include:
 62e5b52e |  :original => 'ac3c64a7a3f555ffd6939179326e7666155bc5fc'
2023-08-02T12:27:56 [I|app|62e5b52e] Deface: [WARNING] No :original defined for 'add_execution_interface', you should change its definition to include:
 62e5b52e |  :original => 'dbe1da973bfb251a74b994e7ae11bc8d11502c97'
2023-08-02T12:27:57 [I|app|62e5b52e]   Rendered hosts/edit.html.erb within layouts/application (Duration: 1713.4ms | Allocations: 423475)
2023-08-02T12:27:57 [I|app|62e5b52e]   Rendered layout layouts/application.html.erb (Duration: 1713.5ms | Allocations: 423530)
2023-08-02T12:27:57 [W|app|62e5b52e] UnauthorizedOperation => You are not authorized to perform this operation.
2023-08-02T12:27:57 [I|app|62e5b52e] Backtrace for 'UnauthorizedOperation => You are not authorized to perform this operation.' error (ActionView::Template::Error): UnauthorizedOperation => You are not authorized to perform this operation.
 62e5b52e | /usr/share/gems/gems/excon-0.99.0/lib/excon/middlewares/expects.rb:13:in `response_call'
 62e5b52e | /usr/share/gems/gems/excon-0.99.0/lib/excon/middlewares/response_parser.rb:12:in `response_call'
 62e5b52e | /usr/share/gems/gems/excon-0.99.0/lib/excon/connection.rb:459:in `response'
 62e5b52e | /usr/share/gems/gems/excon-0.99.0/lib/excon/connection.rb:290:in `request'
 62e5b52e | /usr/share/foreman/lib/foreman/http_proxy/excon_connection_extension.rb:13:in `request'
 62e5b52e | /usr/share/gems/gems/excon-0.99.0/lib/excon/middlewares/idempotent.rb:50:in `error_call'
 62e5b52e | /usr/share/gems/gems/excon-0.99.0/lib/excon/middlewares/base.rb:17:in `error_call'
 62e5b52e | /usr/share/gems/gems/excon-0.99.0/lib/excon/middlewares/base.rb:17:in `error_call'
 62e5b52e | /usr/share/gems/gems/excon-0.99.0/lib/excon/connection.rb:315:in `rescue in request'
 62e5b52e | /usr/share/gems/gems/excon-0.99.0/lib/excon/connection.rb:230:in `request'
 62e5b52e | /usr/share/foreman/lib/foreman/http_proxy/excon_connection_extension.rb:13:in `request'
 62e5b52e | /usr/share/gems/gems/excon-0.99.0/lib/excon/middlewares/idempotent.rb:50:in `error_call'
 62e5b52e | /usr/share/gems/gems/excon-0.99.0/lib/excon/middlewares/base.rb:17:in `error_call'
 62e5b52e | /usr/share/gems/gems/excon-0.99.0/lib/excon/middlewares/base.rb:17:in `error_call'
 62e5b52e | /usr/share/gems/gems/excon-0.99.0/lib/excon/connection.rb:315:in `rescue in request'
 62e5b52e | /usr/share/gems/gems/excon-0.99.0/lib/excon/connection.rb:230:in `request'
 62e5b52e | /usr/share/foreman/lib/foreman/http_proxy/excon_connection_extension.rb:13:in `request'
 62e5b52e | /usr/share/gems/gems/excon-0.99.0/lib/excon/middlewares/idempotent.rb:50:in `error_call'
 62e5b52e | /usr/share/gems/gems/excon-0.99.0/lib/excon/middlewares/base.rb:17:in `error_call'
 62e5b52e | /usr/share/gems/gems/excon-0.99.0/lib/excon/middlewares/base.rb:17:in `error_call'
 62e5b52e | /usr/share/gems/gems/excon-0.99.0/lib/excon/connection.rb:315:in `rescue in request'
 62e5b52e | /usr/share/gems/gems/excon-0.99.0/lib/excon/connection.rb:230:in `request'
 62e5b52e | /usr/share/foreman/lib/foreman/http_proxy/excon_connection_extension.rb:13:in `request'
 62e5b52e | /usr/share/gems/gems/fog-xml-0.1.4/lib/fog/xml/sax_parser_connection.rb:29:in `request'
 62e5b52e | /usr/share/gems/gems/fog-xml-0.1.4/lib/fog/xml/connection.rb:7:in `request'
 62e5b52e | /usr/share/gems/gems/fog-aws-3.18.0/lib/fog/aws/compute.rb:629:in `_request'
 62e5b52e | /usr/share/gems/gems/fog-aws-3.18.0/lib/fog/aws/compute.rb:620:in `request'
 62e5b52e | /usr/share/gems/gems/fog-aws-3.18.0/lib/fog/aws/requests/compute/describe_tags.rb:25:in `describe_tags'
 62e5b52e | /usr/share/gems/gems/fog-aws-3.18.0/lib/fog/aws/models/compute/tags.rb:18:in `all'
 62e5b52e | /usr/share/foreman/lib/fog_extensions/aws/server.rb:14:in `load_tags'
 62e5b52e | /usr/share/foreman/app/views/compute_resources_vms/form/ec2/_base.html.erb:49:in `_e4aa71442b78d7e5ab28dbf3d9deac81'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/base.rb:247:in `public_send'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/base.rb:247:in `_run'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/template.rb:154:in `block in render'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:205:in `instrument'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/template.rb:345:in `instrument_render_template'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/template.rb:152:in `render'
 62e5b52e | /usr/share/gems/gems/deface-1.5.3/lib/deface/action_view_extensions.rb:43:in `render'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/partial_renderer.rb:285:in `block in render_partial_template'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:203:in `block in instrument'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:203:in `instrument'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/partial_renderer.rb:280:in `render_partial_template'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/partial_renderer.rb:271:in `render'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/renderer.rb:81:in `render_partial_to_object'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/renderer.rb:27:in `render_to_object'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/renderer.rb:22:in `render'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/helpers/rendering_helper.rb:38:in `block in render'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/base.rb:273:in `in_rendering_context'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/helpers/rendering_helper.rb:34:in `render'
 62e5b52e | /usr/share/foreman/app/views/hosts/_compute_detail.html.erb:1:in `_dc517531e560bc25516d672b240bcbc7'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/base.rb:247:in `public_send'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/base.rb:247:in `_run'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/template.rb:154:in `block in render'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:205:in `instrument'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/template.rb:345:in `instrument_render_template'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/template.rb:152:in `render'
 62e5b52e | /usr/share/gems/gems/deface-1.5.3/lib/deface/action_view_extensions.rb:43:in `render'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/partial_renderer.rb:285:in `block in render_partial_template'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:203:in `block in instrument'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:203:in `instrument'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/partial_renderer.rb:280:in `render_partial_template'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/partial_renderer.rb:271:in `render'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/renderer.rb:81:in `render_partial_to_object'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/renderer.rb:27:in `render_to_object'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/renderer.rb:22:in `render'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/helpers/rendering_helper.rb:38:in `block in render'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/base.rb:273:in `in_rendering_context'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/helpers/rendering_helper.rb:34:in `render'
 62e5b52e | /usr/share/foreman/app/views/hosts/_compute.html.erb:8:in `block in _94e3c128463782c427391b157d8ee1fc'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/helpers/capture_helper.rb:45:in `block in capture'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/helpers/capture_helper.rb:209:in `with_output_buffer'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/helpers/capture_helper.rb:45:in `capture'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/helpers/form_helper.rb:1004:in `fields_for'
 62e5b52e | /usr/share/foreman/app/views/hosts/_compute.html.erb:1:in `_94e3c128463782c427391b157d8ee1fc'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/base.rb:247:in `public_send'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/base.rb:247:in `_run'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/template.rb:154:in `block in render'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:205:in `instrument'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/template.rb:345:in `instrument_render_template'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/template.rb:152:in `render'
 62e5b52e | /usr/share/gems/gems/deface-1.5.3/lib/deface/action_view_extensions.rb:43:in `render'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/partial_renderer.rb:285:in `block in render_partial_template'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:203:in `block in instrument'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:203:in `instrument'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/partial_renderer.rb:280:in `render_partial_template'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/partial_renderer.rb:271:in `render'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/renderer.rb:81:in `render_partial_to_object'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/renderer.rb:53:in `render_partial'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/helpers/rendering_helper.rb:45:in `render'
 62e5b52e | /usr/share/foreman/app/views/hosts/_unattended.html.erb:2:in `_fd4a0ddcf7c42a009c7e8006da9ad5a8'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/base.rb:247:in `public_send'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/base.rb:247:in `_run'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/template.rb:154:in `block in render'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:205:in `instrument'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/template.rb:345:in `instrument_render_template'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/template.rb:152:in `render'
 62e5b52e | /usr/share/gems/gems/deface-1.5.3/lib/deface/action_view_extensions.rb:43:in `render'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/partial_renderer.rb:285:in `block in render_partial_template'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:203:in `block in instrument'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:203:in `instrument'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/partial_renderer.rb:280:in `render_partial_template'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/partial_renderer.rb:271:in `render'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/renderer.rb:81:in `render_partial_to_object'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/renderer.rb:53:in `render_partial'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/helpers/rendering_helper.rb:45:in `render'
 62e5b52e | /usr/share/foreman/app/views/hosts/_form.html.erb:123:in `block (2 levels) in _4ff09deb6333824dacadc0f3bc397eb1'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/helpers/capture_helper.rb:45:in `block in capture'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/helpers/capture_helper.rb:209:in `with_output_buffer'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/helpers/capture_helper.rb:45:in `capture'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/helpers/form_helper.rb:450:in `form_for'
 62e5b52e | /usr/share/foreman/app/helpers/form_helper.rb:286:in `form_for'
 62e5b52e | /usr/share/foreman/app/views/hosts/_form.html.erb:7:in `block in _4ff09deb6333824dacadc0f3bc397eb1'
 62e5b52e | /usr/share/foreman/app/models/taxonomy.rb:80:in `block (2 levels) in as_taxonomy'
 62e5b52e | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:195:in `as_location'
 62e5b52e | /usr/share/foreman/app/models/taxonomy.rb:79:in `block in as_taxonomy'
 62e5b52e | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:154:in `as_org'
 62e5b52e | /usr/share/foreman/app/models/taxonomy.rb:78:in `as_taxonomy'
 62e5b52e | /usr/share/foreman/app/views/hosts/_form.html.erb:6:in `_4ff09deb6333824dacadc0f3bc397eb1'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/base.rb:247:in `public_send'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/base.rb:247:in `_run'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/template.rb:154:in `block in render'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:205:in `instrument'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/template.rb:345:in `instrument_render_template'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/template.rb:152:in `render'
 62e5b52e | /usr/share/gems/gems/deface-1.5.3/lib/deface/action_view_extensions.rb:43:in `render'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/partial_renderer.rb:285:in `block in render_partial_template'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:203:in `block in instrument'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:203:in `instrument'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/partial_renderer.rb:280:in `render_partial_template'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/partial_renderer.rb:271:in `render'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/renderer.rb:81:in `render_partial_to_object'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/renderer.rb:27:in `render_to_object'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/renderer.rb:22:in `render'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/helpers/rendering_helper.rb:38:in `block in render'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/base.rb:273:in `in_rendering_context'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/helpers/rendering_helper.rb:34:in `render'
 62e5b52e | /usr/share/foreman/app/views/hosts/edit.html.erb:13:in `_e9dc2f838518adacbf7857ae98aabde7'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/base.rb:247:in `public_send'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/base.rb:247:in `_run'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/template.rb:154:in `block in render'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:205:in `instrument'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/template.rb:345:in `instrument_render_template'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/template.rb:152:in `render'
 62e5b52e | /usr/share/gems/gems/deface-1.5.3/lib/deface/action_view_extensions.rb:43:in `render'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/template_renderer.rb:61:in `block (2 levels) in render_template'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:203:in `block in instrument'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:203:in `instrument'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/template_renderer.rb:56:in `block in render_template'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/template_renderer.rb:71:in `block in render_with_layout'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:203:in `block in instrument'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:203:in `instrument'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/template_renderer.rb:70:in `render_with_layout'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/template_renderer.rb:55:in `render_template'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/template_renderer.rb:11:in `render'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/renderer.rb:61:in `render_template_to_object'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/renderer/renderer.rb:29:in `render_to_object'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/rendering.rb:117:in `block in _render_template'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/base.rb:273:in `in_rendering_context'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/rendering.rb:116:in `_render_template'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_controller/metal/streaming.rb:218:in `_render_template'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/rendering.rb:103:in `render_to_body'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_controller/metal/rendering.rb:52:in `render_to_body'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_controller/metal/renderers.rb:142:in `render_to_body'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/abstract_controller/rendering.rb:25:in `render'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_controller/metal/rendering.rb:36:in `render'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_controller/metal/instrumentation.rb:46:in `block (2 levels) in render'
 62e5b52e | /usr/share/ruby/benchmark.rb:308:in `realtime'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/core_ext/benchmark.rb:14:in `ms'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_controller/metal/instrumentation.rb:46:in `block in render'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_controller/metal/instrumentation.rb:86:in `cleanup_view_runtime'
 62e5b52e | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/railties/controller_runtime.rb:34:in `cleanup_view_runtime'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_controller/metal/instrumentation.rb:45:in `render'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_controller/metal/implicit_render.rb:35:in `default_render'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_controller/metal/basic_implicit_render.rb:6:in `block in send_action'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_controller/metal/basic_implicit_render.rb:6:in `tap'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/abstract_controller/base.rb:228:in `process_action'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_controller/metal/rendering.rb:30:in `process_action'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
 62e5b52e | /usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:10:in `set_timezone'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 62e5b52e | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 62e5b52e | /usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 62e5b52e | /usr/share/gems/gems/audited-5.3.1/lib/audited/sweeper.rb:16:in `around'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 62e5b52e | /usr/share/gems/gems/audited-5.3.1/lib/audited/sweeper.rb:16:in `around'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:137:in `run_callbacks'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/abstract_controller/callbacks.rb:41:in `process_action'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_controller/metal/rescue.rb:22:in `process_action'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:203:in `block in instrument'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:203:in `instrument'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_controller/metal/instrumentation.rb:33:in `process_action'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_controller/metal/params_wrapper.rb:249:in `process_action'
 62e5b52e | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/abstract_controller/base.rb:165:in `process'
 62e5b52e | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/rendering.rb:39:in `process'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_controller/metal.rb:190:in `dispatch'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_controller/metal.rb:254:in `dispatch'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/routing/route_set.rb:33:in `serve'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/journey/router.rb:50:in `block in serve'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/journey/router.rb:32:in `each'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/journey/router.rb:32:in `serve'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/routing/route_set.rb:842:in `call'
 62e5b52e | /usr/share/gems/gems/katello-4.8.3/lib/katello/middleware/organization_created_enforcer.rb:18:in `call'
 62e5b52e | /usr/share/gems/gems/katello-4.8.3/lib/katello/middleware/event_daemon.rb:10:in `call'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/static.rb:24:in `call'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/static.rb:24:in `call'
 62e5b52e | /usr/share/gems/gems/apipie-dsl-2.5.0/lib/apipie_dsl/static_dispatcher.rb:67:in `call'
 62e5b52e | /usr/share/gems/gems/apipie-rails-0.8.2/lib/apipie/static_dispatcher.rb:68:in `call'
 62e5b52e | /usr/share/gems/gems/apipie-rails-0.8.2/lib/apipie/extractor/recorder.rb:137:in `call'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/static.rb:24:in `call'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/static.rb:24:in `call'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/static.rb:24:in `call'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/static.rb:24:in `call'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/static.rb:24:in `call'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/static.rb:24:in `call'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/static.rb:24:in `call'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/static.rb:24:in `call'
 62e5b52e | /usr/share/foreman/lib/foreman/middleware/libvirt_connection_cleaner.rb:9:in `call'
 62e5b52e | /usr/share/foreman/lib/foreman/middleware/telemetry.rb:10:in `call'
 62e5b52e | /usr/share/gems/gems/apipie-rails-0.8.2/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
 62e5b52e | /usr/share/gems/gems/rack-2.2.6.2/lib/rack/tempfile_reaper.rb:15:in `call'
 62e5b52e | /usr/share/gems/gems/rack-2.2.6.2/lib/rack/etag.rb:27:in `call'
 62e5b52e | /usr/share/gems/gems/rack-2.2.6.2/lib/rack/conditional_get.rb:27:in `call'
 62e5b52e | /usr/share/gems/gems/rack-2.2.6.2/lib/rack/head.rb:12:in `call'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/http/permissions_policy.rb:22:in `call'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/http/content_security_policy.rb:19:in `call'
 62e5b52e | /usr/share/foreman/lib/foreman/middleware/logging_context_session.rb:22:in `call'
 62e5b52e | /usr/share/gems/gems/rack-2.2.6.2/lib/rack/session/abstract/id.rb:266:in `context'
 62e5b52e | /usr/share/gems/gems/rack-2.2.6.2/lib/rack/session/abstract/id.rb:260:in `call'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/cookies.rb:697:in `call'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:98:in `run_callbacks'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/debug_exceptions.rb:29:in `call'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
 62e5b52e | /usr/share/gems/gems/railties-6.1.7.3/lib/rails/rack/logger.rb:37:in `call_app'
 62e5b52e | /usr/share/gems/gems/railties-6.1.7.3/lib/rails/rack/logger.rb:28:in `call'
 62e5b52e | /usr/share/gems/gems/sprockets-rails-3.4.2/lib/sprockets/rails/quiet_assets.rb:13:in `call'
 62e5b52e | /usr/share/foreman/lib/foreman/middleware/logging_context_request.rb:11:in `call'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/request_id.rb:26:in `call'
 62e5b52e | /usr/share/gems/gems/katello-4.8.3/lib/katello/prevent_json_parsing.rb:12:in `call'
 62e5b52e | /usr/share/gems/gems/rack-2.2.6.2/lib/rack/method_override.rb:24:in `call'
 62e5b52e | /usr/share/gems/gems/rack-2.2.6.2/lib/rack/runtime.rb:22:in `call'
 62e5b52e | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/executor.rb:14:in `call'
 62e5b52e | /usr/share/gems/gems/rack-2.2.6.2/lib/rack/sendfile.rb:110:in `call'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/ssl.rb:77:in `call'
 62e5b52e | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/host_authorization.rb:142:in `call'
 62e5b52e | /usr/share/gems/gems/secure_headers-6.5.0/lib/secure_headers/middleware.rb:11:in `call'
 62e5b52e | /usr/share/gems/gems/railties-6.1.7.3/lib/rails/engine.rb:539:in `call'
 62e5b52e | /usr/share/gems/gems/railties-6.1.7.3/lib/rails/railtie.rb:207:in `public_send'
 62e5b52e | /usr/share/gems/gems/railties-6.1.7.3/lib/rails/railtie.rb:207:in `method_missing'
 62e5b52e | /usr/share/gems/gems/rack-2.2.6.2/lib/rack/urlmap.rb:74:in `block in call'
 62e5b52e | /usr/share/gems/gems/rack-2.2.6.2/lib/rack/urlmap.rb:58:in `each'
 62e5b52e | /usr/share/gems/gems/rack-2.2.6.2/lib/rack/urlmap.rb:58:in `call'
 62e5b52e | /usr/share/gems/gems/puma-5.6.5/lib/puma/configuration.rb:252:in `call'
 62e5b52e | /usr/share/gems/gems/puma-5.6.5/lib/puma/request.rb:77:in `block in handle_request'
 62e5b52e | /usr/share/gems/gems/puma-5.6.5/lib/puma/thread_pool.rb:340:in `with_force_shutdown'
 62e5b52e | /usr/share/gems/gems/puma-5.6.5/lib/puma/request.rb:76:in `handle_request'
 62e5b52e | /usr/share/gems/gems/puma-5.6.5/lib/puma/server.rb:443:in `process_client'
 62e5b52e | /usr/share/gems/gems/puma-5.6.5/lib/puma/thread_pool.rb:147:in `block in spawn_thread'
 62e5b52e | /usr/share/gems/gems/logging-2.3.1/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
2023-08-02T12:27:57 [I|app|62e5b52e]   Rendered common/500.html.erb within layouts/application (Duration: 1.8ms | Allocations: 1108)
2023-08-02T12:27:57 [I|app|62e5b52e]   Rendered layouts/base.html.erb (Duration: 4.6ms | Allocations: 9046)
2023-08-02T12:27:57 [I|app|62e5b52e]   Rendered layout layouts/application.html.erb (Duration: 12.7ms | Allocations: 22457)
2023-08-02T12:27:57 [I|app|62e5b52e] Completed 500 Internal Server Error in 1752ms (Views: 13.5ms | ActiveRecord: 21.0ms | Allocations: 458729)
*
<!-- Managed client information, logs from Foreman and/or the Proxy, modified templates, commands issued, etc. For logs and configuration files, please use "preformatted text" from the toolbar to ensure proper formatting. -->
````Preformatted text`

Solved. There were missing rights in AWS for the user.