Implementing Granular RBAC for Node Debugging and Pod Log Access Control in Red Hat OpenShift

Solution Verified - Updated -

Issue

  • How to restrict users from viewing pod logs from certain namespaces like "dynatrace_finuat," "metrics-debug," as well as prevent them from accessing logs from Master and Infra nodes. Log access for worker nodes should be restricted to application-related logs only.
  `$ oc adm node-logs simba-XYZ-worker-XYZ --path=pods/uat4-prod_xyz/noxyz/0.log`
   error: nodes "simba-9mczl-worker-78nt5" is forbidden: User "C36481" cannot get resource "nodes/proxy" in API 
   group "" at the cluster scope

Environment

  • Red Hat OpenShift Container Platform (RHOCP)
    • 4

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content