Functional Implementation of the 2023-06-15-preview API#333
Functional Implementation of the 2023-06-15-preview API#333michael-sabrnak-swi wants to merge 8 commits intoebourg:masterfrom
Conversation
Try to use new API
- Added header-aware RESTResponse return path in RESTClient so callers can access operation metadata (status code, headers, parsed body, raw bytes) without reimplementing HTTP plumbing.
- Updated AzureTrustedSigningService to use the new RESTResponse, read Azure’s operation-location header, and poll the returned /sign/{operationId} URL until completion.
- Adjusted the Azure Trusted Signing tests to simulate the :sign POST plus header-driven polling flow, ensuring certificate-chain fetch, signing success/failure, and timeout cases all match the real API
|
After further investigation, I'm closing this PR. I verified that Microsoft's own latest tooling still uses api-version=
Every downstream tool - the GitHub Action (azure/artifact-signing-action), Azure DevOps tasks (ArtifactSigning 1.0.0, TrustedSigning 0.5.13), the TrustedSigning PowerShell module 0.5.8, and the Notation plugin - all transitively use this same chain. The DLL string tables show REST-style /sign paths (not :sign RPC), and the only API version literal embedded is 2022-06-15-preview. No newer data plane API version has been published in any Microsoft SDK, and the data plane OpenAPI spec is still not in azure-rest-api-specs (the link referenced in this PR returns 404). The original issue (#332) was actually caused by a trailing slash in the endpoint URL producing |
|
Thank you for the info, I'll probably apply the PR when the new API is more widely used. |
This PR was raised in response to #332.
Here’s a quick before/after rundown between Azure Trusted Signing’s 2022-style flow and the
2023-06-15-previewversion:Endpoint shape
.../certificateprofiles/{profile}/sign(no colon)..../certificateprofiles/{profile}:signfor the initial POST, while the poll endpoint moves to/sign/{operationId}and is advertised via headers. More details here.Operation metadata
Response contract
InProgress, with the real signature only available after polling the operation URL untilstatus == "Succeeded"; errors now come in theerrorDetail/errorsenvelope.Payload subtleties
digest, optional additional hash lists) plus stricter algorithm names (RS256, ES256, etc.) - the refactor clamps inputs to what the preview API accepts.Client behavior
AzureTrustedSigningService, and reworked tests to mimic that asynchronous lifecycle.