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

support / inside of vault names #197

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

Mythra
Copy link

@Mythra Mythra commented Oct 6, 2020

fixes #196

not the best code of all time, for listing vaults (since i struggled of a way to think of filepath joining, without copying the string extra times? Though maybe this is more unreadable, but figured I'd at least push this up and can always change later.)

I went through some basic scenarios locally with a go built version:

$ ./vaulted create testing/test
Creating new vault 'testing/test'...

[...]

?=Help; q=Save and Quit; Ctrl+C=Abort
Edit AWS key [k,m,r,R,t,S,D,b]: q

Are you sure you wish to save and exit the vault? (y/n): y
Vault 'testing/test'
   New password: 
   Confirm password: 
Vault 'testing/test' successfully saved!
$ ./vaulted list
[...]
testing/test
[...]
$ ./vaulted cp testing/test test/a/very/big/test/lol
Vault 'testing/test'
   Password: 
Vault 'test/a/very/big/test/lol'
   New password: 
   Confirm password:
$ ./vaulted list
[...]
test/a/very/big/test/lol
testing/test
[...]
$ ./vaulted dump testing/test
Vault 'testing/test'
   Password: 
{
  "aws_key": {
    "id": "asdf",
    "secret": "asdf",
    "forgoTempCredGeneration": false
  }
} 
$ ./vaulted dump test/a/very/big/test/lol
Vault 'test/a/very/big/test/lol'
   Password: 
{
  "aws_key": {
    "id": "asdf",
    "secret": "asdf",
    "forgoTempCredGeneration": false
  }
} 
$ rm -rf /home/cynthia/.local/share/vaulted/testing/
$ rm -rf /home/cynthia/.local/share/vaulted/test/
$ ./vaulted dump test/a/very/big/test/lol
file does not exist
$ ./vaulted list
bs-root
cncf-envoy
tetrate-hub
tetrate/hub

@Mythra
Copy link
Author

Mythra commented Oct 6, 2020

The failures on go 1.12 seem to be not caused by this PR:

The command "eval go get -v -t ./... " failed. Retrying, 2 of 3.
go get: warning: modules disabled by GO111MODULE=auto in GOPATH/src;
	ignoring go.mod;
	see 'go help modules'
github.com/hashicorp/vault/vendor/github.com/hashicorp/go-multierror
github.com/hashicorp/vault/vendor/github.com/hashicorp/go-retryablehttp
# github.com/hashicorp/vault/vendor/github.com/hashicorp/go-multierror
../../hashicorp/vault/vendor/github.com/hashicorp/go-multierror/multierror.go:112:9: undefined: errors.As
../../hashicorp/vault/vendor/github.com/hashicorp/go-multierror/multierror.go:117:9: undefined: errors.Is
# github.com/hashicorp/vault/vendor/github.com/hashicorp/go-retryablehttp
../../hashicorp/vault/vendor/github.com/hashicorp/go-retryablehttp/roundtripper.go:48:16: undefined: errors.Unwrap
The command "eval go get -v -t ./... " failed. Retrying, 3 of 3.
go get: warning: modules disabled by GO111MODULE=auto in GOPATH/src;
	ignoring go.mod;
	see 'go help modules'
github.com/hashicorp/vault/vendor/github.com/hashicorp/go-multierror
github.com/hashicorp/vault/vendor/github.com/hashicorp/go-retryablehttp
# github.com/hashicorp/vault/vendor/github.com/hashicorp/go-multierror
../../hashicorp/vault/vendor/github.com/hashicorp/go-multierror/multierror.go:112:9: undefined: errors.As
../../hashicorp/vault/vendor/github.com/hashicorp/go-multierror/multierror.go:117:9: undefined: errors.Is
# github.com/hashicorp/vault/vendor/github.com/hashicorp/go-retryablehttp
../../hashicorp/vault/vendor/github.com/hashicorp/go-retryablehttp/roundtripper.go:48:16: undefined: errors.Unwrap
The command "eval go get -v -t ./... " failed 3 times.
The command "go get -v -t ./..." failed and exited with 2 during .

Perhaps travisci needs GO111MODULE=on always?

@miquella
Copy link
Owner

Thanks for taking a crack at this!

Need to think through this a bit to make sure it's not going to cut off another feature we were considering (subvaults). I think we'll be okay, but give me a few days to discuss with @ryan-norton first.

I'll also see if I can find some time to get CI working properly again.

@Mythra
Copy link
Author

Mythra commented Oct 13, 2020

Yeah no problem take your time!

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

Successfully merging this pull request may close these issues.

Vaulted doesn't properly show vaults with "/" in their name
2 participants