Namespace: "sysadm"
Name: "settings"
Arguments structure needs the "action" variable/value for all calls:
Action: "list_ssl_certs"
- No additional input needed: will list the known/registered certificates organized by <username> : { <public_key> : <certificate as text> }
Action: "register_ssl_cert"
Example Payload: {"action" : "register_ssl_cert", "pub_key" : <public_key> }
The <public_key> string needs to match the public key of one of the certificates currently loaded into the server/client connection. This will register that certificate on the server and allow that user to authenticate without a password as long as that same certificate is loaded up in any future connections. No special outputs are send back (just overall error/ok status).
Action: "revoke_ssl_cert"
Example Payload: {"action" : "revoke_ssl_cert", "pub_key" : <public_key>, "user" : <optional-username> }
The <public_key> string needs to match one of the keys given by the list function (does not need to match any currently-loaded certs). The "user" field is optional, and allows a connection with full admin privileges to revoke certs belonging to other users.
Note about current user/connection permissions level:
If the current user has full admin access, the "list_ssl_certs" API call will return the registered certificates for all users on the system - otherwise it will only return the certificates for the current user. Similarly, the "revoke_ssl_cert" may be used to remove certs registered to other users only if the current user/connection has full admin access - otherwise it may only be used to manage the current user's certificates.
an ISO
FYI, this only boots the VM with the ISO, to do the install
the user still needs to run "iohyve console <name>" from the system,
which uses serial mode to bring up a terminal
REST Request:
-------------------------------
PUT /sysadm/iohyve
{
"name" : "bsdguest",
"iso" : "FreeBSD-10.2-RELEASE-amd64-disc1.iso",
"action" : "install"
}
WebSocket Request:
-------------------------------
{
"namespace" : "sysadm",
"name" : "iohyve",
"id" : "fooid",
"args" : {
"action" : "install",
"iso" : "FreeBSD-10.2-RELEASE-amd64-disc1.iso",
"name" : "bsdguest"
}
}
Response:
-------------------------------
{
"args": {
"install": {
"iso": "FreeBSD-10.2-RELEASE-amd64-disc1.iso",
"name": "bsdguest"
}
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}