cisagov / ScubaGear

Automation to assess the state of your M365 tenant against CISA's baselines
https://www.cisa.gov/resources-tools/services/secure-cloud-business-applications-scuba-project
Creative Commons Zero v1.0 Universal
1.79k stars 230 forks source link

Update product name from Azure AD to Microsoft Entra ID in baseline identifiers and all source code references #888

Open schrolla opened 10 months ago

schrolla commented 10 months ago

đź’ˇ Summary

Microsoft has changed the name of its Azure Active Directory (Azure AD) service to Entra ID. The Azure AD (and other M365) baselines still use the old name. The uses of the product name need to be changed, both in the baseline(s) and ScubaGear tool reporting. Essentially, anywhere that the tool uses "Azure AD", "AAD", or refers to capabilities that now fall under the Entra/Entra ID product should be updated to use the new name. The old names can still be referenced in the baseline to help users through the transition.

Motivation and context

Going forward, the baselines should reference the product by the name the vendor is using and will continue to use in current and future documentation to prevent user confusion.

Implementation notes

Please provide details for implementation, such as:

Acceptance criteria

How do we know when this work is done?

schrolla commented 10 months ago

@gdasher

Written base issue above, but several questions to be decided for scope:

  1. Does the name change force a policy ID update from MS.AAD to something like MS.ENTRAID? This means that AAD policy variables would also change name in the code.
  2. Do we want to update the ProductNames parameter to take the old aad, a new entraid, or both?

The answers to the above, particularly if yes, could expand the level of effort required to implement.

gdasher commented 9 months ago

On 1: no, i think we can keep the policy ids the same to reduce churn.

On 2: I am indifferent. Given decision to keep policy names unchanged, i lean towards leaving this as aad and adding an alias for entraid to the productnames param to support it too.

worldsdream commented 9 months ago

The official name is “Microsoft Entra ID” and not “Entra ID”. While we all understand Entra ID, but it’s not the correct naming. So if you are going to update (what every script or vendor should), then please us “Microsoft Entra ID”.

schrolla commented 9 months ago

Focus on baseline prose updates that do not affect code base at this time. Also update HTML report display name.

Leave remainder (code changes, file name changes, etc) as a TODO in separate issues.

tkol2022 commented 9 months ago

921 has been created to cover the cosmetic changes to the AAD baseline prose. I am removing it from this issue.

buidav commented 9 months ago

Impact Analysis/Steps to renaming Azure Active Directory to Microsoft Entra ID within ScubaGear

[!Note] This impact analysis is an all or nothing renaming from Azure AD to Entra ID. Maintaining the old AAD policy identifiers would make this refactor much harder.

1. Using VSCode or another text editor Find and replace all instances of AAD to Entra ID using the mapping below.

2. For ScubaGear to function rename the following files.

Note that I was able to do the steps 1 and 2 above and generate a HTML report from ScubaGear within 10 minutes with Invoke-SCuBA -ProductNames 'entraid'

Screenshot 2024-02-19 172608

Note that the conditional access policy name containing AAD is from the tenant itself.

3. To track down renaming the other files in the various test suites use the following handy line of code

Get-ChildItem -Path './' -Recurse -File |
    Where-Object { $_.Name -match 'AAD' } |
    Rename-Item -NewName { $_.Name -replace 'AAD', 'EntraID' }

4. Rename the services for example Conditional Access" to "Microsoft Entra Conditional Access" within the newly renamed Entra ID markdown document.

5. Clean up by hunting down lingering references of AAD to rename to Azure AD.

This could take a while is this is essentially our sanity check to see if we've fully renamed everything.

My recommendation is to do the full renaming from AAD to Entra ID. Due to our diligence in keeping the AAD, Azure AD naming consistent the name change is easy to do within ScubaGear itself. Our test suites can confirm if anything has gone awry or if we've missed something.

See example refactor in the example-entra-refactor branch for a working version of ScubaGear with the Entra ID name.

Additional consideration is that ScubaGear executes the products in "alphabetical order" with our shortened version of the ProductNames. Renaming aad => entraid will cause entra to execute after defender. This has no impact on our results except the ordering.

[!WARNING] Switching over to the Entra name makes a large number of changes across files multiple files. Will heavily conflict with ongoing PRs as a result.

ahuynhMITRE commented 5 months ago

@buidav reassigning this issue to you for better clarity since you have been working on the related code fixes and #921 is scoped more on the baseline changes