Bug 1916112

Summary: [Assisted-4.6 ]Read only admin cannot fetch openshift_versions
Product: OpenShift Container Platform Reporter: nshidlin <nshidlin>
Component: assisted-installerAssignee: Elior Erez <eerez>
assisted-installer sub component: assisted-service QA Contact: Yuri Obshansky <yobshans>
Status: CLOSED ERRATA Docs Contact:
Severity: unspecified    
Priority: unspecified CC: aos-bugs, frolland, mfilanov
Version: 4.6   
Target Milestone: ---   
Target Release: 4.6.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: OCP-Metal-v1.0.15.2 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-01 15:24:36 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 nshidlin 2021-01-14 08:52:22 UTC
Description of problem:
Read only admin cannot GET https://api.openshift.com/api/assisted-install/v1/openshift_versions

Version-Release number of selected component (if applicable):
{
    "release_tag": "v1.0.14.3",
    "versions": {
        "assisted-installer": "registry-proxy.engineering.redhat.com/rh-osbs/openshift4-assisted-installer-rhel8:v4.6.0-71",
        "assisted-installer-controller": "registry-proxy.engineering.redhat.com/rh-osbs/openshift4-assisted-installer-reporter-rhel8:v4.6.0-70",
        "assisted-installer-service": "quay.io/app-sre/assisted-service:8fde13c",
        "discovery-agent": "registry-proxy.engineering.redhat.com/rh-osbs/openshift4-assisted-installer-agent-rhel8:v4.6.0-77"
    }
}

How reproducible:
Every time

Steps to Reproduce:
1. Using read only admin credentials GET to https://api.openshift.com/api/assisted-install/v1/openshift_versions

Actual results:
{
    "code": 403,
    "message": "ocp-edge-qe-assisted-installer: Unauthorized to access route (insufficient role read-only-admin)"
}

Expected results:
supported openshift versions are returned:
{
    "4.6": {
        "display_name": "4.6.8",
        "release_image": "quay.io/openshift-release-dev/ocp-release:4.6.8-x86_64",
        "rhcos_image": "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.6/4.6.8/rhcos-4.6.8-x86_64-live.x86_64.iso",
        "support_level": "production"
    },
    "4.7": {
        "display_name": "4.7-pre-release",
        "release_image": "quay.io/openshift-release-dev/ocp-release@sha256:2419f9cd3ea9bd114764855653012e305ade2527210d332bfdd6dbdae538bd66",
        "rhcos_image": "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.6/4.6.8/rhcos-4.6.8-x86_64-live.x86_64.iso",
        "support_level": "beta"
    }
}

Comment 1 Michael Filanov 2021-01-18 17:43:17 UTC
comment to trigger the sync.

Comment 2 Fred Rolland 2021-01-20 12:05:57 UTC
Checking sync again.

Comment 3 Michael Filanov 2021-01-25 09:39:08 UTC
comment to trigger the sync.

Comment 5 Yuri Obshansky 2021-01-25 12:50:15 UTC
(In reply to Michael Filanov from comment #3)
> comment to trigger the sync.

Hi, Please, specify what is fixed version -> "Fixed In Version:"
Otherwise we cannot verify bug
Thank you

Comment 6 nshidlin 2021-01-25 15:59:25 UTC
Verified on staging v1.0.15.1

curl --location --request GET 'https://api.stage.openshift.com/api/assisted-install/v1/openshift_versions' \
--header 'Authorization: Bearer {TOKEN}'

{
    "4.6": {
        "display_name": "4.6.8",
        "release_image": "quay.io/openshift-release-dev/ocp-release:4.6.8-x86_64",
        "rhcos_image": "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.6/4.6.8/rhcos-4.6.8-x86_64-live.x86_64.iso",
        "support_level": "production"
    },
    "4.7": {
        "display_name": "4.7-pre-release",
        "release_image": "quay.io/openshift-release-dev/ocp-release@sha256:2419f9cd3ea9bd114764855653012e305ade2527210d332bfdd6dbdae538bd66",
        "rhcos_image": "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.6/4.6.8/rhcos-4.6.8-x86_64-live.x86_64.iso",
        "support_level": "beta"
    }
}

Comment 8 errata-xmlrpc 2021-02-01 15:24:36 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.6.15 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-2021:0235