Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

fix(azure-registry): handle binary files #311

Conversation

lukaspj
Copy link
Contributor

@lukaspj lukaspj commented Mar 26, 2020

Hi!

The issue

We had an issue with fetching certificates from the Azure KeyVaults.
Because the certificate were binary files, the Azure KeyVault would base64 encode it, however the @azure/keyvault-secrets library gives no notice or way to detect that the secret is base64 encoded.

Then kubernetes-external-secrets would base64 encode it again, so the binary files were base64 encoded twice, which meant that we had to alter our application to base64 decode the certificates before we could use them.

This change

Here we add a new keyOptions field isBinary so that you can explicitly specify that the Azure KeyVault secret is a binary and that no base64 encoding should happen.

Notice that the isBinary field does not work together with the property field, as the property field does JSON-decode and that would definetly not work on a Buffer.

@lukaspj lukaspj force-pushed the fix/handle-binary-files-in-azure-key-vault branch from 142e709 to 0a13162 Compare March 26, 2020 13:07
README.md Outdated Show resolved Hide resolved
@lukaspj lukaspj force-pushed the fix/handle-binary-files-in-azure-key-vault branch from 1128f89 to b94c020 Compare March 26, 2020 15:59
Copy link
Contributor

@silasbw silasbw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for tracking this down and submitting a fix!

crd.yaml Outdated Show resolved Hide resolved
@lukaspj lukaspj force-pushed the fix/handle-binary-files-in-azure-key-vault branch from 4c732cf to a3716de Compare March 27, 2020 11:52
@silasbw silasbw merged commit 9727d48 into external-secrets:master Mar 27, 2020
@silasbw
Copy link
Contributor

silasbw commented Mar 27, 2020

Thanks for the tracking this down and submitting the PR 💯 !

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

Successfully merging this pull request may close these issues.

3 participants