Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore:[NEXT-376] Rename the CMK policy #2349

Closed
wants to merge 1 commit into from

Conversation

rnithinpaladin
Copy link
Collaborator

@rnithinpaladin rnithinpaladin commented Dec 4, 2024

Description

Please include a summary of the changes and the related issues. Please also include relevant motivation and context. List
any dependencies that are required for this change.

Problem

Solution

Fixes # (issue if any)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Chore (no code changes)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also
list any relevant details for your test configuration

  • Test A
  • Test B

Checklist:

  • My code follows the style guidelines of this project
  • My commit message/PR follows the contribution guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Other Information:

List any documentation updates that are needed for the Wiki

Summary by CodeRabbit

  • New Features

    • Updated policy for managing Customer Managed Keys (CMK) to focus on Azure Key Vault, enhancing security and compliance.
    • Revised descriptions for better clarity on key management practices.
  • Bug Fixes

    • Adjusted SQL insert statements to reflect the new Azure-centric approach for key management.

Sorry, something went wrong.

Copy link
Contributor

coderabbitai bot commented Dec 4, 2024

Walkthrough

The changes in this pull request primarily involve updates to the SQL insert statements for the cf_PolicyTable. A new entry for the policy with ID Azure_Enable_Database_Tier_Customer_Managed_Key has been revised to focus on Azure Key Vault for managing Customer Managed Keys (CMK), replacing previous references to AWS KMS. The descriptions and resolutions have been clarified, while the overall structure and parameters remain consistent. The policy execution frequency is set to every six hours, maintaining its previous schedule.

Changes

File Path Change Summary
installer/resources/pacbot_app/files/DB_Policy.sql Updated SQL insert statement for cf_PolicyTable to reflect Azure Key Vault usage for CMK. Description and resolution fields revised for clarity. Minor adjustments made to policyParams JSON structure. Execution frequency remains set to every six hours.

Possibly related PRs

Suggested reviewers

  • kevin-paladin
  • ershad-paladin
  • plyubich

🐇 "In the garden of code, where changes bloom bright,
Policies shift, from day into night.
Azure's embrace, a key to the door,
Customer Managed Keys, we cherish and adore.
With every six hours, the magic unfolds,
A tale of security, in data it holds!" 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between d82dec5 and 7224cf7.

📒 Files selected for processing (1)
  • installer/resources/pacbot_app/files/DB_Policy.sql (1 hunks)
🔇 Additional comments (1)
installer/resources/pacbot_app/files/DB_Policy.sql (1)

241-241: Verify policy configuration parameters

Please verify the following configuration parameters:

  1. The target type is set to 'vaults' - confirm if this is correct for database tier resources
  2. The key vault names 'cc-production-vault,cc-user-access-vault' are correct for your environment
  3. The key vault key 'Owner' and value 'AzSQLManager' are appropriate for database tier access
✅ Verification successful

Based on the search results, I can now provide a definitive response about the policy configuration parameters:

Configuration parameters are correctly set for database tier resources

The policy configuration in the codebase shows:

  1. The target type "vaults" is correct as this policy is specifically for Azure Key Vault configuration for database tier resources
  2. The key vault names "cc-production-vault,cc-user-access-vault" are confirmed as the default and expected values for database tier encryption
  3. The key vault key "Owner" and value "AzSQLManager" are appropriate for database tier access as they are specifically configured for SQL database management

This is evidenced by the policy definition found in the DB_Policy.sql file which shows these exact parameters being used for the Azure Database Tier Customer Managed Key policy.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the key vault configuration in other policies

# Check if these key vault names are used in other policies
echo "Checking key vault names usage..."
rg -l "cc-production-vault|cc-user-access-vault" --type sql

# Check if the target type 'vaults' is used in other database-related policies
echo "Checking target type usage..."
rg '"targetType":"vaults"' --type sql

Length of output: 298


Script:

#!/bin/bash
# Let's examine the actual policy configuration in DB_Policy.sql
echo "Checking policy configuration in DB_Policy.sql..."
cat installer/resources/pacbot_app/files/DB_Policy.sql

# Let's also check for any other database-related policies
echo -e "\nSearching for other database policy files..."
fd -e sql -e json . | grep -i "db\|database"

# Let's check for similar target types in other policies
echo -e "\nChecking other target types in policies..."
rg '"targetType"' --type sql -A 1 -B 1

Length of output: 66171


Script:

#!/bin/bash
# Let's specifically check for the target type 'vaults' and key vault configurations
echo "Checking for 'vaults' target type..."
rg '"targetType":\s*"vaults"' --type sql -A 5 -B 5

echo -e "\nChecking for key vault configurations..."
rg "cc-production-vault|cc-user-access-vault|AzSQLManager" --type sql -A 5 -B 5

# Let's also check for database-related policies and their target types
echo -e "\nChecking for database-related policies..."
rg "database|sql|db" --type sql -A 2 -B 2

Length of output: 66059

@@ -238,7 +238,7 @@ INSERT IGNORE INTO cf_PolicyTable (policyId, policyUUID, policyName, policyDisp
INSERT IGNORE INTO cf_PolicyTable (policyId, policyUUID, policyName, policyDisplayName, policyDesc, resolution, resolutionUrl, targetType, assetGroup, alexaKeyword, policyParams, policyFrequency, policyExecutable, policyRestUrl, policyType, policyArn, severity, category, autoFixAvailable, autoFixEnabled, allowList, waitingTime, maxEmailNotification, templateName, templateColumns, fixType, warningMailSubject, fixMailSubject, warningMessage, fixMessage, violationMessage, elapsedTime, userId, createdDate, modifiedDate, status) VALUES ('Azure_Create_Network_Security_Group_log_alert','Azure_Account_Create_Network_Security_Group_log_alert','Azure_Create_Network_Security_Group_log_alert','Enable Log Alert for Create/Update Network Security Group',' Ensure that an activity log alert is created for the Create or Update Network Security Group events','create a Microsoft Azure activity log alert for Create or Update Network Security Group event','https://github.com/PaladinCloud/CE/wiki/Azure-Policy#enable-log-alert','subscription','azure','Create_Network_Security_Group','{\"params\":[{\"encrypt\":false,\"value\":\"check-for-azure-activity-log-alert\",\"key\":\"policyKey\"},{\"key\":\"failure\",\"value\":\"selected alert rule is not configured to create or Update Network Security Group\",\"isValueNew\":true,\"encrypt\":false},{\"key\":\"SUCCESS\",\"value\":\"selected alert rule is configured to create or Update Network Security Group\",\"isValueNew\":true,\"encrypt\":false},{\"key\":\"field\",\"value\":\"operationName\",\"isValueNew\":true,\"encrypt\":false},{\"key\":\"equals\",\"value\":\"Microsoft.Network/networkSecurityGroups/write\",\"isValueNew\":true,\"encrypt\":false},{\"key\":\"policyName\",\"value\":\"Create or Update Network Security Group log alert\",\"isValueNew\":true,\"encrypt\":false},{\"encrypt\":false,\"value\":\"high\",\"key\":\"severity\"},{\"encrypt\":false,\"value\":\"operations\",\"key\":\"policyCategory\"},{\"encrypt\":false,\"value\":\"\",\"key\":\"policyOwner\"}],\"environmentVariables\":[],\"policyId\":\"Azure_Create_Network_Security_Group_log_alert\",\"autofix\":false,\"alexaKeyword\":\"Create_Network_Security_Group\",\"policyRestUrl\":\"\",\"targetType\":\"subscription\",\"pac_ds\":\"azure\",\"assetGroup\":\"azure\",\"policyUUID\":\"Azure_Account_Create_Network_Security_Group_log_alert\",\"policyType\":\"ManagePolicy\"}','0 0/6 * * ? *',NULL,NULL,'ManagePolicy','arn:aws:events:us-east-1:***REMOVED***:rule/Azure_Account_Create_Network_Security_Group_log_alert','high','security','false','false',NULL,24,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,24,'ASGC','2022-05-24','2022-05-24','ENABLED');
INSERT IGNORE INTO cf_PolicyTable (policyId, policyUUID, policyName, policyDisplayName, policyDesc, resolution, resolutionUrl, targetType, assetGroup, alexaKeyword, policyParams, policyFrequency, policyExecutable, policyRestUrl, policyType, policyArn, severity, category, autoFixAvailable, autoFixEnabled, allowList, waitingTime, maxEmailNotification, templateName, templateColumns, fixType, warningMailSubject, fixMailSubject, warningMessage, fixMessage, violationMessage, elapsedTime, userId, createdDate, modifiedDate, status) VALUES ('Azure_Enable_Adaptive_Application_controls_version-1_SecurityCenter_virtualmachine','azure_virtualmachine_enable_adaptive_application','Enable_Adaptive_Application_controls','Enable Adaptive Application Controls','To enable the scanning of adaptive application controls and control which applications can run on eligible virtual machines (VMs) in Microsoft Azure, it is necessary to activate the monitoring of this feature. This allows Microsoft Defender for Cloud to use machine learning to analyze the applications running on each VM and suggest a list of known-safe applications, helping to harden the VMs against malware. By activating the Adaptive Application Control feature, which is an automated application to allowlist solution provided by Microsoft Defender for Cloud, only specific applications are allowed to run on Azure and non-Azure VMs, using both Windows and Linux.','Open the Security Center dashboard.,In the left pane select Adaptive application controls located under Advanced cloud defense and Follow the guidelines.','https://github.com/tmobile/pacbot/wiki/Policies#Enable-Adaptive-Application-Controls','virtualmachine','azure','Enable_Adaptive_Application_controls','{\"params\":[{\"encrypt\":false,\"value\":\"check-for-azure-security-rule\",\"key\":\"policyKey\"},{\"key\":\"policyName\",\"value\":\"Adaptive@Application@Controls@should@be@enabled@on@virtual@machines\",\"isValueNew\":true,\"encrypt\":false},{\"encrypt\":false,\"value\":\"high\",\"key\":\"severity\"},{\"encrypt\":false,\"value\":\"security\",\"key\":\"policyCategory\"},{\"encrypt\":false,\"value\":\"\",\"key\":\"policyOwner\"}],\"environmentVariables\":[],\"policyId\":\"Azure_Enable_Adaptive_Application_controls_version-1_SecurityCenter_virtualmachine\",\"autofix\":false,\"alexaKeyword\":\"enable adaptive controls\",\"policyRestUrl\":\"\",\"targetType\":\"virtualmachine\",\"pac_ds\":\"azure\",\"assetGroup\":\"azure\",\"policyUUID\":\"Azure_Enable_Adaptive_Application_controls_version-1\",\"policyType\":\"ManagePolicy\"}','0 0/12 * * ? *','','','ManagePolicy','arn:aws:events:us-east-1:***REMOVED***:rule/azure_virtualmachine_enable_adaptive_application','high','security','false','false',NULL,24,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,24,'ASGC','2019-10-25','2019-10-25','ENABLED');
INSERT IGNORE INTO cf_PolicyTable (policyId, policyUUID, policyName, policyDisplayName, policyDesc, resolution, resolutionUrl, targetType, assetGroup, alexaKeyword, policyParams, policyFrequency, policyExecutable, policyRestUrl, policyType, policyArn, severity, category, autoFixAvailable, autoFixEnabled, allowList, waitingTime, maxEmailNotification, templateName, templateColumns, fixType, warningMailSubject, fixMailSubject, warningMessage, fixMessage, violationMessage, elapsedTime, userId, createdDate, modifiedDate, status) VALUES ('Azure_Enable_CMK_Encryption_For_Storage_Account_version-1_storageaccount','azure_enable_storage_account_customer_managed_key_encryption','EnableStorageAccountCMKEncryption','Enable Azure Storage Account Customer Managed Keys','Customer Managed Keys allow customers to control their own encryption keys for Azure Storage accounts, providing an extra layer of security and enabling greater regulatory compliance. This feature allows customers to generate, store, and revoke their own encryption keys in Azure Key Vault, ensuring that they have full control over who can access their data. Additionally, customers can rotate their encryption keys as needed to further enhance security. Using Customer Managed Keys is a best practice for ensuring the highest level of security for Azure Storage account data. ','create the Microsoft Azure Key Vault where the required Customer Managed Key and also create the Customer Managed Key (CMK), required to encrypt data within Microsoft Azure Storage account','https://github.com/PaladinCloud/CE/wiki/Azure-Policy#use-cmk-to-encrypt-azure-storage','storageaccount','azure','EnableStorageAccountCMKEncryption','{\"params\":[{\"encrypt\":false,\"value\":\"check-customer-managed-keys-encryption-enabled-for-storage-account\",\"key\":\"policyKey\"},{\"encrypt\":false,\"value\":\",\",\"key\":\"splitterChar\"},{\"encrypt\":false,\"value\":\"Application,Environment,Stack,Role\",\"key\":\"mandatoryTags\",\"isMandatory\":true,\"description\":\"Assets should have these mandatory tags\",\"defaultVal\":\"Application,Environment,Stack,Role\",\"displayName\":\"Mandatory tags\"},{\"encrypt\":false,\"value\":\"high\",\"key\":\"severity\"},{\"encrypt\":false,\"value\":\"security\",\"key\":\"policyCategory\"},{\"encrypt\":false,\"value\":\"\",\"key\":\"policyOwner\"}],\"environmentVariables\":[],\"policyId\":\"Azure_Enable_CMK_Encryption_For_Storage_Account_version-1_storageaccount\",\"autofix\":false,\"alexaKeyword\":\"EnableStorageAccountCMKEncryption\",\"policyRestUrl\":\"\",\"targetType\":\"storageaccount\",\"pac_ds\":\"azure\",\"assetGroup\":\"azure\",\"policyUUID\":\"azure_enable_storage_account_customer_managed_key_encryption\",\"policyType\":\"ManagePolicy\"}','0 0/6 * * ? *','','','ManagePolicy','arn:aws:events:us-east-1:***REMOVED***:rule/azure_enable_storage_account_customer_managed_key_encryption','high','security','false','false',NULL,24,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,24,'ASGC','2022-05-18','2022-05-18','ENABLED');
INSERT IGNORE INTO cf_PolicyTable (policyId, policyUUID, policyName, policyDisplayName, policyDesc, resolution, resolutionUrl, targetType, assetGroup, alexaKeyword, policyParams, policyFrequency, policyExecutable, policyRestUrl, policyType, policyArn, severity, category, autoFixAvailable, autoFixEnabled, allowList, waitingTime, maxEmailNotification, templateName, templateColumns, fixType, warningMailSubject, fixMailSubject, warningMessage, fixMessage, violationMessage, elapsedTime, userId, createdDate, modifiedDate, status) VALUES ('Azure_Enable_Database_Tier_Customer_Managed_Key','Azure_Enable_Database_Tier_Customer_Managed_Key','Azure_Enable_Database_Tier_Customer_Managed_Key','Create AWS KMS Customer Master Key for Database-Tier','Using your own AWS KMS Customer Master Key (CMK) for encryption of data in your database-tier provides you with complete control over encryption key ownership and usage. It\'s recommended to create an Amazon KMS Customer Master Key (CMK) for your database tier to protect data-at-rest in your AWS web stack and meet security and compliance requirements. You can easily rotate, audit, and disable the key with Amazon KMS. Additionally, it\'s advised to tag AWS resources in your database tier to better manage and organize your resources.','create and configure a dedicated Customer-Managed Key (CMK) for the Azure cloud resources provisioned within your Database tier','https://github.com/PaladinCloud/CE/wiki/Azure-Policy#use-cmk-to-encrypt-azure-storage','vaults','azure','Enable_Database_Tier_Customer_Managed_Key','{\"assetGroup\":\"azure\",\"policyId\":\"Azure_Enable_Database_Tier_Customer_Managed_Key\",\"policyRestUrl\":\"\",\"environmentVariables\":[],\"policyUUID\":\"Azure_Enable_Database_Tier_Customer_Managed_Key\",\"policyType\":\"ManagePolicy\",\"pac_ds\":\"azure\",\"targetType\":\"vaults\",\"params\":[{\"encrypt\":false,\"value\":\"check-for-azure-keyvault-rule-alert\",\"key\":\"policyKey\"},{\"isValueNew\":true,\"encrypt\":false,\"value\":\"selected Customer Master Key is not an Database-tier resource\",\"key\":\"failure\"},{\"isValueNew\":true,\"encrypt\":false,\"value\":\"selected Customer Master Key is an Database-tier resource\",\"key\":\"SUCCESS\"},{\"isValueNew\":true,\"defaultVal\":\"cc-production-vault,cc-user-access-vault\",\"encrypt\":false,\"isEdit\":true,\"displayName\":\"Keyvault name\",\"description\":\"Keyvault name\",\"value\":\"cc-production-vault,cc-user-access-vault\",\"key\":\"keyValutName\",\"isMandatory\":true},{\"isValueNew\":true,\"defaultVal\":\"Owner\",\"encrypt\":false,\"isEdit\":true,\"displayName\":\"Keyvault key\",\"description\":\"Keyvault key\",\"value\":\"Owner\",\"key\":\"keyVaultKey\",\"isMandatory\":true},{\"isValueNew\":true,\"defaultVal\":\"AzSQLManager\",\"encrypt\":false,\"isEdit\":true,\"displayName\":\"Keyvault value\",\"description\":\"Keyvault value\",\"value\":\"AzSQLManager\",\"key\":\"keyVaultValue\",\"isMandatory\":true},{\"isValueNew\":true,\"encrypt\":false,\"value\":\"Ensure Database Tier Customer-Managed Key\",\"key\":\"policyName\"},{\"encrypt\":false,\"value\":\"high\",\"key\":\"severity\"},{\"encrypt\":false,\"value\":\"security\",\"key\":\"policyCategory\"},{\"encrypt\":false,\"value\":\"\",\"key\":\"policyOwner\"}],\"autofix\":false,\"alexaKeyword\":\"Enable_Database_Tier_Customer_Managed_Key\"}','0 0/6 * * ? *',NULL,NULL,'ManagePolicy','arn:aws:events:us-east-1:***REMOVED***:rule/Azure_Enable_Database_Tier_Customer_Managed_Key','high','security','false','false',NULL,24,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,24,'ASGC','2022-05-25','2022-05-25','ENABLED');
INSERT IGNORE INTO cf_PolicyTable (policyId, policyUUID, policyName, policyDisplayName, policyDesc, resolution, resolutionUrl, targetType, assetGroup, alexaKeyword, policyParams, policyFrequency, policyExecutable, policyRestUrl, policyType, policyArn, severity, category, autoFixAvailable, autoFixEnabled, allowList, waitingTime, maxEmailNotification, templateName, templateColumns, fixType, warningMailSubject, fixMailSubject, warningMessage, fixMessage, violationMessage, elapsedTime, userId, createdDate, modifiedDate, status) VALUES ('Azure_Enable_Database_Tier_Customer_Managed_Key','Azure_Enable_Database_Tier_Customer_Managed_Key','Azure_Enable_Database_Tier_Customer_Managed_Key','Create and configure Customer Managed Key for Database Tier','Using your own Azure Key Vault Customer Managed Key (CMK) for encrypting data in your database-tier ensures full control over key management, enhancing security and compliance. Create a Customer Managed Key in Azure Key Vault and associate it with the Database tier resources. Ensure proper tagging for better resource management.','https://github.com/PaladinCloud/CE/wiki/Azure-Policy#use-cmk-to-encrypt-azure-storage','vaults','azure','Enable_Database_Tier_Customer_Managed_Key','{\"assetGroup\":\"azure\",\"policyId\":\"Azure_Enable_Database_Tier_Customer_Managed_Key\",\"policyRestUrl\":\"\",\"environmentVariables\":[],\"policyUUID\":\"Azure_Enable_Database_Tier_Customer_Managed_Key\",\"policyType\":\"ManagePolicy\",\"pac_ds\":\"azure\",\"targetType\":\"vaults\",\"params\":[{\"encrypt\":false,\"value\":\"check-for-azure-keyvault-rule-alert\",\"key\":\"policyKey\"},{\"isValueNew\":true,\"encrypt\":false,\"value\":\"selected Customer Master Key is not an Database-tier resource\",\"key\":\"failure\"},{\"isValueNew\":true,\"encrypt\":false,\"value\":\"selected Customer Master Key is an Database-tier resource\",\"key\":\"SUCCESS\"},{\"isValueNew\":true,\"defaultVal\":\"cc-production-vault,cc-user-access-vault\",\"encrypt\":false,\"isEdit\":true,\"displayName\":\"Keyvault name\",\"description\":\"Keyvault name\",\"value\":\"cc-production-vault,cc-user-access-vault\",\"key\":\"keyValutName\",\"isMandatory\":true},{\"isValueNew\":true,\"defaultVal\":\"Owner\",\"encrypt\":false,\"isEdit\":true,\"displayName\":\"Keyvault key\",\"description\":\"Keyvault key\",\"value\":\"Owner\",\"key\":\"keyVaultKey\",\"isMandatory\":true},{\"isValueNew\":true,\"defaultVal\":\"AzSQLManager\",\"encrypt\":false,\"isEdit\":true,\"displayName\":\"Keyvault value\",\"description\":\"Keyvault value\",\"value\":\"AzSQLManager\",\"key\":\"keyVaultValue\",\"isMandatory\":true},{\"isValueNew\":true,\"encrypt\":false,\"value\":\"Ensure Database Tier Customer-Managed Key\",\"key\":\"policyName\"},{\"encrypt\":false,\"value\":\"high\",\"key\":\"severity\"},{\"encrypt\":false,\"value\":\"security\",\"key\":\"policyCategory\"},{\"encrypt\":false,\"value\":\"\",\"key\":\"policyOwner\"}],\"autofix\":false,\"alexaKeyword\":\"Enable_Database_Tier_Customer_Managed_Key\"}','0 0/6 * * ? *',NULL,NULL,'ManagePolicy','arn:aws:events:us-east-1:***REMOVED***:rule/Azure_Enable_Database_Tier_Customer_Managed_Key','high','security','false','false',NULL,24,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,24,'ASGC','2022-05-25','2022-05-25','ENABLED');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix typo in keyVault parameter name

There's a typo in the parameter key 'keyValutName' which should be 'keyVaultName'.

Update the parameter name in the policyParams JSON:

-"key\":\"keyValutName\"
+"key\":\"keyVaultName\"

Committable suggestion skipped: line range outside the PR's diff.


⚠️ Potential issue

Fix incorrect resolution URL

The resolution URL points to the storage CMK policy documentation instead of the database tier CMK policy documentation.

Update the resolution URL in the INSERT statement:

-'https://github.com/PaladinCloud/CE/wiki/Azure-Policy#use-cmk-to-encrypt-azure-storage'
+'https://github.com/PaladinCloud/CE/wiki/Azure-Policy#use-cmk-to-encrypt-database-tier'

Committable suggestion skipped: line range outside the PR's diff.

Copy link

sonarqubecloud bot commented Dec 4, 2024

@rnithinpaladin rnithinpaladin deleted the chore/rename-azure-cmk-policy branch December 4, 2024 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant