Bug 2041605 - Dynamic Plugins: discrepancy in proxy alias documentation/implementation
Summary: Dynamic Plugins: discrepancy in proxy alias documentation/implementation
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.10
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.10.0
Assignee: Jakub Hadvig
QA Contact: Yadan Pei
Depends On:
TreeView+ depends on / blocked
Reported: 2022-01-17 20:21 UTC by Kevin Cormier
Modified: 2022-03-10 16:40 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2022-03-10 16:40:08 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github openshift api pull 1098 0 None open Bug 2041605: Fix plugin proxy path 2022-01-18 15:07:18 UTC
Github openshift console-operator pull 628 0 None open Bug 2041605: Fix plugin proxy path 2022-01-18 17:06:18 UTC
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-10 16:40:32 UTC

Description Kevin Cormier 2022-01-17 20:21:40 UTC
Description of problem:

From the enhancement (https://github.com/openshift/enhancements/blob/master/enhancements/console/dynamic-plugins.md#delivering-plugins), path of the alias should be:


However, in the implementation, the 'plugin' segment is omitted:

I0117 19:14:07.200071       1 server.go:482] The following console endpoints are now proxied to these services:
I0117 19:14:07.200099       1 server.go:485]  - /api/proxy/acm-plugin/console/ -> https://console-chart-6bc1d-console-v2.open-cluster-management.svc.cluster.local:3000

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

OpenShift 4.10.0-0.nightly-2022-01-17

How reproducible:


Steps to Reproduce:
1. Create a ConsolePlugin with a proxy service
2. Check logs for openshift-console pods

Actual results:

Actual proxied path does not include 'plugin' segment, but instead looks like /api/proxy/<plugin-name>/<proxy-alias>

Expected results:

Documentation and implementation should match

Additional info:

Comment 2 Jakub Hadvig 2022-01-18 17:04:55 UTC
Putting back to ASSIGNED since we need to merge https://github.com/openshift/console-operator/pull/628 as part of the fix.

Comment 5 Yadan Pei 2022-01-24 03:43:57 UTC
1. build a dynamic plugin based on https://github.com/yapei/console/tree/consoleplugin which has 
const ExampleProxyResponse: React.FC = () => {
  const [data, setData] = React.useState();

  React.useEffect(() => {
      .then((response) => {
      .catch((e) => console.error(e));
  }, []);

  return (
    <pre>{JSON.stringify(data, null, 2)}</pre>
2. create plugin manifests and enable dynamic plugin, visit /test-proxy-service, json is returned correctly

verified on 4.10.0-0.nightly-2022-01-22-102609

Comment 8 errata-xmlrpc 2022-03-10 16:40:08 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 (Moderate: OpenShift Container Platform 4.10.3 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.


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