Bug 1562527

Summary: [3.9] Provision call failed: deploymentconfigs is forbidden: User cannot get deploymentconfigs in project
Product: OpenShift Container Platform Reporter: Nicholas Schuetz <nick>
Component: TemplatesAssignee: Ben Parees <bparees>
Status: CLOSED ERRATA QA Contact: Dongbo Yan <dyan>
Severity: high Docs Contact:
Priority: high    
Version: 3.9.0CC: aos-bugs, bparees, chezhang, hgomes, jiazha, jmatthew, jokerman, mmariyan, mmccomas, nick, sdehn, wzheng, zhsun, zitang
Target Milestone: ---Keywords: Reopened
Target Release: 3.9.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Groups associated w/ a user were not checked when performing access checks to look up the readiness of objects created by the templates. Consequence: For objects the user could only access due to their group membership, objects would be created by the template, but could not be checked for readiness, resulting in a readiness failure at the template instance level. Fix: Pass the user's groups when performing the readiness check operation, not just when performing the object creation. Result: Objects can successfully be checked for readiness as long as the user's group membership permits the check.
Story Points: ---
Clone Of:
: 1610991 1610994 1610995 (view as bug list) Environment:
Last Closed: 2018-08-29 14:42:31 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:
Bug Depends On:    
Bug Blocks: 1610991, 1610994, 1610995    
Attachments:
Description Flags
screenshot of error none

Description Nicholas Schuetz 2018-03-31 16:23:11 UTC
Created attachment 1415566 [details]
screenshot of error

3.9.14-1.git.0.4efa2ca

Getting this error when provisioning a simple (ephemeral) mysql instance from the service catalog:

Provision call failed: deploymentconfigs "mysql" is forbidden: User "ocpadmin" cannot get deploymentconfigs in project "testing"

The 'ocpadmin' user has cluster-admin role.

This occurs whether i bind it or not.

Screenshot attached...

-Nick

Comment 1 Jordan Liggitt 2018-04-11 13:06:51 UTC
What does the following show:

oc adm policy who-can get deploymentconfigs -n testing

Also, can you attach the output of:

oc get clusterrolebindings -o yaml
oc get rolebindings -o yaml -n testing

Comment 2 Nicholas Schuetz 2018-04-12 17:49:18 UTC
closing this out as i have not been able to reproduce it (on the exact same install i saw it on initially).  Chalking it up to the gremlins that seem to come out with disconnected installs.  I'll re-open if it happens again.

Thanks!
-Nick

Comment 8 Simo Sorce 2018-07-09 10:05:53 UTC
Which user exactly is having issue with which project exactly ?

Comment 12 Simo Sorce 2018-07-09 15:10:52 UTC
Sounds like a service catalog issue at this point.

Comment 14 Jay Boyd 2018-07-10 15:22:11 UTC
The error is being set by the Service Broker.  John can your team take a look at this?

Comment 21 Ben Parees 2018-08-01 20:15:32 UTC
Looks like this is a bug in the template instance controller itself, fixing here (will need to backport):
https://github.com/openshift/origin/pull/20505

Comment 22 XiuJuan Wang 2018-08-02 07:01:14 UTC
Could reproduce this issue as steps in comments #13 with ocp 3.10.14 && 3.11.0-0.10.0

Comment 23 Ben Parees 2018-08-02 17:55:47 UTC
https://github.com/openshift/ose/pull/1383

Comment 25 Dongbo Yan 2018-08-27 02:35:30 UTC
Test with
# openshift version
openshift v3.9.41
kubernetes v1.9.1+a0ce1bc657
etcd 3.2.16

Reproduce steps:
1. Login openshift with user1 and create project 
2. Create user group and add admin role to group
$oc adm groups new testgroup user1 user2
$oc policy add-role-to-group admin testgroup -n testproject

3. Login to the webconsole as user2
4. Using the web console, switch to that testproject and add the httpd service catalog item, click through accepting defaults

5. Check serviceinstance status
$oc get serviceinstance
$oc describe serviceinstance/httpd-example-v8fpv

Actual result:
servicesintance is ready

move to verified

Comment 27 errata-xmlrpc 2018-08-29 14:42:31 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-2018:2549