Bug 1958097

Summary: don't show "old, insecure token format" if the token does not actually exist
Product: OpenShift Container Platform Reporter: Standa Laznicka <slaznick>
Component: oauth-apiserverAssignee: Standa Laznicka <slaznick>
Status: CLOSED ERRATA QA Contact: pmali
Severity: high Docs Contact:
Priority: high    
Version: 4.8CC: aos-bugs, kewang, mfojtik, pmali, xxia
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 23:07:23 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 Standa Laznicka 2021-05-07 07:50:42 UTC
Description of problem:
When inspecting error messages when serviceaccount token authentication fails such as the one in https://bugzilla.redhat.com/show_bug.cgi?id=1956879, we could see that the oauth-apiserver's token review returns a message "old, insecure token format".

The message from oauth-apiserver should instead warn about the token not being found if it really does not exist not to confuse the person debugging the issue. In case an old token was really found, it shoud not use commas so that it does not appear like two separate error messages.

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

How reproducible:
100%

Steps to Reproduce:
1. attempt to login with an invalid bearer token

Comment 7 errata-xmlrpc 2021-07-27 23:07:23 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: OpenShift Container Platform 4.8.2 bug fix and security update), 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:2438