Bug 1806166 - Could not create github idp if "Hostname" is not set
Summary: Could not create github idp if "Hostname" is not set
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.4.0
Assignee: Samuel Padgett
QA Contact: Yanping Zhang
URL:
Whiteboard:
Depends On: 1804056
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-22 15:12 UTC by Samuel Padgett
Modified: 2020-05-04 11:39 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of: 1804056
Environment:
Last Closed: 2020-05-04 11:39:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 4450 0 None closed [release-4.4] Bug 1806166: Fix incorrect IDP dry run requests 2020-04-17 17:58:25 UTC
Red Hat Product Errata RHBA-2020:0581 0 None None None 2020-05-04 11:39:28 UTC

Description Samuel Padgett 2020-02-22 15:12:05 UTC
+++ This bug was initially created as a clone of Bug #1804056 +++

Description of problem:
Create github idp from console, the "Hostname" field is not marked as a required field, when it's not set, github idp could not be created successfully.

Version-Release number of selected component (if applicable):
4.4.0-0.nightly-2020-02-17-192940

How reproducible:
Always

Steps to Reproduce:
1.Create github idp from console, set name, client id, client secret, organization name, click "Create".
2.
3.

Actual results:
1. Could not create successfully, an error showed up:
Danger alert:An error occurred
Error "Invalid value: v1.ConfigMapNameReference{Name:"ca-name"}: cannot be specified when hostname is empty" for field "spec.identityProviders[1].github.ca".

Expected results:
1. Should create github idp seccessfully if there is no info to indicate the "Hostname" must be set.

Additional info:

--- Additional comment from Samuel Padgett on 2020-02-18 14:45:13 UTC ---

Hostname is not required. It's only required because you provided a CA file (or for GitHub Enterprise), and it only makes sense to provide a CA file if you also provide a hostname. See the documentation here:

https://docs.openshift.com/container-platform/4.3/authentication/identity_providers/configuring-github-identity-provider.html

--- Additional comment from Yanping Zhang on 2020-02-19 07:05:05 UTC ---

@Sam, the scenario is: I don't want to set "Hostname" and "CA", I just set idp name, client id, client secret, organization or team name, then click "Create", the idp should be created, it works in OCP 4.3/4.2, but now fails in OCP 4.4 with error:"Invalid value: v1.ConfigMapNameReference{Name:"ca-name"}: cannot be specified when hostname is empty" for field "spec.identityProviders[1].github.ca".u 
If it's not a bug for 4.4, then should be bug for 4.2/4.3, could you have a check again?

--- Additional comment from Yanping Zhang on 2020-02-20 07:04:36 UTC ---

Could not create github idp successfully if I don't set "Hostname" and "CA", reopen the bug, we need a effective way to create github idp from console without "Hostname" and "CA" set.

--- Additional comment from Samuel Padgett on 2020-02-22 15:06:58 UTC ---

This is a regression from https://github.com/openshift/console/pull/3947. We are incorrectly setting a CA in the dry-run request when one isn't set in the form. We might have this problem for other IDPs.

--- Additional comment from Samuel Padgett on 2020-02-22 15:11:25 UTC ---

This affects most IDP forms.

Comment 4 Yanping Zhang 2020-02-28 05:28:02 UTC
Tested on OCP 4.4 with payload 4.4.0-0.nightly-2020-02-27-020932.
Now create github idp from console, after set idp name, client id, client secret and organization, click "Create", idp is created successfully.
The bug is fixed, so move it to Verified.

Comment 7 errata-xmlrpc 2020-05-04 11:39: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, 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:0581


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