Fix STS AssumeRole 501 error on S3-compatible storage by making inline policy optional - #5425
Fix STS AssumeRole 501 error on S3-compatible storage by making inline policy optional#5425zhang-arvin wants to merge 1 commit into
Conversation
…e policy optional
vigneshio
left a comment
There was a problem hiding this comment.
Thanks for the contribution @zhang-arvin.
A few comments below. This also deserves a changelog entry - skipping the policy means the vended creds inherit the full role instead of location-scoped access.
| * session policies. When enabled, the temporary credentials inherit the full permissions of the | ||
| * assumed role; ensure the IAM role has appropriate permissions for the required operations. | ||
| */ | ||
| public abstract @Nullable Boolean getNoInlinePolicy(); |
There was a problem hiding this comment.
This property is not yet integrated into the OpenAPI schema or the entity mappings. Please add it adjacent tokmsUnavailablein the AwsStorageConfigInfo schema, and ensure it is mapped bidirectionally between CatalogEntity.getAwsStorageConfigInfo and getAwsStorageConfigurationInfo.
There was a problem hiding this comment.
Thanks @vigneshio — agreed, the flag isn't effective until it's wired end-to-end. I'll add noInlinePolicy to the AwsStorageConfigInfo OpenAPI schema next to kmsUnavailable, map it bidirectionally in CatalogEntity.getAwsStorageConfigInfo() / getAwsStorageConfigurationInfo(), and add the AssumeRoleRequest test verifying Policy is omitted when the flag is true.
| .toJson()) | ||
| .durationSeconds(storageCredentialDurationSeconds); | ||
|
|
||
| if (!Boolean.TRUE.equals(awsStorageConfig.getNoInlinePolicy())) { |
There was a problem hiding this comment.
Once CatalogEntity actually copies the field, getNoInlinePolicy() will return the configured value; until then it’s always null, so the inline policy is still included. After the wiring is in place, please add a test that verifies AssumeRoleRequest omits the policy field when the no-inline-policy flag is true.
There was a problem hiding this comment.
Thanks @vigneshio — agreed, the flag isn't effective until it's wired end-to-end. I'll add noInlinePolicy to the AwsStorageConfigInfo OpenAPI schema next to kmsUnavailable, map it bidirectionally in CatalogEntity.getAwsStorageConfigInfo() / getAwsStorageConfigurationInfo(), and add the AssumeRoleRequest test verifying Policy is omitted when the flag is true.
|
|
||
| /** | ||
| * Flag indicating whether to omit the inline session policy from STS AssumeRole requests. Set to | ||
| * {@code true} for S3-compatible STS implementations (e.g. VAST Data) that do not support inline |
There was a problem hiding this comment.
Can we confirm that Policy is the unsupported field on the reported VAST build before making its omission the compatibility switch? The successful CLI request in #5099 also uses a different role ARN format from the catalog config and omits ExternalId. VAST’s current guide for the 5.4.3+ flow lists Policy as supported. That does not prove the reported hotfix behaves the same, but it leaves the root cause unresolved. Do we have a request capture or controlled reproduction that holds the other fields constant and shows the 501 disappears when only Policy is removed?
There was a problem hiding this comment.
@flyingImer we don't have a request capture from the reporter's VAST build beyond what's in #5099, and we can't reproduce against their deployed version ourselves, so we can't fully confirm Policy is the unsupported field from that capture alone. Given that, I'd rather keep the switch narrowly scoped to the inline policy (the only element shown to differ in the failing vs. succeeding capture) and treat it as a config-level compatibility option that defaults to current behavior. If maintainers prefer, I can also gate it so it only takes effect when explicitly enabled on S3-compatible storage. Happy to iterate.
|
Thanks for the contribution. I'm confused by the PR description's claim that VAST Data does not support inline session policies. VAST's current STS guide documents That may not match the reporter's deployed VAST version, but it leaves the asserted root cause unverified. |
|
Thanks for pointing that out @snazy. Our root-cause verification was based on the reporter's environment in #5099: the failing request (with inline You're right that VAST's current docs describe |
|
My concerns about this change are about the security contract it removes, rather than about making an optional STS parameter configurable. Omitting This may be an acceptable, explicitly documented operator trade-off where the catalog role is already tightly constrained, but it loses table/prefix-level vending isolation whenever that role is broader. I think this needs a scoped design/security review before merge, with the supported mode, compensating deployment constraints, and documentation made explicit - not only a boolean plus Javadoc. Separately, the root cause for the reported VAST deployment is not established by the available evidence yet. In particular, #5099 also identifies a role-ARN-format discrepancy. Can we obtain a redacted, controlled comparison that holds all request parameters constant and shows that omitting only VAST’s current STS documentation describes |
|
Thanks @snazy - that's a fair point, and I agree removing Let me try to get a redacted, controlled repro from the reporter's deployment (hold all params constant, toggle only On the design side, I see three options; would be great to hear your preference before I invest further:
Happy to take any of these. |
Fixes #5099: STS AssumeRole fails with 501 on VAST Data and other S3-compatible storage that does not support inline session policies.
Root Cause
Polaris always includes an inline Policy parameter in STS AssumeRole requests. VAST Data STS implementation returns 501 for this parameter.
Fix
Added noInlinePolicy config option to AwsStorageConfigurationInfo. When true, the inline session policy is omitted from the AssumeRole request.