Description of problem:
When adding Google IDP from console, Hosted Domain is set as an optional field while it's required when mapping method is `claim`
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. admin users logins and visit cluster OAuth configuration
2. Identity Providers -> Add -> Google
3. Fill in IDP Name, clientID, clientSecret and click Add
3. It returns error message
An error occurred
Error "Invalid value: "null": hostedDomain must be specified unless lookup is used" for field "spec.identityProviders.google.hostedDomain".
mappingMethod is hard coded as `claim` but `Hosted Domain` is set as optional field
3. `Hosted Domain` only can be set as optional when mappingMethod is set to `lookup` , our console make mappingMethod defaults to `claim` so we need set `Hosted Domain` as required field
Also it's much clear if we can some message on the page telling user mapping method is hardcoded as `claim` otherwise user don't know which mapping method is used until a IDP is finally created
Just a quick note that we've decided not to explicitly call out the mapping method in the UI. Some discussion in the PR about it. It's an advanced option that you should rarely change. In this case since we've marked the field as required, I think it eliminates some of the confusion.
We will have to revisit this if we ever add edit capability to IDPs.
Hosted Domain now is a required field, that's desired behavior
Verified on 4.2.0-0.nightly-2019-07-17-115118
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.