You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "youngrae81 (via GitHub)" <gi...@apache.org> on 2026/09/09 09:22:08 UTC
[PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
youngrae81 opened a new pull request, #5473:
URL: https://github.com/apache/polaris/pull/5473
When a client offers several access-delegation mechanisms (`X-Iceberg-Access-Delegation: vended-credentials,remote-signing`) and credential vending is not possible for the catalog (S3 with `stsUnavailable: true`, external catalog with vending disabled, `SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION`), `DefaultAccessDelegationModeResolver` deliberately degrades to `REMOTE_SIGNING`. Remote signing is not implemented, and `IcebergCatalogHandler` rejected that resolved mode with a `checkArgument`, so the "graceful" path ended as `400 Unsupported access delegation mode: REMOTE_SIGNING` on loadTable, createTable, updateTable and registerTable.
The Iceberg REST spec makes the header a hint: "The server may choose to supply access via any or none of the requested mechanisms." The handler now returns the table without delegated access in that case. It also stops advertising `client.refresh-credentials-endpoint` when no credentials are vended, so the degraded response is identical to one for a request without the header.
Design point for reviewers: a request for `remote-signing` alone is still rejected with 400, since it cannot be satisfied in any form the client offered. If you prefer the strict spec reading (also fall back to no delegation), that is a one-line change; happy to adjust.
Tests: two handler unit tests (both-modes fallback returns the table without credentials; single-mode remote-signing is still rejected) and an integration test in `RestCatalogFlociS3SpecialIT` loading a table from an S3 catalog without STS with both modes requested, asserting 200 with no credentials and no refresh endpoint. Before the fix the both-modes handler test failed with the 400 above Jump to bottom (click) โ graph on `stsUnavailable` is updated accordingly.
Fixes #5472
## Checklist
- [x] ๐ก Don't disclose security issues! (contact security@apache.org)
- [x] ๐ Clearly explained why the changes are needed, or linked related issues: Fixes #5472
- [x] ๐งช Added/updated tests with good coverage, or manually tested (and explained how)
- [x] ๐ก Added comments for complex logic
- [x] ๐งพ Updated `CHANGELOG.md` (if needed)
- [x] ๐ Updated documentation in `site/content/in-dev/unreleased` (if needed)
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "youngrae81 (via GitHub)" <gi...@apache.org>.
youngrae81 commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4017540765
##########
CHANGELOG.md:
##########
@@ -110,7 +110,11 @@ request adding CHANGELOG notes for breaking (!) changes and possibly other secti
- Deleting a semantic model now returns HTTP 404 instead of HTTP 500 when the model or its
catalog path disappears after resolution and before the deletion is persisted.
- Return HTTP 404 instead of 500 when a policy or its catalog path disappears after resolution and before deletion.
-
+- Iceberg REST: a request whose `X-Iceberg-Access-Delegation` resolves to remote signing (not yet
+ implemented) now returns the table without delegated access instead of `400 Unsupported access
+ delegation mode: REMOTE_SIGNING`. This applies to `remote-signing` requested alone and to
+ `vended-credentials,remote-signing` against a catalog that cannot vend credentials. A response without
Review Comment:
Thanks for pushing on this. To be transparent: this did not come from a production incident. I found it while reading the code: the resolver deliberately degrades a both-modes request to REMOTE_SIGNING (and its tests assert that), while the handler rejected that resolved mode with a 400, so the two disagreed on what the fallback means.
The PR fixed the disagreement in the direction the spec allows (header is a hint, server may supply none), but I don't have a real client that sends both modes and can still reach storage on its own.
Your point stands: a client that asks for vended-credentials or remote-signing most likely has no storage credentials of its own, so a 200 without credentials just moves the failure to the first data access, where it is harder to diagnose. The asymmetry you listed (vended-credentials alone fails, vended-credentials,remote signing silently succeeds) is a real downside of the current change.
I see two consistent options and am happy to implement either:
1. Keep the current behavior (no delegation, 200) and document it. Spec-compliant, but with the troubleshooting downside above.
3. Fail both cases the same way: when the resolved mode is not something Polaris can actually provide, return a clear 4xx such as "This catalog cannot vend credentials or sign requests; request without X-Iceberg-Access-Delegation or configure storage credentials on the client", instead of the current opaque "Unsupported access delegation mode: REMOTE_SIGNING". That keeps the fail-fast property of case 1 and fixes the confusing message that started this.
My preference is option 2, since it matches how vended-credentials alone already behaves. If that works for you and @flyrain, I'll rework the PR accordingly (handler, tests, CHANGELOG, docs).
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "flyrain (via GitHub)" <gi...@apache.org>.
flyrain commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4010874346
##########
CHANGELOG.md:
##########
@@ -110,7 +110,11 @@ request adding CHANGELOG notes for breaking (!) changes and possibly other secti
- Deleting a semantic model now returns HTTP 404 instead of HTTP 500 when the model or its
catalog path disappears after resolution and before the deletion is persisted.
- Return HTTP 404 instead of 500 when a policy or its catalog path disappears after resolution and before deletion.
-
+- Iceberg REST: a request whose `X-Iceberg-Access-Delegation` resolves to remote signing (not yet
+ implemented) now returns the table without delegated access instead of `400 Unsupported access
+ delegation mode: REMOTE_SIGNING`. This applies to `remote-signing` requested alone and to
Review Comment:
The cross line "`" doesn't render correctly.
##########
CHANGELOG.md:
##########
@@ -110,7 +110,11 @@ request adding CHANGELOG notes for breaking (!) changes and possibly other secti
- Deleting a semantic model now returns HTTP 404 instead of HTTP 500 when the model or its
catalog path disappears after resolution and before the deletion is persisted.
- Return HTTP 404 instead of 500 when a policy or its catalog path disappears after resolution and before deletion.
-
+- Iceberg REST: a request whose `X-Iceberg-Access-Delegation` resolves to remote signing (not yet
+ implemented) now returns the table without delegated access instead of `400 Unsupported access
+ delegation mode: REMOTE_SIGNING`. This applies to `remote-signing` requested alone and to
+ `vended-credentials,remote-signing` against a catalog that cannot vend credentials. A response without
Review Comment:
what about a request with header `vended-credentials` only?
##########
CHANGELOG.md:
##########
@@ -110,7 +110,11 @@ request adding CHANGELOG notes for breaking (!) changes and possibly other secti
- Deleting a semantic model now returns HTTP 404 instead of HTTP 500 when the model or its
catalog path disappears after resolution and before the deletion is persisted.
- Return HTTP 404 instead of 500 when a policy or its catalog path disappears after resolution and before deletion.
-
+- Iceberg REST: a request whose `X-Iceberg-Access-Delegation` resolves to remote signing (not yet
+ implemented) now returns the table without delegated access instead of `400 Unsupported access
+ delegation mode: REMOTE_SIGNING`. This applies to `remote-signing` requested alone and to
+ `vended-credentials,remote-signing` against a catalog that cannot vend credentials. A response without
+ vended credentials no longer advertises a credential-refresh endpoint.
Review Comment:
Do we need to mention the credential-fresh endpoint here?
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4017249989
##########
CHANGELOG.md:
##########
@@ -110,7 +110,11 @@ request adding CHANGELOG notes for breaking (!) changes and possibly other secti
- Deleting a semantic model now returns HTTP 404 instead of HTTP 500 when the model or its
catalog path disappears after resolution and before the deletion is persisted.
- Return HTTP 404 instead of 500 when a policy or its catalog path disappears after resolution and before deletion.
-
+- Iceberg REST: a request whose `X-Iceberg-Access-Delegation` resolves to remote signing (not yet
+ implemented) now returns the table without delegated access instead of `400 Unsupported access
+ delegation mode: REMOTE_SIGNING`. This applies to `remote-signing` requested alone and to
+ `vended-credentials,remote-signing` against a catalog that cannot vend credentials. A response without
Review Comment:
TBH, I forgot that we fail if `vended-credentials` is requested, but cannot be provided.
In that light, this PR does produce an awkward effect assuming no STS is available :thinking:
1. `vended-credentials` alone leads to error
2. `vended-credentials,remote-signing` leads to no error and no credentials
As @youngrae81 noted, the IRC spec does not require the server to fail if it cannot satisfy any of the methods mentioned in the `X-Iceberg-Access-Delegation` header.
On the other hand a clean failure in case 1 is helpful for trouble-shooting on the client side.
In practice, I believe most clients requesting `vended-credentials` or `remote-signing` do _not_ have local storage credentials, so receiving a no-error `loadTable` response without any storage credentials is not helpful.
@youngrae81 : Could you elaborate more on your use case? Are your client capable of accessing storage without `X-Iceberg-Access-Delegation`? If so, why is the header added to requests?
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "flyrain (via GitHub)" <gi...@apache.org>.
flyrain commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4010908948
##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandler.java:
##########
@@ -1809,11 +1819,15 @@ protected Optional<AccessDelegationMode> resolveAccessDelegationModes(
accessDelegationModeResolver().resolve(requestedModes, catalogEntity);
// TODO remove when remote signing is implemented
- // Reject if the resolved mode is REMOTE_SIGNING since it's not yet supported
- Preconditions.checkArgument(
- resolvedMode.orElse(null) != AccessDelegationMode.REMOTE_SIGNING,
- "Unsupported access delegation mode: %s",
- AccessDelegationMode.REMOTE_SIGNING);
+ if (resolvedMode.orElse(null) == AccessDelegationMode.REMOTE_SIGNING) {
+ LOGGER.info(
+ "Client requested access delegation modes {} but only {} is viable for catalog {}, "
Review Comment:
It throws an exception before this change, which is caught by here(https://github.com/apache/polaris/blob/69ab55715afca6ce21b3731ef8786d3f1a777818/runtime/service/src/main/java/org/apache/polaris/service/exception/IcebergExceptionMapper.java#L90-L103), and log at INFO. I think INFO is fine, here. WDYT?
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "youngrae81 (via GitHub)" <gi...@apache.org>.
youngrae81 commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4010857504
##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandler.java:
##########
@@ -1194,16 +1194,19 @@ private LoadTableResponse.Builder buildLoadTableResponseWithDelegationCredential
// allowedLocations were tightened after the table was created.
validateTableLocations(tableIdentifier, tableLocations, resolvedStoragePath);
+ boolean vendCredentials = VENDED_CREDENTIALS.equals(delegationMode.orElse(null));
+ // Only advertise the credential-refresh endpoint when credentials are actually vended; a
+ // response without delegated access must look like one for a request without the header.
Review Comment:
Good catch, thanks. The latest commit keys the refresh endpoint on whether credentials actually ended up in the response, not on the resolved mode, and strips the refresh-endpoint keys (AWS, GCS, Azure) from the config otherwise.
Added a handler test where the mode resolves to vended-credentials but the storage integration returns no credentials; it failed on the previous code and passes now.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "youngrae81 (via GitHub)" <gi...@apache.org>.
youngrae81 commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4010840508
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-aws-s3-cloud-storage-specific.md:
##########
@@ -218,7 +218,7 @@ For AWS S3 and S3-compatible backends that expose the STS API (such as MinIO), l
For S3-compatible backends without STS (Apache Ozone S3 gateway, or Ceph RGW without STS enabled),
set `stsUnavailable: true`. Polaris will then skip subscoped credential vending entirely, and the
-client must omit `X-Iceberg-Access-Delegation: vended-credentials` and authenticate to the object
+client must omit the `X-Iceberg-Access-Delegation` header entirely and authenticate to the object
Review Comment:
Went with dimas-b's wording in the latest commit: the header may be sent, but the catalog will not vend credentials or provide a remote-signing endpoint, so the client has to authenticate to the object store directly.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4010234003
##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandler.java:
##########
@@ -1809,11 +1819,15 @@ protected Optional<AccessDelegationMode> resolveAccessDelegationModes(
accessDelegationModeResolver().resolve(requestedModes, catalogEntity);
// TODO remove when remote signing is implemented
- // Reject if the resolved mode is REMOTE_SIGNING since it's not yet supported
- Preconditions.checkArgument(
- resolvedMode.orElse(null) != AccessDelegationMode.REMOTE_SIGNING,
- "Unsupported access delegation mode: %s",
- AccessDelegationMode.REMOTE_SIGNING);
+ if (resolvedMode.orElse(null) == AccessDelegationMode.REMOTE_SIGNING) {
+ LOGGER.info(
+ "Client requested access delegation modes {} but only {} is viable for catalog {}, "
Review Comment:
This can spam the server log in cases this PR is attempting to fix ๐ค
Can we go with `.debug()` instead?
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-aws-s3-cloud-storage-specific.md:
##########
@@ -218,7 +218,7 @@ For AWS S3 and S3-compatible backends that expose the STS API (such as MinIO), l
For S3-compatible backends without STS (Apache Ozone S3 gateway, or Ceph RGW without STS enabled),
set `stsUnavailable: true`. Polaris will then skip subscoped credential vending entirely, and the
-client must omit `X-Iceberg-Access-Delegation: vended-credentials` and authenticate to the object
+client must omit the `X-Iceberg-Access-Delegation` header entirely and authenticate to the object
Review Comment:
With this PR, the "must" is not longer a requirement, I think. The client may submit the `X-Iceberg-Access-Delegation`, but will not receive any vended credentials.
##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandler.java:
##########
@@ -1194,16 +1194,19 @@ private LoadTableResponse.Builder buildLoadTableResponseWithDelegationCredential
// allowedLocations were tightened after the table was created.
validateTableLocations(tableIdentifier, tableLocations, resolvedStoragePath);
+ boolean vendCredentials = VENDED_CREDENTIALS.equals(delegationMode.orElse(null));
+ // Only advertise the credential-refresh endpoint when credentials are actually vended; a
+ // response without delegated access must look like one for a request without the header.
Review Comment:
This is a very good point ๐
However, `vendCredentials == true` does not guarantee that credentials are actually vended: `credentialConfig` may be empty (line 1210).
Would it be possible to keep these two cases in sync?
##########
CHANGELOG.md:
##########
@@ -110,7 +110,13 @@ request adding CHANGELOG notes for breaking (!) changes and possibly other secti
- Deleting a semantic model now returns HTTP 404 instead of HTTP 500 when the model or its
catalog path disappears after resolution and before the deletion is persisted.
- Return HTTP 404 instead of 500 when a policy or its catalog path disappears after resolution and before deletion.
-
+- Iceberg REST: a request whose `X-Iceberg-Access-Delegation` resolves to remote signing, which is not
+ implemented, now returns the table without delegated access, as the Iceberg REST specification allows
+ for this optional header. This covers `remote-signing` requested alone, and
+ `vended-credentials,remote-signing` against a catalog that cannot vend credentials (for example S3 with
+ `stsUnavailable: true`, or an external catalog with credential vending disabled). Previously both cases
+ failed with `400 Unsupported access delegation mode: REMOTE_SIGNING`. The server logs at `INFO` when it
+ falls back to no delegation.
Review Comment:
Yes, I propose to remove the INFO log too.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: clarify the error when X-Iceberg-Access-Delegation resolves to unsupported remote signing [polaris]
Posted by "youngrae81 (via GitHub)" <gi...@apache.org>.
youngrae81 commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4022503053
##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandler.java:
##########
@@ -1809,11 +1819,15 @@ protected Optional<AccessDelegationMode> resolveAccessDelegationModes(
accessDelegationModeResolver().resolve(requestedModes, catalogEntity);
// TODO remove when remote signing is implemented
- // Reject if the resolved mode is REMOTE_SIGNING since it's not yet supported
- Preconditions.checkArgument(
- resolvedMode.orElse(null) != AccessDelegationMode.REMOTE_SIGNING,
- "Unsupported access delegation mode: %s",
- AccessDelegationMode.REMOTE_SIGNING);
+ if (resolvedMode.orElse(null) == AccessDelegationMode.REMOTE_SIGNING) {
+ LOGGER.info(
+ "Client requested access delegation modes {} but only {} is viable for catalog {}, "
Review Comment:
> This can spam the server log in cases this PR is attempting to fix ๐ค
>
> Can we go with `.debug()` instead?
Moot now: the log statement is removed along with the fallback branch.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "flyrain (via GitHub)" <gi...@apache.org>.
flyrain commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r3993773324
##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandler.java:
##########
@@ -1717,11 +1728,19 @@ protected Optional<AccessDelegationMode> resolveAccessDelegationModes(
accessDelegationModeResolver().resolve(requestedModes, catalogEntity);
// TODO remove when remote signing is implemented
- // Reject if the resolved mode is REMOTE_SIGNING since it's not yet supported
- Preconditions.checkArgument(
- resolvedMode.orElse(null) != AccessDelegationMode.REMOTE_SIGNING,
- "Unsupported access delegation mode: %s",
- AccessDelegationMode.REMOTE_SIGNING);
+ if (resolvedMode.orElse(null) == AccessDelegationMode.REMOTE_SIGNING) {
+ Preconditions.checkArgument(
+ requestedModes.size() > 1,
Review Comment:
Could we also return no delegation when remote-signing is the only requested mechanism given that IRC spec consider the header is optional?
We may remove this single-mode rejection and updating the test accordingly.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "flyrain (via GitHub)" <gi...@apache.org>.
flyrain commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4018310096
##########
CHANGELOG.md:
##########
@@ -110,7 +110,11 @@ request adding CHANGELOG notes for breaking (!) changes and possibly other secti
- Deleting a semantic model now returns HTTP 404 instead of HTTP 500 when the model or its
catalog path disappears after resolution and before the deletion is persisted.
- Return HTTP 404 instead of 500 when a policy or its catalog path disappears after resolution and before deletion.
-
+- Iceberg REST: a request whose `X-Iceberg-Access-Delegation` resolves to remote signing (not yet
+ implemented) now returns the table without delegated access instead of `400 Unsupported access
+ delegation mode: REMOTE_SIGNING`. This applies to `remote-signing` requested alone and to
+ `vended-credentials,remote-signing` against a catalog that cannot vend credentials. A response without
Review Comment:
Option 2 is fine to me, as option 1 is a break change. I think we should error out for `remote-signing` alone as well. In that case, there'd be no behavior change in this PR.
Looking forward, erroring out is not quite aligned with the IRC spec. But I'm OK if we want to discuss that in a followup issue/PR.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "youngrae81 (via GitHub)" <gi...@apache.org>.
youngrae81 commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4017540765
##########
CHANGELOG.md:
##########
@@ -110,7 +110,11 @@ request adding CHANGELOG notes for breaking (!) changes and possibly other secti
- Deleting a semantic model now returns HTTP 404 instead of HTTP 500 when the model or its
catalog path disappears after resolution and before the deletion is persisted.
- Return HTTP 404 instead of 500 when a policy or its catalog path disappears after resolution and before deletion.
-
+- Iceberg REST: a request whose `X-Iceberg-Access-Delegation` resolves to remote signing (not yet
+ implemented) now returns the table without delegated access instead of `400 Unsupported access
+ delegation mode: REMOTE_SIGNING`. This applies to `remote-signing` requested alone and to
+ `vended-credentials,remote-signing` against a catalog that cannot vend credentials. A response without
Review Comment:
Thanks for pushing on this. To be transparent: this did not come from a production incident. I found it while reading the code: the resolver deliberately degrades a both-modes request to REMOTE_SIGNING (and its tests assert that), while the handler rejected that resolved mode with a 400, so the two disagreed on what the fallback means.
The PR fixed the disagreement in the direction the spec allows (header is a hint, server may supply none), but I don't have a real client that sends both modes and can still reach storage on its own.
Your point stands: a client that asks for vended-credentials or remote-signing most likely has no storage credentials of its own, so a 200 without credentials just moves the failure to the first data access, where it is harder to diagnose. The asymmetry you listed (vended-credentials alone fails, vended-credentials, remote-signing silently succeeds) is a real downside of the current change.
I see two consistent options and am happy to implement either:
1. Keep the current behavior (no delegation, 200) and document it. Spec-compliant, but with the troubleshooting downside above.
2. Fail both cases the same way: when the resolved mode is not something Polaris can actually provide, return a clear 4xx such as "This catalog cannot vend credentials or sign requests; request without X-Iceberg-Access-Delegation or configure storage credentials on the client", instead of the current opaque "Unsupported access delegation mode: REMOTE_SIGNING". That keeps the fail-fast property of case 1 and fixes the confusing message that started this.
My preference is option 2, since it matches how vended-credentials alone already behaves. If that works for you and @flyrain, I'll rework the PR accordingly (handler, tests, CHANGELOG, docs).
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "flyrain (via GitHub)" <gi...@apache.org>.
flyrain commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r3993721470
##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandler.java:
##########
@@ -1780,11 +1728,19 @@ protected Optional<AccessDelegationMode> resolveAccessDelegationModes(
accessDelegationModeResolver().resolve(requestedModes, catalogEntity);
// TODO remove when remote signing is implemented
- // Reject if the resolved mode is REMOTE_SIGNING since it's not yet supported
- Preconditions.checkArgument(
- resolvedMode.orElse(null) != AccessDelegationMode.REMOTE_SIGNING,
- "Unsupported access delegation mode: %s",
- AccessDelegationMode.REMOTE_SIGNING);
+ if (resolvedMode.orElse(null) == AccessDelegationMode.REMOTE_SIGNING) {
+ Preconditions.checkArgument(
+ requestedModes.size() > 1,
+ "Unsupported access delegation mode: %s",
+ AccessDelegationMode.REMOTE_SIGNING);
+ LOGGER.debug(
Review Comment:
Should we make it info level? I think this message is valuable for the system admin.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "youngrae81 (via GitHub)" <gi...@apache.org>.
youngrae81 commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r3994751668
##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandler.java:
##########
@@ -1780,11 +1728,19 @@ protected Optional<AccessDelegationMode> resolveAccessDelegationModes(
accessDelegationModeResolver().resolve(requestedModes, catalogEntity);
// TODO remove when remote signing is implemented
- // Reject if the resolved mode is REMOTE_SIGNING since it's not yet supported
- Preconditions.checkArgument(
- resolvedMode.orElse(null) != AccessDelegationMode.REMOTE_SIGNING,
- "Unsupported access delegation mode: %s",
- AccessDelegationMode.REMOTE_SIGNING);
+ if (resolvedMode.orElse(null) == AccessDelegationMode.REMOTE_SIGNING) {
+ Preconditions.checkArgument(
+ requestedModes.size() > 1,
+ "Unsupported access delegation mode: %s",
+ AccessDelegationMode.REMOTE_SIGNING);
+ LOGGER.debug(
Review Comment:
Done, changed to INFO in the latest commit. Agreed it is useful for operators to see clients asking for an unsupported mechanism.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "youngrae81 (via GitHub)" <gi...@apache.org>.
youngrae81 commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4010891016
##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandler.java:
##########
@@ -1194,33 +1203,43 @@ private LoadTableResponse.Builder buildLoadTableResponseWithDelegationCredential
// allowedLocations were tightened after the table was created.
validateTableLocations(tableIdentifier, tableLocations, resolvedStoragePath);
+ boolean vendCredentials = VENDED_CREDENTIALS.equals(delegationMode.orElse(null));
StorageAccessConfig storageAccessConfig =
storageAccessConfigProvider()
.getStorageAccessConfig(
tableIdentifier,
tableLocations,
actions,
- refreshCredentialsEndpoint,
+ vendCredentials ? refreshCredentialsEndpoint : Optional.empty(),
resolvedStoragePath);
Map<String, String> credentialConfig = storageAccessConfig.credentials();
- if (VENDED_CREDENTIALS.equals(delegationMode.orElse(null))) {
- if (!credentialConfig.isEmpty()) {
- responseBuilder.addAllConfig(credentialConfig);
- responseBuilder.addCredential(
- ImmutableCredential.builder()
- .prefix(tableMetadata.location())
- .config(credentialConfig)
- .build());
- } else {
- Boolean skipCredIndirection =
- realmConfig().getConfig(FeatureConfiguration.SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION);
- Preconditions.checkArgument(
- !storageAccessConfig.supportsCredentialVending() || skipCredIndirection,
- "Credential vending was requested for table %s, but no credentials are available",
- tableIdentifier);
- }
+ boolean credentialsVended = vendCredentials && !credentialConfig.isEmpty();
+ if (credentialsVended) {
+ responseBuilder.addAllConfig(credentialConfig);
+ responseBuilder.addCredential(
+ ImmutableCredential.builder()
+ .prefix(tableMetadata.location())
+ .config(credentialConfig)
+ .build());
+ } else if (vendCredentials) {
+ Boolean skipCredIndirection =
+ realmConfig().getConfig(FeatureConfiguration.SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION);
+ Preconditions.checkArgument(
+ !storageAccessConfig.supportsCredentialVending() || skipCredIndirection,
+ "Credential vending was requested for table %s, but no credentials are available",
+ tableIdentifier);
+ }
+ // The credential-refresh endpoint only makes sense next to vended credentials. Keep the two
+ // in sync: a response without credentials (delegation not resolved, or the storage
+ // integration vended none) must not advertise a refresh endpoint either.
+ Map<String, String> extraProperties = storageAccessConfig.extraProperties();
+ if (!credentialsVended) {
+ extraProperties =
+ extraProperties.entrySet().stream()
+ .filter(e -> !REFRESH_CREDENTIALS_ENDPOINT_PROPERTIES.contains(e.getKey()))
Review Comment:
No worries, and thanks for double-checking.
You're right: every path that yields no credentials either fails the request or returns an empty config with no extra properties, so the filtering could never remove anything. Reverted to the previous version in the latest commit and dropped the test for that unreachable case.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "youngrae81 (via GitHub)" <gi...@apache.org>.
youngrae81 commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4010798638
##########
CHANGELOG.md:
##########
@@ -110,7 +110,13 @@ request adding CHANGELOG notes for breaking (!) changes and possibly other secti
- Deleting a semantic model now returns HTTP 404 instead of HTTP 500 when the model or its
catalog path disappears after resolution and before the deletion is persisted.
- Return HTTP 404 instead of 500 when a policy or its catalog path disappears after resolution and before deletion.
-
+- Iceberg REST: a request whose `X-Iceberg-Access-Delegation` resolves to remote signing, which is not
+ implemented, now returns the table without delegated access, as the Iceberg REST specification allows
+ for this optional header. This covers `remote-signing` requested alone, and
+ `vended-credentials,remote-signing` against a catalog that cannot vend credentials (for example S3 with
+ `stsUnavailable: true`, or an external catalog with credential vending disabled). Previously both cases
+ failed with `400 Unsupported access delegation mode: REMOTE_SIGNING`. The server logs at `INFO` when it
+ falls back to no delegation.
Review Comment:
Done, shortened the entry and dropped the log mention. The log itself is back to DEBUG in the latest commit.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: clarify the error when X-Iceberg-Access-Delegation resolves to unsupported remote signing [polaris]
Posted by "youngrae81 (via GitHub)" <gi...@apache.org>.
youngrae81 commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4033116368
##########
CHANGELOG.md:
##########
@@ -110,7 +110,11 @@ request adding CHANGELOG notes for breaking (!) changes and possibly other secti
- Deleting a semantic model now returns HTTP 404 instead of HTTP 500 when the model or its
catalog path disappears after resolution and before the deletion is persisted.
- Return HTTP 404 instead of 500 when a policy or its catalog path disappears after resolution and before deletion.
-
+- Iceberg REST: a request whose `X-Iceberg-Access-Delegation` resolves to remote signing (not yet
+ implemented) now returns the table without delegated access instead of `400 Unsupported access
+ delegation mode: REMOTE_SIGNING`. This applies to `remote-signing` requested alone and to
+ `vended-credentials,remote-signing` against a catalog that cannot vend credentials. A response without
Review Comment:
Makes sense, I'll start a [DISCUSS] thread on dev@ instead of a GitHub issue. Thanks for the guidance, and for merging!
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: clarify the error when X-Iceberg-Access-Delegation resolves to unsupported remote signing [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4028908986
##########
CHANGELOG.md:
##########
@@ -110,7 +110,11 @@ request adding CHANGELOG notes for breaking (!) changes and possibly other secti
- Deleting a semantic model now returns HTTP 404 instead of HTTP 500 when the model or its
catalog path disappears after resolution and before the deletion is persisted.
- Return HTTP 404 instead of 500 when a policy or its catalog path disappears after resolution and before deletion.
-
+- Iceberg REST: a request whose `X-Iceberg-Access-Delegation` resolves to remote signing (not yet
+ implemented) now returns the table without delegated access instead of `400 Unsupported access
+ delegation mode: REMOTE_SIGNING`. This applies to `remote-signing` requested alone and to
+ `vended-credentials,remote-signing` against a catalog that cannot vend credentials. A response without
Review Comment:
I'd say a `dev` email thread is probably preferable for spec alignment discussions :thinking:
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "youngrae81 (via GitHub)" <gi...@apache.org>.
youngrae81 commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4010798638
##########
CHANGELOG.md:
##########
@@ -110,7 +110,13 @@ request adding CHANGELOG notes for breaking (!) changes and possibly other secti
- Deleting a semantic model now returns HTTP 404 instead of HTTP 500 when the model or its
catalog path disappears after resolution and before the deletion is persisted.
- Return HTTP 404 instead of 500 when a policy or its catalog path disappears after resolution and before deletion.
-
+- Iceberg REST: a request whose `X-Iceberg-Access-Delegation` resolves to remote signing, which is not
+ implemented, now returns the table without delegated access, as the Iceberg REST specification allows
+ for this optional header. This covers `remote-signing` requested alone, and
+ `vended-credentials,remote-signing` against a catalog that cannot vend credentials (for example S3 with
+ `stsUnavailable: true`, or an external catalog with credential vending disabled). Previously both cases
+ failed with `400 Unsupported access delegation mode: REMOTE_SIGNING`. The server logs at `INFO` when it
+ falls back to no delegation.
Review Comment:
Done, shortened the entry and dropped the log mention. The log itself is back to DEBUG in the latest commit.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4010945648
##########
CHANGELOG.md:
##########
@@ -110,7 +110,11 @@ request adding CHANGELOG notes for breaking (!) changes and possibly other secti
- Deleting a semantic model now returns HTTP 404 instead of HTTP 500 when the model or its
catalog path disappears after resolution and before the deletion is persisted.
- Return HTTP 404 instead of 500 when a policy or its catalog path disappears after resolution and before deletion.
-
+- Iceberg REST: a request whose `X-Iceberg-Access-Delegation` resolves to remote signing (not yet
+ implemented) now returns the table without delegated access instead of `400 Unsupported access
+ delegation mode: REMOTE_SIGNING`. This applies to `remote-signing` requested alone and to
+ `vended-credentials,remote-signing` against a catalog that cannot vend credentials. A response without
Review Comment:
I'd be +1 to keep CHANGELOG short. Docs have more info for interested readers.
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-aws-s3-cloud-storage-specific.md:
##########
@@ -217,9 +217,9 @@ For AWS S3 and S3-compatible backends that expose the STS API (such as MinIO), l
```
For S3-compatible backends without STS (Apache Ozone S3 gateway, or Ceph RGW without STS enabled),
-set `stsUnavailable: true`. Polaris will then skip subscoped credential vending entirely, and the
-client must omit `X-Iceberg-Access-Delegation: vended-credentials` and authenticate to the object
-store directly. The Polaris guides for [Apache Ozone][ozone-guide] and [Ceph][ceph-guide] show
+set `stsUnavailable: true`. Polaris will then skip subscoped credential vending entirely. The client
+may still send the `X-Iceberg-Access-Delegation` header, but the catalog will not vend credentials or
+provide any remote-signing endpoint, so the client has to authenticate to the object store directly. The Polaris guides for [Apache Ozone][ozone-guide] and [Ceph][ceph-guide] show
Review Comment:
nit: odd like breaks (this like is very long)
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4010857454
##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandler.java:
##########
@@ -1194,33 +1203,43 @@ private LoadTableResponse.Builder buildLoadTableResponseWithDelegationCredential
// allowedLocations were tightened after the table was created.
validateTableLocations(tableIdentifier, tableLocations, resolvedStoragePath);
+ boolean vendCredentials = VENDED_CREDENTIALS.equals(delegationMode.orElse(null));
StorageAccessConfig storageAccessConfig =
storageAccessConfigProvider()
.getStorageAccessConfig(
tableIdentifier,
tableLocations,
actions,
- refreshCredentialsEndpoint,
+ vendCredentials ? refreshCredentialsEndpoint : Optional.empty(),
resolvedStoragePath);
Map<String, String> credentialConfig = storageAccessConfig.credentials();
- if (VENDED_CREDENTIALS.equals(delegationMode.orElse(null))) {
- if (!credentialConfig.isEmpty()) {
- responseBuilder.addAllConfig(credentialConfig);
- responseBuilder.addCredential(
- ImmutableCredential.builder()
- .prefix(tableMetadata.location())
- .config(credentialConfig)
- .build());
- } else {
- Boolean skipCredIndirection =
- realmConfig().getConfig(FeatureConfiguration.SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION);
- Preconditions.checkArgument(
- !storageAccessConfig.supportsCredentialVending() || skipCredIndirection,
- "Credential vending was requested for table %s, but no credentials are available",
- tableIdentifier);
- }
+ boolean credentialsVended = vendCredentials && !credentialConfig.isEmpty();
+ if (credentialsVended) {
+ responseBuilder.addAllConfig(credentialConfig);
+ responseBuilder.addCredential(
+ ImmutableCredential.builder()
+ .prefix(tableMetadata.location())
+ .config(credentialConfig)
+ .build());
+ } else if (vendCredentials) {
+ Boolean skipCredIndirection =
+ realmConfig().getConfig(FeatureConfiguration.SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION);
+ Preconditions.checkArgument(
+ !storageAccessConfig.supportsCredentialVending() || skipCredIndirection,
+ "Credential vending was requested for table %s, but no credentials are available",
+ tableIdentifier);
+ }
+ // The credential-refresh endpoint only makes sense next to vended credentials. Keep the two
+ // in sync: a response without credentials (delegation not resolved, or the storage
+ // integration vended none) must not advertise a refresh endpoint either.
+ Map<String, String> extraProperties = storageAccessConfig.extraProperties();
+ if (!credentialsVended) {
+ extraProperties =
+ extraProperties.entrySet().stream()
+ .filter(e -> !REFRESH_CREDENTIALS_ENDPOINT_PROPERTIES.contains(e.getKey()))
Review Comment:
Other than this, the PR LGTM ๐
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "youngrae81 (via GitHub)" <gi...@apache.org>.
youngrae81 commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4010999199
##########
CHANGELOG.md:
##########
@@ -110,7 +110,11 @@ request adding CHANGELOG notes for breaking (!) changes and possibly other secti
- Deleting a semantic model now returns HTTP 404 instead of HTTP 500 when the model or its
catalog path disappears after resolution and before the deletion is persisted.
- Return HTTP 404 instead of 500 when a policy or its catalog path disappears after resolution and before deletion.
-
+- Iceberg REST: a request whose `X-Iceberg-Access-Delegation` resolves to remote signing (not yet
+ implemented) now returns the table without delegated access instead of `400 Unsupported access
+ delegation mode: REMOTE_SIGNING`. This applies to `remote-signing` requested alone and to
+ `vended-credentials,remote-signing` against a catalog that cannot vend credentials. A response without
Review Comment:
`vended-credentials` alone is unchanged by this PR: against a catalog that cannot vend credentials it still fails with "Credential vending was requested ... but no credentials are available", as the existing integration test asserts. Only requests that resolve to remote-signing change behavior. Agreed with dimas-b on keeping the entry short; the docs paragraph covers the rest.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "youngrae81 (via GitHub)" <gi...@apache.org>.
youngrae81 commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4010999199
##########
CHANGELOG.md:
##########
@@ -110,7 +110,11 @@ request adding CHANGELOG notes for breaking (!) changes and possibly other secti
- Deleting a semantic model now returns HTTP 404 instead of HTTP 500 when the model or its
catalog path disappears after resolution and before the deletion is persisted.
- Return HTTP 404 instead of 500 when a policy or its catalog path disappears after resolution and before deletion.
-
+- Iceberg REST: a request whose `X-Iceberg-Access-Delegation` resolves to remote signing (not yet
+ implemented) now returns the table without delegated access instead of `400 Unsupported access
+ delegation mode: REMOTE_SIGNING`. This applies to `remote-signing` requested alone and to
+ `vended-credentials,remote-signing` against a catalog that cannot vend credentials. A response without
Review Comment:
`vended-credentials` alone is unchanged by this PR: against a catalog that cannot vend credentials it still fails with "Credential vending was requested ... but no credentials are available", as the existing integration test asserts. Only requests that resolve to remote-signing change behavior. Agreed with dimas-b on keeping the entry short the docs paragraph covers the rest.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "youngrae81 (via GitHub)" <gi...@apache.org>.
youngrae81 commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4010852851
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-aws-s3-cloud-storage-specific.md:
##########
@@ -218,7 +218,7 @@ For AWS S3 and S3-compatible backends that expose the STS API (such as MinIO), l
For S3-compatible backends without STS (Apache Ozone S3 gateway, or Ceph RGW without STS enabled),
set `stsUnavailable: true`. Polaris will then skip subscoped credential vending entirely, and the
-client must omit `X-Iceberg-Access-Delegation: vended-credentials` and authenticate to the object
+client must omit the `X-Iceberg-Access-Delegation` header entirely and authenticate to the object
Review Comment:
>
Went with dimas-b's wording in the latest commit: the header may be sent, but the catalog will not vend credentials or provide a remote-signing endpoint, so the client has to authenticate to the object store directly.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "youngrae81 (via GitHub)" <gi...@apache.org>.
youngrae81 commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4010840508
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-aws-s3-cloud-storage-specific.md:
##########
@@ -218,7 +218,7 @@ For AWS S3 and S3-compatible backends that expose the STS API (such as MinIO), l
For S3-compatible backends without STS (Apache Ozone S3 gateway, or Ceph RGW without STS enabled),
set `stsUnavailable: true`. Polaris will then skip subscoped credential vending entirely, and the
-client must omit `X-Iceberg-Access-Delegation: vended-credentials` and authenticate to the object
+client must omit the `X-Iceberg-Access-Delegation` header entirely and authenticate to the object
Review Comment:
Agreed, the paragraph no longer says "must"; it now describes what the client gets (no credentials, no signing endpoint) and what it has to do instead.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: clarify the error when X-Iceberg-Access-Delegation resolves to unsupported remote signing [polaris]
Posted by "youngrae81 (via GitHub)" <gi...@apache.org>.
youngrae81 commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4022493523
##########
CHANGELOG.md:
##########
@@ -110,7 +110,11 @@ request adding CHANGELOG notes for breaking (!) changes and possibly other secti
- Deleting a semantic model now returns HTTP 404 instead of HTTP 500 when the model or its
catalog path disappears after resolution and before the deletion is persisted.
- Return HTTP 404 instead of 500 when a policy or its catalog path disappears after resolution and before deletion.
-
+- Iceberg REST: a request whose `X-Iceberg-Access-Delegation` resolves to remote signing (not yet
+ implemented) now returns the table without delegated access instead of `400 Unsupported access
+ delegation mode: REMOTE_SIGNING`. This applies to `remote-signing` requested alone and to
+ `vended-credentials,remote-signing` against a catalog that cannot vend credentials. A response without
Review Comment:
Done in the latest commit, thanks both. Both `remote-signing` alone and `vended-credentials,remote-signing` against a non-vending catalog now fail with "This catalog cannot vend credentials or sign requests; request without X-Iceberg-Access-Delegation and configure storage credentials on the client" (with "and", as suggested). No behavior change otherwise: the fallback branch, the debug log and the defensive refresh-endpoint tweak are gone, and the docs paragraph is back to its original wording.
One implementation note: I raise the error in the handler's `resolveAccessDelegationModes` rather than inside `DefaultAccessDelegationModeResolver`, since that is where "remote signing is not implemented" already lives and it keeps the resolver's existing tests untouched. Happy to move it if you prefer it in the resolver.
I'll open a follow-up issue for the spec-alignment discussion (server may supply none of the requested mechanisms) as @flyrain suggested. PR title and description updated to reflect the narrower scope.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "flyrain (via GitHub)" <gi...@apache.org>.
flyrain commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4009584870
##########
CHANGELOG.md:
##########
@@ -110,7 +110,13 @@ request adding CHANGELOG notes for breaking (!) changes and possibly other secti
- Deleting a semantic model now returns HTTP 404 instead of HTTP 500 when the model or its
catalog path disappears after resolution and before the deletion is persisted.
- Return HTTP 404 instead of 500 when a policy or its catalog path disappears after resolution and before deletion.
-
+- Iceberg REST: a request whose `X-Iceberg-Access-Delegation` resolves to remote signing, which is not
+ implemented, now returns the table without delegated access, as the Iceberg REST specification allows
+ for this optional header. This covers `remote-signing` requested alone, and
+ `vended-credentials,remote-signing` against a catalog that cannot vend credentials (for example S3 with
+ `stsUnavailable: true`, or an external catalog with credential vending disabled). Previously both cases
+ failed with `400 Unsupported access delegation mode: REMOTE_SIGNING`. The server logs at `INFO` when it
+ falls back to no delegation.
Review Comment:
Nit: Can you make it concise and remove the logs statement?
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-aws-s3-cloud-storage-specific.md:
##########
@@ -218,7 +218,7 @@ For AWS S3 and S3-compatible backends that expose the STS API (such as MinIO), l
For S3-compatible backends without STS (Apache Ozone S3 gateway, or Ceph RGW without STS enabled),
set `stsUnavailable: true`. Polaris will then skip subscoped credential vending entirely, and the
-client must omit `X-Iceberg-Access-Delegation: vended-credentials` and authenticate to the object
+client must omit the `X-Iceberg-Access-Delegation` header entirely and authenticate to the object
Review Comment:
```suggestion
client should omit the `X-Iceberg-Access-Delegation` header and authenticate to the object
```
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4010851398
##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandler.java:
##########
@@ -1194,33 +1203,43 @@ private LoadTableResponse.Builder buildLoadTableResponseWithDelegationCredential
// allowedLocations were tightened after the table was created.
validateTableLocations(tableIdentifier, tableLocations, resolvedStoragePath);
+ boolean vendCredentials = VENDED_CREDENTIALS.equals(delegationMode.orElse(null));
StorageAccessConfig storageAccessConfig =
storageAccessConfigProvider()
.getStorageAccessConfig(
tableIdentifier,
tableLocations,
actions,
- refreshCredentialsEndpoint,
+ vendCredentials ? refreshCredentialsEndpoint : Optional.empty(),
resolvedStoragePath);
Map<String, String> credentialConfig = storageAccessConfig.credentials();
- if (VENDED_CREDENTIALS.equals(delegationMode.orElse(null))) {
- if (!credentialConfig.isEmpty()) {
- responseBuilder.addAllConfig(credentialConfig);
- responseBuilder.addCredential(
- ImmutableCredential.builder()
- .prefix(tableMetadata.location())
- .config(credentialConfig)
- .build());
- } else {
- Boolean skipCredIndirection =
- realmConfig().getConfig(FeatureConfiguration.SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION);
- Preconditions.checkArgument(
- !storageAccessConfig.supportsCredentialVending() || skipCredIndirection,
- "Credential vending was requested for table %s, but no credentials are available",
- tableIdentifier);
- }
+ boolean credentialsVended = vendCredentials && !credentialConfig.isEmpty();
+ if (credentialsVended) {
+ responseBuilder.addAllConfig(credentialConfig);
+ responseBuilder.addCredential(
+ ImmutableCredential.builder()
+ .prefix(tableMetadata.location())
+ .config(credentialConfig)
+ .build());
+ } else if (vendCredentials) {
+ Boolean skipCredIndirection =
+ realmConfig().getConfig(FeatureConfiguration.SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION);
+ Preconditions.checkArgument(
+ !storageAccessConfig.supportsCredentialVending() || skipCredIndirection,
+ "Credential vending was requested for table %s, but no credentials are available",
+ tableIdentifier);
+ }
+ // The credential-refresh endpoint only makes sense next to vended credentials. Keep the two
+ // in sync: a response without credentials (delegation not resolved, or the storage
+ // integration vended none) must not advertise a refresh endpoint either.
+ Map<String, String> extraProperties = storageAccessConfig.extraProperties();
+ if (!credentialsVended) {
+ extraProperties =
+ extraProperties.entrySet().stream()
+ .filter(e -> !REFRESH_CREDENTIALS_ENDPOINT_PROPERTIES.contains(e.getKey()))
Review Comment:
After more looking into the current code, I do not think it is possible for these properties to be set if credential vending is off.
Apologies, if my previous comment was confusing. I guess I anticipated something that did not actually exist ๐
I guess the previous version was more correct.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: clarify the error when X-Iceberg-Access-Delegation resolves to unsupported remote signing [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b merged PR #5473:
URL: https://github.com/apache/polaris/pull/5473
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r3967348368
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-aws-s3-cloud-storage-specific.md:
##########
@@ -218,8 +218,10 @@ For AWS S3 and S3-compatible backends that expose the STS API (such as MinIO), l
For S3-compatible backends without STS (Apache Ozone S3 gateway, or Ceph RGW without STS enabled),
set `stsUnavailable: true`. Polaris will then skip subscoped credential vending entirely, and the
-client must omit `X-Iceberg-Access-Delegation: vended-credentials` and authenticate to the object
-store directly. The Polaris guides for [Apache Ozone][ozone-guide] and [Ceph][ceph-guide] show
+client must authenticate to the object store directly. A client that requests only
Review Comment:
Not sure about changing these instructions. The prior version is imho more correct than the proposed one, which relies on something not being implemented. As soon as remote signing gets implemented the proposed change will become inaccurate, and we'll probably forget to update it until someone notices the error.
If you want we could just say that "the client must omit the `X-Iceberg-Access-Delegation` header entirely and authenticate to the object store directly." WDYT?
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "youngrae81 (via GitHub)" <gi...@apache.org>.
youngrae81 commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r3968947022
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-aws-s3-cloud-storage-specific.md:
##########
@@ -218,8 +218,10 @@ For AWS S3 and S3-compatible backends that expose the STS API (such as MinIO), l
For S3-compatible backends without STS (Apache Ozone S3 gateway, or Ceph RGW without STS enabled),
set `stsUnavailable: true`. Polaris will then skip subscoped credential vending entirely, and the
-client must omit `X-Iceberg-Access-Delegation: vended-credentials` and authenticate to the object
-store directly. The Polaris guides for [Apache Ozone][ozone-guide] and [Ceph][ceph-guide] show
+client must authenticate to the object store directly. A client that requests only
Review Comment:
Agreed, that's a better framing: the docs should describe what the client does, not the server's current fallback, which would go stale once remote signing lands. Updated in the follow-up commit with your wording ("omit the `X-Iceberg-Access-Delegation` header entirely and authenticate to the object store directly")
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "youngrae81 (via GitHub)" <gi...@apache.org>.
youngrae81 commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r3994753525
##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandler.java:
##########
@@ -1717,11 +1728,19 @@ protected Optional<AccessDelegationMode> resolveAccessDelegationModes(
accessDelegationModeResolver().resolve(requestedModes, catalogEntity);
// TODO remove when remote signing is implemented
- // Reject if the resolved mode is REMOTE_SIGNING since it's not yet supported
- Preconditions.checkArgument(
- resolvedMode.orElse(null) != AccessDelegationMode.REMOTE_SIGNING,
- "Unsupported access delegation mode: %s",
- AccessDelegationMode.REMOTE_SIGNING);
+ if (resolvedMode.orElse(null) == AccessDelegationMode.REMOTE_SIGNING) {
+ Preconditions.checkArgument(
+ requestedModes.size() > 1,
Review Comment:
Makes sense, thanks.
The latest commit removes the single-mode rejection, so any request that resolves to remote-signing now gets the table without delegated access. The handler test for remote-signing alone now asserts the table is returned without credentials, the integration test covers both header variants, and the CHANGELOG entry is updated accordingly.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "youngrae81 (via GitHub)" <gi...@apache.org>.
youngrae81 commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4010887123
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-aws-s3-cloud-storage-specific.md:
##########
@@ -218,7 +218,7 @@ For AWS S3 and S3-compatible backends that expose the STS API (such as MinIO), l
For S3-compatible backends without STS (Apache Ozone S3 gateway, or Ceph RGW without STS enabled),
set `stsUnavailable: true`. Polaris will then skip subscoped credential vending entirely, and the
-client must omit `X-Iceberg-Access-Delegation: vended-credentials` and authenticate to the object
+client must omit the `X-Iceberg-Access-Delegation` header entirely and authenticate to the object
Review Comment:
Agreed, the paragraph no longer says "must"; it now describes what the client gets (no credentials, no signing endpoint) and what it has to do instead.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4010288824
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-aws-s3-cloud-storage-specific.md:
##########
@@ -218,7 +218,7 @@ For AWS S3 and S3-compatible backends that expose the STS API (such as MinIO), l
For S3-compatible backends without STS (Apache Ozone S3 gateway, or Ceph RGW without STS enabled),
set `stsUnavailable: true`. Polaris will then skip subscoped credential vending entirely, and the
-client must omit `X-Iceberg-Access-Delegation: vended-credentials` and authenticate to the object
+client must omit the `X-Iceberg-Access-Delegation` header entirely and authenticate to the object
Review Comment:
I'd say, the `X-Iceberg-Access-Delegation` may be provided, but the catalog will not vend credentials or provide any remote-signing endpoints to the client and the client will have to authenticate to the object store directly.
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-aws-s3-cloud-storage-specific.md:
##########
@@ -218,7 +218,7 @@ For AWS S3 and S3-compatible backends that expose the STS API (such as MinIO), l
For S3-compatible backends without STS (Apache Ozone S3 gateway, or Ceph RGW without STS enabled),
set `stsUnavailable: true`. Polaris will then skip subscoped credential vending entirely, and the
-client must omit `X-Iceberg-Access-Delegation: vended-credentials` and authenticate to the object
+client must omit the `X-Iceberg-Access-Delegation` header entirely and authenticate to the object
Review Comment:
I'd say, the `X-Iceberg-Access-Delegation` may be provided, but the catalog will not vend credentials or provide any remote-signing endpoints to the client, and the client will have to authenticate to the object store directly.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4010272885
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-aws-s3-cloud-storage-specific.md:
##########
@@ -218,7 +218,7 @@ For AWS S3 and S3-compatible backends that expose the STS API (such as MinIO), l
For S3-compatible backends without STS (Apache Ozone S3 gateway, or Ceph RGW without STS enabled),
set `stsUnavailable: true`. Polaris will then skip subscoped credential vending entirely, and the
-client must omit `X-Iceberg-Access-Delegation: vended-credentials` and authenticate to the object
+client must omit the `X-Iceberg-Access-Delegation` header entirely and authenticate to the object
Review Comment:
With this PR, the "must" is no longer a requirement, I think. The client may submit the `X-Iceberg-Access-Delegation`, but will not receive any vended credentials.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: clarify the error when X-Iceberg-Access-Delegation resolves to unsupported remote signing [polaris]
Posted by "youngrae81 (via GitHub)" <gi...@apache.org>.
youngrae81 commented on PR #5473:
URL: https://github.com/apache/polaris/pull/5473#issuecomment-5701833396
> @youngrae81 , pls rebase so that we can merge it.
Rebased on main (CHANGELOG conflict with #5466 resolved), CI is running. Thanks!
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "youngrae81 (via GitHub)" <gi...@apache.org>.
youngrae81 commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4010860425
##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandler.java:
##########
@@ -1809,11 +1819,15 @@ protected Optional<AccessDelegationMode> resolveAccessDelegationModes(
accessDelegationModeResolver().resolve(requestedModes, catalogEntity);
// TODO remove when remote signing is implemented
- // Reject if the resolved mode is REMOTE_SIGNING since it's not yet supported
- Preconditions.checkArgument(
- resolvedMode.orElse(null) != AccessDelegationMode.REMOTE_SIGNING,
- "Unsupported access delegation mode: %s",
- AccessDelegationMode.REMOTE_SIGNING);
+ if (resolvedMode.orElse(null) == AccessDelegationMode.REMOTE_SIGNING) {
+ LOGGER.info(
+ "Client requested access delegation modes {} but only {} is viable for catalog {}, "
Review Comment:
Agreed, switched to DEBUG. At INFO it would repeat on every table load from clients that offer both mechanisms, which is exactly the traffic this change is meant to handle quietly.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on PR #5473:
URL: https://github.com/apache/polaris/pull/5473#issuecomment-5671881008
Nice fix, @youngrae81 ! Thanks for your contribution :+1:
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "youngrae81 (via GitHub)" <gi...@apache.org>.
youngrae81 commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4010836493
##########
CHANGELOG.md:
##########
@@ -110,7 +110,13 @@ request adding CHANGELOG notes for breaking (!) changes and possibly other secti
- Deleting a semantic model now returns HTTP 404 instead of HTTP 500 when the model or its
catalog path disappears after resolution and before the deletion is persisted.
- Return HTTP 404 instead of 500 when a policy or its catalog path disappears after resolution and before deletion.
-
+- Iceberg REST: a request whose `X-Iceberg-Access-Delegation` resolves to remote signing, which is not
+ implemented, now returns the table without delegated access, as the Iceberg REST specification allows
+ for this optional header. This covers `remote-signing` requested alone, and
+ `vended-credentials,remote-signing` against a catalog that cannot vend credentials (for example S3 with
+ `stsUnavailable: true`, or an external catalog with credential vending disabled). Previously both cases
+ failed with `400 Unsupported access delegation mode: REMOTE_SIGNING`. The server logs at `INFO` when it
+ falls back to no delegation.
Review Comment:
Done, shortened the entry and dropped the log mention.
The log itself is back to DEBUG in the latest commit.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: clarify the error when X-Iceberg-Access-Delegation resolves to unsupported remote signing [polaris]
Posted by "flyrain (via GitHub)" <gi...@apache.org>.
flyrain commented on PR #5473:
URL: https://github.com/apache/polaris/pull/5473#issuecomment-5701068327
@youngrae81 , pls rebase so that we can merge it.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "youngrae81 (via GitHub)" <gi...@apache.org>.
youngrae81 commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4010943451
##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandler.java:
##########
@@ -1809,11 +1819,15 @@ protected Optional<AccessDelegationMode> resolveAccessDelegationModes(
accessDelegationModeResolver().resolve(requestedModes, catalogEntity);
// TODO remove when remote signing is implemented
- // Reject if the resolved mode is REMOTE_SIGNING since it's not yet supported
- Preconditions.checkArgument(
- resolvedMode.orElse(null) != AccessDelegationMode.REMOTE_SIGNING,
- "Unsupported access delegation mode: %s",
- AccessDelegationMode.REMOTE_SIGNING);
+ if (resolvedMode.orElse(null) == AccessDelegationMode.REMOTE_SIGNING) {
+ LOGGER.info(
+ "Client requested access delegation modes {} but only {} is viable for catalog {}, "
Review Comment:
Both points are fair. Before this change the exception mapper already logged one INFO line per such request, so INFO here keeps the volume unchanged; on the other hand the request is now a normal success, and the same client will hit this line on every table load.
I don't have a strong preference, so I'll follow whatever you and @dimas-b agree on. If it helps decide: with `stsUnavailable` catalogs and clients that always send both modes (the case this PR targets), the line would appear on every loadTable.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "youngrae81 (via GitHub)" <gi...@apache.org>.
youngrae81 commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4010902126
##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandler.java:
##########
@@ -1194,16 +1194,19 @@ private LoadTableResponse.Builder buildLoadTableResponseWithDelegationCredential
// allowedLocations were tightened after the table was created.
validateTableLocations(tableIdentifier, tableLocations, resolvedStoragePath);
+ boolean vendCredentials = VENDED_CREDENTIALS.equals(delegationMode.orElse(null));
+ // Only advertise the credential-refresh endpoint when credentials are actually vended; a
+ // response without delegated access must look like one for a request without the header.
Review Comment:
Update: per the follow-up thread below, this turned out to be unreachable, so the filtering is reverted in the latest commit and the refresh endpoint is again requested only in vended-credentials mode.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4018182573
##########
CHANGELOG.md:
##########
@@ -110,7 +110,11 @@ request adding CHANGELOG notes for breaking (!) changes and possibly other secti
- Deleting a semantic model now returns HTTP 404 instead of HTTP 500 when the model or its
catalog path disappears after resolution and before the deletion is persisted.
- Return HTTP 404 instead of 500 when a policy or its catalog path disappears after resolution and before deletion.
-
+- Iceberg REST: a request whose `X-Iceberg-Access-Delegation` resolves to remote signing (not yet
+ implemented) now returns the table without delegated access instead of `400 Unsupported access
+ delegation mode: REMOTE_SIGNING`. This applies to `remote-signing` requested alone and to
+ `vended-credentials,remote-signing` against a catalog that cannot vend credentials. A response without
Review Comment:
Thanks for the analysis, @youngrae81 !
My preference is with option 2 as well.
Let's remove the confusing `Unsupported access delegation mode: REMOTE_SIGNING` error on the delegation mode selection call path.
I agree that, if both `vended-credentials` and `remote-signing` are requested, but vending is not available (and remote signing is not supported ATM), then `DefaultAccessDelegationModeResolver` should produce `This catalog cannot vend credentials or sign requests; request without X-Iceberg-Access-Delegation and configure storage credentials on the client` (note: `or` -> `and`).
I guess no doc changes are required in this case.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: return table without delegation when access-delegation degrades to remote signing [polaris]
Posted by "flyrain (via GitHub)" <gi...@apache.org>.
flyrain commented on code in PR #5473:
URL: https://github.com/apache/polaris/pull/5473#discussion_r4018310096
##########
CHANGELOG.md:
##########
@@ -110,7 +110,11 @@ request adding CHANGELOG notes for breaking (!) changes and possibly other secti
- Deleting a semantic model now returns HTTP 404 instead of HTTP 500 when the model or its
catalog path disappears after resolution and before the deletion is persisted.
- Return HTTP 404 instead of 500 when a policy or its catalog path disappears after resolution and before deletion.
-
+- Iceberg REST: a request whose `X-Iceberg-Access-Delegation` resolves to remote signing (not yet
+ implemented) now returns the table without delegated access instead of `400 Unsupported access
+ delegation mode: REMOTE_SIGNING`. This applies to `remote-signing` requested alone and to
+ `vended-credentials,remote-signing` against a catalog that cannot vend credentials. A response without
Review Comment:
Option 2 is fine to me, as it doesn't introduce any behavior changes. I think we should error out for `remote-signing` alone as well. In that case, there'd be no behavior change in this PR.
Looking forward, erroring out is not quite aligned with the IRC spec. But I'm OK if we want to discuss that in a followup issue/PR.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org