wunderio / radi-cli

CLI interface for the Radi-API
1 stars 2 forks source link

radi-cli operations are unreliable without a '~/.config/radi/user.yml' file #29

Closed james-nesbitt closed 7 years ago

james-nesbitt commented 7 years ago

when running some radi-cli commands, we sometimes get missing operations and the following type of output:

ERRO[0000] Error loading config for user                 error="Unknown config key requested"
No help topic for 'local.project.create'

This issue was first report https://github.com/wunderkraut/radi-project-wundertoolswrapper/issues/20

james-nesbitt commented 7 years ago

it has been on my list to write a small wrapper for the very default user-loading, to provide a default user based on OS reported user. It looks like this, and a null security wrapper are a good idea now.

james-nesbitt commented 7 years ago

to clarify: our cli is now using a secured api-builder, which applies authorization checks to all operations. The cli pulls current-user information from a config-wrapper, but does not have a fallback for "no user config exists" and is reporting "no-user" which stalls the security authorization check.

james-nesbitt commented 7 years ago

expected user yml looks like this:

-> % cat ~/.config/radi/user.yml 
Id: james.nesbitt@wunder.io
Label: James Nesbitt
james-nesbitt commented 7 years ago

Default user handling now exists after https://github.com/wunderkraut/radi-cli/pull/30.