-
Notifications
You must be signed in to change notification settings - Fork 4k
Adding Advanced Threat Protection and Vulnerability Assessment cmdlets on Managed Instance #8227
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
Conversation
src/ResourceManager/Profile/Commands.Profile/AzureRmAlias/Mappings.json
Outdated
Show resolved
Hide resolved
src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/Common.ps1
Outdated
Show resolved
Hide resolved
....Sql/AdvancedThreatProtection/Cmdlet/SqlManagedInstanceAdvancedThreatProtectionCmdletBase.cs
Outdated
Show resolved
Hide resolved
/// <summary> | ||
/// Gets or sets the managed instance name | ||
/// </summary> | ||
public string ManagedInstanceName { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
InstanceName
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In AzureSqlManagedInstanceModel, the managed instance name property is also called ManagedInstanceName. Do you still want me to rename to InstanceName?
|
||
namespace Microsoft.Azure.Commands.Sql.ThreatDetection.Model | ||
{ | ||
public class ManagedInstanceThreatDetectionPolicyModel : BaseThreatDetectionPolicyModel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
InstanceThreatDetectionPolicyModel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The managed instance model name is AzureSqlManagedInstanceModel. Do you still want me to rename to InstanceThreatDetectionPolicyModel?
...uleBaseline/ManagedDatabase/GetAzureSqlManagedDatabaseVulnerabilityAssessmentRuleBaseline.cs
Outdated
Show resolved
Hide resolved
...uleBaseline/ManagedDatabase/GetAzureSqlManagedDatabaseVulnerabilityAssessmentRuleBaseline.cs
Outdated
Show resolved
Hide resolved
Please review the existing managed instance cmdlets and make yours consistent with those. |
src/ResourceManager/Profile/Commands.Profile/AzureRmAlias/Mappings.json
Outdated
Show resolved
Hide resolved
...ager/Sql/Commands.Sql/help/Clear-AzSqlInstanceDatabaseVulnerabilityAssessmentRuleBaseline.md
Outdated
Show resolved
Hide resolved
@@ -20,7 +20,7 @@ Clear-AzSqlDatabaseVulnerabilityAssessmentRuleBaseline [-InputObject <AzureSqlDa | |||
|
|||
## DESCRIPTION | |||
The **Clear-AzSqlDatabaseVulnerabilityAssessmentRuleBaseline** cmdlet removes the vulnerability assessment rule baseline. | |||
Note that you need to run *Enable-AzSqlServerAdvancedThreatProtection* and *Set-AzSqlDatabaseVulnerabilityAssessmentSettings* cmdlet as a prerequisite for using this cmdlets. | |||
Note that you need to run *Enable-AzSqlServerAdvancedThreatProtection* and *Update-AzSqlDatabaseVulnerabilityAssessmentSettings* cmdlet as a prerequisite for using this cmdlets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does Set-AzSqlDatabaseVulnerabilityAssessmentSettings
still exist? Because we cannot remove it outside of a breaking change release. And, I didn't see a cmdlet alias on Update-AzSqlDatabaseVulnerabilityAssessmentSettings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set-AzSqlDatabaseVulnerabilityAssessmentSettings never existed. It's an error in the documentation that I noticed and fixed
...eManager/Sql/Commands.Sql/help/Get-AzSqlInstanceDatabaseVulnerabilityAssessmentScanRecord.md
Outdated
Show resolved
Hide resolved
@talhers We have moved our projects to a shallower depth. You have merge conflicts. Basically, your changes to:
Now need to be made to:
Please update those accordingly and resolve the merge conflicts by deleting the files at the old path. |
…s on Managed Instance
Tal, you are seeing weird merge problems because you are making changes directly in talhers/master instead of a feature branch. You should always develop in a feature branch to avoid this. Here is how we can fix this. I already ran the following commands:
As a result, now I have a branch jaredmoo/talhersFixed that your PR should use. You can forcefully change the PR to have the same commit as my jaredmoo/talhersFixed branch by doing this:
|
@talhers - there are some static analysis failures causing the ci build to fial - at least some of them (the places outlined in SignatureIssues.csv where you have cmdlets with mutiple parameters sets but no default parameter set) will need to be fixed, and you will need to go over thene potential breakign changes outlined in BreakingChangeIssues.csv to see if the new types replacing the current types have the same public property signature. Look at the log for detailed errors, and this document describes how to process atatic analysis errors: |
@maddieclayton Can you work with @tahlers to ensure this is ready for the next release? |
@markcowl - thanks for checking my PR, breaking changes - static analysis reported a change in input object - this is because previously the VA database cmdlets would receive the DatabaseVulnerabilityAssessmentSettingsModel object, and now they can receive the base class object - VulnerabilityAssessmentSettingsModel. This will not break any existing scripts as DatabaseVulnerabilityAssessmentSettingsModel object is still accepted. (same explanation applies on all input objects reported) signature issues - I have defined default parameters in the required places. @markcowl , @maddieclayton - can you take another look? |
@talhers You have to update the suppression files or the build will continue to fail. For SQL, they are in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
These cmdlets are meant for working with managed instance, and they are the same as the Advanced Threat Protection and Vulnerability Assessment cmdlets on regular Azure db.
Design review for Advanced Threat Protection and Vulnerability Assessment cmdlets on regular Azure db can be found at: https://github.com/Azure/azure-powershell-cmdlet-review-pr/issues/78
PR for Advanced Threat Protection and Vulnerability Assessment cmdlets on regular Azure db can be found at: #6653
Checklist
CONTRIBUTING.md
platyPS
module