Project

General

Profile

Feature #30677

Registration module

Added by Leos Stejskal 5 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Templates
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:


Related issues

Related to Foreman - Feature #30459: Global Registration Template - Capsule callback supportClosed
Related to Foreman - Feature #30440: Simple & automatic host registration WFNew

Associated revisions

Revision 0af6c5aa (diff)
Added by Leos Stejskal 4 months ago

Fixes #30677 - Registration module (#768)

This introduces a new registration module described at https://community.theforeman.org/t/rfc-simple-automatic-host-registration-wf/19588/59
The module proxies host registration request to Foreman, which typically
responds with the template that contains the registration instructions. There
are two endpoints, one for obtaining the global registration template with
generic instructions for any host, the second for host registration template,
which is typically customized by parameters set for this specific host.

Revision c2fabb1d (diff)
Added by Marek Hulán 3 months ago

Refs #30677 - support also urlencoded data

The default registration template in Foreman started to send the data in
urlencoded form instead of a JSON, as of https://projects.theforeman.org/issues/31043

In order to support that, we need to remove nested parameters from query,
since Sinatra parses it from body automatically. We only need to proxy
the body of the request. ForemanRequestFactory also defaults to
application/json if not set explicitly, in this case we need to enforce
the correct content-type through headers.

This also requires a change in handling headers, because if content-type
is specified as a header, it's set twice. Once it's set by
content_type=, second time through add_field, resulting in broken
header.

History

#1 Updated by Leos Stejskal 5 months ago

  • Tracker changed from Bug to Feature

#2 Updated by Leos Stejskal 5 months ago

  • Related to Feature #30459: Global Registration Template - Capsule callback support added

#3 Updated by Leos Stejskal 5 months ago

  • Related to Feature #30440: Simple & automatic host registration WF added

#4 Updated by Leos Stejskal 5 months ago

  • Subject changed from Support Global Registration Template to Global registration endpoint

#5 Updated by The Foreman Bot 5 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/smart-proxy/pull/763 added

#6 Updated by Leos Stejskal 4 months ago

  • Subject changed from Global registration endpoint to Registration module
  • Pull request deleted (https://github.com/theforeman/smart-proxy/pull/763)

#7 Updated by The Foreman Bot 4 months ago

  • Pull request https://github.com/theforeman/smart-proxy/pull/768 added

#8 Updated by The Foreman Bot 4 months ago

  • Fixed in Releases 2.3.0 added

#9 Updated by Anonymous 4 months ago

  • Status changed from Ready For Testing to Closed

#10 Updated by The Foreman Bot 3 months ago

  • Pull request https://github.com/theforeman/smart-proxy/pull/778 added

Also available in: Atom PDF