Git Product home page Git Product logo

Comments (5)

defvol avatar defvol commented on September 26, 2024

Started w some basic layout here 5a60a32

from deprecated-patrol-rules-aws.

ianshward avatar ianshward commented on September 26, 2024

Looking 👌 @rodowi. In case you hadn't seen it yet, once you add S3 store, you can add the IAM permissions needed for that via the statements property in the rule. This is discussed briefly in the [rule spec](https://github.com/mapbox/lambda-cfn/blob/master/RULE-SPEC.md and there's an example of it in this security-group auditing rule PR https://github.com/mapbox/patrol-rules-aws/pull/50/files#diff-9d1601b3d15acbe65755888f9e351821R13

from deprecated-patrol-rules-aws.

defvol avatar defvol commented on September 26, 2024

awesome!

in this case, we would want to s3 permissions on a specific bucket, could this be a Ref to one of the Parameters defined before:

see deviceHistory:

  name: 'loginFromNewDevice',
  sourcePath: 'rules/loginFromNewDevice.js',
  parameters: {
    deviceHistory: {
      Type: 'String',
      Description: 'ARN of S3 bucket for storing a list of known devices'
    }
  },
  statements: [
    {
      Effect: 'Allow',
      Action: [
        's3:GetObject'
      ],
      Resource: { 'Ref': 'deviceHistory' }
    }
  ],

from deprecated-patrol-rules-aws.

ianshward avatar ianshward commented on September 26, 2024

Resource: { 'Ref': 'deviceHistory' }

I believe that will work. Here's the relevant code in lambda-cfn which handles interpreting the statements https://github.com/mapbox/lambda-cfn/blob/2dc4d70924fa50cf2369705aee7b4c4b75ddfcc6/lib/lambda-cfn.js#L928-L954

from deprecated-patrol-rules-aws.

ianshward avatar ianshward commented on September 26, 2024

@zmully will deviceHistory get namespaced (prefixed) with loginFromNewDevice ?

from deprecated-patrol-rules-aws.

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.