Copilot commented on code in PR #18254:
URL: https://github.com/apache/iceberg/pull/18254#discussion_r4382497220
##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -1429,6 +1429,58 @@ paths:
5XX:
$ref: '#/components/responses/ServerErrorResponse'
+ /v1/{prefix}/namespaces/{namespace}/tables/{table}/sign/batch:
+ parameters:
+ - $ref: '#/components/parameters/prefix'
+ - $ref: '#/components/parameters/namespace'
+ - $ref: '#/components/parameters/table'
+ - $ref: '#/components/parameters/data-access'
+
+ post:
+ tags:
+ - Catalog API
+ summary: Remotely signs a batch of requests to object storage
+ operationId: batchSignRequests
+ description:
+ Signs a batch of requests to object storage on the client's behalf.
+
+
+ A client should use `sign-batch-max-size` from the table's
`RemoteSigningConfig` as the
+ maximum number of elements in a batch.
+
+
+ A 200 response means the batch was processed. Each element of
`requests` is reported once,
+ by its 0-based index, in either `completed` or `failed`.
+
+
+ `X-Iceberg-Access-Delegation` applies to the batch as a whole.
Review Comment:
Please explicitly apply `signRequest`'s signing-mode negotiation rules to
this endpoint. Prerequisite #18080 defines the absent-header default, supported
mechanisms, and 406 guidance only for `signRequest`, so saying the header
applies to the whole batch leaves those cases unspecified for batch clients and
servers.
##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -5466,6 +5518,95 @@ components:
headers:
$ref: '#/components/schemas/MultiValuedMap'
+ RemoteSignBatchRequest:
+ description: >
+ A batch of requests to be signed remotely. `region`, `method`,
`provider` and
+ `properties` apply to every element of `requests`.
+ type: object
+ required:
+ - region
+ - method
+ - provider
+ - requests
+ properties:
+ region:
+ type: string
+ method:
+ type: string
+ enum: ["PUT", "GET", "HEAD", "POST", "DELETE", "PATCH", "OPTIONS"]
+ provider:
+ type: string
+ description: The storage provider for every element of the batch.
The provider should correspond
+ to the scheme used for a storage native URI. For example `s3` for
AWS S3 paths.
+ properties:
+ type: object
+ additionalProperties:
+ type: string
Review Comment:
The forwarding contract for `RemoteSigningConfig.properties` names only
`RemoteSignRequest`, leaving batch clients free to omit server-supplied
properties that the signer may require. Extend that contract to require copying
the properties unchanged into `RemoteSignBatchRequest.properties`, and
regenerate the Python model documentation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]