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

AWS library scope does not respect cluster filter #5

Open
pecigonzalo opened this issue Sep 18, 2017 · 2 comments
Open

AWS library scope does not respect cluster filter #5

pecigonzalo opened this issue Sep 18, 2017 · 2 comments

Comments

@pecigonzalo
Copy link

When we use ECS Cluster filter, the AWS API queries are not respecting that filter and require us to use wide open rules.

@slok
Copy link
Owner

slok commented Oct 1, 2017

Hi!

I don't understand the issue, could you explain me a little more please? :)

@pecigonzalo
Copy link
Author

pecigonzalo commented Oct 4, 2017

Sure thing!
Lets say i run:
./bin/ecs-exporter --aws.region="${AWS_REGION}" --aws.cluster-filter="${SOME_CLUSTER}"

The exporter still requires us to use

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "",
            "Effect": "Allow",
            "Action": [
                "ecs:ListServices",
                "ecs:ListContainerInstances",
                "ecs:ListClusters",
                "ecs:DescribeServices",
                "ecs:DescribeContainerInstances",
                "ecs:DescribeClusters"
            ],
            "Resource": "*"
        }
    ]
}

When it knows the cluster and the regions, so it should be able to run without ecs:ListClusters and it should not run the describe/list on all cluster.
This also applies to the "Resource": "*" definition, if try to use a smaller scope it will fail due to how it performs the lookup.

My main concern here is to prevent ecs-exporter from accessing other clusters. Hope this is more clear now.

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

No branches or pull requests

2 participants