Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(deployment): FSS Deployment tool for Azure #89

Draft
wants to merge 51 commits into
base: master
Choose a base branch
from

Conversation

GeorgeDavis-TM
Copy link
Contributor

@GeorgeDavis-TM GeorgeDavis-TM commented Aug 6, 2022

FSS Deployment tool for Azure

Change Summary

  • Introduction of a FSS deployment tool for Azure subscriptions
  • The deployment tool support 3 modes of deployment -
    • geographies - 1 FSS Scanner Stack per Azure geographyGroup, Default
    • one-to-one - 1 FSS Scanner Stack per Storage Account (1:1 relationship)
    • single - Just 1 FSS Scanner Stack for all Storage Accounts (not recommended for multi-region storage accounts)

PR Checklist

Other Notes

⚠️ Recommend to merge PR #87 #88 before merging this PR.

GeorgeDavis-TM and others added 30 commits July 26, 2022 10:38
…ation

feat(post-scan action): GCP Slack notification for FSS
…ation

fix(post-scan action)!: GCP Slack notification for FSS
…ation

feat(post-scan action): GCP Teams notification for FSS
GeorgeDavis-TM and others added 20 commits July 28, 2022 09:11
…params are honored by order of inheritance and overriding, mentioned in serverless framework documentation
…ation

feat(post-scan action): GCP Slack notification for FSS
…ation

feat(post-scan action): GCP Teams notification for FSS
…ation

fix: Changing package.include and package.exclude to package.patterns
…ation

fix: Changing package.include and package.exclude to package.patterns
…e-fss/File-Storage-Security/Deployment/azure-python-deploy-to-all-existing-storage for PR to trendmicro/cloudone-filestorage-plugins
@GeorgeDavis-TM GeorgeDavis-TM marked this pull request as draft August 6, 2022 20:32
@trend-jack-c-tang trend-jack-c-tang requested review from a team and removed request for a team August 8, 2022 01:36
Copy link
Contributor

@trend-jack-c-tang trend-jack-c-tang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @GeorgeDavis-TM,
Thank you for this PR. This can help customers to protect lots of storage accounts at a time. I have few questions about the solution:

  • How long does the function take to deploy stacks for, like 10, storage accounts? Consumption function app has 10 minutes as maximal timeout, and deploying one set of stacks would take that long time. Can the deployment run in parallel? Or can we use ARM to deploy that many stacks?
  • One scanner stack for serving 50 storage stacks looks a bit aggressive to me. And some storage accounts that have higher uploading frequency would need dedicated scanner for each.
  • How to monitor the failure and recover the process from failure when deploying multiple stacks?
  • The way to configure credentials are not documented. Managed identity with a proper role would be another choice for you to refer to. By using it you won't need to configure credentials.

@GeorgeDavis-TM
Copy link
Contributor Author

GeorgeDavis-TM commented Aug 8, 2022

@jack-c-tang Thank you for your review. Please see my comments inline.

Hi @GeorgeDavis-TM, Thank you for this PR. This can help customers to protect lots of storage accounts at a time. I have few questions about the solution:

  • How long does the function take to deploy stacks for, like 10, storage accounts? Consumption function app has 10 minutes as maximal timeout, and deploying one set of stacks would take that long time. Can the deployment run in parallel? Or can we use ARM to deploy that many stacks?

This tool was designed to run in a terminal or Azure Cloud Shell, with versions for Azure functions planned for future releases when we have achieved parallelity.

Please consider this tool, an MVP attempt at implementing deployment automation for FSS Stacks in Azure. I am looking for validation of this approach. Once validated from the product team, we can design for parallel runs.

  • One scanner stack for serving 50 storage stacks looks a bit aggressive to me. And some storage accounts that have higher uploading frequency would need dedicated scanner for each.

The value is configurable in the config.json file, under cloudone.max_storage_stack_per_scanner_stack. The default is set to 50 as a maximum guideline. We can add a warning at the start of execution on rightsizing for the workload.

  • How to monitor the failure and recover the process from failure when deploying multiple stacks?

At the moment, failure of a deployment, throws an exception and exits the script. Complex handling logic can be introduced in later stages, where we are deploying multiple stacks in parallel.

  • The way to configure credentials are not documented. Managed identity with a proper role would be another choice for you to refer to. By using it you won't need to configure credentials.

At the moment, I am using an Azure registered app and secret from the same, similar to tm-fss-management.

…otification from the deployment-azure-fss branch
@trend-jack-c-tang
Copy link
Contributor

Hi @GeorgeDavis-TM ,
Sorry that I've been busy and cannot fully review this huge and rich-functional PR. In prod team Q3 OKR we have this item in the secondary priority, and this PR could be a start point for building this. Thank you for submitting this PR.

Due to resources and priority, the prod team might not be able to fully validate this solution in a short time. I tried to understand how the plugin works, but some points are still unclear to me. The deploy.sh script looks like just to deploy a function app and doesn't trigger it, so I don't get how to trigger the function. And there's no serverless template in the PR, why is there serverless deploy -s dev command in the README? It looks like it's the function app who deploys the stacks not the script, so the timeout hard limit needs to be considered. Maybe you can use premium tier which has unlimited timeout.

Do you think a short demo video clip can help us understand it quickly? If you have run some tests, like the number of storage accounts you've protected by this plugin, that would also be helpful. Thanks.

@GeorgeDavis-TM
Copy link
Contributor Author

Hi @GeorgeDavis-TM , Sorry that I've been busy and cannot fully review this huge and rich-functional PR. In prod team Q3 OKR we have this item in the secondary priority, and this PR could be a start point for building this. Thank you for submitting this PR.

Due to resources and priority, the prod team might not be able to fully validate this solution in a short time. I tried to understand how the plugin works, but some points are still unclear to me. The deploy.sh script looks like just to deploy a function app and doesn't trigger it, so I don't get how to trigger the function. And there's no serverless template in the PR, why is there serverless deploy -s dev command in the README? It looks like it's the function app who deploys the stacks not the script, so the timeout hard limit needs to be considered. Maybe you can use premium tier which has unlimited timeout.

Do you think a short demo video clip can help us understand it quickly? If you have run some tests, like the number of storage accounts you've protected by this plugin, that would also be helpful. Thanks.

I will work on updating the README and get back to you for review. Thank you for your feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants