Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1510486 - Incorrect Status Code For User With Invalid Permissions
Summary: Incorrect Status Code For User With Invalid Permissions
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Service Broker
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.9.0
Assignee: Shawn Hurley
QA Contact: Jian Zhang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-07 14:33 UTC by Shawn Hurley
Modified: 2018-03-28 14:11 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-28 14:11:22 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0489 None None None 2018-03-28 14:11:45 UTC

Description Shawn Hurley 2017-11-07 14:33:19 UTC
Description of problem:
The broker will return with a 400 status code when an originating user does not have the correct permissions to complete the APB action. The correct return would be a 403 status code

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Deploy broker, make sure that auto_escalate is false
2. Create a project with user1
3. login to cluster as user2 and attempt to provision APB into project that was created by user1

Actual results:
Error with the description saying user2 does not have the permissions, with a 400 status code.

Expected results:
Error with the description saying user2 does not have the permissions, with a 403 status code.

Additional info:

Comment 1 Shawn Hurley 2017-12-11 19:56:54 UTC
PR that has fixed this issue: https://github.com/openshift/ansible-service-broker/pull/586

Comment 3 Jian Zhang 2018-01-03 07:30:17 UTC
The current version is 1.0.19, but the fixed PR will be released in 1.1.3. So, waiting for the image ready and then to verify.

[root@host-172-16-120-75 ~]# docker run --rm --entrypoint=asbd registry.reg-aws.openshift.com:443/openshift3/ose-ansible-service-broker:v3.9 --version
Unable to find image 'registry.reg-aws.openshift.com:443/openshift3/ose-ansible-service-broker:v3.9' locally
Trying to pull repository registry.reg-aws.openshift.com:443/openshift3/ose-ansible-service-broker ... 
v3.9: Pulling from registry.reg-aws.openshift.com:443/openshift3/ose-ansible-service-broker
9cadd93b16ff: Already exists 
4aa565ad8b7a: Already exists 
ab577ec3df40: Pull complete 
Digest: sha256:f8561500eacbb305d1314657ccffca2a11963d2542d8a58ff01f4ec07eb8be56
1.0.19

Comment 7 errata-xmlrpc 2018-03-28 14:11:22 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:0489


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