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

Fixing FileProvider for read key from kubernetes secret file #94

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

gawsoftpl
Copy link

There was a issue for Kubernetes secrets:
I saved key in file as string not binary file.

Kubernetes save secrets without whitelines and converted string to binary

For that situation I have error: Invalid ciphertext because script read string file as binary and do not convert them from string(hex2bin) and do not remove whitespaces.

  1. I moved string convert function to Util class
  2. I wrote unit tests for binary, string files with key
  3. I add new logic for getSymmetricKey in FileProvider

…ace.

Script only read binary key from file. I added converter for hashed, base64 string reader too.
Additional string remove whitespace from files

Signed-off-by: Pitos <[email protected]>
Signed-off-by: Pitos <[email protected]>
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

Successfully merging this pull request may close these issues.

1 participant