Skip to content

Commit 1205126

Browse files
fix: SFI issue fixes
2 parents 49c45bb + 5cb1c09 commit 1205126

3 files changed

Lines changed: 1729 additions & 330 deletions

File tree

infra/main.bicep

Lines changed: 64 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -476,12 +476,71 @@ module jumpboxVM 'br/public:avm/res/compute/virtual-machine:0.21.0' = if (deploy
476476
}
477477
}
478478
encryptionAtHost: false // Some Azure subscriptions do not support encryption at host
479+
extensionMonitoringAgentConfig: {
480+
enabled: enableMonitoring
481+
dataCollectionRuleAssociations: enableMonitoring ? [
482+
{
483+
name: 'dcra-${jumpboxVmName}'
484+
dataCollectionRuleResourceId: jumpboxDcr!.outputs.resourceId
485+
description: 'Associates the Windows security event DCR with the jumpbox VM.'
486+
}
487+
] : []
488+
}
479489
location: solutionLocation
480490
tags: tags
481491
}
482-
dependsOn: (enableMonitoring && !useExistingLogAnalytics) ? [logAnalyticsWorkspace] : []
492+
dependsOn: (enableMonitoring && !useExistingLogAnalytics) ? [logAnalyticsWorkspace, jumpboxDcr] : (enableMonitoring ? [jumpboxDcr] : [])
483493
}
484494

495+
// ========== Data Collection Rule for Jumpbox Security Event Logs (SFI-AzTBv17) ========== //
496+
var jumpboxDcrName = take('dcr-${jumpboxVmName}', 64)
497+
module jumpboxDcr 'br/public:avm/res/insights/data-collection-rule:0.11.0' = if (deployAdminAccessResources && enableMonitoring) {
498+
name: take('avm.res.insights.data-collection-rule.${jumpboxDcrName}', 64)
499+
params: {
500+
name: jumpboxDcrName
501+
location: solutionLocation
502+
tags: tags
503+
enableTelemetry: enableTelemetry
504+
dataCollectionRuleProperties: {
505+
kind: 'Windows'
506+
description: 'Collects Windows Security audit success/failure events from jumpbox VM (SFI-AzTBv17 compliance).'
507+
dataSources: {
508+
windowsEventLogs: [
509+
{
510+
name: 'securityEventLogsDataSource'
511+
streams: [
512+
'Microsoft-SecurityEvent'
513+
]
514+
xPathQueries: [
515+
'Security!*[System[(band(Keywords,13510798882111488))]]'
516+
]
517+
}
518+
]
519+
}
520+
destinations: {
521+
logAnalytics: [
522+
{
523+
name: 'laDestination'
524+
workspaceResourceId: logAnalyticsWorkspaceResourceId
525+
}
526+
]
527+
}
528+
dataFlows: [
529+
{
530+
streams: [
531+
'Microsoft-SecurityEvent'
532+
]
533+
destinations: [
534+
'laDestination'
535+
]
536+
}
537+
]
538+
}
539+
}
540+
}
541+
542+
543+
485544
// ========== Private DNS Zones ========== //
486545
// Only create DNS zones for resources that need private endpoints:
487546
// - Cognitive Services (for AI Services)
@@ -685,12 +744,8 @@ module aiSearch 'br/public:avm/res/search/search-service:0.12.0' = {
685744
partitionCount: 1
686745
hostingMode: 'Default'
687746
semanticSearch: 'free'
688-
authOptions: {
689-
aadOrApiKey: {
690-
aadAuthFailureMode: 'http401WithBearerChallenge'
691-
}
692-
}
693-
disableLocalAuth: false
747+
managedIdentities: { systemAssigned: true }
748+
disableLocalAuth: true
694749
roleAssignments: [
695750
{
696751
principalId: userAssignedIdentity.outputs.principalId
@@ -722,6 +777,7 @@ module storageAccount 'br/public:avm/res/storage/storage-account:0.32.0' = {
722777
skuName: enableRedundancy ? 'Standard_ZRS' : 'Standard_LRS'
723778
managedIdentities: { systemAssigned: true }
724779
minimumTlsVersion: 'TLS1_2'
780+
requireInfrastructureEncryption: true
725781
enableTelemetry: enableTelemetry
726782
tags: tags
727783
accessTier: 'Hot'
@@ -938,6 +994,7 @@ module webSite 'modules/web-sites.bicep' = {
938994
diagnosticSettings: enableMonitoring ? [{ workspaceResourceId: logAnalyticsWorkspaceResourceId }] : null
939995
vnetRouteAllEnabled: enablePrivateNetworking
940996
vnetImagePullEnabled: enablePrivateNetworking
997+
e2eEncryptionEnabled: true
941998
publicNetworkAccess: 'Enabled'
942999
}
9431000
}

0 commit comments

Comments
 (0)