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

sopstool cannot decrypt with absolute path + configfile path option #3

Open
blimmer opened this issue Jan 30, 2018 · 1 comment
Open
Labels
bug Something isn't working

Comments

@blimmer
Copy link
Contributor

blimmer commented Jan 30, 2018

I have a ruby project directory that looks like this:

my_gem
├── .sops.yaml
├── lib
│   └── my_gem.rb
└── secrets
    └── my_secrets.sops.yaml

from within the my_gem directory, I can decrypt using this command

sopstool decrypt secrets/my_secrets.sops.yaml

However, I can't decrypt that same file when using an absolute path

sopstool decrypt /src/my_gem/secrets/my_secrets.sops.yaml --configpath /src/my_gem

This seems to have something to do with the .sops.yaml configuration. This is the configuration where I was experiencing the problem:

creation_rules:
- kms: ...snip...
encrypted_files:
- secrets/deployment.yaml

If I change the encrypted_files to the absolute path, it starts working

encrypted_files:
- /src/my_gem/secrets/deployment.yaml
@blimmer blimmer added the bug Something isn't working label Jan 30, 2018
@onyxraven
Copy link
Member

Yep, I have a feeling that the pathing isn't too smart. Ultimately sopstool should resolve every path added/used as relative to .sops.yml wherever it is (hopefully including ../). At a minimum it should resolve it as direct-ancestor of .sops.yml regardless of the cwd

@onyxraven onyxraven added this to the 1.0 public release milestone Feb 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants