Bug 1821625 - normal user get 403 Forbidden error when viewing Network In and Network Out metric on Pod Details page
Summary: normal user get 403 Forbidden error when viewing Network In and Network Out m...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.4.z
Assignee: Yadan Pei
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On: 1819628
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-07 09:09 UTC by Yadan Pei
Modified: 2020-05-26 16:50 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Namespace is required for normal users to view Network In and Network Out metrics on the Pod Details page. Consequence: Normal users cannot view Network In and Network Out metrics on the Pod Details page since the code does not supply a namespace. Fix: Add a namespace prop to Network In and Network Out metrics on the Pod Details page. Result: Normal users can view Network In and Network Out metrics on the Pod Details page.
Clone Of: 1819628
Environment:
Last Closed: 2020-05-26 16:50:32 UTC
Target Upstream Version:


Attachments (Terms of Use)
Normal User Can View Pod Metrics (197.76 KB, image/png)
2020-05-19 02:15 UTC, Yadan Pei
no flags Details


Links
System ID Priority Status Summary Last Updated
Github openshift console pull 5001 None closed Bug 1821625: Fix bug where networking metrics unavailable to regular users 2020-06-18 13:37:27 UTC
Red Hat Product Errata RHBA-2020:2180 None None None 2020-05-26 16:50:45 UTC

Description Yadan Pei 2020-04-07 09:09:18 UTC
+++ This bug was initially created as a clone of Bug #1819628 +++

Description of problem:
When normal user view metrics on Pod details page, it always show 'No datapoints found' in Network In and Network Out chart while on project overview, Network Transfer(including Network In and Network Out) data is shown correctly
 
Version-Release number of selected component (if applicable):
4.5.0-0.nightly-2020-03-31-203533

How reproducible:
Always

Steps to Reproduce:
1. normal user create a project and add application
$ oc new-app ruby~https://github.com/sclorg/ruby-ex.git
2. when pod is running, view pod metrics on Pod details page

Actual results:
2. Memory Usage, CPU Usage, Filesystem charts are shown correctly, it always show 'No datapoints found' in Network In and Network Out chart. Also the fetch request returns 403 
Request URL:https://<console_route>/api/prometheus/api/v1/query_range?start=1585725918.507&end=1585729518.507&step=60&query=sum%28irate%28container_network_receive_bytes_total%7Bpod%3D%27ruby-ex-1-fnngw%27%2C+namespace%3D%27yapei1-1%27%7D%5B5m%5D%29%29+by+%28pod%2C+namespace%29
Request URL:https://<console_route>/api/prometheus/api/v1/query_range?start=1585725919.918&end=1585729519.918&step=60&query=sum%28irate%28container_network_transmit_bytes_total%7Bpod%3D%27ruby-ex-1-fnngw%27%2C+namespace%3D%27yapei1-1%27%7D%5B5m%5D%29%29+by+%28pod%2C+namespace%29

Expected results:
2. Network In and Network Out data should be loaded correctly 

Additional info:

Comment 1 Robb Hamilton 2020-05-08 17:22:48 UTC
PR opened, awaiting cherry pick approval.

Comment 4 Yadan Pei 2020-05-19 02:15:19 UTC
Created attachment 1689731 [details]
Normal User Can View Pod Metrics

Now normal user can view pod Network In and Network Out metrics successfully

Verified on  4.4.0-0.nightly-2020-05-18-014003

Comment 6 errata-xmlrpc 2020-05-26 16:50:32 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, 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/RHBA-2020:2180


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