vapor-ware / sctl

SCTL is not End2End encryption, instead SCTL is more of an envelope, in which you store secrets until they are needed, and those secrets should only remain available in plain text while the operation that needs them is active.
GNU General Public License v3.0
8 stars 2 forks source link

bump to 0.8.0 #12

Closed lazypower closed 5 years ago

lazypower commented 5 years ago

Double base64 encoding for maximum effort

Related to #4

resolves multi-line, but does not resolve contexts outside of ENV population.

marcoceppi commented 5 years ago

I just realized, if you previously had and expected a base64 encoded string this will decode which doesn't quite maintain backwards compat.

Would it be better to instead create an object like:

version: v1
kind: sctl
encoding: base64
data: |
  <base64encodedstring>

Thereby if you do decode base64 but don't get a matching doctument structure like this, then you can assume just return the original string (backwards, backwards compat). If you do have a matching structure you can then be confident that decoding the data key from the payload will yield a correct result.

I know this strays a bit but I can't help but feel that if I previously sctl saved a b64encoded string that it'd break compat. Could also just go straight for a 1.0 and skip this too - though I think adding payload metadata might be helpful in general

lazypower commented 5 years ago

If i add the payload metadata i'm going to let it soak for a bit before I cut a 1.0 - i want the data format to be stable enough that i'm not going to go back in and muck with it once we hit that point. i'm generally +1 to adding the behavior you're asking for. Something like:

echo "my really big secret" | base64 | sctl add BIG_SECRETS --no-decode

as the older entries wont have the "encoding" field, they will default to skip, and wont be piped through that decoder.

thoughts?

lazypower commented 5 years ago

@marcoceppi since you had requested some changes, this branch is getting hairy with yak shaving, and the feature is incomplete - i'm goign to tag you for re-review. Once we've got a path forward that you're happy with i'll cycle into getting that on the branch, and re-request review.

dismissing prior reviews

lazypower commented 5 years ago

Ok, I think this is ready for re-review. Still a bit sparse on test coverage, but i'm losing hair and sleep over this, and will re-visit.