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

1604 Коммитов

Автор SHA1 Сообщение Дата
Aaron Meihm b63dbe2aee [minor] update standalone_install for api key changes in mig-console 2017-04-11 15:11:01 -05:00
Aaron Meihm 21d73e2180 [doc] add documentation around use of investigator API keys 2017-04-11 15:09:26 -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 5956901025 Merge pull request #336 from ameihm0912/shutdown-panic
[minor/bug] resolve write to closed chan Terminate panic on shutdown
2017-04-03 14:19:46 -05:00
Aaron Meihm c52cdf518b Merge pull request #337 from ameihm0912/httpreg-panic
[minor/bug] register endpoints on status socket once
2017-04-03 14:19:10 -05:00
Aaron Meihm f919e56f58 [minor/bug] register endpoints on status socket once
If the agent fails to bind the status socket, it will wait and retry
again. As part of this retry, it was also binding endpoints to register
them in the http package for the status socket which would result in a
panic.

Changes behavior so endpoints are only registered once.
2017-04-03 14:03:58 -05:00
Aaron Meihm 854bd2a2c8 [minor/bug] resolve write to closed chan Terminate panic on shutdown
When the agent shuts down (e.g. due to a signal, etc) a message is sent
to the Terminate channel, which results eventually in the agent Context
being destroyed.

The terminate channel was being closed before the AMQP connection was
being shut down. This was causing a panic as the getCommands function
also writes to the terminate channel to indicate relay collection is
failing.

Move close of Terminate later in destroy and after we shut down the AMQP
connection so prevent the write on the closed Terminate channel in
getCommands.
2017-04-03 10:52:02 -05:00
Aaron Meihm dbb2e7a7d5 Merge pull request #334 from ameihm0912/statsagtver
[minor] include agent version in status output
2017-03-28 13:42:22 -05:00
Aaron Meihm 43d4373630 [minor] include agent version in status output 2017-03-28 13:22:23 -05:00
Aaron Meihm ad9fc33bb3 Merge pull request #333 from ameihm0912/moarstats
[minor] include recent actions in agent statistics output
2017-03-28 12:31:23 -05:00
Aaron Meihm 2e0af390f0 [minor] include modules invoked in recent actions 2017-03-28 12:19:57 -05:00
Aaron Meihm aac134abf5 [minor] use RFC3339 in stats time field 2017-03-28 12:19:57 -05:00
Aaron Meihm 15d5615154 [minor] make agent action stats limit configurable 2017-03-28 12:19:57 -05:00
Aaron Meihm fe38333773 [minor] include recent actions in agent statistics output 2017-03-28 12:19:57 -05:00
Aaron Meihm 1b5483bf69 Merge pull request #332 from ameihm0912/issue-326
Improve handling for Linux distribution detection
2017-03-27 14:02:14 -05:00
Aaron Meihm 803b3bd1ff [minor] in findOSInfo(), dont log normal errors at Info
On some distributions lsb_release will not be present. Currently when
the agent is run on these systems, an error is always generated on
startup after lsb_release cannot be found and the agent uses issue for
distribution detection.

This changes the function so it does not generate these errors as they
are expected during normal execution, but will still print them at the
debug level.

Closes #326
2017-03-27 13:47:07 -05:00
Aaron Meihm c5a4d1528e [minor] remove spurious error check in getLSBRelease 2017-03-27 13:35:30 -05:00
Aaron Meihm 3d37ea6fc4 [minor] export getFlavor, and use in place of duplicate code in getInit 2017-03-27 13:33:21 -05:00
Aaron Meihm dcb89d9ad6 [minor] remove vendored service-go and just include this package in mig
service-go is being imported as a vendor package. It was originally more
generic but over time has been tweaked in a few ways for its use within
MIG. Rather then manage it as a separate package, just include it.
2017-03-27 13:19:23 -05:00
Aaron Meihm 1f403c02ed Merge pull request #328 from vbmade2000/print-config-settings
[minor] Add an option to print agent settings, fixes #280
2017-03-21 00:13:31 -05:00
Aaron Meihm 4fa69e6c64 Merge branch 'master' into print-config-settings 2017-03-21 00:03:15 -05:00
Aaron Meihm aad30da5cb Merge pull request #331 from ameihm0912/testsfix
Updates for Docker build and standalone installation
2017-03-20 16:17:08 -05:00
Aaron Meihm a20df962ab [minor] update Dockerfile, use xenial
Updates Dockerfile with a few changes:
- use ubuntu:xenial
- Ensure we stop postgresql after build so it starts without requiring
  recovery
- Also install packages in docker build to take advantage of cache for
  faster testing
2017-03-20 16:06:01 -05:00
Aaron Meihm 30a9bcb834 [minor] some cleanup for standalone_install.sh 2017-03-20 16:06:01 -05:00
Aaron Meihm 477bda1f03 [minor] add a couple comments describing some of the actions in travis 2017-03-20 16:06:01 -05:00
Aaron Meihm 1ad585a3af Merge pull request #330 from ameihm0912/actionfileconf
[minor/bug] read conf and create client in mig-cmd with -i
2017-03-20 15:22:29 -05:00
Aaron Meihm d4cb34e0bc [minor/bug] read conf and create client in mig-cmd with -i
ba34c5c moved some code in mig-cmd around so a client/configuration was
not required with -t local, but this created issues with -i as the
configuration was no longer being read. Update action file handling to
include reading configuration and creating a client.
2017-03-20 15:20:49 -05:00
Julien Vehent [:ulfr] f78f20ad76 [doc] Update CONTRIBUTING.md, fixes #329 2017-03-20 12:59:15 -04:00
Malhar Vora 51006ed651 [minor] Add an option to print agent settings, fixes #280 2017-03-20 11:37:30 -05:00
Aaron Meihm 25b7e46e37 Merge pull request #327 from mozilla/jayantpatch
[minor] allow simmultaneous update of investigator status and permissions
2017-03-20 08:49:28 -05:00
jayant-yadav b1cafd7841
[minor] allow simmultaneous update of investigator status and permissions 2017-03-20 09:20:33 -04:00
Aaron Meihm 27067b682f Merge pull request #325 from ameihm0912/httpstatsock
Use HTTP for status socket, add agent status page
2017-03-16 09:38:37 -05:00
Aaron Meihm dd7fd95fb7 [minor] indent json for readability in status output 2017-03-16 09:28:48 -05:00
Aaron Meihm a91b9a0ed6 [minor] use css from mig website for status output 2017-03-16 09:12:41 -05:00
Aaron Meihm 34a7c81410 [minor] add a new status endpoint to the agent status socket
If the agent is running on for example a workstation device, by browsing
to the status socket (e.g., typically bound at http://127.0.0.1:51664)
basic statistics of the agent are returned to be viewed.
2017-03-15 12:49:52 -05:00
Aaron Meihm 4181963c45 [minor] convert agent stat socket to use HTTP
Rather than a custom/raw TCP protocol here, make use of HTTP for
communication with the agent stat socket. The existing functionality has
been modified to operate in the same manner as it was previously.
2017-03-15 09:55:59 -05:00
Aaron Meihm 8849f86373 Merge pull request #324 from vbmade2000/typo
[minor] Fix typo
2017-03-14 11:41:31 -05:00
Aaron Meihm a6074b1c9e Merge branch 'master' into typo 2017-03-14 11:33:05 -05:00
Malhar Vora bf9396df17 [minor] Fix typo 2017-03-14 11:07:10 -05:00
Aaron Meihm 7c8e31d852 Merge pull request #323 from mozilla/bypasslocal
[minor] Don't create a client conf when running with -t local
2017-03-13 09:19:54 -05:00
Julien Vehent ba34c5c48c
[minor] Don't create a client conf when running with -t local 2017-03-13 10:07:50 -04:00
Julien Vehent da684c5c5f
Merge branch 'master' of github.com:mozilla/mig 2017-03-08 13:30:51 -05:00
Julien Vehent e7a93ea32c
[minor] fix rabbitmq configuration in standalone install 2017-03-08 13:30:06 -05:00
Julien Vehent [:ulfr] 87dd6d4663 [doc] add Docker quick start to README 2017-03-08 13:29:36 -05:00
Julien Vehent 4e9b29f816
[minor] fix container build in travisci 2017-03-08 12:30:25 -05:00
Julien Vehent 6af099a424
[doc] add git tag makefile target 2017-03-08 12:00:44 -05:00
Aaron Meihm cae3006a9f Merge pull request #321 from mozilla/dockerfile
[minor] build standalone instance into Docker container
2017-03-08 08:54:50 -06:00
Julien Vehent 88b8197305
[minor] move integration test to standalone install 2017-03-07 13:51:55 -05:00
Julien Vehent 6d87a3f4f4
[minor] add docker service to travisci 2017-03-07 13:10:22 -05:00
Julien Vehent 3130486a34
[minor] build standalone instance into Docker container 2017-03-07 11:43:06 -05:00