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 the values of unencrypted keys as-is #317

Closed
srid opened this issue Apr 17, 2023 · 5 comments
Closed

Expose the values of unencrypted keys as-is #317

srid opened this issue Apr 17, 2023 · 5 comments

Comments

@srid
Copy link

srid commented Apr 17, 2023

A subset of keys in secrets.yaml can be marked as unencrypted by suffixing them with _unencryprted. This is useful for things like SSH public (not private) keys.

Can sops-nix expose these unencrypted values during evaluation? Not as .path (which points to /run/... path, accessible only during runtime), but as .text (accessible during evaluation time)?

I could then store public keys in secrets.yaml (along with the encrypted private keys) and use them to set options like users.user.<name>.authorizedKeys in a say container (that has no access to the host's /run directory).

@srid
Copy link
Author

srid commented Apr 17, 2023

I could read config.sops.defaultSopsFile, run it through fromYAML then fromJSON ... but it would be nice to have sops-nix provide the raw text directly.

@Mic92
Copy link
Owner

Mic92 commented Apr 30, 2023

I would accept this as a contribution but won't implement it as I don't have a use-case for it.

@srid

This comment was marked as resolved.

@Mic92
Copy link
Owner

Mic92 commented May 4, 2023

sops-nix can only support formats also supported by sops. It relies on sops for editing secrets and it's unlikely that they will add nix. There is not import-from-derivation required to check yaml. It's just a normal nix derivation.

@srid
Copy link
Author

srid commented May 8, 2023

Closing, because I no longer need this, as I'll just use JSON as the secrets format (though, that requires #328).

@srid srid closed this as not planned Won't fix, can't repro, duplicate, stale May 8, 2023
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

No branches or pull requests

2 participants