Skip to content

#WAF Add extended WAF functionality to Application Gateway#1052

Merged
veronicagg merged 15 commits into
Azure:masterfrom
jobatzil:feature/jobatzil/waf
Mar 28, 2017
Merged

#WAF Add extended WAF functionality to Application Gateway#1052
veronicagg merged 15 commits into
Azure:masterfrom
jobatzil:feature/jobatzil/waf

Conversation

@jobatzil
Copy link
Copy Markdown
Contributor

@jobatzil jobatzil commented Mar 21, 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
Copy Markdown

@jobatzil,
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

@jobatzil jobatzil changed the title Add extended WAF functionality to Application Gateway #WAF Add extended WAF functionality to Application Gateway Mar 21, 2017
Copy link
Copy Markdown
Contributor

@sergey-shandar sergey-shandar left a comment

Choose a reason for hiding this comment

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

@jobatzil As I can see. This PR may contain some breaking changes and CI still reports some errors/warnings which are not related to the changes. Do you have a link to previous PR where the errors/warnings have been discussed? https://travis-ci.org/Azure/azure-rest-api-specs/jobs/213495817

"required": [
"enabled"
"enabled",
"firewallMode",
Copy link
Copy Markdown
Contributor

@sergey-shandar sergey-shandar Mar 21, 2017

Choose a reason for hiding this comment

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

It's a breaking change.

Copy link
Copy Markdown
Contributor Author

@jobatzil jobatzil Mar 21, 2017

Choose a reason for hiding this comment

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

Yes, it's adding some new functionality to the web application firewall.
We introduce it for the new Api-Version 2017-03-01 and no older ones though.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

you have to release the sdk on a major version.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks like no SDK was published with this api-version yet (please, confirm). So it should be ok to publish. Of course, we still have to address the warnings/errors.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The azure-sdk-for-net PR is currently still open since we have to coordinate multiple Network related PRs. I will changed the Version to a new major version as @DeepakRajendranMsft requested.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@sergey-shandar Yes, no SDK with api-version 2017-03-01 was published yet

@jobatzil
Copy link
Copy Markdown
Contributor Author

@sergey-shandar We will address the CI warnings later, but don't have time rn since we want to get into the upcoming release of PowerShell.

"health": {
"type": "string",
"description": "Health of backend server. Possible values are: 'Unknown', 'Up', 'Down', and 'Partial'.",
"description": "Health of backend server.",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why are you changing the description

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i believe the documentation team did this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It get's automatically added to the auto-generated code. Otherwise the possible enum values would be twice in a row in the documentation of the property.

"required": [
"enabled"
"enabled",
"firewallMode",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

you have to release the sdk on a major version.

},
"ruleSetType": {
"type": "string",
"description": "The type of the web application firewall rule set. Possible values are: 'OWASP'."
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why not an enum?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

seems like the service is also not an enum

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes.

@jobatzil
Copy link
Copy Markdown
Contributor Author

I will change the Version number in the azure-sdk-for-net to 10.0.0.0

@sergey-shandar
Copy link
Copy Markdown
Contributor

sergey-shandar commented Mar 22, 2017

@jobatzil @salameer @veronicagg

Ok, here's a list of errors/warnings which we need to discuss

  • SDKViolation:
    • NonAppJsonTypeWarning, Media types other than 'application/json' has limited support, 2 warnings: 14, 18.
    • ListOperationNamingWarning, Since operation '_' response has model definition 'array', it should be named as "list_*"", 2 errors: 320, 370
  • RPCViolation:
    • OperationsAPIImplementationValidation, Operations API must be implemented for the service. 1 error.
    • BooleanPropertyNotRecommended, Booleans are not descriptive and make them hard to use. Instead use string enums with allowed set of values defined. 3 warnings: 893, 1296, 1338
    • TrackedResourceValidation,
      • A Tracked Resource "ApplicationGateway" must have
        • a ListByResourceGroup operation with x-ms-pageable extension.
        • a ListBySubscriptionId operation with x-ms-pageable extension.
    • TrackedResourcePatchOperationValidation, Tracked resource 'ApplicationGateway' must have patch operation that at least supports the update of tags 1214
    • DefinitionsPropertiesNamesCamelCase, 636, 640, 656, 740, 865, 1122, 1143, 740

Some other warnings and errors are derived from the network.json swagger file.

@jobatzil
Copy link
Copy Markdown
Contributor Author

@sergey-shandar I can change the warnings that are related to the code I'm adding, but would prefer to leave the other warnings for this PR since some of them may introduce further breaking changes.

@jobatzil
Copy link
Copy Markdown
Contributor Author

SDKViolation:

  • NonAppJsonTypeWarning, Media types other than 'application/json' has limited support, 2 warnings: 14, 18.

Removed the Text/Json support.

  • ListOperationNamingWarning, Since operation '' response has model definition 'array', it should be named as "list*"", 2 errors: 320, 370

Updated operationId of getAvailableWafRuleSets.
For the next bigger PR: will probably duplicate operation backendHealth with updated operationId and keep the old one as lecacy.

RPCViolation:

  • OperationsAPIImplementationValidation, Operations API must be implemented for the service. 1 error.

Will talk to Network team since it might be better to have one shared API call for that.

  • BooleanPropertyNotRecommended, Booleans are not descriptive and make them hard to use. Instead use string enums with allowed set of values defined. 3 warnings: 893, 1296, 1338

Keep existing Booleans since it would need bigger changes in the backend.
Will be taken into account in future design decisions.

  • TrackedResourceValidation,
    A Tracked Resource "ApplicationGateway" must have
    a ListByResourceGroup operation with x-ms-pageable extension.
    a ListBySubscriptionId operation with x-ms-pageable extension.

Operations exist already but have different operationIds.
For next bigger PR: Duplicate existing operations with updated operationId and keep the old ones as legacy.

  • TrackedResourcePatchOperationValidation, Tracked resource 'ApplicationGateway' must have patch operation that at least supports the update of tags 1214

Will not be added in the near future, needs major changes in the backend.

-DefinitionsPropertiesNamesCamelCase, 636, 640, 656, 740, 865, 1122, 1143, 740

All related to ...IP... naming. Keep it like that for now, might be changed in next bigger PR.

@shahabhijeet
Copy link
Copy Markdown
Contributor

Generated SDK Azure/azure-sdk-for-net#2992

@sergey-shandar
Copy link
Copy Markdown
Contributor

@ravbhatnagar there are several cases when Operations API is not implemented because there are several APIs (swaggers) implemented by this service. Could you provide guidance how to provide the Operations API using composite swagger?

Copy link
Copy Markdown
Contributor

@sergey-shandar sergey-shandar left a comment

Choose a reason for hiding this comment

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

Please, address the errors/warnings in the next major version so we can get rid of them.

@veronicagg veronicagg merged commit 7c15291 into Azure:master Mar 28, 2017
@AutorestCI
Copy link
Copy Markdown

No modification for NodeJS

@AutorestCI
Copy link
Copy Markdown

@AutorestCI
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants