[WIP] feat: add STS credential vending to Catalog API - #1
Open
briangallagher wants to merge 2 commits into
Open
briangallagher wants to merge 2 commits into
briangallagher wants to merge 2 commits into
Conversation
Add scoped, temporary S3 credential vending to the loadTable and getVolume handlers via MinIO/AWS STS AssumeRole. When STS_ENDPOINT, STS_ACCESS_KEY, and STS_SECRET_KEY env vars are set, the server mints per-request credentials scoped to each asset's S3 prefix. Changes: - New credentials.py with STSCredentialVender class - loadTable returns vended creds in the config map (Iceberg REST spec) - getVolume returns vended creds in a new config field on VolumeInfo - No DB or proto changes — config is env-var-only, vending is request-scoped and never persisted
MinIO STS rejects s3:prefix as a condition key for s3:GetObject. Separate into two statements: GetObject scoped by resource ARN, ListBucket scoped by s3:prefix condition.
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.
Summary
Adds scoped, temporary S3 credential vending to the Catalog API's
loadTableandgetVolumehandlers via MinIO/AWS STSAssumeRole.When
STS_ENDPOINT,STS_ACCESS_KEY, andSTS_SECRET_KEYenvironment variables are set on the Feast server pod, the server mints per-request credentials scoped to each asset's S3 prefix using an inline IAM session policy. Credentials are returned in the responseconfigmap, following the Iceberg REST Catalog spec's credential vending pattern.Changes
credentials.py—STSCredentialVenderclass that calls STSAssumeRolewith an inline policy restricting access to the specific table/volume S3 prefixtables.py—loadTablehandler populatesconfigwith vendeds3.access-key-id,s3.secret-access-key,s3.session-tokenwhen STS is configured and the table has ans3://locationvolumes.py—getVolumehandler does the same;VolumeInfomodel gains aconfigfield__init__.py— creates the vender at startup from env vars and passes it to table/volume routersWhat this does NOT change
How it works with PyIceberg
PyIceberg's REST catalog client automatically reads
s3.access-key-id,s3.secret-access-key,s3.session-tokenfrom theloadTableconfig map — so credential vending is transparent to the user. No code changes needed in notebooks.Testing
To be validated on the Option 2 POC cluster against MinIO STS (
AssumeRolewith inline policy scoping). A demo notebook comparing static vs STS credential flows is in progress.Made with Cursor