-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-40899] [CONNECT] Make UserContext extensible. #38374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| // Spark Connect leverages the Any protobuf type that can be used to inject arbitrary other | ||
| // messages into this message. Extensions are stored as a `repeated` type to be able to | ||
| // handle multiple active extensions. | ||
| repeated google.protobuf.Any extensions = 999; |
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.
Just for my self education:
Is Any type potentially a cause of security holes?
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.
No any is just used to define extension points in the proto so that at the point of writing the proto we don't need to define message that is embedded in the proto.
Interpreting the serialized class is up to the consumer and follows the same security model as any other serialized code so we have to be careful but it's not a new threat.
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.
I see. Makes sense.
amaliujia
left a comment
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.
LGTM
Only left an open question.
|
Can one of the admins verify this patch? |
|
thanks, merging to master! |
Different systems will need different metadata that is passed as the user context during the request. To be able to handle the different systems seamlessly, make the `UserContext` extensible with `google.protobuf.Any`. Extensibility. No UT Closes apache#38374 from grundprinzip/SPARK-40899. Authored-by: Martin Grund <[email protected]> Signed-off-by: Wenchen Fan <[email protected]>
### What changes were proposed in this pull request? Different systems will need different metadata that is passed as the user context during the request. To be able to handle the different systems seamlessly, make the `UserContext` extensible with `google.protobuf.Any`. ### Why are the changes needed? Extensibility. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? UT Closes apache#38374 from grundprinzip/SPARK-40899. Authored-by: Martin Grund <[email protected]> Signed-off-by: Wenchen Fan <[email protected]>
What changes were proposed in this pull request?
Different systems will need different metadata that is passed as the user context during the request. To be able to handle the different systems seamlessly, make the
UserContextextensible withgoogle.protobuf.Any.Why are the changes needed?
Extensibility.
Does this PR introduce any user-facing change?
No
How was this patch tested?
UT