Bug 1486142 - cluster-reader is suggested to have permission to run `oadm top node/pod`
Summary: cluster-reader is suggested to have permission to run `oadm top node/pod`
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: apiserver-auth
Version: 3.6.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Simo Sorce
QA Contact: Chuan Yu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-29 07:26 UTC by Xingxing Xia
Modified: 2017-09-09 20:05 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-09 20:05:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Xingxing Xia 2017-08-29 07:26:08 UTC
Description of problem:
Currently cluster-reader does not have permission to run `oadm top node/pod` until the clusterrole is manually edited to add `services/proxy` item.
It is suggested to let it have the permission from the view of its role name's semantic meaning.

BTW, this issue is found and suggested when cluster-reader account (granted by email https://url.corp.redhat.com/b289d64) is used to check the top pod/nodes in cluster

Version-Release number of selected component (if applicable):
v3.6.173.0.5

How reproducible:
Always

Steps to Reproduce:
1. Give user cluster-reader
oadm policy add-cluster-role-to-user cluster-reader xxia
2. Login with the user and run top pod/node
For the command, see comment https://bugzilla.redhat.com/show_bug.cgi?id=1470003#c10

Actual results:
2. Cluster reader cannot see top pods/nodes. Details see https://bugzilla.redhat.com/show_bug.cgi?id=1470003#c10

Expected results:
2. Cluster reader should see.

Additional info:

Comment 1 Mo 2017-09-09 03:58:37 UTC
@Jordan pods/proxy and services/proxy are marked as escalating resources in TestClusterReaderCoverage.  I assume this is because the proxy capabilities could be abused to gain access to secrets?  Could you give specifics?

@Xingxing I plan to close this once I get more info from Jordan.

Comment 2 Jordan Liggitt 2017-09-09 04:06:27 UTC
proxying to arbitrary services and pods is considered escalating because it allows access to unknown capabilities, and we cannot guarantee the access is read-only

Comment 4 Mo 2017-09-09 20:05:48 UTC
Cluster reader must be guaranteed to only have read access to resources.  Since that cannot be determined for the pod/service proxy sub resources, we cannot add those permissions to it.


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