-
Notifications
You must be signed in to change notification settings - Fork 41
RFE: warn users when secret data is not base64 encoded #595
Comments
another check could be to make sure the secret data doesn't have any newlines in it since those aren't allowed: see https://kubernetes.io/docs/concepts/configuration/secret/ |
@dustymabe , How can we recognize whether string is base64 encoded or not? What I read about it, I found we can check following parameters to verify:
But here's the problem:
|
yeah mainly all we can do is do checks that guarantee it isn't a valid base64 secret string:
it is possible that a user did not base64 encode the data and it still passes all the checks, but in that case we can't really do anything. |
for examples, |
right. in other words, we can't warn the user in all cases, but we certainly can warn the user in some cases. |
so one thing I noticed today when I was playing around:
so maybe some of this is already done for us? |
adding a note here to anyone who may hit a similar problem.. here is how I put the token into my env before running kedge to replace
|
It might be nice to add a feature to warn a user when secret data that is being passed in is obviously not base64 encoded. For example, if I have a secret:
and I accidentally populated
$FOO_TOKEN
in my environment with the original token and not the base64 encoded token then a warning to help me understand that would be nice.The text was updated successfully, but these errors were encountered: