fix: allow S3 storage to use default AWS credentials - #9893
Open
newlandj wants to merge 14 commits into
Open
Conversation
Restore optional access key fields so environment credentials and IAM roles work in both storage forms.
👷 Deploy request for label-studio-docs-new-theme pending review.Visit the deploys page to approve it
|
👷 Deploy request for heartex-docs pending review.Visit the deploys page to approve it
|
✅ Deploy Preview for label-studio-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for label-studio-playground ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Preserve explicit credential clearing, reject partial key pairs, and cover create and edit behavior for import and export storage.
newlandj
marked this pull request as draft
August 11, 2026 23:54
Avoid persisting connection-test values and protect session tokens while limiting credential-clearing behavior to S3.
Use only permission-checked storage state, validate partial updates, and keep explicit credentials separate from boto3's default chain.
Keep validation credentials out of the client cache while preserving complete prefixed environment credential aliases.
Carry the S3 no-cache marker through connection checks and preview candidates so canceled edits retain no clients.
Apply the S3 validation marker to export creation so failed candidates retain no clients.
Treat unrecognized AWS client errors as validation failures for create and update flows.
Convert botocore configuration and provider failures into user-facing validation errors.
Rely on the S3 serializer's sanitized connection check and map custom endpoint failures to form errors.
Keep the credential-clearing fix in its single caller and remove testing-only files from the PR.
Reuse existing prefixed environment lookup behavior and preserve the hook's original explanatory comments.
Keep the optional S3 credential fix focused by preserving the existing export API behavior.
Keep the public bug fix focused on form validation and add a direct regression test for blank credentials.
newlandj
marked this pull request as ready for review
August 12, 2026 04:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reason for change
The S3 storage forms require an access key ID and secret access key even though Label Studio already supports AWS's default credential chain. This prevents EKS Pod Identity, IRSA, environment credentials, and AWS profiles from being used.
Solution
Fixes #8847
Fixes #9130
Testing
bun test --dom apps/labelstudio/src/pages/Settings/StorageSettings/providers/s3.test.ts(local dependency installation was incomplete; CI will run the test with the full frontend dependencies)Acceptance criteria
Risks
Low. The change only restores optional validation for the two credential fields; backend credential resolution is unchanged.