Byron/google-apis-rs

Secret manager bad decode base64 of data

Opened this issue · 1 comments

When using secrets_versions_access api, the serde tries to deserialize it as urlsafe, for some secrets it doesn't work as expected.
error:
Invalid byte 43, offset 19. at line 4 column
Unfortunately, I can't provide the full output as it contains the secret.
Here is the offending line:

#[serde_as(as = "Option<::client::serde::urlsafe_base64::Wrapper>")]
pub data: Option<Vec<u8>>,

Confirmed from version: 5.0.2+20230114

Byron commented

There are a lot of reports with problems due to incorrect deserialization of fields, which was recently adjusted to make one other API work.
It should be possible to adjust this per API.

In the mean time, it might be possible to use older versions of the crate that don't have the change, or to vendor the code and apply a patch yourself to adjust the serialization scheme.