Giter VIP home page Giter VIP logo

mousetrap's People

Contributors

amitlt avatar dependabot[bot] avatar omer-dolev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

omerdolev

mousetrap's Issues

[FEATURE] Support S3 event notifications

Problem:
I'm going to implement the next scenario. When a new file uploaded to S3 bucket it should be checked by AV. S3 event notifications can send messages to a SQS notification queue, but format of a message is different than mousetrap expected.

Suggested solution::
Add extra validation for message what expected S3 message pattern: "eventSource": "aws:s3"

Example of S3 message:

{
    "Records": [
        {
            "eventVersion": "2.1",
            "eventSource": "aws:s3",
            "awsRegion": "us-east-1",
            "eventTime": "2020-11-15T17:03:43.718Z",
            "eventName": "ObjectCreated:Put",
            "userIdentity": {
                "principalId": "AWS:xxx"
            },
            "requestParameters": {
                "sourceIPAddress": "4.79.40.174"
            },
            "responseElements": {
                "x-amz-request-id": "7F3CBD63501C6716",
                "x-amz-id-2": "IETQzK13GB6UwPKyHVA20DqxsSHOVy9O5jtPronMbykSLJzErxPghyzGbKmeQnZ7vfBHXoe1Y2JFcSfjlI5hmq1z6S3JBO2M"
            },
            "s3": {
                "s3SchemaVersion": "1.0",
                "configurationId": "eugene-av",
                "bucket": {
                    "name": "eugene-av",
                    "ownerIdentity": {
                        "principalId": "A277FPSBMIAL09"
                    },
                    "arn": "arn:aws:s3:::eugene-av"
                },
                "object": {
                    "key": "photo_2020-10-29_19-20-49.jpg",
                    "size": 30573,
                    "eTag": "f9ee8886f30bd40963d327ef2d81a1f3",
                    "sequencer": "005FB15F7536F961A3"
                }
            }
        }
    ]
}

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.