Giter Club home page Giter Club logo

Comments (8)

jvehent avatar jvehent commented on July 21, 2024

You mean support ini for the .sops.yaml configuration file documented at https://github.com/mozilla/sops#using-sops-yaml-conf-to-select-kms-pgp-for-new-files ?

I don't think that's a problem as long as the loaded configuration fits into the same dictionary. But, to be honest, that yaml formal is so trivial I don't really see a benefit to supporting ini as well.

from sops.

imsky avatar imsky commented on July 21, 2024

i meant ini as another option vs. json/yaml for encrypted files

from sops.

jvehent avatar jvehent commented on July 21, 2024

Ah, that's a different story then 😄
I'm not familiar enough with the ini format to say that it's possible to do. Do you have a link to a formal specification? If ini can be loaded as a key/value tree like yaml and json, then we should be able to encrypt the leaves.

Of course, you can always treat ini files as binary, but you lose the readability of keeping the file structure in cleartext.

from sops.

imsky avatar imsky commented on July 21, 2024

i don't think there's a formal spec (not one i could easily find anyway). https://docs.python.org/3/library/configparser.html is probably all that's necessary here. i think key/value tree access works out of the box.

from sops.

jcassee avatar jcassee commented on July 21, 2024

How about supporting simple .env files first? This is literally the syntax:

VAR1=val1
VAR2=val2

I'm looking to use sops to decrypt secrets for Kustomize, and encrypting only values for .env files sounds like a nice quality of life feature.

I have very little experience with Go, though. @jvehent some pointers on how to add this file format?

from sops.

autrilla avatar autrilla commented on July 21, 2024

@jcassee you essentially need to write something that implements the Store interface and then plug that in to the command line tool. Here's the YAML store which you can use as an example.

The main challenge here is that SOPS needs to store its metadata (a non-flat structure) with the file, so you'd have to figure out how to store that for .env files. For YAML and JSON, we just use a "sops" top level map entry.

from sops.

jcassee avatar jcassee commented on July 21, 2024

@autrilla Thanks for the pointers. #391 implements the new store.

from sops.

ajvb avatar ajvb commented on July 21, 2024

Fixed with #400

from sops.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.