948 Commits

Author SHA1 Message Date
Ken Moore
ef6f7ec39f Merge branch 'master' of github.com:pcbsd/sysadm 2016-02-29 14:43:36 -05:00
Ken Moore
3663931eb7 Add a new signal to the Dispatcher process: ProcessOutput(QString log) 2016-02-29 14:43:02 -05:00
Dru Lavigne
187b1cc3e3 Fix typo. 2016-02-29 13:35:55 -05:00
dlavigne
2887addb92 Minor formatting fixes. 2016-02-29 13:28:23 -05:00
Ken Moore
fb1e0008a5 Update connection.rst
Add information about the auth_ssl system, and clarify the localhost password requirements.
2016-02-29 11:42:51 -05:00
Kris Moore
7be9688773 Update README 2016-02-27 12:01:11 -05:00
Kris Moore
1f94a24f1d Update more of the sysrc / service 2016-02-26 18:59:54 -05:00
Kris Moore
0588229c7e Update service example 2016-02-26 18:59:23 -05:00
Ken Moore
27607befef Fix a parsing bug in the beadm list function. 2016-02-25 14:37:03 -05:00
Ken Moore
e1c162454e Fix a bug in the auth system where exising auth tokens could accidentally get removed from the internal hash. 2016-02-25 12:46:27 -05:00
Ken Moore
e64bf091ab Rework how the SSL registration information is saved/retrieved for listing a bit. 2016-02-25 09:24:40 -05:00
Ken Moore
c064bdcfcd Small set of general cleanup in the server sources:
1) Fix a connection issue in the dispatcher
2) Always run the [T]SOCKET->isValid() check before interacting with any socket.
2016-02-25 08:49:17 -05:00
Kris Moore
b18a6a1a2a Auto-restart the daemon after a crash 2016-02-24 13:15:13 -05:00
Ken Moore
55af9df9f9 Merge branch 'master' of github.com:pcbsd/sysadm 2016-02-23 14:53:09 -05:00
Ken Moore
cdbe769fe2 Fix up the new "State" event system a bit. 2016-02-23 14:52:45 -05:00
Kris Moore
03650dd925 Set portsdir 2016-02-23 13:56:02 -05:00
Kris Moore
90a9e3f5bd Move location of sysadm.ini 2016-02-23 12:24:39 -05:00
Ken Moore
dddfabaef2 Just in case, also specify the char* length on the server when loading it into the QByteArray. 2016-02-23 11:22:56 -05:00
Ken Moore
775ce5c337 Remove a lot of debugging and fix a possible crash with the SSL decrypt routine on the server. This now completely works. 2016-02-23 11:20:59 -05:00
Ken Moore
cab15e9137 Revert "Fix the crash of the server on SSL login attempt - still does not work reliably though."
The encrypt/decrypt string method works better than the SSL hash/sign/verify routine from this commit.
This reverts commit 68a520bb48.
2016-02-23 10:39:43 -05:00
Ken Moore
68a520bb48 Fix the crash of the server on SSL login attempt - still does not work reliably though. 2016-02-22 16:45:55 -05:00
Ken Moore
dfdc795bb2 Require that the SSL public key be base64 encoded when recieved for registration on the server. Also change the server SSL type flag to TLS 1.0 or later (instead of TLS 1.0 only) 2016-02-22 14:02:02 -05:00
Ken Moore
2e64d2d0a6 Fix the location of the SSL files used for the websocket server. 2016-02-22 13:13:47 -05:00
Kris Moore
b2cd436269 Flip the flags for -ws -> -rest 2016-02-22 12:56:48 -05:00
Ken Moore
6640762196 Fix up the timers in the event watcher. Due to the multi-threading, we need to create the timers in the start() function instead of the constructor. 2016-02-22 12:53:27 -05:00
Ken Moore
a6c76fbaa1 Add the new sysadm.conf.dist file to the project, and add it to the pkg-plist as well. 2016-02-22 12:33:18 -05:00
Ken Moore
8f1116719a Merge branch 'master' of github.com:pcbsd/sysadm 2016-02-22 12:27:22 -05:00
Ken Moore
7e230c5f5f Change the location of the sysadm server internal settings file (QSettings file), and add support for an optional sysadm.conf file which is loaded on server startup. 2016-02-22 12:25:52 -05:00
Kris Moore
69ebb9d435 Rename sysadm-websocket -> sysadm, and sysadm-restserver -> sysadm-rest 2016-02-22 11:53:30 -05:00
Ken Moore
9ebf28134e Merge branch 'master' of github.com:pcbsd/sysadm 2016-02-22 09:42:37 -05:00
Ken Moore
e8b65c04d2 Update the dispatcher class to return a pointer to the newly created DProcess object so that the requestor can connect to various process signals as needed. 2016-02-22 09:41:09 -05:00
dlavigne
0074c95e72 Add 4 modes for getjailsettings. 2016-02-22 08:13:40 -05:00
dlavigne
ab19e341d5 Doc halt and reboot actions. 2016-02-22 07:48:24 -05:00
Ken Moore
19618b7581 Get rid of the "toLatin1()" call when converting the base64 encrypted string to a bytearray. 2016-02-19 16:25:13 -05:00
Ken Moore
9bb9add1db Update the server to expect a base64 encoded string as the encrypted string (for JSON transport). 2016-02-19 16:07:39 -05:00
Ken Moore
2bd77b9882 Merge branch 'master' of github.com:pcbsd/sysadm 2016-02-19 15:15:56 -05:00
Ken Moore
767bf82ec8 Finish fixing up the new auth_ssl option (lots of debugging still enabled). The SSL encode/decode systems still are not working yet - looks like an inherent incompatibility with a text-base transport system (JSON), so we will need to find another method (acting on a file and sending the hash instead?). 2016-02-19 15:13:29 -05:00
Ken Moore
6cfaf6e597 Completely re-do the SSL authentication systems. Now it is a two-stage auth system, where the server generates a random string, sends it to the client for encryptions with their private SSL key, then gets sent back to the server where the new string is decrypted with the known SSL keys and compared to teh original for accuracy. 2016-02-18 17:01:09 -05:00
Kris Moore
80bcd67733 Add two new API calls, to shutdown/halt the system, and to
reboot the system.

Shutdown API call

REST Request:
-------------------------------
PUT /sysadm/systemmanager
{
   "action" : "halt"
}

WebSocket Request:
-------------------------------
{
   "id" : "fooid",
   "args" : {
      "action" : "halt"
   },
   "name" : "systemmanager",
   "namespace" : "sysadm"
}

Response:
-------------------------------
{
  "args": {
    "halt": {
      "response": "true"
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}

Reboot API call

REST Request:
-------------------------------
PUT /sysadm/systemmanager
{
   "action" : "reboot"
}

WebSocket Request:
-------------------------------
{
   "id" : "fooid",
   "args" : {
      "action" : "reboot"
   },
   "name" : "systemmanager",
   "namespace" : "sysadm"
}

Response:
-------------------------------
{
  "args": {
    "reboot": {
      "response": "true"
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2016-02-17 13:08:12 -05:00
Kris Moore
cd72cb1308 Fix location of sysadm-general.h 2016-02-12 12:58:04 -05:00
Kris Moore
a1593e759a Add initial Event watcher for system health, needs fixing since
QTimer isn't working at the moment, kenmoore will investigate
2016-02-12 12:54:45 -05:00
dlavigne
cc5ecf1f65 Doc umountbe action. 2016-02-12 10:24:11 -05:00
dlavigne
14923ef541 Update mountbe example. 2016-02-12 10:13:40 -05:00
JoshDW19
d3d32b15c5 New API call for unmounting a boot environment. This will specify the -f flag which will force unmount even if the BE is busy.
REST Request:
-------------------------------
PUT /sysadm/beadm
{
   "action" : "umountbe",
   "be" : "green"
}

WebSocket Request:
-------------------------------
{
   "name" : "beadm",
   "namespace" : "sysadm",
   "id" : "fooid",
   "args" : {
      "be" : "green",
      "action" : "umountbe"
   }
}

Response:
-------------------------------
{
  "args": {
    "umountbe": {
      "be": "green"
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2016-02-11 14:49:14 -05:00
JoshDW19
6152e7d5f4 Merge branch 'master' of https://github.com/pcbsd/sysadm 2016-02-11 13:15:12 -05:00
JoshDW19
a95927e28d Fixed a bug where a response was not being returned on the mountbe API call. Updated example below.
REST Request:
-------------------------------
PUT /sysadm/beadm
{
   "action" : "mountbe",
   "be" : "green",
   "mountpoint" : "/tmp/mountdir"
}

WebSocket Request:
-------------------------------
{
   "id" : "fooid",
   "name" : "beadm",
   "args" : {
      "action" : "mountbe",
      "be" : "green",
      "mountpoint" : "/tmp/mountdir"
   },
   "namespace" : "sysadm"
}

Response:
-------------------------------
{
  "args": {
    "mountbe": {
      "be": "green",
      "mountpoint": "/tmp/mountdir"
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2016-02-11 13:14:16 -05:00
dlavigne
f351f85f74 Doc mountbe action. 2016-02-11 12:47:38 -05:00
dlavigne
cfb7537d78 Doc execjail action. 2016-02-11 12:35:37 -05:00
dlavigne
37b55c6f8f Doc df action. 2016-02-11 12:06:36 -05:00
dlavigne
231fb7e044 Doc destroyjail action. 2016-02-11 11:58:39 -05:00