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

read allowed projects on endpoints in nodes.proto #486

Open
vjeffrey opened this issue Jun 3, 2019 · 3 comments
Open

read allowed projects on endpoints in nodes.proto #486

vjeffrey opened this issue Jun 3, 2019 · 3 comments
Labels
iamv2 This issue or pull request applies to iamv2 work for Automate

Comments

@vjeffrey
Copy link

vjeffrey commented Jun 3, 2019

User Story

there's plenty of prior art for this, as we are already doing the work of reading allowed projects on the ingested nodes endpoint in automate (see "filterByProjects" func https://github.com/chef/automate/blob/master/components/compliance-service/api/reporting/server/server.go#L342)
on list endpoints, we need to filter by allowed projects
on update/delete endpoints, we need to ensure the user has update/delete rights on those resources/has the correct allowed projects

this work concerns the following endpoints in nodes.proto:

	rpc Read(Id) returns (Node) {};
	rpc Update(Node) returns (google.protobuf.Empty) {};
	rpc Delete(Id) returns (google.protobuf.Empty) {};
	rpc List(Query) returns (Nodes) {};
	rpc BulkDelete(Query) returns (BulkDeleteResponse) {};
	rpc BulkDeleteById(Ids) returns (BulkDeleteResponse) {};

Definition of Done

reading projects/adding to filters/etc on all above listed endpoints

@vjeffrey vjeffrey added this to the iamv2: manually added nodes and node integrations milestone Jun 3, 2019
@vjeffrey vjeffrey added the iamv2 This issue or pull request applies to iamv2 work for Automate label Jun 3, 2019
@vjeffrey
Copy link
Author

vjeffrey commented Oct 10, 2019

I believe reading allowed projects on list and read endpoints for the nodemanager nodes should be prioritized and included in the "GA" definition of iamv2 resource scoped access.
why?
b/c every ingested report sends information about itself to the nodemanager
this node information is available at api/v0/nodes/search
with #1772, we ensured that the nodemanager nodes' projects information is always up to date
without doing the work to read allowed projects on api/v0/nodes/search and api/v0/nodes/id/{id}, users who are not supposed to be allowed to see nodes x, y, will be able to see some metadata information about those nodes (last scan/run status, node name, other info)

this is a small amount of work. most of the work is testing.

@vjeffrey
Copy link
Author

i'm gonna open a separate issue for just the list and read parts of this, since that is the part we need for the GA release. the other endpoints can wait.

@vjeffrey
Copy link
Author

opened #1894 for this. after thinking about the scenario i also realized this is only necessary on the search endpoint

@vjeffrey vjeffrey removed this from the iamv2: manually added nodes and node integrations milestone Nov 13, 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

1 participant