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 1920405 - Global Registration: Registration tab has curl with bearer token
Summary: Global Registration: Registration tab has curl with bearer token
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Registration
Version: 6.9.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: 6.10.0
Assignee: satellite6-bugs
QA Contact: Stephen Wadeley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-26 09:23 UTC by Kenny Tordeurs
Modified: 2021-11-16 14:10 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-16 14:09:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 31912 0 Normal Closed Global Registration: Registration tab does not provide registration in the script 2021-03-02 12:35:55 UTC
Github theforeman foreman pull 8343 0 None closed Fixes #31912 - Host registration tab improvements 2021-03-02 12:35:55 UTC
Red Hat Knowledge Base (Solution) 5910151 0 None None None 2021-04-12 14:52:46 UTC
Red Hat Product Errata RHSA-2021:4702 0 None None None 2021-11-16 14:10:05 UTC

Description Kenny Tordeurs 2021-01-26 09:23:02 UTC
Description of problem:
In all hosts -> <some host> there is a new tab called "Registration Tab" which contains a bearer token to register the system,where does this token come from?


~~~
This host can be registered to Satellite by executing this command:

  curl https://ktordeur-testathon.kenny.lan/foreman_register/hosts/register?token=eyJhbGciOiJIUzI1NiJ9.eyJob3N0X2lkIjozLCJpYXQiOjE2MTE2NTI2NTYsImp0aSI6ImU5MzNlM2I1YTdkMmM4YzdkZmNjMzQxZjhlMGM0NWMwOTEwN2YwZTM3MGFlMmI2MmY2NWY5NGUwNGQ4YzlhZTciLCJleHAiOjE2MTE3MzkwNTYsIm5iZiI6MTYxMTY0OTA1Nn0.qFGOxzQVSFJZWn-j79WrltjTb6PjEk5Ob4FoGQMvZIY | bash
~~~  

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

Comment 2 Kenny Tordeurs 2021-01-26 09:26:36 UTC
Seems the token is generated upon opening of the "registration tab" and changes each time you open it.

Comment 4 Stephen Wadeley 2021-02-11 10:44:52 UTC
Hi Kenny

I cannot see that tab in my test Satellite, perhaps some setup step I am missing.

What are you requesting? That the token not be generated till you click a button?

Thank you

Comment 5 Kenny Tordeurs 2021-02-11 10:55:52 UTC
Hey Stephen,

That tab only appears if you provisioned the host via Satellite.

What are you requesting? That the token not be generated till you click a button?
-> Yes, it seems it automatically generates a token just by clicking on the tab itself (like the global registration does but automatically), it's also not clear if it inherits the settings from the host or not. (maybe this is explained in the documentation, but that is not yet available I believe)

I could compare the settings in the provided script with the settings but would like to get a bit more information about this 'registration tab' in general, what is it's intended purpose for example etc.

Thanks

Comment 6 Stephen Wadeley 2021-02-11 15:24:47 UTC
(In reply to Kenny Tordeurs from comment #5)
> Hey Stephen,
> 
> That tab only appears if you provisioned the host via Satellite.

OK, a "Managed host"
> 
> What are you requesting? That the token not be generated till you click a
> button?
> -> Yes, it seems it automatically generates a token just by clicking on the
> tab itself (like the global registration does but automatically), it's also
> not clear if it inherits the settings from the host or not. (maybe this is
> explained in the documentation, but that is not yet available I believe)
> 
> I could compare the settings in the provided script with the settings but
> would like to get a bit more information about this 'registration tab' in
> general, what is it's intended purpose for example etc.
> 

Right, I can update docs once the bug is ON_QA and its use is clearer.


Thank you

Comment 10 Stephen Wadeley 2021-06-02 09:12:59 UTC
Hello

Docs for 6.9 cover this topic

Section 3.1, “Registering a Host to Red Hat Satellite Using the Global Registration Template”

https://access.redhat.com/documentation/en-us/red_hat_satellite/6.9/html/managing_hosts/registering_hosts

Comment 15 errata-xmlrpc 2021-11-16 14:09:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Satellite 6.10 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:4702


Note You need to log in before you can comment on or make changes to this bug.