Bug 1880123

Summary: anonymous browsers should get a 403 from /
Product: OpenShift Container Platform Reporter: OpenShift BugZilla Robot <openshift-bugzilla-robot>
Component: apiserver-authAssignee: Andrea Hoffer <ahoffer>
Status: CLOSED ERRATA QA Contact: scheng
Severity: high Docs Contact:
Priority: high    
Version: 4.4CC: aos-bugs, bparees, jcallen, mfojtik, pasik, sttts, vareti, xxia
Target Milestone: ---Keywords: Reopened
Target Release: 4.4.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Release Note
Doc Text:
In OpenShift release 4.1, an anonymous user could access discovery endpoints. Later releases revoked this access by removing unauthenticated subjects from cluster role bindings. Because of the way default policy resources are reconciled, unauthenticated access is preserved in upgrade clusters. The ability to revoke this access after upgrading a cluster can be added to OpenShift. But, as doing that automatically would break existing use-cases, cluster administrators are given the ability to chose the best path forward based on their use case. There could be up to five cluster role bindings in an OpenShift 4.6 cluster that give unauthenticated user access to discovery endpoints. 1. cluster-status-binding 2. discovery 3. system:basic-user 4. system:discovery 5. system:openshift:discovery Cluster administrators can revoke unauthenticated access by using the below shell script. Please note that after running this snippet, an application that relied on unauthenticated behavior might start to receive HTTP 403 from the API Server. ## Snippet to remove unauthenticated group from all the cluster role bindings. $ for clusterrolebinding in cluster-status-binding discovery system:basic-user system:discovery system:openshift:discovery ; do ### Find the index of unauthenticated group in list of subjects index=$(oc get clusterrolebinding ${clusterrolebinding} -o json | jq 'select(.subjects!=null) | .subjects | map(.name=="system:unauthenticated") | index(true)'); ### Remove the element at index from subjects array oc patch clusterrolebinding ${clusterrolebinding} --type=json --patch "[{'op': 'remove','path': '/subjects/$index'}]"; done
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-13 08:17:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1879650    
Bug Blocks:    

Comment 1 Venkata Siva Teja Areti 2020-09-17 17:53:48 UTC
*** Bug 1822681 has been marked as a duplicate of this bug. ***

Comment 6 errata-xmlrpc 2020-10-13 08:17:44 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 (OpenShift Container Platform 4.4.27 bug fix 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/RHBA-2020:4063