cloudfoundry/credhub

CredHub CLI "find" command should behave like the unix find command for filesystems

Closed this issue · 3 comments

I have no way of discovering credentials saved under the root path /. For example if I create an entry with no slashes in its name, I have to remember the name to get it back, since find -a and find -p / don't show them. Or I think someone else on my team mucked around with my CredHub and I want to see if they left anything around, and it's hard to figure out.

In general, it appears that find shows "directories", not credentials, contrary to what a lot of the help text for the find command says. Also, it refers to "directories" as "paths", which is confusing -- "paths" should refer to "directories" or entries. In general I'd expect to be able to navigate the CredHub KV store similar to how I'd navigate a file system with the find utility, with recursive listing, options for showing only directories or only "end-values", limiting the depth to show, etc.

Additional information:

$ ./credhub --version
CLI Version: 0.3.0
CM Version: 0.3.0 build DEV

Hi Amit -

I have added a story to list credentials in the root path.
https://www.pivotaltracker.com/story/show/129956997

I agree that the difference of what is returned by the find command may not be the most straight forward way. I'll think if there is a more clear way to accomplish this.

Can you expand on this comment? I'm not sure I understand -

Also, it refers to "directories" as "paths", which is confusing -- "paths" should refer to "directories" or entries.

Sorry, don't think that comment of mine was very clear. I'll rephrase.

In a file system, everything is a file, and every file has a path. In a basic file system, you have directories (which are just a special type of file), and regular files. If I have a layout like:

myproject/
  - foo.rb
  - README.md

myproject/ is a directory and foo.rb and README.md are regular files within the directory. But they all have paths: /myproject, /myproject/foo.rb, /myproject/README.md respectively. The find command talks about searching by path, but it's only showing you directories, e.g. /myproject. So it's confusing because (a) the nomenclature is inconsistent with file-system nomenclature (in a file-system, everything has a path, but in the CredHub find command, paths only correspond to the equivalent of directories), and (b) the things I really want to list out anyways are credentials.

This issue was moved to cloudfoundry/credhub-cli#9