inspectalerts: improve error message when no bearer token is available#2276
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughValidateRESTConfig's missing-token error text is updated to state that token-based authentication is required by the monitoring API and to hint that users should run ChangesAuthentication validation messaging
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 12✅ Passed checks (12 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
When using certificate-based authentication (e.g. system:admin from
installer kubeconfig), the monitoring API on Thanos Querier rejects
the request because kube-rbac-proxy only supports TokenReview-based
authentication on the web port (9091). The previous error message
("no token is currently in use for this session") did not explain
why it failed or what the user should do.
Update the message to clarify that token-based auth is required and
point users to 'oc login'
Signed-off-by: Daniel Mellado <dmellado@fedoraproject.org>
1160753 to
6d280ec
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: danielmellado, simonpasquier The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/verified by @simonpasquier |
|
@simonpasquier: This PR has been marked as verified by DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/test e2e-aws-ovn-upgrade |
|
@danielmellado: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
When using certificate-based authentication (e.g. system:admin from installer kubeconfig), the monitoring API on Thanos Querier rejects the request because kube-rbac-proxy only supports TokenReview-based authentication on the web port (9091). The previous error message ("no token is currently in use for this session") did not explain why it failed or what the user should do.
Update the message to clarify that token-based auth is required and point users to 'oc login' or creating a service account with the 'cluster-monitoring-view' role.
Summary by CodeRabbit
oc loginor using an appropriately scoped service account).