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 · 1 comment
Open

Comments

@niebayes
Copy link

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
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.

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