Commit Graph

906 Commits

Author SHA1 Message Date
Ken Moore
90eeee0469 Enable the variant of the SSL auth procedures in the websocket. 2016-05-25 08:36:23 -04:00
Ken Moore
12d2517f17 Another couple minor tweaks to the server auth systems. 2016-05-25 08:35:35 -04:00
Ken Moore
d845364382 Merge branch 'master' of github.com:pcbsd/sysadm 2016-05-25 08:17:06 -04:00
Ken Moore
4ec1dd2694 Get the server all setup for enabling encryption (alternate API calls implemented - just no encryption turned on yet). 2016-05-25 08:16:15 -04:00
Kris Moore
dc7b2f6138 Opps fix typo 2016-05-24 09:43:30 -04:00
Kris Moore
f5bdfc4f1d Fix pkg-plist 2016-05-24 09:42:12 -04:00
Kris Moore
84481bec41 Merge pull request #20 from mheily/master
Convert manifests from relaunchd to jobd
2016-05-24 09:35:01 -04:00
Mark Heily
22e9088a81 Remove /usr/local/share path 2016-05-23 22:20:10 -04:00
Mark Heily
ebb5029255 Migrate relaunchd manifests to jobd 2016-05-23 22:17:31 -04:00
Ken Moore
2ac91c7c70 Get all the MD5 key generation/matching functional for the server/bridge. Also add an internal 1 minute timer to the bridge connections just to check/remove any broken connections as necessary. 2016-05-23 10:31:49 -04:00
Ken Moore
376a903991 Fix up the bridge/server connection management stuff. Now the server will automatically check/re-connect as needed. 2016-05-23 10:05:09 -04:00
Kris Moore
87f344e218 Update sysutils/relaunchd -> sysutils/jobd 2016-05-22 20:51:24 -04:00
Ken Moore
d479e424f5 Turn off a bunch of debugging in the sysadm-server. 2016-05-20 14:56:02 -04:00
Ken Moore
13fe684d78 Get the final bridge systems setup. Seems to be functioning perfectly now. 2016-05-20 14:46:47 -04:00
Ken Moore
23c254e11e Get a lot more of the bridge/server connections functional. Just have to work through a mismatch between server/client MD5 sums of valid keys. 2016-05-20 14:11:06 -04:00
Ken Moore
d8a0faea79 Clean up the server and bridge systems so that connections are now successful as needed. 2016-05-20 12:40:32 -04:00
Ken Moore
6e07eb7c49 Commit another batch of fine-tuning for the bridge/server. Still not getting the server->bridge connection for some reason - working on it... 2016-05-18 14:44:42 -04:00
Ken Moore
18bcd3b03e Fix up the import of a public key through the CLI on the sysadm-bridge. 2016-05-18 14:07:05 -04:00
Ken Moore
dc14b0c89b Fix up all the file paths and such needed for sysadm-bridge to function. Now it should be usable when run either as root or as a user. 2016-05-18 13:40:54 -04:00
Ken Moore
ae892c3e5b Turn off some debugging in the server. 2016-05-18 09:03:44 -04:00
Ken Moore
826eb104c4 Make the api-test script ask for which server to test (rest/ws). 2016-05-18 08:59:56 -04:00
Ken Moore
02d6a326e4 Make the input parsing a bit more flexible with regards to a newline on the end of the input JSON or not. 2016-05-18 08:59:04 -04:00
Ken Moore
68793175f7 Oops - forgot to have the server instantly sync/exit when using the new CLI flag (for interacting with running servers - does not start server itself). 2016-05-17 12:44:38 -04:00
Ken Moore
a81ca75519 Add a new CLI option to the sysadm server:
"-import_ssl_key <user> <key> <nickname> [<email>]": This will add the designated key (file path or raw text) to the SSL keys available for authentication to the server.
2016-05-17 12:42:14 -04:00
Ken Moore
e2382280cb Merge branch 'master' of github.com:pcbsd/sysadm 2016-05-17 11:36:00 -04:00
Tim Moore
273cd613d3 Merge pull request #19 from Mrt134/master
Additional documentation for SSL certificate management
2016-05-17 11:34:52 -04:00
Ken Moore
4f9776c6df Finish up all the new CLI options for sysadm-bridge:
1) Add a "-h" or "help" option which lists all the current CLI flags and their usage.
2) Adjust the "-import_ssl_file" and "-import_ssl_pubkey" options to now take 2 argument, with the first being some nickname for the key.
3) Add a "-remove_ssl [nickname]" option for removing a key.
2016-05-17 11:33:09 -04:00
Mrt134
d216ad5c2b Additional documentation for SSL certificate management
- Added json code blocks for websocket requests and responses of ssl certificate actions
- Style tweaks
2016-05-17 11:31:45 -04:00
Ken Moore
20c0c0b47e Add another CLI option to sysadm-bridge:
- "-list_ssl": This will output all the known public keys which may be authenticated with the server and any information about them.
2016-05-17 10:31:02 -04:00
Ken Moore
1451f217be Add a couple CLI options to the sysadm-bridge:
1) "-import_ssl_file <filepath>": This will import any .crt or .key file such that the designated public key may be used for authentication with this bridge.
2) "-import_ssl_pubkey <pubkey>": This will import the designated pubkey such that it may be used for authentication with this bridge.
2016-05-17 10:12:55 -04:00
Ken Moore
b8a33dd02a Fix the pkg-plist so it includes the sysadm-bridge binaries. 2016-05-17 09:15:33 -04:00
Ken Moore
4d587f67ae Clean up some more of the server/bridge.
- Turn off some debugging in the server.
 - Add a "bridge_export_key" CLI flag to the server to export the contents of the public certificate used for bridge connections.
 - Fix up the bridge rc.d script so it actually works.
 - Ensure that the bridge SSL key/cert is created when starting the server.
 - Add the bridge to the overall project build.
2016-05-17 09:11:11 -04:00
Ken Moore
df3f9bb57c Merge branch 'master' of github.com:pcbsd/sysadm 2016-05-17 09:08:52 -04:00
Ken Moore
7a34e1a527 Clean up the pkg database access so that each new probe opens/destroys it's own connection to the DB. This prevents the server DB connection from getting "stale" if pkg changes the DB in some drastic way. 2016-05-17 09:07:34 -04:00
Dru Lavigne
170bbf223f Merge pull request #18 from Mrt134/master
bugfix in theme stylesheet
2016-05-16 14:39:33 -04:00
Mrt134
df5c7c3373 bugfix in theme stylesheet
-fixed a highlighting bug
-moved 'themes' directory for simpler access
2016-05-16 14:28:37 -04:00
Dru Lavigne
22e3fd0f1a Merge pull request #17 from Mrt134/master
Style updates
2016-05-13 13:40:12 -04:00
Mrt134
01c37a00cb Style updates
- Replaced pcbsd_style.css with the universal for both server and API handbooks
2016-05-13 11:14:45 -04:00
Dru Lavigne
7995588dbd Merge pull request #16 from Mrt134/master
Added pcbsd_theme, updated API section
2016-05-12 16:15:14 -04:00
Mrt134
a9ce5ad765 Added pcbsd_theme 2016-05-12 16:07:42 -04:00
Mrt134
1a45554b8a Update API with Bridge
- Identified server, client or bridge websocket requests
- Added Bridge subsystem section with json example
2016-05-12 16:05:25 -04:00
Ken Moore
8a16f9a4d0 Completely finish up the raw changes to the sysadm-server so it can operator over a bridge connection (untested).
This also adds some stand-alone CLI options to the sysadm-binary utility:
"bridge_list": List any bridge connections in the settings file. Output Format: "name (url)"
"bridge_add <name> <url>": Add a bridge connection to the settings with the given name. (if websocket server is running, this change will take effect within 5 minutes).
"bridge_remove <name>": Remove a bridge connection from the settings. If a websocket server is running, this change will take effect within 5 minutes (closing the connection to the removed bridge as needed).

There is also a new option in the global server config file:
BRIDGE_CONNECTIONS_ONLY=[true/false]
If true, this will allow the websocket server to run without listening on any ports, and instead force all traffic through the existing bridge connections.
2016-05-12 10:25:16 -04:00
Ken Moore
916069ce69 Add support for the server to become the initiator in a client->bridge connection. The bridge setting to use are still not implemented yet, and the new bridge-specific SSL key pair still needs to be created on first run. 2016-05-11 15:29:37 -04:00
Ken Moore
9012c7cb57 Add an additional localhost verification check for passwordless logins: Ensure that the designated user is actually active on the localhost (via "users" if no graphical sessions running, or number of active processes if there are graphical sessions running) 2016-05-11 12:14:20 -04:00
Ken Moore
a303e160af Get the sysadm-server all setup for bridge relay connections (untested). 2016-05-10 15:56:16 -04:00
Ken Moore
f5ed144d90 Start adding the bridge data handling into the server so there can be unique encryption keys and auth tokens per bridged system connection. 2016-05-10 12:13:24 -04:00
Ken Moore
94596117ed API CHANGE: Get the sysadm-bridge all finished up. Now to add the necessary bits to the server/client so we can try using it.
NOTE: There is a special API/event for the bridge to announce which server/client connections are available (clients will see only servers, and vice versa)
The syntax for this event is:

{
 "namespace":"events",
 "name":"bridge",
 "id":"",
 "args":{
   "available_connections":["ID1","ID2", etc..]
 }
}

Note that the available_connections are *all* the connections available at that time (it is not a difference from a previous state), so there may be both new ID's in the list and ID's which are no longer listed.

This event will get sent out any time a new connection/disconnection is made from the bridge which impacts the current connection (so a client will only get the event when a server connects/disconnects and vice versa).
2016-05-10 10:49:33 -04:00
Ken Moore
083b8ad694 Oops - forgot to add the new RestStructs.cpp file to GIT. 2016-05-09 14:50:10 -04:00
Ken Moore
e2c66ceef7 Merge branch 'master' of github.com:pcbsd/sysadm 2016-05-09 13:37:35 -04:00
Ken Moore
1fea33c354 Get the sysadm server message parsing system all setup for bridge relays (no additional encryption/decryption layer yet) 2016-05-09 13:36:40 -04:00