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 1920405

Summary: Global Registration: Registration tab has curl with bearer token
Product: Red Hat Satellite Reporter: Kenny Tordeurs <ktordeur>
Component: RegistrationAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Stephen Wadeley <swadeley>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.9.0CC: jbhatia, lstejska
Target Milestone: 6.10.0Keywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-16 14:09:54 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 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