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

Enable Azure Security Center in MLZ subscriptions #55

Merged
merged 20 commits into from
Mar 9, 2021
Merged

Conversation

Phydeauxman
Copy link
Contributor

Description

Code enables Azure Security Center with configurations below on each sub used for the MLZ deployment:

  • Sets VirtualMachines to Standard
  • Sets StorageAccounts to Standard
  • Creates Log Analytics workspace
  • Configures ASC to use the workspace as the default
  • Enables auto-provisioning

Issue reference

The issue this PR will close: #7

@glennmusa
Copy link
Contributor

glennmusa commented Mar 3, 2021

The Pull Request could use a better title, it's what makes it into the history (see below for examples). Looks like this is "add ability to enable Azure Security Center"?

image

scripts/configure_asc.sh Outdated Show resolved Hide resolved
scripts/configure_asc.sh Outdated Show resolved Hide resolved
@@ -0,0 +1,126 @@
#!/bin/bash
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this deserves it's own folder to house all the things it's doing:

└──src
  └──scripts
    └──security-center
      └──generate_asc_names.sh
      └──configure_asc.sh
      └──remove_asc.sh # eventually creating this script
    └──config

scripts/configure_asc.sh Outdated Show resolved Hide resolved
src/provider_archive/unzipprovider.sh Show resolved Hide resolved
scripts/mlz_tf_setup.sh Outdated Show resolved Hide resolved
scripts/configure_asc.sh Outdated Show resolved Hide resolved
scripts/mlz_tf_setup.sh Outdated Show resolved Hide resolved
Copy link
Contributor

@brooke-hamilton brooke-hamilton left a comment

Choose a reason for hiding this comment

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

This PR has conflicts in two files. Are you planning to replace the existing files with your changes, i.e. should I review them as-is, or should I wait for you to fix the conflicts?
scripts/mlz_config_validate.sh
scripts/mlz_tf_setup.sh

@Phydeauxman Phydeauxman changed the title Byboudre/asc Enable Azure Security Center in MLZ subscriptions Mar 3, 2021
Phydeauxman and others added 5 commits March 3, 2021 19:58
- Copied generate_names.sh script into ASC folder
- Updated naming in asc script
- Added ASC naming to generate script
- Moved generate names call into loop
- Updated wait loop to use variables
scripts/security-center/configure_asc.sh Outdated Show resolved Hide resolved
scripts/security-center/configure_asc.sh Outdated Show resolved Hide resolved
scripts/security-center/configure_asc.sh Outdated Show resolved Hide resolved
scripts/security-center/configure_asc.sh Outdated Show resolved Hide resolved
scripts/security-center/generate_names.sh Outdated Show resolved Hide resolved
@Phydeauxman Phydeauxman merged commit 031d896 into main Mar 9, 2021
@Phydeauxman Phydeauxman deleted the byboudre/asc branch March 9, 2021 19:22
Breanna-Stryker added a commit that referenced this pull request Mar 11, 2021
* add the shellcheck extension to the devcontainer (#70)

Co-authored-by: Glenn Musa <glennmusa@users.noreply.github.com>

* Enable Azure Security Center in MLZ subscriptions (#55)

* Updated documentation in script

* - Added execution flag to shell scripts
- Added configure_asc.sh script
- Added code to create subs array to mlz_tf_setup.sh
- Added code to call configure_asc.sh from mlz_tf_setup.sh

* - Added executable flag to unzipprovider.sh script

* - Added executable flag to check scripts

* - Updated loop code for workspace setting

* - Created folder for ASC scripts
- Copied generate_names.sh script into ASC folder

* - Removed ASC calling code from setup script
- Updated naming in asc script
- Added ASC naming to generate script

* - Moved LAWS name generation into generate names
- Moved generate names call into loop
- Updated wait loop to use variables

* - Removed message for elapsed time
- Added quotes consistently for echo's

* - Updated Copyright statement
- Added set -e
- Modified variables to use env & location from vars file

* - Corrected counter logic
- Corrected description in names script

* output number of attempts remaining

* add a comment that this may fail

* - Removed creater comment

* unusually typo

Co-authored-by: Glenn Musa <glennmusa@users.noreply.github.com>

Co-authored-by: Glenn Musa <4622125+glennmusa@users.noreply.github.com>
Co-authored-by: Glenn Musa <glennmusa@users.noreply.github.com>
Co-authored-by: Byron Boudreaux <16844071+Phydeauxman@users.noreply.github.com>
Breanna-Stryker added a commit that referenced this pull request Mar 19, 2021
* add the shellcheck extension to the devcontainer (#70)

Co-authored-by: Glenn Musa <glennmusa@users.noreply.github.com>

* Enable Azure Security Center in MLZ subscriptions (#55)

* Updated documentation in script

* - Added execution flag to shell scripts
- Added configure_asc.sh script
- Added code to create subs array to mlz_tf_setup.sh
- Added code to call configure_asc.sh from mlz_tf_setup.sh

* - Added executable flag to unzipprovider.sh script

* - Added executable flag to check scripts

* - Updated loop code for workspace setting

* - Created folder for ASC scripts
- Copied generate_names.sh script into ASC folder

* - Removed ASC calling code from setup script
- Updated naming in asc script
- Added ASC naming to generate script

* - Moved LAWS name generation into generate names
- Moved generate names call into loop
- Updated wait loop to use variables

* - Removed message for elapsed time
- Added quotes consistently for echo's

* - Updated Copyright statement
- Added set -e
- Modified variables to use env & location from vars file

* - Corrected counter logic
- Corrected description in names script

* output number of attempts remaining

* add a comment that this may fail

* - Removed creater comment

* unusually typo

Co-authored-by: Glenn Musa <glennmusa@users.noreply.github.com>

* Add persona and business justification to the Issue template (#73)

* issue template update

* Implement error handling into shell scripts (#72)

* - Added error handling to configure_asc script
- Suppressed "create" output in configure_asc script

* - Added error handling to config_create script
- Remove commented lines from configure_asc script

* - Added error handling to config_validate script

* - Added error handling to get_sp_identity script
- Corrected SP lookup

* - Added error handling to mlz_config_create script

* - Updated echo lines

* Implement Sub ID array for Role assignment (#76)

* - Updated bullet numbering in README
- Added code to create sub id array

* - Reverted numbering changes made to README.md

* - Added description of sed command

* - Added parameter to suppress WARNING on sp create

* Remove providers (#84)

* use azurerm 2.50 in src/core

* removing provider files

* updates to readme and scripts for local providers

* set tf provider folder

Co-authored-by: Glenn Musa <glennmusa@users.noreply.github.com>

* unique diagnostic settings names (#82)

Co-authored-by: Glenn Musa <glennmusa@users.noreply.github.com>

* move scripts to src/scripts (#87)

* add a workflow for apply and destroy terraform (#83)

* add retries for apply and destroy

* update readmes

Co-authored-by: Glenn Musa <4622125+glennmusa@users.noreply.github.com>
Co-authored-by: Glenn Musa <glennmusa@users.noreply.github.com>
Co-authored-by: Byron Boudreaux <16844071+Phydeauxman@users.noreply.github.com>
Co-authored-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
Co-authored-by: Breanna-Stryker <>
jwaltireland pushed a commit to ARPA-H/AzureMissionLZ that referenced this pull request Nov 14, 2024
* Updated documentation in script

* - Added execution flag to shell scripts
- Added configure_asc.sh script
- Added code to create subs array to mlz_tf_setup.sh
- Added code to call configure_asc.sh from mlz_tf_setup.sh

* - Added executable flag to unzipprovider.sh script

* - Added executable flag to check scripts

* - Updated loop code for workspace setting

* - Created folder for ASC scripts
- Copied generate_names.sh script into ASC folder

* - Removed ASC calling code from setup script
- Updated naming in asc script
- Added ASC naming to generate script

* - Moved LAWS name generation into generate names
- Moved generate names call into loop
- Updated wait loop to use variables

* - Removed message for elapsed time
- Added quotes consistently for echo's

* - Updated Copyright statement
- Added set -e
- Modified variables to use env & location from vars file

* - Corrected counter logic
- Corrected description in names script

* output number of attempts remaining

* add a comment that this may fail

* - Removed creater comment

* unusually typo

Co-authored-by: Glenn Musa <glennmusa@users.noreply.github.com>
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.

Azure Security Center on every sub
3 participants