Repository navigation
REST: disallow overriding "credential" in table sessions - #10345
Merged
Merged
Conversation
adutra
commented
May 17, 2024
|
|
||
| private AuthSession tableSession(Map<String, String> tableConf, AuthSession parent) { | ||
| Pair<String, Supplier<AuthSession>> newSession = newSession(tableConf, tableConf, parent); | ||
| Map<String, String> credentials = Maps.newHashMapWithExpectedSize(tableConf.size()); |
Contributor
Author
There was a problem hiding this comment.
Note: this change still allows overriding credential from the SessionContext which I believe is the desired behavior. But I'm happy to also apply the restriction to SessionContext as well.
Contributor
Author
|
@nastra could you have a look at this one as well please? |
nastra
approved these changes
Jun 4, 2024
| if (TABLE_SESSION_ALLOW_LIST.contains(prop)) { | ||
| credentials.put(prop, tableConf.get(prop)); | ||
| } | ||
| } |
Contributor
There was a problem hiding this comment.
nit: newline after the closing }
See apache#10256 for context. This change disallows overriding the "credential" property in table sessions, by introducing an allow-list of auth-related properties that can be overridden in such situations. Only the "token" property and properties used to exchange one token for another ("urn:ietf:params:oauth:token-type:*") are now allowed.
jasonf20
pushed a commit
to jasonf20/iceberg
that referenced
this pull request
Aug 4, 2024
See apache#10256 for context. This change disallows overriding the "credential" property in table sessions, by introducing an allow-list of auth-related properties that can be overridden in such situations. Only the "token" property and properties used to exchange one token for another ("urn:ietf:params:oauth:token-type:*") are now allowed.
zachdisc
pushed a commit
to zachdisc/iceberg
that referenced
this pull request
Dec 23, 2024
See apache#10256 for context. This change disallows overriding the "credential" property in table sessions, by introducing an allow-list of auth-related properties that can be overridden in such situations. Only the "token" property and properties used to exchange one token for another ("urn:ietf:params:oauth:token-type:*") are now allowed.
zhongyujiang
pushed a commit
to zhongyujiang/iceberg
that referenced
this pull request
Apr 16, 2025
See apache#10256 for context. This change disallows overriding the "credential" property in table sessions, by introducing an allow-list of auth-related properties that can be overridden in such situations. Only the "token" property and properties used to exchange one token for another ("urn:ietf:params:oauth:token-type:*") are now allowed.
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.
See #10256 for context.
As requested, this change disallows overriding the
credentialproperty in table sessions, by introducing an allow-list of auth-related properties that can be overridden in such situations.Only the
tokenproperty and properties used to exchange one token for another (urn:ietf:params:oauth:token-type:*) are now allowed.