1 Protocol between the server and the clients
2 ===========================================
4 Messages are sent through a UNIX-domain sequential packet socket
5 and authenticated by automatic passing of user credentials.
6 For every request, a reply is sent through the same connection.
7 Pipelining of requests is currently not supported.
9 All requests and replies are serialized as JSON objects. Requests
10 have always the "cmd" attribute set to the name of the command.
11 Replies always have the "error" attribute set; it contains an error
12 message or an empty string to indicate success.
14 Some operations require root privileges. Other operations are
15 unprivileged if no login name present, or if it matches the UID
16 of the requesting user.
18 # No operation (unprivileged)
23 # Create an account (privileged)
26 "login": "login name",
30 # Delete an account (privileged)
33 "login": "login name",
34 "zone": "auth zone" # "*" to delete accounts in all zones
37 # Create an authentication token
39 "cmd": "create-token",
40 "login": "login name",
42 "comment": "optional comment"
50 # Delete an authentication token
52 "cmd": "delete-token",
53 "login": "login name",
55 "ident": "token id" # "*" for all tokens for the login+zone
58 # Change parameters of a token
61 "login": "login name",
64 "comment": "new comment" # optional
67 # Set password for an account
70 "login": "login name",
72 "passwd": "new password"
75 # Delete password for an account
77 "cmd": "delete-passwd",
78 "login": "login name",
82 # Create a temporary token
85 "login": "login name",
87 "validity": seconds # Requested token validity
97 "login": "login name",
99 "passwd": "password or token"
102 # List user's accounts and tokens
105 "login": "login name",
109 "login: "login name",
115 "type": "token type", # passwd/token
117 "lastmod": timestamp # UNIX timestamp of last modification
126 # List known authentication zones
135 "desc": "human-readable description",
136 "allow-passwd": boolean, # Does the zone support passwords?
137 "allow-tokens": boolean, # Does the zone support auth tokens?
138 "max-temp-validity": seconds # Maximum validity of temp tokens
139 # (if no temp tokens supported)