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
Agents which are added or updated via a heartbeat message will have the
loadername value populated if the agent instance is associated with a
loader instance. This also permits targeting of agents using the loader
name associated with the agent.
Use the agent ID/queue location information sent by the loader and
update a new queueloc column associated with the loader instance. This
provides an accurate means to identify any agents associated with a
given loader instance.
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.
It's possible over the course of the process lifetime on a workstation
that address or other environment information can change. This adds
support for periodic refreshes of current environment information from
the system.
This commit also requires modifying the way we pass the Context around
the agent, from a copy to using a pointer so the changes made in the
refresh routine are visible.
Closes#205
Use column default of false for isadmin privilege, API will not have
permission to change this value. Also fix a syntax error in investigator
query string that was causing queries to fail.
Checkpoint commit for initial revision of mig-loader related code. This
change adds functionality supporting agent auto-update using manifests
stored in the API.
This is a major change to the structure of the repository and the Makefile,
but a minor change in terms of functionalities. It simply changes the structure
of the directories to be compliant with Go's idiomatic build methods.
I also bought the domain `mig.ninja` and will now be using that as
a standard import path for everything. The magic to serve everything
under mig.ninja/mig will be documented elsewhere.