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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
verify(sseType == NONE, "Cannot set KMS when sseType is %s", sseType)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's verify it properly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it would have a restriction on S3SecurityMapping side that all the buckets should be under this KMS - For instance we could have one bucket which has
S3security mapping and we could have one bucket which could haveKMStype SSE which could be mapped to specific users - If we add a verification they we might not be able access bucket with different SSE settings. Or am I missing something here ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the filesystem created per bucket?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case of S3SecurityMapping or in general ? But the configs are shared right ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, the
TrinoFileSystemFactoryis created once at injection time and thenTrinoFileSystemis created at each usage site withConnectorIdentity.S3 security mapping uses
SwitchingFileSystemFactorywithS3FileSystemLoaderto create a separateS3SecurityMappingFileSystemFactoryper location.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is correct. The purpose of S3 security mapping is to override the security settings for that mapping. So you could configure
s3.sse.type=S3as the global default and override for a specific bucket, path, etc.