Return an error from FindHomedir rather then panic with no context.
Also, modify one case here to use path.Join instead of expecting UNIX
filesystem layout.
Use WaitGroups to avoid interleaving text if an action is cancelled.
This did not occur all the time, but this change should provide for more
consistent behavior.
mig-console didn't handle this at all; add a comment around this as well
and adjust mig-console to provide the additional extra parameter
required.
This reverts the change made in 32824ce2 to handle error results from
GetAPIResource. Some logic in here needs to be revisited; GetAPIResource
returns an error even under normal circumstances (such as getting a 404
if no results were found for a given query) which breaks results fetch
in the client.
loader keys have a specific format. rather then various clients needing
to be familiar with the format, just generate keys api side and return
them once upon generation to the client.
X-PGPAUTHORIZATION based authentication was previously used for
authorizing client access to the API. This patch adds the option of
using a standard API key as well.
Note that PGP is still required for querying agents. In some cases
though, we may want to integrate other external applications that just
require API access (e.g. to review previous investigations, manage
users, etc). Using PGP for this is problematic and the ability
to instead just use a regular API key for these scenarios remediates
this.
Investigators can now be assigned an key that enables API key based
access to the MIG API. Investigators can also be created without a PGP
key, so they can solely utilize API key based access.
Resolves#239
This removes the previous implementation where an investigator could
either be set to an admin or not, and expands this to per-endpoint
permissions that can be set for individual investigators.
This provides the ability for users to define target macros in ~/.migrc,
as an example rather than requiring -t "status='online'", given a
section such as:
[targets]
macro = allonline:status='online'
in .migrc, you can then do -t allonline. The intended specification
format is macro = name:<target string>. Multiple "macro" items can be
specified in the targets section.
This also removes the default target in mig-cmd, and the -t flag is
now a required option. This better aligns with how mig-console works.
We need to make sure even if the previous request is being discarded we
read the entire response body. If not, this can result in the subsequent
Do() call returning an error related to request cancellation.
Checkpoint commit for initial revision of mig-loader related code. This
change adds functionality supporting agent auto-update using manifests
stored in the API.
When the .migrc is missing, a new one can be created, and if gpg is
installed, but there is no suitable key in the secring file, it will
display an error saying "No suitable key found". This commit also adds
to the error description the file which was inspected.
This fixes issue #132.