-
Notifications
You must be signed in to change notification settings - Fork 903
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
Add ability to store sops metadata in OpenAPI compliant format #519
Comments
I'm not 100% sure I understand what you're asking, but I think this is related to #401. There are more ideas about the possible interface SOPS could expose to users, and as possible users, your team's opinion on those ideas would be helpful 🙂. My opinion is that Kubernetes is big enough that a separate subcommand for related operations could make sense, even if it's just a thin wrapper over a more "generic" Kubernetes store. In short, I think this is definitely something we want in SOPS. |
#401 is definetely related issue. I've created k8s operator (added link above), which can be used at the moment with I would still need to do changes to the operator (I have none compliant field - The fields I mentioned are from example bellow: apiVersion: isindir.github.com/v1alpha1
kind: SopsSecret
metadata:
name: tst-secrets
namespace: tst
spec:
secret_templates:
- name: ENC[AES256_GCM,data:<redacted>,iv:<redacted>,tag:<redacted>,type:str]
data:
MY_PASS: ENC[AES256_GCM,data:<redacted>,iv:,tag:<redacted>,type:str]
- name: ENC[AES256_GCM,data:<redacted>,iv:<redacted>,tag:,type:str]
data:
MY_PASS2: ENC[AES256_GCM,data:<redacted>,iv:<redacted>,tag:,type:str]
sops:
kms:
- arn: arn:aws:kms:<redacted>:<redacted>:alias/<redacted>
created_at: '<redacted>'
enc: <redacted>
aws_profile: ""
gcp_kms: []
azure_kv: []
lastmodified: '<redacted>'
mac: ENC[AES256_GCM,data:<redacted>,iv:<redacted>,tag:<redacted>,type:str]
pgp: []
encrypted_suffix: _templates
version: 3.3.1 |
I see, thanks for clarifying. I can't see a way to do this cleanly right now, but I'll see if I come up with something. Implementing a separate |
I am also not sure whether implementing this would be optimal. It would perhaps be better to reach agreement on what a good solution for Kubernetes workflows would be and implement that for everyone, instead of creating a new |
I think latter would be better option. I think the main two ways of deploying secrets to kubernetes are - via CI/CD pipeline of some sort and via gitops CD. If done via CI/CD pipeline, |
Not ideal, but the operator could pass only a small blob of CRD data to sops-as-a-library to decrypt into a kubernetes secret which would be encrypted at rest in 1.15. Alternatively, you could sanitize the relevant portions and translate the keys into and out of camel case using a library like strcase or conjson or using a technique like in this stackoverflow question. You could also create kubernetes specific camel case variants and trivially convert into the regular sops ones. Just throwing out ideas. thanks for cool stuff so far! |
This is openining discussion and/or potential request to:
Implement sops metadata in OpenAPI compliant format.
Problem description:
I've written Kubernetes sops-secrets-operator which allows to use
sops
as cli to encrypt Kubernetes CR definition for storage inside git repository for GitOps using FluxCD. We foundsops
very easy to use inside the team. The issue is that all Kubenrnetes resources (including custom resources) must be OpenAPI compliant. From k8s version 1.15 non-compliant fields will be removed from resource at creation time in k8s and not stored inetcd
. However operator relies on information passed viasops
metadata, which is not OpenApi compliant - ie fields likegcp_kms
,azure_kv
,encrypted_suffix
,created_at
,aws_profile
, etc. That makes it impossible to continue development and use of the operator as it will not be compattible with k8s version 1.15.Questions about feature implementation:
I'd be happy to help with this feature development, but will need some help and guidance.
Thanks
The text was updated successfully, but these errors were encountered: