Hi all,
Thanks for your message Arnab, and +1 to Yufei's point on clarifying
the expected semantics per field first.
I checked the current code and tests around
validateUpdateCatalogDiffOrThrow and
ALLOW_UNRESTRICTED_STORAGE_CONFIG_ROLE_CHANGES, and a few details
stood out:
1. Allowing roleARN updates within the same AWS account ID is
intentional and explicitly tested
(ManagementServiceTest.testUpdateCatalogChangesWithinSameAccountAllowed
and
PolarisManagementServiceIntegrationTest.testUpdateCatalogChangeRoleWithinSameAccountAllowed).
So the ALLOW_UNRESTRICTED_STORAGE_CONFIG_ROLE_CHANGES description is
what's out of sync here, it mentions "role ARN" broadly, whereas the
intended default guardrail is cross-account changes (awsAccountId) and
externalId.
Updating the doc to reflect that makes more sense than breaking
same-account role rotation.
2. You are right that Objects.equals(...) currently rejects null ->
value when ALLOW_UNRESTRICTED_STORAGE_CONFIG_ROLE_CHANGES is false,
which contradicts the flag description ("new values can be set when
none were previously configured"). Fixing that discrepancy (code or
doc, depending on whether we want null -> value allowed as PR #4019
intended) seems worth doing regardless of any broader expansion.
3. All three storage integrations (AwsStorageCredentialCacheKey,
GcpStorageCredentialCacheKey, AzureStorageCredentialCacheKey) include
the full StorageConfigurationInfo in the cache key, so updating these
fields won't serve stale cached credentials from the previous
configuration.
- gcpServiceAccount is the closest counterpart to AWS role / Azure
tenant impersonation (and is required when
GCS_PRINCIPAL_ATTRIBUTION_ENABLED is enabled). However, making it
unconditionally immutable would prevent rotating service accounts or
populating it on older catalogs (especially since gcpServiceAccount
only started taking effect in Polaris 1.4.0). If we restrict changes
to it, it should be behind
ALLOW_UNRESTRICTED_STORAGE_CONFIG_ROLE_CHANGES (rather than always
immutable or introducing another flag).
- isHierarchical reflects whether the Azure account uses HNS and
controls SAS path scoping in AzureCredentialsStorageIntegration.
Changing it is more likely fixing an initial catalog configuration
mistake than a role/identity boundary change, so gating it behind a
*_ROLE_CHANGES flag might be surprising.
So overall, I would suggest:
- In the short term, align the existing
ALLOW_UNRESTRICTED_STORAGE_CONFIG_ROLE_CHANGES doc and null -> value
behavior with the tested semantics.
- Agree with Yufei on documenting the exact update semantics and
impact for each storage config field (identity/tenant boundary vs
mutable operational setting) before adding new immutability checks.
Thanks!
Regards
JB
On Sat, Nov 14, 2026 at 8:53 AM Arnab Karmakar <[email protected]> wrote:
>
> Hi all,
> I came across a TODO in
> PolarisAdminService.validateUpdateCatalogDiffOrThrow (around line 1010):
> "Expand the set of validations if there are other fields for other cloud
> providers that we can't successfully apply changes to."
>
> Today the method rejects storage type changes, and rejects AWS account ID /
> external ID changes and Azure tenant ID changes unless
> ALLOW_UNRESTRICTED_STORAGE_CONFIG_ROLE_CHANGES is true. Nothing is checked
> for GCP or for the other Azure fields.
> Gaps I confirmed in the code:
> - GCP gcpServiceAccount is not checked on update. It is the service account
> Polaris impersonates for credential vending, so changing it silently
> changes the identity used.
> - Azure isHierarchical is not checked on update. It changes how paths are
> handled in credential vending.
> - The published flag doc says AWS role ARN changes are restricted, but the
> code only checks account ID and external ID, so a role change within the
> same account is allowed.
> - The flag doc says new values can be set when none were previously
> configured. The code rejects a null-to-value change, so the two disagree.
>
> Proposal: add immutability checks for the fields that actually affect
> credential vending, reuse ALLOW_UNRESTRICTED_STORAGE_CONFIG_ROLE_CHANGES
> (or add a new flag), and add tests for each rule. Azure multiTenantAppName
> and consentUrl appear to have no consumers, so I would leave them out
> unless someone knows otherwise.
>
> Questions:
> 1. Is this worth doing now?
> 2. Should the GCP service account be immutable under the same flag, or
> always?
> 3. Should AWS role ARN be restricted to match the doc, or should the doc
> change?
> 4. Should Azure isHierarchical be immutable?
> 5. Reuse ALLOW_UNRESTRICTED_STORAGE_CONFIG_ROLE_CHANGES or add a new flag?
>
> I'm happy to take this if the direction is agreed.
> Thanks,
> Arnab