You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add resource prefix for safe secret standard alerts (Azure#40028)
Add the prefix to identify RGs that we are creating in our TME
tenant to identify them as potentially using local auth and violating
our safe secret standards.
Co-authored-by: Wes Haggard <Wes.Haggard@microsoft.com>
Copy file name to clipboardexpand all lines: eng/common/TestResources/New-TestResources.ps1
+12
Original file line number
Diff line number
Diff line change
@@ -194,6 +194,18 @@ try {
194
194
-serviceDirectoryName $serviceName`
195
195
-CI $CI
196
196
197
+
if ($wellKnownTMETenants.Contains($TenantId)) {
198
+
# Add a prefix to the resource group name to avoid flagging the usages of local auth
199
+
# See details at https://eng.ms/docs/products/onecert-certificates-key-vault-and-dsms/key-vault-dsms/certandsecretmngmt/credfreefaqs#how-can-i-disable-s360-reporting-when-testing-customer-facing-3p-features-that-depend-on-use-of-unsafe-local-auth
200
+
$ResourceGroupName="SSS3PT_"+$ResourceGroupName
201
+
}
202
+
203
+
if ($ResourceGroupName.Length-gt90) {
204
+
# See limits at https://docs.microsoft.com/azure/architecture/best-practices/resource-naming
205
+
Write-Warning-Message "Resource group name '$ResourceGroupName' is too long. So pruning it to be the first 90 characters."
0 commit comments