Bug 2180568
Summary: | Represent 'unlimited' as 0 for `hammer host-registration generate-command` | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Pablo Mendez Hernandez <pmendezh> |
Component: | Registration | Assignee: | Girija Soni <gisoni> |
Status: | CLOSED ERRATA | QA Contact: | Shweta Singh <shwsingh> |
Severity: | medium | Docs Contact: | Zuzana Lena Ansorgova <zuansorg> |
Priority: | medium | ||
Version: | 6.13.0 | CC: | ahumbe, bangelic, gisoni, jhutar, lstejska, msunil, rlavi, saydas, s.heijmans, shwsingh, zhunting, zuansorg |
Target Milestone: | 6.15.0 | Keywords: | Triaged, WorkAround |
Target Release: | Unused | Flags: | gisoni:
needinfo+
|
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | foreman-3.9.1.3-1 | Doc Type: | Bug Fix |
Doc Text: |
.Generate host registration commands by using 0 as unlimited for JWT expiration
Previously, it was not clear what value Hammer and API accept for generation of the host registration command with an unlimited authorization token.
The accepted values are as follows:
* 0 means unlimited
* A value between 0 and 999999 is expiration in hours, 4 hours by default
* Other values are not accepted.
With this release, the unlimited value has been clarified in the Hammer help and API reference.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2024-04-23 17:13:57 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
Pablo Mendez Hernandez
2023-03-21 19:37:51 UTC
I made this an RFE, to propose the support of `unlimited` token expiration option also in Hammer and also API *** Bug 2228192 has been marked as a duplicate of this bug. *** An important point to add ( mentioned in dup BZ# 2228192 ) is that when we use the API, it accepts "unlimited" as a valid value ( same as UI ). But it seems it's just the hammer with some validation in place which would not accept anything except a numerical value. I will prioritize with my team, but looking at the description I believe this should be a bug, not an RFE, It works in UI, but not in API. Removing the FutureFeature keyword based on comment 6. Please consider it as a bug for hammer. Created redmine issue https://projects.theforeman.org/issues/36972 from this bug FailedQA Version Tested: 1. Generate the curl command with "--jwt-expiration" option, set it to 0 for unlimited. Observation: When x < 0, it does not raises any error. ``` # hammer -u admin -p $PASSWORD host-registration generate-command --organization "Default Organization" --activation-key $AK --location $LOCATION --jwt-expiration unlimited Failed to generate registration command: Error: Option '--jwt-expiration': Numeric value is required.. ``` This was even in stream: ``` # rpm -q foreman foreman-3.10.0-0.4.develop.20240116220126git0b40a64.el8sat.noarch ``` Verified. Version Tested: Satellite 6.15.0 Snap 8.0 Verification Steps: 1. Generate the curl command with "--jwt-expiration" option. Set it to different options as below and see if it works. x = 0 Unlimited token x < 0 raises an error, invalid value x > 999999 raises an error, invalid value x > 0 expiration in hours. x = 4 default hours. Result: Token life time values are working as expected. 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 (Important: Satellite 6.15.0 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-2024:2010 |