-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Align custom role definitions to CAF (#138)
* Align custom roles to CAF recommendations * Ensure custom roles are created through roles CI * Add branch config for testing * Update pipeline step name * Add role description * Update role description * Remove branch config
- Loading branch information
1 parent
bfbd761
commit 7ea0e90
Showing
6 changed files
with
124 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// ---------------------------------------------------------------------------------- | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
// | ||
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, | ||
// EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES | ||
// OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. | ||
// ---------------------------------------------------------------------------------- | ||
|
||
targetScope = 'managementGroup' | ||
|
||
@description('Management Group Id for assignable scope.') | ||
param assignableMgId string | ||
|
||
var scope = tenantResourceId('Microsoft.Management/managementGroups', assignableMgId) | ||
var roleName = 'Custom - Network Operations (NetOps)' | ||
var roleDescription = 'Platform-wide global connectivity management: virtual networks, UDRs, NSGs, NVAs, VPN, Azure ExpressRoute, and others.' | ||
|
||
// Telemetry - Azure customer usage attribution | ||
// Reference: https://docs.microsoft.com/azure/marketplace/azure-partner-customer-usage-attribution | ||
var telemetry = json(loadTextContent('../config/telemetry.json')) | ||
module telemetryCustomerUsageAttribution '../azresources/telemetry/customer-usage-attribution-management-group.bicep' = if (telemetry.customerUsageAttribution.enabled) { | ||
name: 'pid-${telemetry.customerUsageAttribution.modules.roles}' | ||
} | ||
|
||
// Reference: https://docs.microsoft.com/azure/cloud-adoption-framework/ready/landing-zone/design-area/identity-access | ||
resource roleDefn 'Microsoft.Authorization/roleDefinitions@2018-01-01-preview' = { | ||
name: guid(roleName) | ||
scope: managementGroup() | ||
properties: { | ||
roleName: roleName | ||
description: roleDescription | ||
permissions: [ | ||
{ | ||
actions: [ | ||
'*/read' | ||
'Microsoft.Network/*' | ||
'Microsoft.Resources/deployments/*' | ||
'Microsoft.Support/*' | ||
] | ||
notActions: [] | ||
dataActions: [] | ||
notDataActions: [] | ||
} | ||
] | ||
assignableScopes: [ | ||
scope | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// ---------------------------------------------------------------------------------- | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
// | ||
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, | ||
// EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES | ||
// OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. | ||
// ---------------------------------------------------------------------------------- | ||
|
||
targetScope = 'managementGroup' | ||
|
||
@description('Management Group Id for assignable scope.') | ||
param assignableMgId string | ||
|
||
var scope = tenantResourceId('Microsoft.Management/managementGroups', assignableMgId) | ||
var roleName = 'Custom - Security Operations (SecOps)' | ||
var roleDescription = 'Security Administrator role with a horizontal view across the entire Azure estate and the Azure Key Vault purge policy.' | ||
|
||
// Telemetry - Azure customer usage attribution | ||
// Reference: https://docs.microsoft.com/azure/marketplace/azure-partner-customer-usage-attribution | ||
var telemetry = json(loadTextContent('../config/telemetry.json')) | ||
module telemetryCustomerUsageAttribution '../azresources/telemetry/customer-usage-attribution-management-group.bicep' = if (telemetry.customerUsageAttribution.enabled) { | ||
name: 'pid-${telemetry.customerUsageAttribution.modules.roles}' | ||
} | ||
|
||
// Reference: https://docs.microsoft.com/azure/cloud-adoption-framework/ready/landing-zone/design-area/identity-access | ||
resource roleDefn 'Microsoft.Authorization/roleDefinitions@2018-01-01-preview' = { | ||
name: guid(roleName) | ||
scope: managementGroup() | ||
properties: { | ||
roleName: roleName | ||
description: roleDescription | ||
permissions: [ | ||
{ | ||
actions: [ | ||
'*/read' | ||
'*/register/action' | ||
'Microsoft.KeyVault/locations/deletedVaults/purge/action' | ||
'Microsoft.PolicyInsights/*' | ||
'Microsoft.Authorization/policyAssignments/*' | ||
'Microsoft.Authorization/policyDefinitions/*' | ||
'Microsoft.Authorization/policyExemptions/*' | ||
'Microsoft.Authorization/policySetDefinitions/*' | ||
'Microsoft.Insights/alertRules/*' | ||
'Microsoft.Resources/deployments/*' | ||
'Microsoft.Security/*' | ||
'Microsoft.Support/*' | ||
] | ||
notActions: [] | ||
dataActions: [] | ||
notDataActions: [] | ||
} | ||
] | ||
assignableScopes: [ | ||
scope | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters