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

feat: Add EFS FileSystemPolicy to AWS source plugin #14632

Closed
1 task
mMeijden opened this issue Oct 17, 2023 · 1 comment · Fixed by #14672
Closed
1 task

feat: Add EFS FileSystemPolicy to AWS source plugin #14632

mMeijden opened this issue Oct 17, 2023 · 1 comment · Fixed by #14672

Comments

@mMeijden
Copy link

Describe the resource

EFS supports File system policies to be configured. These policies are currently not collected by CloudQuery.
https://docs.aws.amazon.com/efs/latest/ug/API_DescribeFileSystemPolicy.html

Blog post:
https://aws.amazon.com/blogs/aws/new-for-amazon-efs-iam-authorization-and-access-points/

Can this be added to the EFS table or as a separate table perhaps?

Use Case

Our use case is to build a full cloud resource inventory and perform security and compliance analyses on top of that.
One of the reason we require the file systems is to ensure that they are not overprivileged or public.

Link to API documentation

https://docs.aws.amazon.com/sdk-for-go/api/service/efs/#EFS.DescribeFileSystemPolicy

Additional Context

No response

Pull request (optional)

  • I can submit a pull request
@cychiang
Copy link
Contributor

cychiang commented Oct 17, 2023

I'm working on this at the moment, and it looks nature to me by extending the filesystems table with the filesystem_policy column. The return value of DescribeFileSystemPolicy for policy is a formatted JSON string, so I might just set the type into string instead of json

cychiang added a commit to cychiang/cloudquery that referenced this issue Oct 17, 2023
@kodiakhq kodiakhq bot closed this as completed in #14672 Oct 20, 2023
kodiakhq bot pushed a commit that referenced this issue Oct 20, 2023

#### Summary

resolves #14632

I'm looking for a way to reduce the duplicate implementations, for example, the following part is a way to get a service to resolve data for the table. It works well when a table relays on a single resolver. But if a table needs multiple resolver then might be a good way to do it. 

```go
	p := resource.Item.(types.FileSystemDescription)
	config := efs.DescribeFileSystemPolicyInput{
		FileSystemId: p.FileSystemId,
	}
	cl := meta.(*client.Client)
	svc := cl.Services(client.AWSServiceEfs).Efs
```

<!--
Explain what problem this PR addresses
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants