Bug 1965929
Summary: | kube-apiserver should use cert auth when reaching out to the oauth-apiserver with a TokenReview request | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Standa Laznicka <slaznick> |
Component: | apiserver-auth | Assignee: | Standa Laznicka <slaznick> |
Status: | CLOSED ERRATA | QA Contact: | liyao |
Severity: | urgent | Docs Contact: | |
Priority: | urgent | ||
Version: | 4.8 | CC: | aos-bugs, mfojtik, sttts, surbania, xxia |
Target Milestone: | --- | ||
Target Release: | 4.8.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | No Doc Update | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-07-27 23:10:35 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Standa Laznicka
2021-05-31 07:35:14 UTC
needs one more slight improvement from lib-go Tested in cluster 4.8.0-0.nightly-2021-06-10-071057 1. check secret/webhook-authentication-integrated-oauth content is presented with cert/key form $ oc extract secret/webhook-authentication-integrated-oauth -n openshift-config 2. save cert and key echo 'client-certificate-data value' | base64 -d > cert echo 'client-key-data value' | base64 -d > key 3. In terminal A: cat > tokenreview_invalid.json << EOF {"kind":"TokenReview","apiVersion":"authentication.k8s.io/v1","spec":{"token":"aaaaaaaaaaaa"}} EOF oc login -u testuser-41 -p <password> TOKEN=`oc whoami -t` cat > tokenreview_valid.json << EOF {"kind":"TokenReview","apiVersion":"authentication.k8s.io/v1","spec":{"token":"$TOKEN"}} EOF 4.In terminal B: VALIDATION_POD=`oc get pod -n openshift-oauth-apiserver --no-headers | awk '{print $1}' | head -n 1` oc port-forward -n openshift-oauth-apiserver $VALIDATION_POD 8443:8443 5.In terminal A again, using the cert and key file saved in step2 curl -ksS -XPOST --cert ./cert --key ./key -H "Content-Type: application/json" https://localhost:8443/apis/oauth.openshift.io/v1/tokenreviews/ -d @tokenreview_valid.json ... "status": { "authenticated": true, check and find above .status.authenticated is true, which is the expected value. 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 (Moderate: OpenShift Container Platform 4.8.2 bug fix and security 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/RHSA-2021:2438 |