getsops / getsops/sops

Possible to use as Kubernetes KMS provider?

Open
#831 18 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hi! I was hoping to use sops as a KMS provider to encrypt secrets at rest in Kubernetes ( https://kubernetes.io/docs/tasks/administer-cluster/kms-provider/ )

I run a sops keyservice

sops keyservice --network unix --address /root/sops/sops.sock

And configure Kubernetes to use it:

apiVersion: apiserver.config.k8s.io/v1
kind: EncryptionConfiguration
resources:
  - resources:
      - secrets
    providers:
      - kms:
          name: myKmsPlugin
          endpoint: unix:///root/sops/sops.sock
          cachesize: 100
          timeout: 3s
      - identity: {}

But I get an error

kubectl get secret somesecret -o json | kubectl replace -f -
Error from server (InternalError): error when replacing "STDIN": Internal error occurred: failed get version from remote KMS provider: rpc error: code = Unimplemented desc = unknown service v1beta1.KeyManagementService

It seems the protocol buffers of sops / Kubernetes kms aren't compatible

Does anyone know any other projects, or workarounds to use sops as a Kubernetes KMS without going down the rabbit hole learning golang & protocol buffers?

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

Start by reading the Kubernetes KMS provider protocol documentation and comparing it with the sops keyservice started by sops keyservice --network unix --address /root/sops/sops.sock. Reproduce the unknown service v1beta1.KeyManagementService error using the provided EncryptionConfiguration, then determine the compatibility work needed; done means Kubernetes can encrypt and decrypt secrets through the sops endpoint.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
devops, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.