Commit Graph

695 Commits

Author SHA1 Message Date
Ken Moore
fa4b19693d Add an additional check to the pkg repo listing to verify which repos are active too. 2016-08-04 14:37:01 -04:00
Ken Moore
31ea5f3497 If there are no .conf files for the pkg repos yet, have it run "pkg update" to generate them and re-try the repo list function. 2016-08-02 12:23:35 -04:00
Ken Moore
a652d1bf0a Merge branch 'master' of github.com:trueos/sysadm 2016-08-02 11:13:37 -04:00
Ken Moore
bdf59b5691 Fix the parsing of the lpreserver replicate list command in the sysadm server. 2016-08-02 11:10:33 -04:00
Mrt134
a5c3e7b8b6 Update qt5 required modules and github links
- Removed two qt5 modules which are no longer required to build sysadm.
- Updated github links to reflect migration from PC-BSD to TrueOS.
2016-08-02 10:53:14 -04:00
Ken Moore
e6c589dc66 Clean up the pkg-plist for the sysadm server (jobd files were still in plist, but disabled in source) 2016-08-01 14:40:29 -04:00
Ken Moore
204310feb6 Rename mkports.sh to mkport.sh so that the auto-sync tool can find/use it. 2016-08-01 14:08:34 -04:00
Ken Moore
4a260b66e2 API CHANGE
Add a "groupadd" action to the sysadm/users class.
This will create a new group on the system
REQUIRED: "name"
OPTIONAL: "gid","users"

REST Request (example):
-------------------------------
PUT /sysadm/users
{
   "action" : "groupadd",
   "name" : "testgroup"
}

WebSocket Request:
-------------------------------
{
   "id" : "fooid",
   "namespace" : "sysadm",
   "args" : {
      "action" : "groupadd",
      "name" : "testgroup"
   },
   "name" : "users"
}

Response:
-------------------------------
{
  "args": {
    "result": "success"
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2016-07-28 16:11:35 -04:00
Ken Moore
a0d82f2367 API CHANGE
Add an "action"="groupshow" option to the sysadm/users class.
This will list all the known groups on the system and any users associated with them (if all access) or which ones the current user is in (if limited access).

REST Request (example):
-------------------------------
PUT /sysadm/users
{
   "action" : "groupshow"
}

WebSocket Request:
-------------------------------
{
   "id" : "fooid",
   "name" : "users",
   "namespace" : "sysadm",
   "args" : {
      "action" : "groupshow"
   }
}

Response:
-------------------------------
{
  "args": {
    "_dhcp": {
      "gid": "65",
      "name": "_dhcp",
      "users": [
        ""
      ]
    },
    "_ntp": {
      "gid": "123",
      "name": "_ntp",
      "users": [
        ""
      ]
    },
    "_pflogd": {
      "gid": "64",
      "name": "_pflogd",
      "users": [
        ""
      ]
    },
    "_tss": {
      "gid": "601",
      "name": "_tss",
      "users": [
        ""
      ]
    },
    "_ypldap": {
      "gid": "160",
      "name": "_ypldap",
      "users": [
        ""
      ]
    },
    "audit": {
      "gid": "77",
      "name": "audit",
      "users": [
        ""
      ]
    },
    "authpf": {
      "gid": "63",
      "name": "authpf",
      "users": [
        ""
      ]
    },
    "avahi": {
      "gid": "558",
      "name": "avahi",
      "users": [
        ""
      ]
    },
    "bin": {
      "gid": "7",
      "name": "bin",
      "users": [
        ""
      ]
    },
    "bind": {
      "gid": "53",
      "name": "bind",
      "users": [
        ""
      ]
    },
    "colord": {
      "gid": "970",
      "name": "colord",
      "users": [
        ""
      ]
    },
    "cups": {
      "gid": "193",
      "name": "cups",
      "users": [
        ""
      ]
    },
    "daemon": {
      "gid": "1",
      "name": "daemon",
      "users": [
        ""
      ]
    },
    "dialer": {
      "gid": "68",
      "name": "dialer",
      "users": [
        ""
      ]
    },
    "ftp": {
      "gid": "14",
      "name": "ftp",
      "users": [
        ""
      ]
    },
    "games": {
      "gid": "13",
      "name": "games",
      "users": [
        ""
      ]
    },
    "git_daemon": {
      "gid": "964",
      "name": "git_daemon",
      "users": [
        ""
      ]
    },
    "guest": {
      "gid": "31",
      "name": "guest",
      "users": [
        ""
      ]
    },
    "haldaemon": {
      "gid": "560",
      "name": "haldaemon",
      "users": [
        ""
      ]
    },
    "hast": {
      "gid": "845",
      "name": "hast",
      "users": [
        ""
      ]
    },
    "kenmoore": {
      "gid": "1001",
      "name": "kenmoore",
      "users": [
        ""
      ]
    },
    "kmem": {
      "gid": "2",
      "name": "kmem",
      "users": [
        ""
      ]
    },
    "mail": {
      "gid": "6",
      "name": "mail",
      "users": [
        ""
      ]
    },
    "mailnull": {
      "gid": "26",
      "name": "mailnull",
      "users": [
        ""
      ]
    },
    "man": {
      "gid": "9",
      "name": "man",
      "users": [
        ""
      ]
    },
    "messagebus": {
      "gid": "556",
      "name": "messagebus",
      "users": [
        ""
      ]
    },
    "network": {
      "gid": "69",
      "name": "network",
      "users": [
        ""
      ]
    },
    "news": {
      "gid": "8",
      "name": "news",
      "users": [
        ""
      ]
    },
    "nobody": {
      "gid": "65534",
      "name": "nobody",
      "users": [
        ""
      ]
    },
    "nogroup": {
      "gid": "65533",
      "name": "nogroup",
      "users": [
        ""
      ]
    },
    "operator": {
      "gid": "5",
      "name": "operator",
      "users": [
        "root",
        "kenmoore"
      ]
    },
    "polkit": {
      "gid": "562",
      "name": "polkit",
      "users": [
        ""
      ]
    },
    "polkitd": {
      "gid": "565",
      "name": "polkitd",
      "users": [
        ""
      ]
    },
    "proxy": {
      "gid": "62",
      "name": "proxy",
      "users": [
        ""
      ]
    },
    "pulse": {
      "gid": "563",
      "name": "pulse",
      "users": [
        ""
      ]
    },
    "pulse-access": {
      "gid": "564",
      "name": "pulse-access",
      "users": [
        ""
      ]
    },
    "pulse-rt": {
      "gid": "557",
      "name": "pulse-rt",
      "users": [
        ""
      ]
    },
    "quasselcore": {
      "gid": "442",
      "name": "quasselcore",
      "users": [
        ""
      ]
    },
    "smmsp": {
      "gid": "25",
      "name": "smmsp",
      "users": [
        ""
      ]
    },
    "sshd": {
      "gid": "22",
      "name": "sshd",
      "users": [
        ""
      ]
    },
    "staff": {
      "gid": "20",
      "name": "staff",
      "users": [
        ""
      ]
    },
    "stunnel": {
      "gid": "341",
      "name": "stunnel",
      "users": [
        ""
      ]
    },
    "sys": {
      "gid": "3",
      "name": "sys",
      "users": [
        ""
      ]
    },
    "test2": {
      "gid": "1003",
      "name": "test2",
      "users": [
        ""
      ]
    },
    "tty": {
      "gid": "4",
      "name": "tty",
      "users": [
        ""
      ]
    },
    "unbound": {
      "gid": "59",
      "name": "unbound",
      "users": [
        ""
      ]
    },
    "uucp": {
      "gid": "66",
      "name": "uucp",
      "users": [
        ""
      ]
    },
    "video": {
      "gid": "44",
      "name": "video",
      "users": [
        ""
      ]
    },
    "webcamd": {
      "gid": "145",
      "name": "webcamd",
      "users": [
        ""
      ]
    },
    "wheel": {
      "gid": "0",
      "name": "wheel",
      "users": [
        "root",
        "kenmoore"
      ]
    },
    "www": {
      "gid": "80",
      "name": "www",
      "users": [
        ""
      ]
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2016-07-28 15:06:15 -04:00
Ken Moore
3c24217a88 Ensure we create user's home dir on new user creation. 2016-07-25 15:57:13 -04:00
Ken Moore
5a5e0df1ad API CHANGE
Add a new API call: sysadm/users, action=personacrypt_listdevs
This will run personacrypt and return any removeable devices which may be used as PC devices.

REST Request (example):
-------------------------------
PUT /sysadm/users
{
   "action" : "personacrypt_listdevs"
}

WebSocket Request:
-------------------------------
{
   "namespace" : "sysadm",
   "name" : "users",
   "id" : "fooid",
   "args" : {
      "action" : "personacrypt_listdevs"
   }
}

Response:
-------------------------------
{
  "args": {
    "da0": "<SanDisk Cruzer 1.26> 7.5G"
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2016-07-25 15:35:06 -04:00
Ken Moore
585beba03a API CHANGE
Add new "usermod" action to the sysadm/users class. This is nearly identical to the "useradd" action, but performs changes to an existing user only (limited access users may modify their own settings, but not other users settings).

Additional OPTIONAL input: "newname" change the username to this instead.

REST Request (example):
-------------------------------
PUT /sysadm/users
{
   "action" : "usermod",
   "comment" : "somecomment",
   "name" : "test2"
}

WebSocket Request:
-------------------------------
{
   "name" : "users",
   "namespace" : "sysadm",
   "args" : {
      "name" : "test2",
      "comment" : "somecomment",
      "action" : "usermod"
   },
   "id" : "fooid"
}

Response:
-------------------------------
{
  "args": {
    "result": "success"
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2016-07-25 14:45:43 -04:00
Ken Moore
86528334e0 [API CHANGE]
Add a new API call to the sysadm/users framework as well as add a bunch more output to current users requests (error/success reporting instead of just the overall good/bad flag).

New API call: "action":"userdelete"
REQUIRED: "name":<username>
OPTIONAL: "clean_home"="true/false" (default is "true")

REST Request (example):
-------------------------------
PUT /sysadm/users
{
   "name" : "test",
   "action" : "userdelete"
}

WebSocket Request:
-------------------------------
{
   "id" : "fooid",
   "name" : "users",
   "args" : {
      "action" : "userdelete",
      "name" : "test"
   },
   "namespace" : "sysadm"
}

Response:
-------------------------------
{
  "args": {
    "result": "success"
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2016-07-25 10:14:06 -04:00
Ken Moore
6ed9dd4e74 Update a bit of the new "adduser" routine quite a bit, adding support for personacrypt init/import options as well (untested). 2016-07-22 13:20:23 -04:00
Ken Moore
f586a30d77 API CHANGE
Add a new API call for creating a user on the system:
action: "useradd"
Required fields: "password" AND ("name" OR "uid")
Optional fields: "comment", "home_dir", "expire", "change", "shell", "group", "other_groups", "class"

REST Request (example):
-------------------------------
PUT /sysadm/users
{
   "password" : "test",
   "name" : "test2",
   "action" : "useradd"
}

WebSocket Request:
-------------------------------
{
   "name" : "users",
   "namespace" : "sysadm",
   "id" : "fooid",
   "args" : {
      "password" : "test",
      "name" : "test2",
      "action" : "useradd"
   }
}

Response:
-------------------------------
{
  "args": {},
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2016-07-21 16:21:28 -04:00
Ken Moore
35f8f466f9 API CHANGE
Add a new "sysadm/users" API class to sysadm for managing users/groups on the system. The "usershow" action is the only one enabled at the present time.

REST Request (example):
-------------------------------
PUT /sysadm/users
{
   "action" : "usershow"
}

WebSocket Request:
-------------------------------
{
   "namespace" : "sysadm",
   "name" : "users",
   "id" : "fooid",
   "args" : {
      "action" : "usershow"
   }
}

Response:
-------------------------------
{
  "args": {
    "_dhcp": {
      "change": "0",
      "class": "",
      "comment": "dhcp programs",
      "expire": "0",
      "gid": "65",
      "home_dir": "/var/empty",
      "name": "_dhcp",
      "shell": "/usr/sbin/nologin",
      "uid": "65"
    },
    "_ntp": {
      "change": "0",
      "class": "",
      "comment": "NTP Daemon",
      "expire": "0",
      "gid": "123",
      "home_dir": "/var/empty",
      "name": "_ntp",
      "shell": "/usr/sbin/nologin",
      "uid": "123"
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2016-07-21 14:57:03 -04:00
Mrt134
4bf475bdc6 SysAdm PEP8 Conversion
- Converted SysAdm Server Handbook to PEP8 standards.
- Converted SysAdm API Handbook to PEP8 standards.
2016-07-05 18:26:39 -04:00
Ken Moore
4da94971cc Oops. Forgot to commit a change to the server Auth manager when working on the SSL crash issue on the client. 2016-06-22 20:12:16 -04:00
Ken Moore
bcaf188dc1 Disable the installation of the jobd routines, and also deactivate the 2nd layer SSL encryption through a bridge for the moment (base64 only right now). 2016-06-21 15:14:29 -04:00
Tim Moore II
5da15e8f0f SysAdm Introduction addition
- Continued work on the Sysadm introduction section
2016-06-14 10:13:33 -04:00
Ken Moore
faf64cdc0d Merge branch 'master' of github.com:pcbsd/sysadm 2016-06-03 15:10:11 -04:00
Ken Moore
0f3ec82dc1 [API CHANGE] Add a new field to the "rpc/identify" API call output
{
namespace : rpc,
name : identify,
id : junk,
args : junk
}

Return args:
args : {
  type : [server/client/bridge],
  hostname : <hostname>
}
2016-06-03 15:08:05 -04:00
Mrt134
d935b7b441 Syntax fix
- Updated bridge initialization commands to reflect new syntax
- fixed a make error in conf.py
2016-06-03 10:39:17 -04:00
Ken Moore
9343ce5e52 Merge branch 'master' of github.com:pcbsd/sysadm 2016-06-03 09:27:55 -04:00
Ken Moore
f65591ad3a Unify the CLI flag format between the server/bridge, and add help/usage information to the server. 2016-06-03 09:27:20 -04:00
Mrt134
e184d4b9d6 Updated "starting sysadm" section
- Updated Starting SysAdm section to reflect current instructions
- Fixed a couple grammar and spelling errors in the Bridge Initialization section
2016-06-02 15:02:17 -04:00
Mrt134
4a51c050d4 Rework bridge initialization
- Reworked bridge initialization section for clarity
- fixed a css error in the handbook theme
2016-06-02 14:30:23 -04:00
Mrt134
2f5321ea75 Sysadm server handbook section addition
- Added WIP section "Bridge System Initialization" to server handbook
- Divided instructions into two methods - one for complete ground up and another for allowing user access to an established network.
- Began clarifying and testing instructions.
2016-05-31 15:03:32 -04:00
Ken Moore
0c6ef4dd85 Add the "BRIDGE_CONNECTIONS_ONLY" option to the sysadm.conf.dist which is distributed. 2016-05-27 13:44:17 -04:00
Ken Moore
2cc0b94db5 Merge branch 'master' of github.com:pcbsd/sysadm 2016-05-27 11:39:52 -04:00
Ken Moore
ea9ed1fa6b Enable a randomized encryption layer within the server->client communications through a bridge. 2016-05-27 11:39:12 -04:00
Kris Moore
4963a82e13 Merge pull request #21 from mheily/master
small jobd fixups
2016-05-27 10:30:58 -04:00
Mark Heily
ad696629d6 Add documentation for running under jobd(8), and avoid auto-enabling the service at package install time 2016-05-26 21:53:47 -04:00
Ken Moore
ce41041ce5 Get encryption turned on in the server for bridged connections. Still not fully-functional - but getting there. 2016-05-26 15:37:55 -04:00
Ken Moore
bf4e4d4212 Merge branch 'master' of github.com:pcbsd/sysadm 2016-05-26 13:32:47 -04:00
Ken Moore
9fcc25d239 Clean up some more of the communication system for the server/client connection through a bridge. Seems to be functioning with base64 encoding only right now. 2016-05-26 13:31:46 -04:00
Mrt134
18e61346b6 Refinement to connection.rst &
-Further refined connection.rst to explain the encryption elements to the SSL certificate authentication initiation
2016-05-26 09:35:50 -04:00
Mrt134
65f8f7f747 Added initial examples of client-bridge-server ssl authentication to api handbook (api/connection.rst)
- added #4 to section 1.1 Authentication: SSL Certificate Initiation
- provided examples of an initial request and reply
- added notation to identify at which point messages become encrypted
2016-05-25 10:22:31 -04:00
Ken Moore
68a4bb29c7 Get the encryption systems setup with a temporary base64 encoding instead of full SSL encryption (for testing the encode/decode routines) 2016-05-25 09:01:38 -04:00
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