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

Project filtering for cfgmgmt GetPolicyCookbooks RPC #387

Open
lancewf opened this issue May 17, 2019 · 0 comments
Open

Project filtering for cfgmgmt GetPolicyCookbooks RPC #387

lancewf opened this issue May 17, 2019 · 0 comments
Labels
iamv2 This issue or pull request applies to iamv2 work for Automate

Comments

@lancewf
Copy link
Contributor

lancewf commented May 17, 2019

User Story

In order to ensure a user has access to the information in the GetPolicyCookbooks RPC project filtering must be added.

This issue is an extension of the #68 issue.

Below is the reason this RPC is different than all the other RPC in the cfgmgmt.proto.

This RPC returns node data and only passes a revisionId. The data returned is searched for in the chef actions. Because this is node data we cannot use the project filtering when pulling the information out of the Chef action indexes. Extra information; the revisionId is also a field on the node-state and converge-history indexes.

One solution is to use the revisionId to request the latest Run with a matching field. Then request that run's associated node to retrieve its projects.

Another solution is to move the policy cookbook information out of the action and store it with the correct associated node.

The preference would be the former solution, but it depends on how much effort it will take.

@kmacgugan would be a good reference for this work.

Definition of Done

The GetPolicyCookbooks API will filter on projects.

Demo Script / Repro Steps

  1. Create a policy cookbook
  2. Run a CCR
  3. Add projects to the CCR node
  4. Ensure that a user with access to that project can request the information.
  5. Ensure that a user without access to that project cannot request the information.
@lancewf lancewf added the iamv2 This issue or pull request applies to iamv2 work for Automate label May 17, 2019
@vjeffrey vjeffrey added this to the iamv2: ingested nodes & actions milestone May 20, 2019
@vjeffrey vjeffrey removed this from the iamv2: ingested nodes & actions milestone Jun 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iamv2 This issue or pull request applies to iamv2 work for Automate
Projects
None yet
Development

No branches or pull requests

2 participants