diff --git a/.github/workflows/markdown-lint.yml b/.github/workflows/markdown-lint.yml index abd42ded07..0475925d25 100644 --- a/.github/workflows/markdown-lint.yml +++ b/.github/workflows/markdown-lint.yml @@ -62,3 +62,6 @@ jobs: env: pnpm_config_ignore_scripts: 'true' run: git ls-files -z '*.md' | xargs -0 -r pnpm dlx markdownlint-cli@0.45.0 -- + + - name: Check Azure ARM documentation assets + run: python3 permissions/templates/azure/bicep/sync_docs_template.py --check diff --git a/docs/assets/templates/azure/prowler-scan.json b/docs/assets/templates/azure/prowler-scan.json index deb9b5ee19..285d02bc7f 100644 --- a/docs/assets/templates/azure/prowler-scan.json +++ b/docs/assets/templates/azure/prowler-scan.json @@ -5,7 +5,7 @@ "_generator": { "name": "bicep", "version": "0.46.1.21595", - "templateHash": "4092263301802395344" + "templateHash": "16146816613430830317" } }, "parameters": { @@ -19,7 +19,7 @@ "type": "string", "defaultValue": "Prowler", "metadata": { - "description": "Cosmetic label used inside the role assignment names so multiple deployments do not collide. Free text; keep the default unless you need to distinguish multiple Prowler deployments." + "description": "Cosmetic label included in the custom role description. Free text; keep the default unless you need to distinguish multiple Prowler deployments." } }, "customRoleName": { @@ -41,7 +41,7 @@ "name": "[variables('customRoleDefinitionName')]", "properties": { "roleName": "[parameters('customRoleName')]", - "description": "Role used by Prowler for checks that require Azure actions beyond the built-in Reader role.", + "description": "[format('Role used by {0} for Prowler checks that require Azure actions beyond the built-in Reader role.', parameters('deploymentLabel'))]", "type": "CustomRole", "assignableScopes": [ "[subscription().id]" @@ -62,7 +62,7 @@ { "type": "Microsoft.Authorization/roleAssignments", "apiVersion": "2022-04-01", - "name": "[guid(subscription().id, parameters('servicePrincipalObjectId'), parameters('deploymentLabel'), 'Reader')]", + "name": "[guid(subscription().id, parameters('servicePrincipalObjectId'), variables('readerRoleDefinitionId'))]", "properties": { "principalId": "[parameters('servicePrincipalObjectId')]", "principalType": "ServicePrincipal", @@ -72,7 +72,7 @@ { "type": "Microsoft.Authorization/roleAssignments", "apiVersion": "2022-04-01", - "name": "[guid(subscription().id, parameters('servicePrincipalObjectId'), parameters('deploymentLabel'), parameters('customRoleName'))]", + "name": "[guid(subscription().id, parameters('servicePrincipalObjectId'), subscriptionResourceId('Microsoft.Authorization/roleDefinitions', variables('customRoleDefinitionName')))]", "properties": { "principalId": "[parameters('servicePrincipalObjectId')]", "principalType": "ServicePrincipal", diff --git a/docs/snippets/azure-prowler-scan-template.mdx b/docs/snippets/azure-prowler-scan-template.mdx index f3120f3db6..e77ef09b3a 100644 --- a/docs/snippets/azure-prowler-scan-template.mdx +++ b/docs/snippets/azure-prowler-scan-template.mdx @@ -8,7 +8,7 @@ "_generator": { "name": "bicep", "version": "0.46.1.21595", - "templateHash": "4092263301802395344" + "templateHash": "16146816613430830317" } }, "parameters": { @@ -22,7 +22,7 @@ "type": "string", "defaultValue": "Prowler", "metadata": { - "description": "Cosmetic label used inside the role assignment names so multiple deployments do not collide. Free text; keep the default unless you need to distinguish multiple Prowler deployments." + "description": "Cosmetic label included in the custom role description. Free text; keep the default unless you need to distinguish multiple Prowler deployments." } }, "customRoleName": { @@ -44,7 +44,7 @@ "name": "[variables('customRoleDefinitionName')]", "properties": { "roleName": "[parameters('customRoleName')]", - "description": "Role used by Prowler for checks that require Azure actions beyond the built-in Reader role.", + "description": "[format('Role used by {0} for Prowler checks that require Azure actions beyond the built-in Reader role.', parameters('deploymentLabel'))]", "type": "CustomRole", "assignableScopes": [ "[subscription().id]" @@ -65,7 +65,7 @@ { "type": "Microsoft.Authorization/roleAssignments", "apiVersion": "2022-04-01", - "name": "[guid(subscription().id, parameters('servicePrincipalObjectId'), parameters('deploymentLabel'), 'Reader')]", + "name": "[guid(subscription().id, parameters('servicePrincipalObjectId'), variables('readerRoleDefinitionId'))]", "properties": { "principalId": "[parameters('servicePrincipalObjectId')]", "principalType": "ServicePrincipal", @@ -75,7 +75,7 @@ { "type": "Microsoft.Authorization/roleAssignments", "apiVersion": "2022-04-01", - "name": "[guid(subscription().id, parameters('servicePrincipalObjectId'), parameters('deploymentLabel'), parameters('customRoleName'))]", + "name": "[guid(subscription().id, parameters('servicePrincipalObjectId'), subscriptionResourceId('Microsoft.Authorization/roleDefinitions', variables('customRoleDefinitionName')))]", "properties": { "principalId": "[parameters('servicePrincipalObjectId')]", "principalType": "ServicePrincipal", diff --git a/docs/user-guide/providers/azure/authentication.mdx b/docs/user-guide/providers/azure/authentication.mdx index 3138f164cd..f43b9156a4 100644 --- a/docs/user-guide/providers/azure/authentication.mdx +++ b/docs/user-guide/providers/azure/authentication.mdx @@ -267,7 +267,7 @@ $cert = New-SelfSignedCertificate -Subject "CN=Prowler" ` Export-Certificate -Cert $cert -FilePath prowler.cer -# Export a PKCS#12 bundle for Prowler. Keep this value secret. +# Export an unencrypted PKCS#12/PFX bundle for Prowler. Keep this value secret. $pfxBytes = $cert.Export('Pfx', '') [Convert]::ToBase64String($pfxBytes) ``` @@ -311,7 +311,7 @@ Paste the following into the Certificate Authentication form of the Azure add-pr - **Tenant ID** — copy the Directory (tenant) ID from the App Registration overview. - **Client ID** — copy the Application (client) ID from the App Registration overview. -- **Certificate Content** — provide the base64-encoded **PEM bundle** (certificate + private key) or PKCS#12 export. Prowler needs both parts to sign the token request. +- **Certificate Content** — provide the base64-encoded **PEM bundle** (certificate + private key) or an unencrypted PKCS#12/PFX export. Prowler needs both parts to sign the token request and does not accept password-protected PKCS#12/PFX input. ### Prowler CLI @@ -325,7 +325,7 @@ export AZURE_CERTIFICATE_CONTENT="