Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1541461 - Deal with buggy encoded scopes from service catalog. #754

Merged
merged 1 commit into from Feb 13, 2018

Conversation

shawn-hurley
Copy link
Contributor

@shawn-hurley shawn-hurley commented Feb 12, 2018

Describe what this PR does and why we need it:
Will allow us to handle scope that has been incorrectly encoded

Changes proposed in this pull request

  • Deal with the other way of encoding scopes
  • Default to close if both scopes are preset

@openshift-ci-robot openshift-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Feb 12, 2018
@shawn-hurley shawn-hurley added bug 3.9 | release-1.1 Kubernetes 1.9 | Openshift 3.9 | Broker release-1.1 needs-review labels Feb 12, 2018
@eriknelson eriknelson added 3.10 | release-1.2 Kubernetes 1.10 | Openshift 3.10 | Broker release-1.2 and removed 3.9 | release-1.1 Kubernetes 1.9 | Openshift 3.9 | Broker release-1.1 labels Feb 12, 2018
switch {
case ok && userInfo.Scopes != nil:
log.Infof("Unable to determine correct scope to use. Found both top level scope and scope in extras.")
return false, http.StatusForbidden, fmt.Errorf("unable to determine correct scope to use")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shawn-hurley how likely is this situation? Will we get into a situation where we're screwed and always getting forbidden? What would cause both information to come in?

Copy link
Contributor

@jmrodri jmrodri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a question, but the code looks good.

@shawn-hurley
Copy link
Contributor Author

shawn-hurley commented Feb 12, 2018 via email

@jmrodri
Copy link
Contributor

jmrodri commented Feb 12, 2018

@shawn-hurley okay, ACK!

Copy link
Member

@djzager djzager left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@shawn-hurley shawn-hurley merged commit 8c7e967 into openshift:master Feb 13, 2018
jianzhangbjz pushed a commit to jianzhangbjz/ansible-service-broker that referenced this pull request May 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.10 | release-1.2 Kubernetes 1.10 | Openshift 3.10 | Broker release-1.2 needs-review size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants