Description
Once upon a time, there was only AWS. The realm of Scout was dominated by this provider only, and as it grew bigger, jealous grew the other providers. GCP was then given a piece of land. GCP, receiving a lot of attention from the Supreme Beings of Scout, was making Azure jealous. And so Azure was given a piece of land. Even though it seemed like the providers were happily cohabiting, the Supreme Beings knew something was not right.
And this is why we need to refactor the providers' architecture. Basically, there is a whole lot of provider-checking conditions, which is a huge code smell. There is already a provider model in place, but a lot of attributes should be bubbled up to the generic provider class, and some others should be pushed down to their respective provider. Basically, we should take advantage of polymorphism.
List of tasks
Services to migrate
AWS
-
Lambdas (WIP - Refactoring/aws lambda config #199) -
CloudFormation (Refactoring/aws/cloudformation #216) -
CloudTrail (Refactoring/aws/cloudtrail #219) -
CloudWatch (Refactoring/aws/cloudwatch #221) -
DirectConnect (Refactoring/aws/directconnect #222) -
EC2 (EC2 migration to the new architecture #202) -
EFS (Refactoring/aws/efs #227) -
ElastiCache (Refactoring/aws/elasticache #245) -
ELB (Refactoring/aws/elb #257) -
ELBv2 (Refactoring/aws/elbv2 #259 ) -
EMR (Refactoring/aws/emr #248) -
IAM (Refactoring/aws/iam #264) -
RDS (Refactoring/aws/rds #271 ) -
RedShift (Refactoring/aws/redshift #261) -
Route53 (Refactoring/aws/route53 #267) -
S3 (Refactoring/aws/s3 #270) -
SES (Refactoring/aws/ses #269) -
SNS (Refactoring/aws/sns #265) -
SQS (Refactoring/aws/sqs #262) -
VPC (Refactoring/aws/vpc #273) -
Config (Integrated new config service implementation #272 and https://github.com/nccgroup/ScoutSuite-Proprietary/pull/115) -
DynamoDb (Refactoring/aws/dynamodb #274 and https://github.com/nccgroup/ScoutSuite-Proprietary/pull/115) -
KMS (Refactoring/aws/kms #280) -
Cleanmetadata.json
Azure
-
App Gateway (https://github.com/nccgroup/ScoutSuite-Proprietary/pull/109) -
App Service (https://github.com/nccgroup/ScoutSuite-Proprietary/pull/110) -
Key Vault (Refactoring/azure/keyvault #239) -
Load Balancer (https://github.com/nccgroup/ScoutSuite-Proprietary/pull/111#event-2195042800) -
Monitor (Refactoring/azure/monitor #236) -
Network (Refactoring/azure/network #242) -
Redis Cache (https://github.com/nccgroup/ScoutSuite-Proprietary/pull/112#event-2195042800) -
Security Center (Refactoring/azure/securitycenter #243) -
SQL Database (Refactoring/azure/sqldatabase #214) -
Storage Accounts (Refactoring/azure/storageaccounts #235)
GCP
-
CloudResourcesManager (Refactoring/gcp/cloudresourcemanager #231) -
CloudSQL (Refactoring/gcp/cloudsql #232) -
CloudStorage (Refactoring/gcp/cloudstorage #304) -
ComputeEngine (Refactoring/gcp/gce #319) -
IAM (Refactoring/gcp/iam #230) -
KubernetesEngine -
StackDiverLogging (Refactoring/gcp/stackdriverlogging #229) -
StackDriverMonitoring (currently has no logic)
Documentation
- Document the architecture in the wiki (a few figures would also come a long way)
- Document [at a high level] how to add a provider
- Document how to add a service for AWS
- Document how to add a service for Azure
- Document how to add a service for GCP
- Write docstrings for the classes and methods involved in the implementation of a new service
Other
-
Ensure that the old logging system works or implement a new one (moved to issue Fetch all logging #283 ) - Go through all the todos we left
- Ensure that the performance is still acceptable, if not better
- [Re-]implement functionality that allows throttling API calls (similar to the current
--threads
). This is necessary as sometimes you need to run Scout while making sure it doesn't affect the call quota - Explicitly deprecate python < 2.x