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

chore: omitempty metadata to reduce the size of stored config #1571

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cgetzen
Copy link

@cgetzen cgetzen commented Jul 31, 2024

This reduces the sops configuration stored in files to its bare minimum:

# example with GCP KMS

someConfig:
...
sops:
    gcp_kms:
        - resource_id: projects/some-project/locations/global/keyRings/some-keyring/cryptoKeys/some-key
          created_at: "2024-08-31T01:09:49Z"
          enc: someenc=
    lastmodified: "2024-08-31T21:53:36Z"
    mac: ENC[AES256_GCM,data:/somemac=,tag:sometag==,type:str]
    encrypted_regex: someregex
    mac_only_encrypted: true
    version: 3.9.0

@cgetzen cgetzen force-pushed the cg/minimum-sops-config branch from d10331a to 246efde Compare July 31, 2024 22:02
@cgetzen cgetzen changed the title chore: omitempty optional metadata to reduce the size of stored config chore: omitempty metadata to reduce the size of stored config Aug 2, 2024
@felixfontein
Copy link
Contributor

While this is nice, it's also causing a lot of changes to exisitng SOPS-encrypted files when these are changed (edited, keys updated, rotated, etc.).

@getsops/maintainers we have to figure out when to include this (it definitely should not go into a bugfix release) - assuming nobody objects to having this at all?

@cgetzen
Copy link
Author

cgetzen commented Sep 17, 2024

Thanks for the review @felixfontein. What do you think about adding the 3.10 label so that it could make it into the next minor version?

@felixfontein
Copy link
Contributor

@cgetzen I added it to the Discussion milestone so it can be moved to the appropriate milestone once it has been discussed. (GitHub only allows to assign one milestone, so adding the 3.10 milestone will remove the Discussion milestone.)

@cgetzen
Copy link
Author

cgetzen commented Dec 19, 2024

@felixfontein I'm curious what qualities would prevent this from going out in a minor release? It is backwards compatible.

@felixfontein
Copy link
Contributor

I think having it in a new minor release is fine, but I'd like to hear opinions from the other maintainers as well. This is potentially creating larger diffs for users, that could be a reason to wait for a new major release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants