Граф коммитов

77 Коммитов

Автор SHA1 Сообщение Дата
Zack Mullaly 49476d62b7
removing function that isn't being used yet 2018-11-22 14:03:49 -05:00
Brandon Myers 9b3205867a
Add update role to agents table for migapi 2018-11-20 13:56:27 -05:00
Zack Mullaly d70bb40bd1
Don't try to insert into table that no longer exists 2018-11-19 15:34:15 -05:00
Zack Mullaly 76a962487b
No longer have need for the relation between agents and actions 2018-11-13 14:59:49 -05:00
Brandon Myers 99fd4eef8d
Modify agent to post heartbeat to api 2018-11-09 10:52:01 -06:00
Zack Mullaly a611f5587c
Establish a relationship between actions and the agents targeted by them when actions are inserted into postgres 2018-10-31 16:20:32 -04:00
Zack Mullaly 6d85490576
Got new integration tests to run 2018-10-31 14:06:56 -04:00
Zack Mullaly e993de63b9
Creating a new table in which we will relate actions to agents and track whether the particular agent has retrieved the action 2018-10-29 16:56:17 -04:00
Zack Mullaly 3ddf5c9dfe
Fixed some silly mistakes 2018-10-26 15:06:23 -04:00
Zack Mullaly 91e5c210fe
Shortened SetupRunnableActions by reusing some new code 2018-10-26 13:45:45 -04:00
Zack Mullaly 447689537e
Proper check 2018-10-26 13:42:46 -04:00
Zack Mullaly 8ad17467b4
Implemented a new database method for retrieving actions targeting a specific agent 2018-10-26 13:41:40 -04:00
Brandon Myers 60f903560e
Switch from ping to select 1 during db open 2018-09-20 11:30:04 -05:00
Brandon Myers 69a59bf660
Check for ping when connecting to postgresql db 2018-09-18 18:39:04 -05:00
Tristan Weir 8c24601740 Update import statements to point to github.com/mozilla/mig/ 2018-07-11 10:11:22 -07:00
Aaron Meihm 7ca6547571 doc: update config guide Postgres section
Updates Postgres section in the configuration guide. Also, remove
references to createlocaldb.sh and createremotedb.sh and remove these
files, as they are not generally needed since a few simple commands can
be used for database setup.
2017-09-18 16:17:42 -05:00
Aaron Meihm 16a78102e2 [medium] move loader key generation into api
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.
2017-04-12 09:43:11 -05:00
Aaron Meihm 0c49439eb0 [major] investigator API key authentication for API use
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
2017-04-11 14:55:58 -05:00
Aaron Meihm 566ffe87da [minor] add a new loadername column to agents table
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.
2017-02-07 16:18:35 -06:00
Aaron Meihm 5f631db035 [minor] scheduler option to log summary of each agent actions/commands
Optionally create a summarized log entry for each command dispatched to
an agent by the scheduler. Currently this log entry just includes the
agent name, the loader name (if it is associated with a loader
instance), and the action name.
2017-02-07 16:18:35 -06:00
Aaron Meihm 58a9df98e1 [minor] in UpdateLoaderEntry, also update queueloc
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.
2017-02-07 16:18:35 -06:00
Aaron Meihm bbd4b8d2e4 [minor] remove upgrade module and additional references to module 2016-12-21 15:08:49 -06:00
Aaron Meihm bffa03456d [minor/bug] don't rollback uninitialized transaction 2016-08-16 09:03:55 -05:00
Aaron Meihm bb5f690710 [major] expand permission model to be per-endpoint 2016-08-15 18:28:57 -05:00
Aaron Meihm 07d135a000 [medium] more granular permissions for investigators
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.
2016-08-15 15:25:01 -05:00
Aaron Meihm 9adaa7ce82 [minor] replace ldr verify stored procedure with function 2016-08-15 15:01:12 -05:00
Aaron Meihm 68e9e583b1 [minor] also allow specification of loader mnfst filter on create 2016-08-11 16:31:44 -05:00
Aaron Meihm c32c3b4ab2 [medium] add environment validation to loader authorization
Adds ability to specify an expected environment or tag query string to
loader instances which are verified prior to manifest lookup.

Resolves #255
2016-08-11 15:28:57 -05:00
Aaron Meihm ca684916cb [minor] NOT NULL on loaderkey and salt 2016-07-12 09:27:40 -05:00
Aaron Meihm 5c4a5deceb [minor] validate auth material returned from database before use 2016-07-12 09:10:58 -05:00
Aaron Meihm f4b825db46 [minor] store key salt in an additional column 2016-07-12 09:01:41 -05:00
Aaron Meihm e70bb04105 [major] hashed storage of api loader keys and format standardization 2016-07-10 16:24:53 -05:00
Aaron Meihm adc27da5a9 [minor] include tags and environment in agent search results 2016-07-05 16:19:38 -05:00
Aaron Meihm 638a6de11e [minor] support creating investigator as admin 2016-05-26 15:16:31 -05:00
Aaron Meihm 6cfd4bbf96 [minor] support enable/disable admin flag via api and console 2016-05-26 14:59:35 -05:00
Aaron Meihm 27526eea8e [minor] show loader enabled status in search 2016-04-25 13:56:25 -05:00
Aaron Meihm 6cb30162c9 [medium] mig-console and api loader key change support 2016-04-25 13:46:20 -05:00
Aaron Meihm 3f4d055c95 [minor/bug] loader api search incorrectly using manifest id 2016-04-25 13:40:48 -05:00
Aaron Meihm 92a1c6f6b8 [minor/bug] fix db column name missed in 008143a 2016-04-25 13:40:43 -05:00
Aaron Meihm 008143a454 [minor] use lastseen instead of lastused in loaders table 2016-04-20 16:47:47 -05:00
Aaron Meihm 73f85ef52e [medium/bug] ignore offline agents in ActiveAgentsByQueue
avoids returning offline agent information to killDupAgents, in
circumstances where the returned data includes only one online agent
with several offline agents, we could end up sending a kill notice to
the only online agent.
2016-04-20 16:47:47 -05:00
Aaron Meihm 461163a032 [medium] add console loader management operations 2016-04-20 16:47:47 -05:00
Aaron Meihm da8bbb2ee5 [minor] add loader search to console 2016-04-20 16:47:47 -05:00
Aaron Meihm a84474ad9e [medium] introduce periodic agent environment refresh
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
2016-04-18 23:04:50 -05:00
Aaron Meihm d056b5b4fb [minor] make api required signatures a config option 2016-03-24 17:08:14 -05:00
Aaron Meihm 3e54d93cf4 [minor] allow loader lookup for staged manifests 2016-03-24 17:08:14 -05:00
Aaron Meihm cae93f70d7 [medium] transform agent configuration with relay credentials 2016-03-24 17:08:14 -05:00
Aaron Meihm 4bbbe24666 [minor] unique index on loader name and key 2016-03-24 17:08:14 -05:00
Aaron Meihm 16321b66d5 [minor] populate IsAdmin for various other investigator queries 2016-03-24 17:08:14 -05:00
Aaron Meihm aed606d730 [minor] use default col val for isadmin in InsertSchedulerInvestigator 2016-03-24 17:08:14 -05:00