Giter Site home page Giter Site logo

Comments (3)

otterley avatar otterley commented on July 28, 2024

Hi Fernando,

Our practice at Segment is to grant access to Parameter Store keys on a need-to-know basis. Since our infrastructure runs almost entirely on AWS, we accomplish this through IAM policies and roles.

For example, if your service runs alone on an EC2 instance, you can associate that EC2 instance with a service role that has an IAM policy permitting access to the Parameter Store keys the service needs access to.

If, on the other hand, your service runs as an ECS task (i.e. container), you can assign an IAM role to the task comprising your service. Then, as with the EC2 example, that role would have an IAM policy attached permitting access to the Parameter Store keys used by your service.

Finally, at Segment, each environment (development, stage, production, etc.) is associated with a separate AWS Account. By default, no environment has access to the resources of any other environment, so there's no chance of cross-environment pollution unless we explicitly permit it (which is very rare).

References:

from chamber.

FernandoMiguel avatar FernandoMiguel commented on July 28, 2024

I see how you secure it.
I was thinking of the separation of services.
while coding this into terraform, i ended up with something like this to limited based on attached policies

statement {
    sid = "SSMGetParameters"

    actions = [
      "ssm:GetParameters",
    ]

    resources = [
      "arn:aws:ssm:${var.region}:${var.AccountID}:parameter/prod.app1.*",
      "arn:aws:ssm:${var.region}:${var.AccountID}:parameter/general.license-code",
    ]
  }

from chamber.

FernandoMiguel avatar FernandoMiguel commented on July 28, 2024

a bigger sample here
https://aws.amazon.com/blogs/compute/managing-secrets-for-amazon-ecs-applications-using-parameter-store-and-iam-roles-for-tasks/

from chamber.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.