sungwy commented on code in PR #16822:
URL: https://github.com/apache/iceberg/pull/16822#discussion_r3499373540
##########
open-api/rest-catalog-open-api.py:
##########
@@ -1123,6 +1120,34 @@ class RemoteSignResult(BaseModel):
headers: MultiValuedMap
+class RemoteSigningConfig(BaseModel):
+ """
+ Configuration for the remote signer client.
+ When present, clients SHOULD use this structure instead of the deprecated
`signer.uri` and
+ `signer.endpoint` properties in the `config` map.
+
+ """
+
+ base_uri: str = Field(
+ ...,
+ alias='base-uri',
+ description='The base URI of the signing service as perceived by the
client, incorporating X-Forwarded-* headers set by proxies. When present, takes
precedence over the deprecated `signer.uri` config property.\n',
+ )
+ endpoint_path: str = Field(
+ ...,
+ alias='endpoint-path',
+ description='Relative path to be resolved against `base-uri` to form
the full signing endpoint URI. When present, overrides the deprecated
`signer.endpoint` config property. The endpoint path SHOULD end with the
canonical signing endpoint path defined in this specification, that is:
`/v1/{prefix}/namespaces/{namespace}/tables/{table}/sign`.\n',
+ )
+ properties: dict[str, str] | None = Field(
+ None,
+ description='Static key-value pairs the signer client MUST pass
through unchanged in the `properties` field of every `RemoteSignRequest` sent
to the signing endpoint.\n',
+ )
+ headers: MultiValuedMap | None = Field(
Review Comment:
Also on the fence about this, I think naming this appropriately will be a
challenge because `headers` is overloaded.
What do you think about naming it something like `static_headers` so it
captures the idea that these are static values that are expected to be sent
over to the signing endpoint as is? (cannot be overridden or inferred
##########
open-api/rest-catalog-open-api.py:
##########
@@ -1123,6 +1120,34 @@ class RemoteSignResult(BaseModel):
headers: MultiValuedMap
+class RemoteSigningConfig(BaseModel):
+ """
+ Configuration for the remote signer client.
+ When present, clients SHOULD use this structure instead of the deprecated
`signer.uri` and
+ `signer.endpoint` properties in the `config` map.
+
+ """
+
+ base_uri: str = Field(
+ ...,
+ alias='base-uri',
+ description='The base URI of the signing service as perceived by the
client, incorporating X-Forwarded-* headers set by proxies. When present, takes
precedence over the deprecated `signer.uri` config property.\n',
+ )
+ endpoint_path: str = Field(
+ ...,
+ alias='endpoint-path',
+ description='Relative path to be resolved against `base-uri` to form
the full signing endpoint URI. When present, overrides the deprecated
`signer.endpoint` config property. The endpoint path SHOULD end with the
canonical signing endpoint path defined in this specification, that is:
`/v1/{prefix}/namespaces/{namespace}/tables/{table}/sign`.\n',
+ )
+ properties: dict[str, str] | None = Field(
+ None,
+ description='Static key-value pairs the signer client MUST pass
through unchanged in the `properties` field of every `RemoteSignRequest` sent
to the signing endpoint.\n',
+ )
+ headers: MultiValuedMap | None = Field(
Review Comment:
Also on the fence about this, I think naming this appropriately will be a
challenge because `headers` is overloaded.
What do you think about naming it something like `static_headers` so it
captures the idea that these are static values that are expected to be sent
over to the signing endpoint as is? (should not be overridden or inferred)
--
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]