You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "flyrain (via GitHub)" <gi...@apache.org> on 2026/04/23 22:35:37 UTC
[PR] Narrow skip credential subscoping scope [polaris]
flyrain opened a new pull request, #4284:
URL: https://github.com/apache/polaris/pull/4284
Rewrite the flag description to state it's test/dev-only, spell out the defense-in-depth risk of handing the server's ambient credentials to every client, and steer S3-compatible deployments without STS to stsUnavailable: true on the storage config.
Add a non-severe ProductionReadinessCheck that emits a WARN on startup when the flag is enabled in defaults or any realm override, so operators see the security caveat without breaking existing deployments.
Runtime behavior is unchanged.
Related dev discussion, https://lists.apache.org/thread/1trcnbm04zzqztpxkzrzs1pvrlyd49bg
## Checklist
- [ ] 🛡️ Don't disclose security issues! (contact security@apache.org)
- [ ] đź”— Clearly explained why the changes are needed, or linked related issues: Fixes #
- [ ] đź§Ş Added/updated tests with good coverage, or manually tested (and explained how)
- [ ] đź’ˇ Added comments for complex logic
- [ ] đź§ľ Updated `CHANGELOG.md` (if needed)
- [ ] 📚 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] Narrow SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION scope [polaris]
Posted by "flyrain (via GitHub)" <gi...@apache.org>.
flyrain commented on code in PR #4284:
URL: https://github.com/apache/polaris/pull/4284#discussion_r3135006553
##########
runtime/service/src/main/java/org/apache/polaris/service/config/ProductionReadinessChecks.java:
##########
@@ -292,6 +292,37 @@ public ProductionReadinessCheck checkInsecureStorageSettings(
: ProductionReadinessCheck.of(errors.toArray(new Error[0]));
}
+ @Produces
+ public ProductionReadinessCheck checkSkipCredentialSubscopingIndirection(
+ FeaturesConfiguration featureConfiguration) {
+ var flag = FeatureConfiguration.SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION;
+ var message =
+ "SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION is enabled. This flag is test/dev-only and returns "
+ + "the Polaris server's ambient credentials to every client, breaking defense-in-depth. "
+ + "For S3-compatible storage without STS, set stsUnavailable: true on the storage "
+ + "config instead.";
+ var errors = new ArrayList<Error>();
+ if (Boolean.parseBoolean(featureConfiguration.defaults().get(flag.key()))) {
+ errors.add(Error.of(message, format("polaris.features.\"%s\"", flag.key())));
+ }
+ featureConfiguration
+ .realmOverrides()
+ .forEach(
+ (realmId, overrides) -> {
+ if (Boolean.parseBoolean(overrides.overrides().get(flag.key()))) {
+ errors.add(
+ Error.of(
+ message,
+ format(
+ "polaris.features.realm-overrides.\"%s\".overrides.\"%s\"",
+ realmId, flag.key())));
+ }
+ });
+ return errors.isEmpty()
+ ? ProductionReadinessCheck.OK
Review Comment:
Same as https://github.com/apache/polaris/pull/4284/changes#r3135005907
##########
runtime/service/src/main/java/org/apache/polaris/service/config/ProductionReadinessChecks.java:
##########
@@ -292,6 +292,37 @@ public ProductionReadinessCheck checkInsecureStorageSettings(
: ProductionReadinessCheck.of(errors.toArray(new Error[0]));
}
+ @Produces
+ public ProductionReadinessCheck checkSkipCredentialSubscopingIndirection(
+ FeaturesConfiguration featureConfiguration) {
+ var flag = FeatureConfiguration.SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION;
+ var message =
+ "SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION is enabled. This flag is test/dev-only and returns "
+ + "the Polaris server's ambient credentials to every client, breaking defense-in-depth. "
+ + "For S3-compatible storage without STS, set stsUnavailable: true on the storage "
+ + "config instead.";
+ var errors = new ArrayList<Error>();
+ if (Boolean.parseBoolean(featureConfiguration.defaults().get(flag.key()))) {
+ errors.add(Error.of(message, format("polaris.features.\"%s\"", flag.key())));
+ }
+ featureConfiguration
+ .realmOverrides()
+ .forEach(
+ (realmId, overrides) -> {
+ if (Boolean.parseBoolean(overrides.overrides().get(flag.key()))) {
+ errors.add(
+ Error.of(
+ message,
+ format(
+ "polaris.features.realm-overrides.\"%s\".overrides.\"%s\"",
+ realmId, flag.key())));
+ }
+ });
+ return errors.isEmpty()
+ ? ProductionReadinessCheck.OK
+ : ProductionReadinessCheck.of(errors.toArray(new Error[0]));
Review Comment:
These two places are basically mimic what we did for other places, like
https://github.com/apache/polaris/blob/676c04db57da2677ef068abb439ce42d5287e8d6/runtime/service/src/main/java/org/apache/polaris/service/config/ProductionReadinessChecks.java#L292
and https://github.com/apache/polaris/blob/676c04db57da2677ef068abb439ce42d5287e8d6/runtime/service/src/main/java/org/apache/polaris/service/config/ProductionReadinessChecks.java#L325
I agreed we may not need it. And we can fix them in a batch. 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] Narrow SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION scope [polaris]
Posted by "flyrain (via GitHub)" <gi...@apache.org>.
flyrain commented on PR #4284:
URL: https://github.com/apache/polaris/pull/4284#issuecomment-4337232190
Thanks @dimas-b for the review. I will file followup PR for your suggestions.
--
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] Narrow SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION scope [polaris]
Posted by "flyrain (via GitHub)" <gi...@apache.org>.
flyrain merged PR #4284:
URL: https://github.com/apache/polaris/pull/4284
--
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] Narrow SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION scope [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on code in PR #4284:
URL: https://github.com/apache/polaris/pull/4284#discussion_r3134614935
##########
runtime/service/src/main/java/org/apache/polaris/service/config/ProductionReadinessChecks.java:
##########
@@ -292,6 +292,37 @@ public ProductionReadinessCheck checkInsecureStorageSettings(
: ProductionReadinessCheck.of(errors.toArray(new Error[0]));
}
+ @Produces
+ public ProductionReadinessCheck checkSkipCredentialSubscopingIndirection(
+ FeaturesConfiguration featureConfiguration) {
+ var flag = FeatureConfiguration.SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION;
+ var message =
+ "SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION is enabled. This flag is test/dev-only and returns "
+ + "the Polaris server's ambient credentials to every client, breaking defense-in-depth. "
+ + "For S3-compatible storage without STS, set stsUnavailable: true on the storage "
+ + "config instead.";
+ var errors = new ArrayList<Error>();
+ if (Boolean.parseBoolean(featureConfiguration.defaults().get(flag.key()))) {
+ errors.add(Error.of(message, format("polaris.features.\"%s\"", flag.key())));
+ }
+ featureConfiguration
+ .realmOverrides()
+ .forEach(
+ (realmId, overrides) -> {
+ if (Boolean.parseBoolean(overrides.overrides().get(flag.key()))) {
+ errors.add(
+ Error.of(
+ message,
+ format(
+ "polaris.features.realm-overrides.\"%s\".overrides.\"%s\"",
+ realmId, flag.key())));
+ }
+ });
+ return errors.isEmpty()
+ ? ProductionReadinessCheck.OK
+ : ProductionReadinessCheck.of(errors.toArray(new Error[0]));
Review Comment:
nit: why `.toArray`? There an `.of()` method that takes an `Iterable` 🤔
##########
runtime/service/src/main/java/org/apache/polaris/service/config/ProductionReadinessChecks.java:
##########
@@ -292,6 +292,37 @@ public ProductionReadinessCheck checkInsecureStorageSettings(
: ProductionReadinessCheck.of(errors.toArray(new Error[0]));
}
+ @Produces
+ public ProductionReadinessCheck checkSkipCredentialSubscopingIndirection(
+ FeaturesConfiguration featureConfiguration) {
+ var flag = FeatureConfiguration.SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION;
+ var message =
+ "SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION is enabled. This flag is test/dev-only and returns "
+ + "the Polaris server's ambient credentials to every client, breaking defense-in-depth. "
+ + "For S3-compatible storage without STS, set stsUnavailable: true on the storage "
+ + "config instead.";
+ var errors = new ArrayList<Error>();
+ if (Boolean.parseBoolean(featureConfiguration.defaults().get(flag.key()))) {
+ errors.add(Error.of(message, format("polaris.features.\"%s\"", flag.key())));
+ }
+ featureConfiguration
+ .realmOverrides()
+ .forEach(
+ (realmId, overrides) -> {
+ if (Boolean.parseBoolean(overrides.overrides().get(flag.key()))) {
+ errors.add(
+ Error.of(
+ message,
+ format(
+ "polaris.features.realm-overrides.\"%s\".overrides.\"%s\"",
+ realmId, flag.key())));
+ }
+ });
+ return errors.isEmpty()
+ ? ProductionReadinessCheck.OK
Review Comment:
nit: I believe this `?` operators is not needed, it'll work fine with an empty list of errors.
--
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] Narrow SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION scope [polaris]
Posted by "flyrain (via GitHub)" <gi...@apache.org>.
flyrain commented on code in PR #4284:
URL: https://github.com/apache/polaris/pull/4284#discussion_r3135005907
##########
runtime/service/src/main/java/org/apache/polaris/service/config/ProductionReadinessChecks.java:
##########
@@ -292,6 +292,37 @@ public ProductionReadinessCheck checkInsecureStorageSettings(
: ProductionReadinessCheck.of(errors.toArray(new Error[0]));
}
+ @Produces
+ public ProductionReadinessCheck checkSkipCredentialSubscopingIndirection(
+ FeaturesConfiguration featureConfiguration) {
+ var flag = FeatureConfiguration.SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION;
+ var message =
+ "SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION is enabled. This flag is test/dev-only and returns "
+ + "the Polaris server's ambient credentials to every client, breaking defense-in-depth. "
+ + "For S3-compatible storage without STS, set stsUnavailable: true on the storage "
+ + "config instead.";
+ var errors = new ArrayList<Error>();
+ if (Boolean.parseBoolean(featureConfiguration.defaults().get(flag.key()))) {
+ errors.add(Error.of(message, format("polaris.features.\"%s\"", flag.key())));
+ }
+ featureConfiguration
+ .realmOverrides()
+ .forEach(
+ (realmId, overrides) -> {
+ if (Boolean.parseBoolean(overrides.overrides().get(flag.key()))) {
+ errors.add(
+ Error.of(
+ message,
+ format(
+ "polaris.features.realm-overrides.\"%s\".overrides.\"%s\"",
+ realmId, flag.key())));
+ }
+ });
+ return errors.isEmpty()
+ ? ProductionReadinessCheck.OK
+ : ProductionReadinessCheck.of(errors.toArray(new Error[0]));
Review Comment:
These two places are basically mimic what we did for other places, like
https://github.com/apache/polaris/blob/676c04db57da2677ef068abb439ce42d5287e8d6/runtime/service/src/main/java/org/apache/polaris/service/config/ProductionReadinessChecks.java#L292
and https://github.com/apache/polaris/blob/676c04db57da2677ef068abb439ce42d5287e8d6/runtime/service/src/main/java/org/apache/polaris/service/config/ProductionReadinessChecks.java#L325
I agreed we may not need it. And we can fix them in a batch.
--
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] Narrow SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION scope [polaris]
Posted by "tsukubatexas (via GitHub)" <gi...@apache.org>.
tsukubatexas commented on PR #4284:
URL: https://github.com/apache/polaris/pull/4284#issuecomment-4957237888
Hi all,
there is a broader use case that might be worth considering for a future, more general feature, especially in cloud environments where security policy restricts certain credential types.
Some environments enforce a strict rule to avoid SAS or other vended storage credentials in production, and instead require all data access to go directly through the cloud provider’s native identity and IAM/RBAC model (for example, using Managed Identities and RBAC on Azure, or equivalent mechanisms elsewhere). In such setups, the desired pattern is:
Polaris acts as the Iceberg catalog and authorization layer.
Storage access is performed directly by clients using their own identity, not via credentials minted by Polaris.
Polaris does not issue SAS (or similar credentials); storage authorization is governed entirely by the cloud IAM/RBAC configuration.
From that perspective, it could be useful to consider a separate, clearly named mode that:
Explicitly disables credential vending (no SAS or equivalent returned to clients),
Assumes clients use their own cloud identities for storage access,
Clearly documents the security model and trade‑offs, in particular:
Storage permissions are controlled solely by the cloud IAM/RBAC layer,
Polaris controls catalog‑level permissions and Iceberg commits,
Some defense‑in‑depth is intentionally traded for a “clients manage their own storage credentials” model.
The intent here would not be to reuse or “promote” the existing SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION flag, but rather to acknowledge that a well‑documented, first‑class configuration for “no vended credentials” operation could be valuable in environments where issuing SAS or similar tokens is constrained by policy.
cheers
--
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