Bug 1734326

Summary: RoleBindingRestriction could not be created for resource validation failed
Product: OpenShift Container Platform Reporter: Chuan Yu <chuyu>
Component: apiserver-authAssignee: Standa Laznicka <slaznick>
Status: CLOSED ERRATA QA Contact: Wei Sun <wsun>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.2.0CC: aos-bugs, mfojtik, slaznick
Target Milestone: ---   
Target Release: 4.2.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: 2019-10-16 06:33:52 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 Chuan Yu 2019-07-30 09:04:01 UTC
Description of problem:
rolebindingrestriction created failed for resource validation failed

Version-Release number of selected component (if applicable):
$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.2.0-0.nightly-2019-07-24-233914   True        False         7h55m   Cluster version is 4.2.0-0.nightly-2019-07-24-233914

How reproducible:
always

Steps to Reproduce:
1. create a rolebinding with a resource file, such as:
$ oc create -f - <<EOF
> apiVersion: authorization.openshift.io/v1
> kind: RoleBindingRestriction
> metadata:
>   name: match-groups
> spec:
>   grouprestriction:
>     groups:
>     - groups-rolebindingrestriction
> EOF

2.
3.

Actual results:
Failed to create such rolebindingrestriction, with validation error:
The RoleBindingRestriction "match-groups" is invalid: []: Invalid value: map[string]interface {}{"apiVersion":"authorization.openshift.io/v1", "kind":"RoleBindingRestriction", "metadata":map[string]interface {}{"creationTimestamp":"2019-07-25T10:03:18Z", "generation":1, "name":"match-groups", "namespace":"openshift-authentication", "uid":"6d10dee8-aec3-11e9-961e-029a6e1b3ab0"}, "spec":map[string]interface {}{"grouprestriction":map[string]interface {}{"groups":[]interface {}{"groups-rolebindingrestriction"}}}}: validation failure list:

scheng: See below logs:
spec.grouprestriction.labels in body is required
spec.serviceaccountrestriction in body is required
spec.userrestriction in body is required

Expected results:
rolebindingrestriction create successfully

Additional info:
In 4.1 with the same resource file, no such issue when create rolebindingrestriction.

Comment 2 Chuan Yu 2019-07-31 03:08:03 UTC
Verified on 4.2.0-0.nightly-2019-07-30-214012

Comment 4 errata-xmlrpc 2019-10-16 06:33:52 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-2019:2922