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

Expose full config via Go API #1682

Open
nicklasfrahm opened this issue Nov 24, 2024 · 3 comments · May be fixed by #1683
Open

Expose full config via Go API #1682

nicklasfrahm opened this issue Nov 24, 2024 · 3 comments · May be fixed by #1683

Comments

@nicklasfrahm
Copy link

Hi,

I am working on a project where I would like to use SOPS as the secret engine. In this context, I want to be agnostic whether the user is using my CLI or sops to interact with the secret, but that requires that I generate the .sops.yaml in their repository.

Currently, there is no simple public Load function that returns a Config and I am wondering if that is by design. My use-case requires both the full config creation_rules and destination_rules.

I am happy to implement this, but I wanted to know if I am not doing anything wrong here.

@nicklasfrahm nicklasfrahm linked a pull request Nov 24, 2024 that will close this issue
@felixfontein
Copy link
Contributor

Right now the only API intended for public consumption as a Go library is the github.com/getsops/sops/v3/decrypt package (https://github.com/getsops/sops/blob/main/sops.go#L4-L6).

Exposing more things, especially the config, makes it a lot harder to do changes in that area in the future, since they then need to be fully backwards compatible.

For that reason I personally don't think this is a good idea.

@felixfontein
Copy link
Contributor

Ping @getsops/maintainers for more input.

@nicklasfrahm
Copy link
Author

I see where you are coming from, but could one not argue that the config is currently part of the (public) API considering that it exists in a lot of repositories in the wild?

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 a pull request may close this issue.

2 participants