Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Ability to specify IAM role for worker #63

Open
vlad-ro opened this issue Aug 22, 2018 · 2 comments
Open

Ability to specify IAM role for worker #63

vlad-ro opened this issue Aug 22, 2018 · 2 comments

Comments

@vlad-ro
Copy link

vlad-ro commented Aug 22, 2018

We are using Concourse to pull and push images from/to AWS ECR.
To make this work we have to specify AWS credentials for any time we access the repo.

We want to be able to setup an IAM role assigned to workers that would give it access to ECR. Therole policy would look like this:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "sts:AssumeRole"
            ],
            "Resource": "*"
        },
        {
            "Effect": "Allow",
            "Action": [
                "ecs:CreateCluster",
                "ecs:DeregisterContainerInstance",
                "ecs:DiscoverPollEndpoint",
                "ecs:Poll",
                "ecs:RegisterContainerInstance",
                "ecs:StartTelemetrySession",
                "ecs:Submit*",
                "ecr:GetAuthorizationToken",
                "ecr:GetDownloadUrlForLayer",
                "ecr:BatchGetImage",
                "ecr:BatchCheckLayerAvailability",
                "s3:GetObject",
                "logs:CreateLogStream",
                "logs:PutLogEvents"
            ],
            "Resource": "*"
        }
    ]
}
@DanielJonesEB
Copy link
Contributor

Hi @vlad-ro,

I'm not familiar with how ECR validates the identity of a worker. Would this work given that tasks and puts run in containers?

@vlad-ro
Copy link
Author

vlad-ro commented Aug 23, 2018

Here is some sample code for how this might look: https://github.com/vlad-ro/concourse-up/commit/00689f80c69901f26b5cc1153c1ae07ef3622ad6
Unfortunately I haven't had a chance to test it. However we are using a similar approach with Concourse deployed on AWS ECS where even Concourse itself runs in a container!

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

No branches or pull requests

3 participants