Bug 2069577

Summary: ConsolePlugin example proxy authorize is wrong
Product: OpenShift Container Platform Reporter: Yadan Pei <yapei>
Component: Management ConsoleAssignee: Jakub Hadvig <jhadvig>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.11CC: aos-bugs, yapei
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-10 11:02:32 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 Yadan Pei 2022-03-29 08:07:10 UTC
Description of problem:
ConsolePlugin proxy authorize is always set as false no matter what value we pass in ConsolePlugin yaml spec

Version-Release number of selected component (if applicable):
4.11.0-0.nightly-2022-03-27-140854


How reproducible:
Always

Steps to Reproduce:
1. replace dynamic demo plugin image quay.io/vszocs/console-demo-plugin with quay.io/yapei/console-demo-plugin:411 and deploy to the cluster
# curl -O https://raw.githubusercontent.com/openshift/console/master/dynamic-demo-plugin/oc-manifest.yaml 
# replace image
# oc apply -f oc-manifest.yaml
2. Check ConsolePlugin CR specs
# oc get consoleplugin console-demo-plugin -o yaml
apiVersion: console.openshift.io/v1alpha1
kind: ConsolePlugin
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"console.openshift.io/v1alpha1","kind":"ConsolePlugin","metadata":{"annotations":{},"name":"console-demo-plugin"},"spec":{"displayName":"OpenShift Console Demo Plugin","proxy":[{"alias":"thanos-querier","service":{"authorize":true,"name":"thanos-querier","namespace":"openshift-monitoring","port":9091},"type":"Service"}],"service":{"basePath":"/","name":"console-demo-plugin","namespace":"console-demo-plugin","port":9001}}}
  creationTimestamp: "2022-03-29T05:57:26Z"
  generation: 1
  name: console-demo-plugin
  resourceVersion: "132487"
  uid: 0314977f-56a5-4ced-94f9-bd24ac34344a
spec:
  displayName: OpenShift Console Demo Plugin
  proxy:
  - alias: thanos-querier
    authorize: false
    service:
      name: thanos-querier
      namespace: openshift-monitoring
      port: 9091
    type: Service
  service:
    basePath: /
    name: console-demo-plugin
    namespace: console-demo-plugin
    port: 9001
3.

Actual results:
2. spec.proxy.authorize is populated with false

Expected results:
2. spec.proxy.authorize should be populated with true

Additional info:
visiting /test-proxy-service extension point will report 403 Forbidden error

Comment 4 Yadan Pei 2022-04-07 02:15:07 UTC
both dynamic-demo-plugin README https://github.com/openshift/console/blob/master/dynamic-demo-plugin/README.md#proxy-service and manifest yaml https://github.com/openshift/console/blob/master/dynamic-demo-plugin/oc-manifest.yaml have been updated correctly

moving to VERIFIED

Comment 6 errata-xmlrpc 2022-08-10 11:02: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 (Important: OpenShift Container Platform 4.11.0 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-2022:5069