PM_spec revision 17ca54c3
117ca54c3Smrg Proxy Management Protocol 217ca54c3Smrg Draft Version 1.0 317ca54c3Smrg Ralph Mor, X Consortium 417ca54c3Smrg 517ca54c3Smrg 617ca54c3SmrgThe Proxy Management Protocol is an ICE based protocol that provides a way 717ca54c3Smrgfor application servers to easily locate proxy services available to them. 817ca54c3Smrg 917ca54c3SmrgTypically, a service called a "proxy manager" is responsible for resolving 1017ca54c3Smrgrequests for proxy services, starting new proxies when appropriate, and 1117ca54c3Smrgkeeping track of all of the available proxy services. The proxy manager 1217ca54c3Smrgstrives to reuse existing proxies whenever possible. 1317ca54c3Smrg 1417ca54c3SmrgIn order to request a proxy service, the GET_PROXY_ADDR message is sent to 1517ca54c3Smrgthe proxy manager. The proxy manager will in turn forward this message to 1617ca54c3Smrga proxy that it thinks can satisfy the request. 1717ca54c3Smrg 1817ca54c3SmrgGET_PROXY_ADDR 1917ca54c3Smrg proxy-service : STRING 2017ca54c3Smrg server-address : STRING 2117ca54c3Smrg host-address : STRING 2217ca54c3Smrg options : STRING 2317ca54c3Smrg auth-data-len : CARD16 2417ca54c3Smrg auth-name : STRING or None 2517ca54c3Smrg auth-data : LISTofCARD8 or None 2617ca54c3Smrg 2717ca54c3Smrg --> 2817ca54c3Smrg 2917ca54c3Smrg status : CARD8 3017ca54c3Smrg proxy-address : STRING 3117ca54c3Smrg failure-reason : STRING 3217ca54c3Smrg 3317ca54c3Smrg 3417ca54c3Smrgproxy-service is the name of the proxy service to be requested, for example 3517ca54c3Smrg"LBX". proxy-service is a case insensitive string. 3617ca54c3Smrg 3717ca54c3Smrgserver-address is the network address of the target server. The format of 3817ca54c3Smrgthe address is specific to proxy-service. For example, for a proxy service 3917ca54c3Smrgof "LBX", the address would be an X display address (e.g, "wkstn.x.org:0"). 4017ca54c3Smrg 4117ca54c3Smrghost-address is the network address of the host on which the proxied 4217ca54c3Smrgapplication will run. This information might be used by the proxy to 4317ca54c3Smrgrestrict access to a specific host. 4417ca54c3Smrg 4517ca54c3Smrgoptions are proxy specific options that will be passed to the proxy. The 4617ca54c3Smrgdetails of these options are not specified here. Their syntax and 4717ca54c3Smrgsemantics are defined by each proxy service. 4817ca54c3Smrg 4917ca54c3SmrgIf auth-data-len is nonzero, then auth-name and auth-data contain 5017ca54c3Smrgauthentication or authorization information that should be passed to 5117ca54c3Smrgthe proxy. The proxy will typically use this to authenticate and 5217ca54c3Smrgauthorize itself to the target server. The details of how the 5317ca54c3Smrgauth fields are used are specific to each proxy service. 5417ca54c3Smrg 5517ca54c3Smrg 5617ca54c3SmrgAfter sending GET_PROXY_ADDR the proxy manager expects a reply from 5717ca54c3Smrgthe proxy. The status field of the reply indicates if the request can 5817ca54c3Smrgbe satisfied. 5917ca54c3Smrg 6017ca54c3SmrgIf status is Success, proxy-address will contain the network address of the 6117ca54c3Smrgproxy willing to handle this request. The format of the proxy address is 6217ca54c3Smrgspecific to the proxy service being used. For example, for a proxy service 6317ca54c3Smrgof "LBX", the proxy address would be the X display address of the proxy 6417ca54c3Smrg(e.g, "gateway.x.org:63"). The proxy manager will forward the successful 6517ca54c3SmrgGET_PROXY_ADDR reply to whomever requested the proxy service. 6617ca54c3Smrg 6717ca54c3SmrgIf status is Unable, the proxy is not able to satisfy the request but 6817ca54c3Smrgit believes some other proxy might be able to do so. Proxy-address is 6917ca54c3Smrgthe empty string and failure-reason indicates the reason for failure. 7017ca54c3SmrgThe proxy manager may choose to forward the original GET_PROXY_ADDR to 7117ca54c3Smrganother already running proxy, or it may choose to start up a new 7217ca54c3Smrgproxy. In the event that the proxy manager can not find or start a 7317ca54c3Smrgproxy, it will send a GET_PROXY_ADDR reply (with status Failure and an 7417ca54c3Smrgappropriate failure-reason) to whomever requested the proxy service. 7517ca54c3Smrg 7617ca54c3SmrgIf status is Failure, the proxy is not able to satisfy the request and 7717ca54c3Smrgin addition is informing the requester that the request is invalid in 7817ca54c3Smrgsome way and should not be retried. 7917ca54c3Smrg 8017ca54c3Smrg 8117ca54c3SmrgIf the proxy manager starts up a new proxy, the proxy manager will 8217ca54c3Smrgneed an indication from the proxy that it is ready to accept 8317ca54c3Smrgrequests. The proxy is required to send a START_PROXY message to the 8417ca54c3Smrgproxy manager to identify itself and signal its readiness to receive 8517ca54c3Smrgrequests. 8617ca54c3Smrg 8717ca54c3SmrgSTART_PROXY 8817ca54c3Smrg proxy-service : STRING (name of proxy service, e.g. "LBX") 8917ca54c3Smrg 9017ca54c3Smrg 9117ca54c3SmrgWhen the proxy manager receives the START_PROXY message from the 9217ca54c3Smrgproxy it checks that the proxy-service is the one that it's expecting. 9317ca54c3SmrgIf the proxy-service is incorrect, an IceBadValue error will be sent 9417ca54c3Smrgto the proxy. Otherwise, the proxy manager will forward the original 9517ca54c3SmrgGET_PROXY_ADDR request to the proxy and the proxy will respond to the 9617ca54c3SmrgGET_PROXY_ADDR request in the same way as discussed above. 9717ca54c3Smrg 9817ca54c3Smrg 9917ca54c3SmrgProtocol 10017ca54c3Smrg-------- 10117ca54c3Smrg 10217ca54c3SmrgICE protocol name is "PROXY_MANAGEMENT". 10317ca54c3SmrgThe major opcode is assigned at run-time by ICE. 10417ca54c3Smrg 10517ca54c3Smrg 10617ca54c3SmrgTypes 10717ca54c3Smrg----- 10817ca54c3Smrg 10917ca54c3SmrgSTRING 11017ca54c3Smrg 2 CARD16 length 11117ca54c3Smrg n LISTofCARD8 the string 11217ca54c3Smrg p p = pad(2+n,8) 11317ca54c3Smrg 11417ca54c3Smrg 11517ca54c3Smrg 11617ca54c3SmrgEncoding 11717ca54c3Smrg-------- 11817ca54c3Smrg 11917ca54c3SmrgGET_PROXY_ADDR 12017ca54c3Smrg 12117ca54c3Smrg 1 ? PROXY_MANAGEMENT 12217ca54c3Smrg 1 1 opcode 12317ca54c3Smrg 2 n auth-data-len (in bytes) 12417ca54c3Smrg 4 (a+b+c+d+e+n+p)/8 length of remaining data in 8-byte units 12517ca54c3Smrg a STRING proxy-service 12617ca54c3Smrg b STRING server-address 12717ca54c3Smrg c STRING host-address 12817ca54c3Smrg d STRING options 12917ca54c3Smrg e STRING auth-name (if auth-data-len > 0) 13017ca54c3Smrg n LISTofCARD8 auth-data (if auth-data-len > 0) 13117ca54c3Smrg p unused, p=pad(n,8) 13217ca54c3Smrg 13317ca54c3SmrgGET_PROXY_ADDR_REPLY 13417ca54c3Smrg 13517ca54c3Smrg 1 ? PROXY_MANAGEMENT 13617ca54c3Smrg 1 2 opcode 13717ca54c3Smrg 1 CARD8 status 13817ca54c3Smrg 0 Unable 13917ca54c3Smrg 1 Success 14017ca54c3Smrg 2 Failure 14117ca54c3Smrg 1 unused 14217ca54c3Smrg 4 (a+b)/8 length of remaining data in 8-byte units 14317ca54c3Smrg a STRING proxy-address 14417ca54c3Smrg b STRING failure-reason 14517ca54c3Smrg 14617ca54c3Smrg 14717ca54c3SmrgSTART_PROXY 14817ca54c3Smrg 14917ca54c3Smrg 1 ? PROXY_MANAGEMENT 15017ca54c3Smrg 1 3 opcode 15117ca54c3Smrg 2 unused 15217ca54c3Smrg 4 a/8 length of remaining data in 8-byte units 15317ca54c3Smrg a STRING proxy-service 154