cycloid-cli
cycloid-cli copied to clipboard
Fix bad API_KEY handling.
There are a number of issue detected with the current handling of the API KEY:
- [x] CLI seems to try to send the auth token of a parent org when making actions on a child org.
- [x] CLI writes config with 0644 permissions on user's home which is bad (fix perm)
- [x] If the config is empty, the CLI panics (bad errors handling and nil map assignment)
- [x] We should allow (and recommend) to fill in the token via env var. Passing the token via arg will write it in the user's bash history.
### Tasks
- [ ] Scope login to API URL
- [ ] In the config file, split orgs by API URL
- [x] If the config is empty, the CLI panics (bad errors handling and nil map assignment)
- [x] CLI writes config with 0644 permissions on user's home which is bad (fix perm)
- [x] We should allow (and recommend) to fill in the token via env var or stdin. Passing the token via arg will write it in the user's bash history.
- [ ] Org related token env
- [x] Fix current org selection via config / env var
@gaelL @talset @marcoldp Any suggestions on this one ?