Key Vault: Resolve inconsistency between spec and service/client implementation#12966
Key Vault: Resolve inconsistency between spec and service/client implementation#12966lmazuel merged 1 commit intoAzure:masterfrom docschmidt:fix/security-domain-sync
Conversation
|
Hi, @docschmidt Thanks for your PR. I am workflow bot for review process. Here are some small tips. Any feedback about review process or workflow bot, pls contact swagger and tools team. vsswagger@microsoft.com |
| "properties": { | ||
| "value": { | ||
| "type": "string", | ||
| "format": "base64url", |
There was a problem hiding this comment.
A format is still required. This blob must be encoded somehow. Even if a valid UTF-8 string now (e.g. JavaScript or Python source, as @herveyw-msft pondered as a thought experiment), this format might change in the future. The encoding rules would need to stay the same for SDKs to continue working properly.
Thus, the required format (which is most often base64url in KV) must be specified in swagger.
There was a problem hiding this comment.
As we discussed offline, I'm concerned this isn't future-proof. The fact this blob is opaque and could be anything is exactly why it shouldn't be simply string-encoded, which also requires that it's valid UTF-8 or can be transcoded correctly and automatically by the language SDK.
For a "v1" (specifically, 7.2) you could always assume it's UTF-8 string-encoded JSON, but I do recommend that in 7.3-preview you add a contentType or contentEncoding property (like the HTTP headers) like we did for Secure Key Release (now in 7.3-preview) that provides a "hint" to both the client and service as to what it really is. Absence of this continues to imply UTF-8 string-encoded JSON, but presence could indicate whatever the property says - be it encoded binary data or even just "application/json".
To note, the format here only dictates the encoding over the wire. It does not and should not affect how the data is stored by the client or service. So, for example, security domains that are JSON files today would still be JSON files even if you were to leave this "base64url". The only thing that changes it that the CLI and service would base64url-encode or -decode it before hand.
/cc @herveyw-msft @vickm
Swagger Generation Artifacts
|
This PR intents to resolve two final inconsistencies between the spec and how the service and client are implemented. These inconsistencies are:
GET /securitydomain/transferkeytoGET /securitydomain/uploadformatattribute of thevalueproperty ofSecurityDomainObjectThese are not breaking changes to the spec, these are rather a reconciliation of an existing mismatch between the specification and existing implementations.
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.
What's the purpose of the update?
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.
When you expect to publish swagger? Please provide date, or month to public if date is not available yet.
If it's an update to existing version, please select SDKs of specific language and CLIs that require refresh after swagger is published.
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.
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 Breaking Change Review Board as defined in the Breaking Change Policy.
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.