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

Key rotation swagger change #11965

Merged
merged 23 commits into from
Jun 4, 2021

Conversation

qinl-li
Copy link
Contributor

@qinl-li qinl-li commented Dec 5, 2020

MSFT employees can try out our new experience at OpenAPI Hub - one location for using our validation tools and finding your workflow.

Changelog

Please ensure to add changelog with this PR by answering the following questions.

  1. What's the purpose of the update?
    • new service onboarding
    • new API version
    • update existing version for new feature
    • update existing version to fix swagger quality issue in s360
    • Other, please clarify
  2. When you are targeting to deploy new service/feature to public regions? Please provide date, or month to public if date is not available yet.
  3. When you expect to publish swagger? Please provide date, or month to public if date is not available yet.
  4. If it's an update to existing version, please select SDKs of specific language and CLIs that require refresh after swagger is published.
    • SDK of .NET (need service team to ensure code readiness)
    • SDK of Python
    • SDK of Java
    • SDK of Js
    • SDK of Go
    • PowerShell
    • CLI
    • Terraform
    • No, no need to refresh for updates in this PR

Contribution checklist:

If any further question about AME onboarding or validation tools, please view the FAQ.

ARM API Review Checklist

  • Ensure to check this box if one of the following scenarios meet updates in the PR, so that label “WaitForARMFeedback” will be added automatically to involve ARM API Review. Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs, all “removals” and “adding a new property” no more require ARM API review.

    • Adding new API(s)
    • Adding a new API version
    • Adding a new service
  • Please ensure you've reviewed following guidelines including ARM resource provider contract and REST guidelines. Estimated time (4 hours). This is required before you can request review from ARM API Review board.

  • If you are blocked on ARM review and want to get the PR merged with urgency, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.

Breaking Change Review Checklist

If there are following updates in the PR, ensure to request an approval from API Review Board as defined in the Breaking Change Policy.

  • Removing API(s) in stable version
  • Removing properties in stable version
  • Removing API version(s) in stable version
  • Updating API in stable version with Breaking Change Validation errors
  • Updating API(s) in preview over 1 year

Action: to initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Addition details on the process and office hours are on the Breaking change Wiki.

Please follow the link to find more details on PR review process.

@openapi-pipeline-app
Copy link

openapi-pipeline-app bot commented Dec 5, 2020

Swagger Validation Report

️❌BreakingChange: 2 Errors, 0 Warnings failed [Detail]
Rule Message
1038 - AddedPath The new version is adding a path that was not found in the old version.
New: Microsoft.KeyVault/preview/7.3-preview/keys.json#L82:5
1038 - AddedPath The new version is adding a path that was not found in the old version.
New: Microsoft.KeyVault/preview/7.3-preview/keys.json#L1134:5
️⚠️LintDiff: 0 Warnings warning [Detail]
The following errors/warnings exist before current PR submission:
Rule Message
R2005 - LongRunningResponseStatusCode A 'PUT' operation 'FullRestoreOperation' with x-ms-long-running-operation extension must have a valid terminal success status code 200 or 201.
Location: Microsoft.KeyVault/preview/7.3-preview/backuprestore.json#L131
R2005 - LongRunningResponseStatusCode A 'PUT' operation 'SelectiveKeyRestoreOperation' with x-ms-long-running-operation extension must have a valid terminal success status code 200 or 201.
Location: Microsoft.KeyVault/preview/7.3-preview/backuprestore.json#L226
⚠️ R2001 - AvoidNestedProperties Consider using x-ms-client-flatten to provide a better end user experience
Location: Microsoft.KeyVault/preview/7.3-preview/rbac.json#L477
⚠️ R2001 - AvoidNestedProperties Consider using x-ms-client-flatten to provide a better end user experience
Location: Microsoft.KeyVault/preview/7.3-preview/rbac.json#L519
⚠️ R2001 - AvoidNestedProperties Consider using x-ms-client-flatten to provide a better end user experience
Location: Microsoft.KeyVault/preview/7.3-preview/rbac.json#L531
⚠️ R2007 - LongRunningOperationsWithLongRunningExtension The operation 'CreateCertificate' returns 202 status code, which indicates a long running operation, please enable 'x-ms-long-running-operation.
Location: Microsoft.KeyVault/preview/7.3-preview/certificates.json#L458
️️✔️Avocado succeeded [Detail] [Expand]
Validation passes for Avocado.
️❌ModelValidation: 1 Errors, 0 Warnings failed [Detail]
Rule Message
OBJECT_ADDITIONAL_PROPERTIES Additional properties not allowed: expirationTime
Url: Microsoft.KeyVault/preview/7.3-preview/keys.json#L2268
️️✔️SemanticValidation succeeded [Detail] [Expand]
Validation passes for SemanticValidation.
️️✔️Cross-Version Breaking Changes succeeded [Detail] [Expand]
There are no breaking changes.
️️✔️CredScan succeeded [Detail] [Expand]
There is no credential detected.
️️✔️[Staging] SDK Track2 Validation succeeded [Detail] [Expand]
Validation passes for SDKTrack2Validation

The following errors/warnings are introduced by current PR:

|:speech_balloon: AutorestCore/Exception|"readme":"keyvault/data-plane/readme.md",
"tag":"package-preview-7.3-preview",
"details":"> Installing AutoRest extension '@microsoft.azure/openapi-validator' (1.8.0)"|
|:speech_balloon: AutorestCore/Exception|"readme":"keyvault/data-plane/readme.md",
"tag":"package-preview-7.3-preview",
"details":"> Installed AutoRest extension '@microsoft.azure/openapi-validator' (1.8.0->1.8.0)"|


The following errors/warnings exist before current PR submission:

|:speech_balloon: AutorestCore/Exception|"readme":"keyvault/data-plane/readme.md",
"tag":"package-preview-7.3-preview",
"details":"> Loading AutoRest extension '@autorest/modelerfour' (4.15.456->4.15.456)"|

️️✔️[Staging] PrettierCheck succeeded [Detail] [Expand]
Validation passes for PrettierCheck.
️️✔️[Staging] SpellCheck succeeded [Detail] [Expand]
Validation passes for SpellCheck.
️️✔️[Staging] Lint(RPaaS) succeeded [Detail] [Expand]
Validation passes for Lint(RPaaS).
Posted by Swagger Pipeline | How to fix these errors?

@openapi-pipeline-app
Copy link

openapi-pipeline-app bot commented Dec 5, 2020

Swagger Generation Artifacts

️️✔️[Staging] ApiDocPreview succeeded [Detail] [Expand]
 Please click here to preview with your @microsoft account. 
️❌[Staging] SDK Breaking Change Tracking failed [Detail]

Breaking Changes Tracking

️✔️azure-sdk-for-go - keyvault/v7.2/keyvault - v55.0.0
️✔️azure-sdk-for-go - keyvault/v7.1/keyvault - v55.0.0
️✔️azure-sdk-for-go - keyvault/v7.0/keyvault - v55.0.0
️✔️azure-sdk-for-go - keyvault/2016-10-01/keyvault - v55.0.0
️✔️azure-sdk-for-go - keyvault/2015-06-01/keyvault - v55.0.0
azure-sdk-for-go - preview/keyvault/v7.2-preview/keyvault - v55.0.0
+	Package was removed
️❌ azure-sdk-for-go failed [Detail]
  • Failed [Logs]Release - Generate from f4a4bad. SDK Automation 14.0.0
    command	sh ./initScript.sh ../../../../../azure-sdk-for-go_tmp/initInput.json ../../../../../azure-sdk-for-go_tmp/initOutput.json
    error	Script return with result [failed] code [1] signal [null] cwd [azure-sdk-for-go/src/github.com/Azure/azure-sdk-for-go]: sh ./initScript.sh
    warn	File azure-sdk-for-go_tmp/initOutput.json not found to read
    command	go run ./tools/generator/main.go automation ../../../../../azure-sdk-for-go_tmp/generateInput.json ../../../../../azure-sdk-for-go_tmp/generateOutput.json
    error	Script return with result [failed] code [1] signal [null] cwd [azure-sdk-for-go/src/github.com/Azure/azure-sdk-for-go]: go run ./tools/generator/main.go automation
    warn	Skip package processing as generation is failed
Posted by Swagger Pipeline | How to fix these errors?

@openapi-workflow-bot
Copy link

NewApiVersionRequired reason:

A service’s API is a contract with customers and is represented by using the api-version query parameter. Changes such as adding an optional property to a request/response or introducing a new operation is a change to the service’s contract and therefore requires a new api-version value. This is critically important for documentation, client libraries, and customer support.

EXAMPLE: if a customer calls a service in the public cloud using api-version=2020-07-27, the new property or operation may exist but if they call the service in a government cloud, air-gapped cloud, or Azure Stack Hub cloud using the same api-version, the property or operation may not exist. Because there is no clear relationship between the service api-version and the new property/operation, customers can’t trust the documentation and Azure customer have difficulty helping customers diagnose issues. In addition, each client library version documents the service version it supports. When an optional property or new operation is added to a service and its Swagger, new client libraries must be produced to expose this functionality to customers. Without updating the api-version, it is unclear to customers which version of a client library supports these new features.

},
"description": "The action that will be executed."
},
"KeyPolicyAttributes": {
Copy link
Member

Choose a reason for hiding this comment

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

Are any of these values required?

@lmazuel lmazuel assigned heaths and unassigned lmazuel Dec 18, 2020
@ghost
Copy link

ghost commented Jan 3, 2021

Hi, @qinl-li. Your PR has no update for 14 days and it is marked as stale PR. If no further update for over 14 days, the bot will close the PR. If you want to refresh the PR, please remove no-recent-activity label.

@ghost ghost added the no-recent-activity label Jan 3, 2021
@openapi-workflow-bot
Copy link

Hi @qinl-li, Your PR has some issues. Please fix the CI sequentially by following the order of Avocado, semantic validation, model validation, breaking change, lintDiff.

TaskHow to fixPrioritySupport (Microsoft alias)
AvocadoFix-AvocadoHighruowan
Semantic validationFix-SemanticValidation-ErrorHighraychen, jianyxi
Model validationFix-ModelValidation-ErrorHighraychen,jianyxi
LintDiffFix-LintDiffhighjianyxi, ruoxuan
If you need further help, please feedback via swagger feedback."

@@ -2149,23 +2159,31 @@
"properties": {
"rotationEnabled": {
"type": "boolean",
"required": false,
Copy link
Member

Choose a reason for hiding this comment

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

Nit: the default for required is false so this isn't necessary, but doesn't hurt.

@heaths
Copy link
Member

heaths commented Mar 6, 2021

@qinl-li can you please resolve comments as you make changes so we can better spot changes?

@ghost
Copy link

ghost commented Mar 28, 2021

Hi, @qinl-li. Your PR has no update for 14 days and it is marked as stale PR. If no further update for over 14 days, the bot will close the PR. If you want to refresh the PR, please remove no-recent-activity label.

@ghost ghost added the no-recent-activity label Mar 28, 2021
@ghost ghost closed this Apr 12, 2021
@ghost
Copy link

ghost commented Apr 12, 2021

Hi, @qinl-li. The PR will be closed since the PR has no update for 28 days. If you still need the PR review to proceed, please reopen it and @ mention PR assignee.

@qinl-li qinl-li reopened this May 28, 2021
@ghost ghost removed the no-recent-activity label May 28, 2021
@qinl-li
Copy link
Contributor Author

qinl-li commented May 28, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@heaths
Copy link
Member

heaths commented Jun 1, 2021

@lmazuel can you merge this? I haven't permissions when there are validation errors, which is expected for KV for now.

@lmazuel lmazuel merged commit f4a4bad into master Jun 4, 2021
mkarmark pushed a commit to mkarmark/azure-rest-api-specs that referenced this pull request Jul 21, 2021
* Key rotation swagger change

* Run PrettierCheck

* fixed spellcheck error

* Update specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json

Co-authored-by: Heath Stewart <[email protected]>

* Update based on comments

* fix prettier failure

* Update Api names

* Add custom words

* Update to key rotation policy

* Remove key rotation policy from response

* Remove required

* fix validation error

* remove parameter force

* Rotate api should be post

* udpate description

* Update UpdateKeyRotationPolicy-example

* Update names

* Microsoft.KeyVault-DP-7.3-preview-KeyAutoRotation

* Update

Co-authored-by: Jack Lichwa <[email protected]>
Co-authored-by: Heath Stewart <[email protected]>
@qinl-li qinl-li deleted the Microsoft.KeyVault-DP-7.3-preview-KeyAutoRotation branch January 28, 2022 22:22
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.

6 participants