getsops / getsops/sops

Support "Stateless OpenPGP Command Line Interface" for encryption/decryption.

Open
#1,982 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

area/keyservice enhancement keyservice/pgp
Dominant language
Go
Stars
23.1k
Forks
1.1k
Avg merge
1d 11h
Merged PRs (30d)
9

Description

There is a (draft) standard for a CLI interface for OpenPGP, call "Stateless OpenPGP", or "SOP" for short. The spec is available under https://datatracker.ietf.org/doc/draft-dkg-openpgp-stateless-cli/. It can be used as a standardized interface for different OpenPGP implementations, which is useful if people want to switch to a different backend for some reason.

GnuPG is the most widespread PGP implementation, but it's not OpenPGP as specified by the IETF, it's LibrePGP as specified by Werner Koch, the lead developer of GnuPG. Most other PGP implementations out there follow the OpenPGP spec. Both OpenPGP and LibrePGP have a common ancestor, RFC 4880, but evolved differently from there. Most of the ecosystem implements RFC 9580, but GnuPG forked off before that RFC was published and wrote their own follow-up to RFC 4880. This is causing compatibility issues, as seen by #896.

To enable people to choose their own PGP implementation, it'd be nice if sops allowed usage of "SOP" implementations for encryption/decryption as an alternative to GnuPG. The stateless nature of SOP and the sops config only listing a fingerprint makes this a bit more difficult, because SOP implementations require keys passed as files for encryption. Key files could be fetched from the local pgp.cert.d if available, from the GnuPG keyring or fetched from keyservers. Additional required parameters could be passed via env vars, such as SOPS_PGP_SOP_KEY for the key path for decryption, SOPS_PGP_SOP_PASSWORD for the password for decryption if the key is encrypted, SOPS_PGP_SOP_EXEC, SOPS_PGP_SOP_ENCRYPTION_EXEC and SOPS_PGP_SOP_DECRYPTION_EXEC for binaries used for SOP, with overrides per action if people want different binaries for encryption/decryption.

Is this something that is of interest for sops?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by reading the SOP draft and reviewing sops' existing GnuPG encryption and decryption paths; clarify key discovery, environment variables, and per-action executable selection. Done requires an agreed design and working SOP support for both actions.

Written by the indexing model from the issue text.

Assessment

Domain
cli, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.