Skip to main content

Posts

Showing posts from October 5, 2018

Restricting a user to view only specific S3 Buckets

                          Today I came across a situation to implement vooplayer along with aws s3 bucket for uploading videos to the s3 bucket. The issue is that for integrating the voopler the IAM user should  needs  s3 admin permissions as the vooplayer itself will create an s3 bucket during the integration, name starting with "vooplayerv4- ". The issue with this is that the user have access to all the buckets and its contents. So to restrict access for this user only to the bucket which belongs to him I have created a policy with the help of AWS support and sharing the same below: {     "Version": "2012-10-17",     "Statement": [         {             "Sid": "VisualEditor0",             "Effect": "Allow",             "Action": [                 "s3:*"             ],             "Resource": [                 "arn:aws:s3:::vooplayerv4-*",              

Enabling Web Application Firewall (Modsecurity) along with NGINX

Initially remove the nginx current version using the below command,as NGINX 1.11.5 or later is required. sudo apt-get purge nginx nginx-common 1 – Install NGINX        cd /tmp/ && wget http://nginx.org/keys/nginx_signing.key        sudo apt-key add nginx_signing.key        sudo sh -c "echo 'deb http://nginx.org/packages/mainline/ubuntu/ '$(lsb_release -cs)' nginx' > /etc/apt/sources.list.d/nginx.list"        sudo apt-get remove nginx        sudo apt-get update        sudo apt install nginx=1.13.1-1~xenial        nginx -V 2 – Install Prerequisite Packages               pt-get install -y apt-utils autoconf automake build-essential git libcurl4-openssl-dev libgeoip-dev liblmdb-dev libpcre++-dev libtool libxml2-dev libyajl-dev pkgconf wget zlib1g-dev 3 – Download and Compile the ModSecurity 3.0 Source Code Clone the GitHub repository: git clone --depth 1 -b v3/master --single-branch https://github.com/SpiderLabs/ModSecurity