Skip to content

Conversation

@yaakoviyun
Copy link
Member

Adding vulnerability Assessemtn clinet code

@yaakoviyun
Copy link
Member Author

@jaredmoo - please review too...

Copy link
Contributor

@jaredmoo jaredmoo left a comment

Choose a reason for hiding this comment

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

Overall looking pretty good :)

/// Gets or sets the recurring scans settings
/// </summary>
[JsonProperty(PropertyName = "properties.recurringScans")]
public VulnerabilityAssessmentRecurringScansProperties RecurringScans { get; set; }
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you not want to flatten these properties up into this class? Either way is fine, but I want to check it is a conscious decision :)

Copy link
Member Author

Choose a reason for hiding this comment

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

It is a conscious decision.
I'll flatten these properties up in powershell

/// parameter.
/// </summary>
[JsonProperty(PropertyName = "properties.storageContainerSasKey")]
public string StorageContainerSasKey { get; set; }
Copy link
Contributor

Choose a reason for hiding this comment

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

Are any of these properties required?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, will fix


sqlClient.DatabaseVulnerabilityAssessmentRuleBaselines.CreateOrUpdate(resourceGroup.Name, server.Name, dbName, testRuleId, ruleBaselineToSet);

// Get basleine
Copy link
Contributor

Choose a reason for hiding this comment

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

typo here

Copy link
Contributor

Choose a reason for hiding this comment

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

Same typo is copied a few times elsewhere

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, fixed.

string scanId1 = string.Format("scantest2_{0}", DateTime.UtcNow.Ticks);
sqlClient.DatabaseVulnerabilityAssessmentScans.Execute(resourceGroup.Name, server.Name, dbName, scanId1);

// Veroify get scan and list scans
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: Verify

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, fixed.

await SetPolicy(context, sqlClient, resourceGroup, server, dbName);

// Run some scans
string scanId = string.Format("scantest1_{0}", DateTime.UtcNow.Ticks);
Copy link
Contributor

Choose a reason for hiding this comment

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

How is this going to work with test playback? UtcNow is different every time you run the test, so the scan uri is not reproducable

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, fixed.


// Run some scans
string scanId = string.Format("scantest1_{0}", DateTime.UtcNow.Ticks);
sqlClient.DatabaseVulnerabilityAssessmentScans.Execute(resourceGroup.Name, server.Name, dbName, scanId);
Copy link
Contributor

Choose a reason for hiding this comment

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

Wasn't this changed to InitiateScan?

Copy link
Member Author

Choose a reason for hiding this comment

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

yep, it was.
will change the client code and update the swagger in azure-rest-api-specs repo

@dsgouda
Copy link
Contributor

dsgouda commented May 16, 2018

@yaakoviyun Please fix failing test cases

Copy link
Contributor

@dsgouda dsgouda left a comment

Choose a reason for hiding this comment

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

These look like additive changes. Please bump the minor version in csproj file along with PackageReleaseNotes

AutorestCI added a commit to Azure/azure-sdk-for-python that referenced this pull request May 21, 2018
Added needed changes to Swagger and exampels

Added needed changes to Swagger
Azure/azure-sdk-for-net#4327 (review)
AutorestCI added a commit to Azure/azure-sdk-for-go that referenced this pull request May 21, 2018
Added needed changes to Swagger and exampels

Added needed changes to Swagger
Azure/azure-sdk-for-net#4327 (review)
AutorestCI added a commit to AutorestCI/azure-libraries-for-java that referenced this pull request May 21, 2018
Added needed changes to Swagger and exampels

Added needed changes to Swagger
Azure/azure-sdk-for-net#4327 (review)
AutorestCI added a commit to Azure/azure-sdk-for-node that referenced this pull request May 21, 2018
Added needed changes to Swagger and exampels

Added needed changes to Swagger
Azure/azure-sdk-for-net#4327 (review)
Turn ON database threat detection as a preprequite to use VA
@jaredmoo
Copy link
Contributor

@dsgouda - Jenkins build failure below seems like not our fault

00:35:56   c:\workspace\NetCore-SdkCI\tools\SdkBuildTools\targets\common.targets(215,5): error MSB3073: The command "dotnet test -f netcoreapp1.1 c:\workspace\NetCore-SdkCI\src\SdkCommon\TestFramework\HttpRecorder.Tests\HttpRecorder.Tests.csproj -l trx;LogFileName=c:\workspace\NetCore-SdkCI\TestResults\netCore11\HttpRecorder.Tests.trx " exited with code 1. [c:\workspace\NetCore-SdkCI\build.proj]

@yaakoviyun
Copy link
Member Author

@dsgouda , can you merge?

@jaredmoo
Copy link
Contributor

This PR was merged into #4351 and can be closed,

anuchandy pushed a commit to Azure/azure-rest-api-specs that referenced this pull request May 23, 2018
* Adding Vulnerability Assessment APIs on managed instance

Adding Vulnerability Assessment APIs on managed instance

* fixed scan operation id

* character mismatch fix

* Added needed changes to Swagger and exampels

Added needed changes to Swagger
Azure/azure-sdk-for-net#4327 (review)

* Delete managedDatabaseVulnerabilityAssessmentBaselines.json

* Delete managedDatabaseVulnerabilityAssessmentScans.json

* Delete managedDatabaseVulnerabilityAssessments.json

* Delete ManagedDatabaseVulnerabilityAssessmentCreateMax.json

* Delete ManagedDatabaseVulnerabilityAssessmentCreateMin.json

* Delete ManagedDatabaseVulnerabilityAssessmentDelete.json

* Delete ManagedDatabaseVulnerabilityAssessmentGet.json

* Delete ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json

* Delete ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json

* Delete ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json

* Delete ManagedDatabaseVulnerabilityAssessmentScanExport.json

* Delete ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json

* Delete ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json

* Delete ManagedDatabaseVulnerabilityAssessmentScansExecute.json

* Update readme.md
@dsgouda dsgouda merged commit 69a5077 into Azure:psSdkJson6 May 24, 2018
AutorestCI added a commit to Azure/azure-sdk-for-go that referenced this pull request Jun 17, 2018
Added needed changes to Swagger and exampels

Added needed changes to Swagger
Azure/azure-sdk-for-net#4327 (review)
AutorestCI added a commit to Azure/azure-sdk-for-node that referenced this pull request Jun 17, 2018
Added needed changes to Swagger and exampels

Added needed changes to Swagger
Azure/azure-sdk-for-net#4327 (review)
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.

3 participants