Skip to content
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

[FlightSQL] Inconsistent base64 encoding for arrow-go and arrow-rust #6753

Open
niebayes opened this issue Nov 19, 2024 · 2 comments
Open

[FlightSQL] Inconsistent base64 encoding for arrow-go and arrow-rust #6753

niebayes opened this issue Nov 19, 2024 · 2 comments

Comments

@niebayes
Copy link
Contributor

For the handshake between a Flight SQL client and a Flight SQL server, the Arrow Rust implementation uses Base64 standard encoding with padding, while the Arrow Go implementation uses Base64 standard encoding without padding. Since these two are incompatible, our Flight SQL server cannot authenticate Go and Rust clients in a unified manner.

@niebayes
Copy link
Contributor Author

niebayes commented Nov 19, 2024

Well, we have found a way for consistent decoding:

let my_base64 = GeneralPurpose::new(
            &alphabet::STANDARD,
            GeneralPurposeConfig::new().with_decode_padding_mode(DecodePaddingMode::Indifferent),
        );

We have to construct our own general-purpose decoder in the server side and set the decode padding mode to Indifferent so that the base64 decoder would allow the encoded string being padded or not padded.

@niebayes
Copy link
Contributor Author

niebayes commented Nov 21, 2024

But I think this is still a issue since not all FlightSQL server implementations would notice the inconsistent base64 encoding in the client side. And this inconsistency would make them hard to handle cross-language requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant