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

Reply via email to