koblas/sops-decoder-node

sops-decoder is using aws-sdk v2 which is being deprecated soon - should switch to aws-sdk v3

chris-grabcad opened this issue · 0 comments

sops-decoder uses v2 of the sdk, and it should really be upgraded to use v3.

I gave this a go locally, and hit a snag with this code block

      return new aws.KMS({
        region,
        accessKeyId: keyid,
        secretAccessKey: secretkey,
        sessionToken: token,
      });

It seems that accessKeyId no longer exists :-(

image

I will keep trying, I'm pretty sure I can work it out, but my main obstacle is that I'm not sure how to test this piece of code

There were a few other minor issues like this

image

new aws.STS() - required a parameter (unlike before?) so I just put {} in - also not sure if I can easily test this path either.

Best I can do testing wise is use yarn link from my local version of sops-decoder and try with my AWS creds to decode a sops file.