2015-10-09 12 views
7

मैं यह समझने की कोशिश कर रहा हूं कि डेवलपर को एक विशेष ईबी वातावरण पर एक डेवलपर ईबी तैनाती, ईबी लॉग और ईबी एसएसएच देने के लिए सेट करने की आवश्यकता है। मैं इसे सेट करना चाहता हूं ताकि सभी डेवलपर्स हमारे विकास पर्यावरण पर तैनाती और डीबग कर सकें, लेकिन केवल एक ही मास्टर को तैनात और डिबग कर सकता है।लोचदार बीनस्टॉक आईएएम डेवलपर अनुमतियां

मैं यह भी लॉक करना चाहता हूं ताकि वे किसी अन्य ईसी 2-इंस्टेंस, आरडीएस-इंस्टेंस, एस 3-बाल्टी, लोड बैलेंसर्स आदि को प्रभावित न कर सकें।

क्या कोई इस के लिए आईएएम नीति (या दो ...) को एक साथ रखने में कामयाब रहा है?

उत्तर

7

लोचदार बीनस्टॉक कई एडब्ल्यूएस सेवाओं को लिखता है। आप पढ़ सकते हैं और पर्यावरण को अद्यतन करने के एडब्ल्यूएस संसाधनों के लिए उन लचीला बीनस्टॉक द्वारा किया जाता है सभी विशिष्ट अनुमति देनी होगी, जिनमें शामिल हैं:

  • CloudFormation
  • EC2
  • ऑटो स्केलिंग समूह
  • लचीला लोड बैलेंसर
  • CloudWatch
  • S3
  • एसएनएस
  • आरडीएस
  • SQS
  • लचीला बीनस्टॉक

यह IAM उपयोगकर्ता पहुँच, अद्यतन, लचीला बीनस्टॉक को तैनात हैं और ssh अनुमति देने के लिए सभी आवश्यक नीति है:

{ 
    "Version": "2012-10-17", 
    "Statement": [ 
    { 
     "Sid": "ElasticBeanstalkReadOnlyAccess", 
     "Effect": "Allow", 
     "Action": [ 
     "elasticbeanstalk:Check*", 
     "elasticbeanstalk:Describe*", 
     "elasticbeanstalk:List*", 
     "elasticbeanstalk:RequestEnvironmentInfo", 
     "elasticbeanstalk:RetrieveEnvironmentInfo", 
     "ec2:Describe*", 
     "elasticloadbalancing:Describe*", 
     "autoscaling:Describe*", 
     "cloudwatch:Describe*", 
     "cloudwatch:List*", 
     "cloudwatch:Get*", 
     "s3:Get*", 
     "s3:List*", 
     "sns:Get*", 
     "sns:List*", 
     "cloudformation:Describe*", 
     "cloudformation:Get*", 
     "cloudformation:List*", 
     "cloudformation:Validate*", 
     "cloudformation:Estimate*", 
     "rds:Describe*", 
     "sqs:Get*", 
     "sqs:List*" 
     ], 
     "Resource": "*" 
    }, 
    { 
     "Sid": "ElasticBeanstalkDeployAccess", 
     "Effect": "Allow", 
     "Action": [ 
     "autoscaling:SuspendProcesses", 
     "autoscaling:ResumeProcesses", 
     "autoscaling:UpdateAutoScalingGroup", 
     "cloudformation:UpdateStack", 
     "ec2:AuthorizeSecurityGroupIngress", 
     "ec2:RevokeSecurityGroupIngress", 
     "elasticloadbalancing:RegisterInstancesWithLoadBalancer", 
     "elasticbeanstalk:CreateStorageLocation", 
     "elasticbeanstalk:CreateApplicationVersion", 
     "elasticbeanstalk:CreateConfigurationTemplate", 
     "elasticbeanstalk:UpdateApplicationVersion", 
     "elasticbeanstalk:UpdateConfigurationTemplate", 
     "elasticbeanstalk:UpdateEnvironment", 
     "elasticbeanstalk:ValidateConfigurationSettings", 
     "s3:PutObject", 
     "s3:DeleteObject", 
     "s3:PutObjectAcl" 
     ], 
     "Resource": [ 
     "*" 
     ] 
    } 
    ] 
} 

ऊपर दी गई नीति IAM उपयोगकर्ताओं अनुमति देने के लिए है पढ़ने के लिए केवल और तैनाती केवल किसी भी लोचदार बीनस्टॉक और संबंधित सेवाओं तक पहुंच।

यदि आप उपयोगकर्ताओं को किसी विशेष AWS संसाधनों तक पहुंच प्रतिबंधित करना चाहते हैं, तो आपको अपने स्वयं के एआरएन और शर्तों को निर्दिष्ट करने की आवश्यकता है। उदाहरण के लिए:

  • arn:aws:s3:::elasticbeanstalk-us-east-1-123456789012/* (लचीला बीनस्टॉक के S3 बाल्टी) की तरह कुछ करने के लिए S3 संसाधनों को सीमित करें।
  • ईसी 2 संसाधन टैग के साथ सशर्त के रूप में (जैसे: elasticbeanstalk:environment-name)।
  • आप एआरएन पर एडब्ल्यूएस क्षेत्र भी निर्दिष्ट कर सकते हैं।
+0

धन्यवाद। मैं इसे विभिन्न अनुप्रयोगों के साथ समझने में कामयाब रहा। बक्षीस के लिए आधे अंक के लायक! – Gustaf

0

यहां बताया गया है कि आप इसका उपयोग कैसे कर सकते हैं। यह कोई सही नहीं था, लेकिन आपके पास कुछ विचार हैं कि आप इसका उपयोग कैसे कर सकते हैं। इसे कम करने के लिए स्पष्ट रूप से और कुछ है, लेकिन इस समय मेरे लिए यह पर्याप्त है।

पहला खंड वे वास्तव में कोई नुकसान नहीं कर सकते हैं इसलिए मैंने उन्हें अब तक पूर्ण पहुंच प्राप्त करने दी है। (मुझे एस 3 और दानेदार करना चाहिए)

मुझे elasticloadbalancing की आवश्यकता है: DeregisterInstancesFromLoadBalancer इसलिए मैंने जोड़ा ताकि यह टीम केवल यूरोप क्षेत्र में इसका उपयोग कर सके। यह अभी ठीक है क्योंकि वे केवल वहां हैं।

तीसरा और चौथा अनुभाग मेरे दो लोचदार बीनस्टॉक ऐप्स के लिए है, जिनके पास पहुंच होनी चाहिए।

{ 
    "Version": "2012-10-17", 
    "Statement": [ 
     { 
      "Effect": "Allow", 
      "Action": [ 
       "ec2:Describe*", 
       "elasticloadbalancing:Describe*", 
       "autoscaling:Describe*", 
       "cloudwatch:Describe*", 
       "cloudwatch:List*", 
       "cloudwatch:Get*", 
       "s3:Get*", 
       "s3:List*", 
       "sns:Get*", 
       "sns:List*", 
       "cloudformation:Describe*", 
       "cloudformation:Get*", 
       "cloudformation:List*", 
       "cloudformation:Validate*", 
       "cloudformation:Estimate*", 
       "rds:Describe*", 
       "elasticbeanstalk:CreateStorageLocation", 
       "sqs:Get*", 
       "sqs:List*", 
       "autoscaling:SuspendProcesses", 
       "autoscaling:ResumeProcesses", 
       "autoscaling:UpdateAutoScalingGroup", 
       "autoscaling:DescribeAutoScalingGroups", 
       "cloudformation:UpdateStack", 
       "cloudformation:DescribeStacks", 
       "ec2:AuthorizeSecurityGroupIngress", 
       "ec2:RevokeSecurityGroupIngress", 
       "s3:PutObject", 
       "s3:DeleteObject", 
       "s3:PutObjectAcl" 
      ], 
      "Resource": [ 
       "*" 
      ] 
     }, 
     { 
      "Effect": "Allow", 
      "Action": [ 
       "elasticloadbalancing:RegisterInstancesWithLoadBalancer", 
       "elasticloadbalancing:DeregisterInstancesFromLoadBalancer" 
      ], 
      "Resource": [ 
       "arn:aws:elasticloadbalancing:eu-west-1:12345678910:loadbalancer/*" 
      ] 
     }, 
     { 
      "Effect": "Allow", 
      "Action": [ 
       "elasticbeanstalk:Check*", 
       "elasticbeanstalk:Describe*", 
       "elasticbeanstalk:List*", 
       "elasticbeanstalk:RequestEnvironmentInfo", 
       "elasticbeanstalk:RetrieveEnvironmentInfo", 
       "elasticbeanstalk:CreateApplicationVersion", 
       "elasticbeanstalk:CreateConfigurationTemplate", 
       "elasticbeanstalk:UpdateApplicationVersion", 
       "elasticbeanstalk:UpdateConfigurationTemplate", 
       "elasticbeanstalk:UpdateEnvironment", 
       "elasticbeanstalk:DescribeEnvironmentResources", 
       "elasticbeanstalk:ValidateConfigurationSettings" 
      ], 
      "Resource": [ 
       "*" 
      ], 
      "Condition": { 
       "StringEquals": { 
        "elasticbeanstalk:InApplication": [ 
         "arn:aws:elasticbeanstalk:eu-west-1:12345678910:application/My App" 
        ] 
       } 
      } 
     }, 
     { 
      "Effect": "Allow", 
      "Action": [ 
       "elasticbeanstalk:Check*", 
       "elasticbeanstalk:Describe*", 
       "elasticbeanstalk:List*", 
       "elasticbeanstalk:RequestEnvironmentInfo", 
       "elasticbeanstalk:RetrieveEnvironmentInfo", 
       "elasticbeanstalk:CreateApplicationVersion", 
       "elasticbeanstalk:CreateConfigurationTemplate", 
       "elasticbeanstalk:UpdateApplicationVersion", 
       "elasticbeanstalk:UpdateConfigurationTemplate", 
       "elasticbeanstalk:UpdateEnvironment", 
       "elasticbeanstalk:DescribeEnvironmentResources", 
       "elasticbeanstalk:ValidateConfigurationSettings" 
      ], 
      "Resource": [ 
       "*" 
      ], 
      "Condition": { 
       "StringEquals": { 
        "elasticbeanstalk:InApplication": [ 
         "arn:aws:elasticbeanstalk:eu-west-1:12345678910:application/My Second App" 
        ] 
       } 
      } 
     } 
    ] 
} 
संबंधित मुद्दे