zend-patterns / ZendServerSDK

Pure ZF2 CLI for zpk creation and webapi client.
BSD 3-Clause "New" or "Revised" License
22 stars 17 forks source link

Local Config Handling #38

Closed zvikazend closed 9 years ago

zvikazend commented 10 years ago

Since command addTarget reads and modifies .zs_api.ini, it raises a security concerns with leftovers target details after use and maintenance of config and targets.

On every zs-client.phar execution, the first line should be something like: Config file: none or Config file: /path/to/.zs_api.ini

This way there is no mistake whether something is recorded on the system with sensitive data.

Next, these extra commands can come in handy:

  1. zs-client.phar config (path) display .zs_api.ini calculated path (matching the logic in addTarget - Windows or Home) and "Exists!" if exists
  2. zs-client.phar config print display config file content, or error if not available or empty
  3. zs-client.phar config delete or: zs-client.phar cleanup [--force](removes the config and any temp files after prompt or -f / --force).
  4. zs-client.phar listTargets
  5. zs-client.phar removeTarget --target=XYZ
  6. zs-client,phar removeAllTargets This is not the same as deleting config, since in the future we might like to see more configuration besides the ZS targets (user prefs, behaviour prefs, logging, command history, macros etc.)

Now who will beat me to implementing the above?!? :)

zvikazend commented 9 years ago

Thanks Slavey! Very happy about the Target method additions, makes ZS SDK very usable for multi-targets :) I'm forfeiting the "config" concept with more than just targets, this might be relevant in the future.