Changes between Initial Version and Version 1 of GuiRpcProtocol


Ignore:
Timestamp:
Mar 31, 2008, 10:34:51 AM (17 years ago)
Author:
Nicolas
Comment:

Move page from UBW. Needs lots of work still.

Legend:

Unmodified
Added
Removed
Modified
  • GuiRpcProtocol

    v1 v1  
     1[[T(Incomplete)]]
     2= GUI RPC protocol =
     3
     4BOINC uses the GUI RPC protocol to make the BOINC Manager communicate with the core client. The protocol is based in XML. Both requests and responses are terminated with the control character `0x03`. Requests are inside `<boinc_gui_rpc_request>` tags, and replies from the client are inside `<boinc_gui_rpc_reply>` tags. A response is never sent without getting a request first.
     5
     6Note that the RPC "server" is the core client, and the RPC client is a GUI or addon communicating with it. It may seem confusing. This terminology will be used on the rest of the page.
     7
     8== Authentication ==
     9
     10The RPC protocol allows the RPC client to authenticate itself using a password. Most RPC operations can only be done by an authenticated client. Some can be done without authentication, but only by a client running on the same machine.
     11
     12Authentication on the RPC protocol is based on a challenge-response system. To initiate the authentication process, send an <code><auth1/></code> command:
     13{{{
     14<boinc_gui_rpc_request>
     15    <auth1/>
     16</boinc_gui_rpc_request>
     17}}}
     18
     19The response will be the authentication challenge:
     20{{{
     21<boinc_gui_rpc_reply>
     22    <nonce>1198959933.057125</nonce>
     23</boinc_gui_rpc_reply>
     24}}}
     25
     26The value of `nonce` is to be used as a salt with the password. It is randomly generated for each request. To calculate the response, concatenate the nonce and the password (nonce first), then calculate the MD5 hash of the result, i.e: {{{md5(nonce+password)}}}. Finally, send an `<auth2>` request with the calculated hash, in hexadecimal format.
     27{{{
     28<boinc_gui_rpc_request>
     29    <auth2>
     30        <nonce_hash>d41d8cd98f00b204e9800998ecf8427e</nonce_hash>
     31    </auth2>
     32</boinc_gui_rpc_request>
     33}}}
     34The reply will be either {{{<authorized/>}}} or {{{<unauthorized/>}}}.