This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

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 1919979 - [RFE] Global Registration: Allow invalidating all JWT registration tokens for a user
Summary: [RFE] Global Registration: Allow invalidating all JWT registration tokens for...
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Registration
Version: 6.9.0
Hardware: x86_64
OS: Linux
medium
medium with 1 vote
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Shweta Singh
URL:
Whiteboard:
: 2241442 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-25 13:59 UTC by Kenny Tordeurs
Modified: 2024-06-06 00:45 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-06-06 00:45:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 34246 0 Normal New Allow invalidating all JWT tokens for a user 2022-01-12 09:56:40 UTC
Red Hat Knowledge Base (Solution) 5767701 0 None None None 2021-02-02 16:45:59 UTC

Description Kenny Tordeurs 2021-01-25 13:59:13 UTC
Description:
Need steps on how to invalidate a token that might have been generated with a very long expiration time.

Additional info:
A token was generated for a user with a lifetime of '9999999999999999999999999' 

Possible steps:
Disabling the user might be sufficient for disabling the token but this should be documented.

Comment 1 Marek Hulan 2021-02-02 15:57:18 UTC
In 6.9, there won't be a built-in way, but we can provide a KCS with the following instructions to invalidate all user's JWTs. Let's assume there's a user with login admin who generated at least one registration command. Therefore it has a jwt_secret stored in our database that is used to decode/verify the token. To invalidate all registration commands (or more precisely all JWT ever generated for this user) perform the following.

On the Satellite server:
1. run `foreman-rake console`
2. User.find_by_login('admin').jwt_secret.destroy
3. you should see the JWT printed out and the console expecting another command, type `exit`

If you instead see NoMethodError: undefined method `destroy' for nil:NilClass, it means the user didn't have the JWT secret stored. Meaning they either didn't render any registration command or their secret was already deleted. For debugging purposes, you can simply run User.find_by_login('admin').jwt_secret and see if the secret exists or not. nil means it does not exist.

I'm keeping this open as an RFE for future versions though. In 6.10 the JWT will be scoped for registration purposes only, however we may still consider adding a way to reset the secret to the application. I'd suggest to backlog.

Kenny, would you be able to create such KCS based on the information provided here?

Comment 4 Kenny Tordeurs 2021-04-12 07:05:30 UTC
KCS shipped live -> https://access.redhat.com/solutions/5767701

Comment 5 Leos Stejskal 2022-01-12 09:56:40 UTC
Created redmine issue https://projects.theforeman.org/issues/34246 from this bug

Comment 6 Brad Buckingham 2022-09-02 20:25:18 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 7 Brad Buckingham 2022-09-05 22:56:27 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 10 nalfassi 2023-10-03 11:31:40 UTC
*** Bug 2241442 has been marked as a duplicate of this bug. ***

Comment 12 Brad Buckingham 2023-10-30 11:29:29 UTC
Bulk setting Target Milestone = 6.15.0 where sat-6.15.0+ is set.

Comment 15 David K 2023-12-05 14:51:55 UTC
This is a security-relevant feature, in my opinion. Any functions involving authN/authZ tokens need to have a way for admins to review and manage active tokens, especially when you provide the ability to create tokens that don't expire.

Comment 17 Eric Helms 2024-06-06 00:45:04 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "SAT-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


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