Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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.
Description of problem:
When test is run on clean installation, clevis sometimes fail on line:
https://github.com/latchset/clevis/blob/master/src/pins/tang/clevis-encrypt-tang#L117
(jose fails on exit code 1, 'clevis encrypt tang' fails on exit code 1 with no error message)
Version-Release number of selected component (if applicable):
clevis-11-1.el8.x86_64
tang-7-1.el8.x86_64
jose-10-2.el8.x86_64
How reproducible:
Between 50-100 % cases of runs on clean installation (1minutetip or beaker)
Steps to Reproduce:
0. get clean fresh installation of rhel-8 (1minutetip, beaker machine)
1. dnf install tang jose
2. systemctl start tangd.socket
3. wget localhost/adv -O adv.json
4. cat adv.json
{"payload":"eyJrZXlzIjpbeyJhbGciOiJFUzUxMiIsImNydiI6IlAtNTIxIiwia2V5X29wcyI6WyJ2ZXJpZnkiXSwia3R5IjoiRUMiLCJ4IjoiQWFsamJfN2E4Smo1QjFOcmZOLWMzQUU2dGpfY2RRakF6bF9maDVNVG9GV3dqV3BkcVlyNlY3eUZITUREMDJuUXFISjRNT0xFZWQ1SHNJSklTZm9fN1R6TSIsInkiOiJBWXhvWEl4bVVGX2tiaGxTTmdCWjlicURhZlUzNGpud2R4c2cyQS01V1JLOWpPNWdZa0htZk9qTWU5cjRvZEZaa0JodVV1RkxRb0FNVkZEQVpwV0wzLXRYIn1dfQ","protected":"eyJhbGciOiJFUzUxMiIsImN0eSI6Imp3ay1zZXQranNvbiJ9","signature":"AHm2wJq7NeHmSLv_cj2ENRhx6BR-b37YlFeWjyPoKzkhlQoErWpxHpJaWAR-cPcQT0HrKCOyM_sv6hFdXSFJMVUmAe8dHhBKzu25ODIRJO4lf8PkmlqQmfpYa0qDiUkfY4ZAHM8z7Qe_Cmlosz5v_25hvJayPF-J_xzUH8Wr-_3iOvVm"}
5. jwks=`jose fmt -j- -Og payload -SyOg keys -AUo- < adv.json` #line 89 of clevis-encrypt-tang
6. echo $jwks
{"keys":[{"alg":"ES512","crv":"P-521","key_ops":["verify"],"kty":"EC","x":"Aaljb_7a8Jj5B1NrfN-c3AE6tj_cdQjAzl_fh5MToFWwjWpdqYr6V7yFHMDD02nQqHJ4MOLEed5HsIJISfo_7TzM","y":"AYxoXIxmUF_kbhlSNgBZ9bqDafU34jnwdxsg2A-5WRK9jO5gYkHmfOjMe9r4odFZkBhuUuFLQoAMVFDAZpWL3-tX"}]}
7. jose jwk use -i- -r -u deriveKey -o- <<< "$jwks" #line 117 of clevis-encrypt-tang
Actual results:
No output of running step 7. Unhandled empty variable in clevis code. Exit code 1 with no error message.
Expected results:
While restarting tang server, it works:
# jose jwk use -i- -r -u deriveKey -o- <<< "$jwks"
{"alg":"ECMR","crv":"P-521","key_ops":["deriveKey"],"kty":"EC","x":"AHpHNX88LDH8GPBB0nXu7RM1JIlPN7GdWV9muUh0zUCL7ZckW_DCH1cJNRp9Wnz0nXlTOADc3dP9Z4GYVmGUScsl","y":"AVioYGZzjiYdBkSyiTrlLoC4fLdhtlDb0sKpfJTNaQYQIdZnx-fLOjVqrVxBcvqr0z44cvnyxI_IKUJlhhK5kOGn"}