Skip to content

Comments

SQL blob auditing and threat detection specs and examples#1012

Merged
anudeepsharma merged 28 commits intoAzure:masterfrom
jaredmoo:datasecurity
Mar 14, 2017
Merged

SQL blob auditing and threat detection specs and examples#1012
anudeepsharma merged 28 commits intoAzure:masterfrom
jaredmoo:datasecurity

Conversation

@jaredmoo
Copy link
Contributor

@jaredmoo jaredmoo commented Mar 8, 2017

This checklist is used to make sure that common issues in a pull request are addressed. This will expedite the process of getting your pull request merged and avoid extra work on your part to fix issues discovered during the review process.

PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
  • If applicable, the PR references the bug/issue that it fixes.
  • Swagger files are correctly named (e.g. the api-version in the path should match the api-version in the spec).

Quality of Swagger

  • I have read the contribution guidelines.
  • My spec meets the review criteria:
    • The spec conforms to the Swagger 2.0 specification.
    • Validation errors from the Linter extension for VS Code have all been fixed for this spec. (Note: for large, previously checked in specs, there will likely be many errors shown. Please contact our team so we can set a timeframe for fixing these errors if your PR is not going to address them).
    • The spec follows the patterns described in the Swagger good patterns document unless the service API makes this impossible.

@msftclas
Copy link

msftclas commented Mar 8, 2017

@jaredmoo,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

"kind": "V12",
"properties": {
"state":"Enabled",
"storageEndpoint": "https://mystorage.blob.core.windows.net",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comment by @anudeepsharma :

ARM's recommendation of using another resource is by ID, and as first party application you can always query access keys. Now you are putting responsibility of updating the storage account key whenever user recycle the storage account keys. I am putting this comment specially here as these APIs are in preview.

This is applicable for SecurityAlert as well (you can open a backlog item for the same for next API version)

In case you ask for storageAccount ID, you don't need to ask subscription id as well. So in total StorageEndpoint, AccessKeys, StorageSubscription, isStorageSecondaryKeyInUse will be replaced by one entity StorageAccountId

"state": "Enabled",
"emailAccountAdmins": "Enabled",
"emailAddresses": "testSecurityAlert@microsoft.com",
"disabledAlerts": "Access_Anomaly;Usage_Anomaly",
Copy link
Contributor

@anudeepsharma anudeepsharma Mar 9, 2017

Choose a reason for hiding this comment

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

Array here would have been better for disabledAlerts and emailAddresses

Copy link
Contributor

@anudeepsharma anudeepsharma left a comment

Choose a reason for hiding this comment

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

https://travis-ci.org/Azure/azure-rest-api-specs/jobs/209097807

Linter errors on PR. Please fix the same.

For comments on APIs please create backlog item in RP to fix and get it reviewed for next API version.

"properties": {
"state": "Enabled",
"emailAccountAdmins": "Enabled",
"emailAddresses": "testSecurityAlert@microsoft.com",
Copy link
Contributor

Choose a reason for hiding this comment

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

The property name is in plural form "emailAddress es" and it only accepts one email address as a string. An array would have been better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ayeletshpigelman please make sure it's noted as a bug.

"state": "Enabled",
"emailAccountAdmins": "Enabled",
"emailAddresses": "",
"disabledAlerts": "",
Copy link
Contributor

@amarzavery amarzavery Mar 9, 2017

Choose a reason for hiding this comment

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

Is it OK to send an empty string back in the response (if the property was not set in the request body OR due to any other reason)? An optional property not being present if not set or it being present always with an empty string are two different things. Looks like the latter is true. If that is indeed the case then should such properties have "default": "".
I have seen this for "storageAccountAccessKey" and "storageEndpoint" as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If "state": "Disabled" then everything else is optional. If "state": "Enabled" then "storageEndpoint" and "storageAccountAccessKey" are required. I'll split these out into 2 different examples.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also emailAddresses etc can be set to null, so empty string is not default.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually the min/max examples are already accurate (when enabled=true). I just have to make state required.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 94e1a24

@jaredmoo
Copy link
Contributor Author

@anudeepsharma @amarzavery can you please review?

  • Build failed due to compositeAutomation.json . Not my fault
  • For ENUM_MISMATCH warnings in example validation: This warning is legit, but I'm not sure how to best document this value. My thinking was to have modelAsString enum so that I can at least list the possible values, even though it's a comma-separated list so it doesn't really work as an enum. (Yes this has design issues, but we are documenting the API as it exists in production). Should I just make this a regular string without enum?
  • The remaining linter warnings I have discussed with @veronicagg and are false positives

Copy link
Contributor

@anudeepsharma anudeepsharma left a comment

Choose a reason for hiding this comment

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

LGTM

@anudeepsharma anudeepsharma merged commit 0d62469 into Azure:master Mar 14, 2017
@jaredmoo
Copy link
Contributor Author

jaredmoo commented Mar 14, 2017 via email

@AutorestCI
Copy link

No modification for NodeJS

@jaredmoo jaredmoo deleted the datasecurity branch July 8, 2017 17:22
mccleanp pushed a commit that referenced this pull request Mar 23, 2022
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.

6 participants