updatekeys uses .sops.yaml closest to PWD while --encrypt uses closest to project root
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.1k
- Forks
- 1.1k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 9
Description
I have observed the following for v 3.6.1:
Given the following directory structure:
.
├── README.md
├── deploy
│ ├── README.md
│ ├── flux
│ │ ├── .sops.yaml
│ │ ├── base
│ │ │ ├── ...
│ │ │ ├── kustomization.yaml
│ │ │ └── namespace.yaml
│ │ └── overlays
│ │ └── dev
│ │ ├── ...
│ │ ├── .sops.yaml
│ │ ├── kustomization.yaml
│ │ ├── kustomizeconfig.yaml
│ │ ├── secrets
│ │ │ ├── ...
│ │ │ ├── deploy
│ │ │ │ └── my-secret.yaml
│ │ └── values
│ │ └── ...
│ └── scripts
│ └── ...
└── docs
└── ...
With the following contents for ./deploy/flux/.sops.yaml (referred to as SOPS1 going forward):
creation_rules:
- encrypted_regex: '^(data|stringData)$'
pgp: <FP11>
and the following contents for ./deploy/flux/overlays/dev/.sops.yaml (referred to as SOPS2 going forward):
creation_rules:
- encrypted_regex: '^(data|stringData)$'
pgp: >-
<FP1>,
<FP2>,
<FP3>
where <FP1> / <FP2> / <FP3> actually contain valid PGP fingerprints.
Behavior:
-
Run at or below
./deploy/flux/overlays/dev:# from dev dir sops --encrypt --in-place secrets/deploy/my-secret.yamlEncrypts with the keys specified in SOPS1.
# from dev dir sops updatekeys secrets/deploy/my-secret.yamlEncrypts with the keys specified in SOPS2.
-
Run at or below
./deploy/fluxbut above./deploy/flux/overlays/dev:# from flux dir sops --encrypt --in-place overlays/dev/secrets/deploy/my-secret.yamlEncrypts with the keys specified in SOPS1.
# from flux dir sops updatekeys overlays/dev/secrets/deploy/my-secret.yamlEncrypts with the keys specified in SOPS1.
Expected behavior:
-
Run at or below
./deploy/flux/overlays/dev:
sops --encryptwould encrypt with the keys specified in SOPS2.
sops updatekeyswould re-encrypt with the keys specified in SOPS2. -
Run at or below
./deploy/fluxbut above./deploy/flux/overlays/dev:
sops --encryptwould encrypt with the keys specified in SOPS1.
sops updatekeyswould encrypt with the keys specified in SOPS1.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the two command pairs from the issue using the shown nested .sops.yaml files and paths. Compare the configuration lookup paths used by --encrypt and updatekeys, then verify that both commands select the nearest applicable configuration from either working directory; the differing key selection should be resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100