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

Fix policy_groups policy authorization to pull from the correct org #643

Merged
merged 1 commit into from
Sep 13, 2016

Conversation

jkeiser
Copy link
Contributor

@jkeiser jkeiser commented Nov 25, 2015

The case that fails:

  1. Upload `/organizations/A/policy_groups/foo/policies/bar
  2. Upload `/organizations/B/policy_groups/foo/policies/bar
  3. Access /organizations/A/policy_groups/foo/policies/bar from a client in A
  4. Access /organizations/B/policy_groups/foo/policies/bar from a client in B

We don't have Pedant multi-org tests yet, so this is hard to add to Pedant.

@markan
Copy link
Contributor

markan commented Nov 25, 2015

Looks reasonable to me.

@marcparadise
Copy link
Member

Wow, nice find. I can help you out setting up a multi-org test, there are a couple of examples kicking around in there.

@stevendanna
Copy link
Contributor

👍 Let's make sure we do get those regression tests soon though.

@stevendanna stevendanna added this to the 12.4 milestone Dec 3, 2015
@marcparadise
Copy link
Member

Is this ready to go?

@stevendanna
Copy link
Contributor

@marcparadise Only question is pedant tests for this.

@marcparadise
Copy link
Member

@jkeiser I know we talked about testing this, and I think we were able to get tests straightened out. Do you recall any details around that?

@tylercloke
Copy link
Contributor

We definitely have multiorg tests: https://github.com/chef/chef-server/blob/master/oc-chef-pedant/spec/api/keys/user_keys_spec.rb#L459-L471

Should probably just write some pedant tests for this.

@stevendanna
Copy link
Contributor

@marcparadise @tylercloke Thoughts on a plan forward here. In my reading this is seriously incorrect behavior. My vote is to either rebase and merge OR make an explicit card for SPOOL to finish the tests if there isn't one already.

@coderanger
Copy link
Contributor

Just bumping this on the behalf of Bloomberg, caused multiple days of confusion for us :-( I think it's already been escalated internally but public vis++.

@mcole
Copy link

mcole commented Aug 4, 2016

+1! We hit this one too, spent a day ferreting through the code / database to work out what was going on.

@coderanger
Copy link
Contributor

Travis failure looked unrelated, likely transient VM fell down.

@danielsdeleo
Copy link
Contributor

I'm 👍 on merging and we can add testing the the SPOOL backlog alongside

@marcparadise
Copy link
Member

Also 👍. I'll rebase and run through CI, then go ahead with the merge.

@marcparadise marcparadise removed this from the 12.4 milestone Aug 4, 2016
@johnbellone
Copy link

👍 Let's merge this!

@stevendanna
Copy link
Contributor

Merged. @chef/chef-server-maintainers I think we should hold a short post-mortem on why this wasn't merged for so long and how we can have a faster turn around in the future. This was a security related patch that went unmerged for too long in my opinion.

@jkeiser jkeiser deleted the jk/policy-auth branch September 13, 2016 21:06
@jkeiser
Copy link
Contributor Author

jkeiser commented Sep 13, 2016

For my part, I waited because I hadn't added tests; I hadn't added tests because I would have had to modify test infrastructure more than I had time for; and then the patch simply dropped off my radar. Sorry about that!

@stevendanna
Copy link
Contributor

stevendanna commented Sep 13, 2016

Reviewing some chat logs, it looks like the recent history is more or less this:

  • We all agreed to merge this without tests on 3 Aug. (following a customer-escalated ticket that we tracked down to this problem) but at the time of the conversation we weren't sure this fix was the complete fix.
  • Noah reported that this fix did indeed work, I reported that to the channel, but failed to merge it (I think assuming that SPOOL was on it because they were handling some build-related churn at the time)

I think the take aways for me are:

  • In future we need to assign a specific maintainer to continue to shepherd security-related patches through.
  • Regardless of our recent fumbling, in my opinion we should have provided support to @jkeiser to get the tests written or wrote the tests ourselves shortly after this was submitted.

FWIW, I'm happy to use this ticket as a discussion for follow-up actions rather than doing a realtime post-mortem since I know schedules can be difficult.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.