RFC 3529
Using Extensible Markup Language-Remote Procedure Calling (XML-RPC) in Blocks Extensible Exchange Protocol (BEEP)
RFC 3529 π
Okay bestie, this is RFC 3529, titled Using Extensible Markup Language-Remote Procedure Calling (XML-RPC) in Blocks Extensible Exchange Protocol (BEEP) π It was written by W. Harold from IBM and published in April 2003. It's labelled Experimental, so it's an Experimental Protocol and not a standard. The title block doesn't list any RFCs it obsoletes or updates β¨
Status of this Memo π
So this memo defines an Experimental Protocol for the Internet community π§ͺ It is not an Internet standard of any kind, and the authors are literally asking for discussion and suggestions for improvement π«Ά Distribution of it is unlimited, so go share it π
Copyright Notice Β©οΈ
The Internet Society holds the copyright here (2003), and all rights are reserved π
Abstract πΈ
XML-RPC is a Remote Procedure Calling protocol built on Extensible Markup Language, and it works over the Internet π It defines an XML format for messages that get passed between clients and servers over HTTP π An XML-RPC message is either a procedure the server should invoke, along with the parameters for that call, or the result of an invocation β¨ The parameters and results can be scalars, numbers, strings, dates, and so on. They can also be complex record and list structures π§
This document describes how to use the Blocks Extensible Exchange Protocol (BEEP) to carry XML-RPC messages between clients and servers π¦
Table of Contents ποΈ
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. BEEP Profile Identification . . . . . . . . . . . . . . . . 2
2.1 Profile Initialization . . . . . . . . . . . . . . . . 3
3. XML-RPC Message Packages . . . . . . . . . . . . . . . . . . 4
4. XML-RPC Message Exchange . . . . . . . . . . . . . . . . . . 5
5. URL Schemes . . . . . . . . . . . . . . . . . . . . . . . . 5
5.1 The xmlrpc.beep URL Scheme. . . . . . . . . . . . . . . 5
5.1.1 Resolving IP/TCP Address Information . . . . . . 6
5.2 The xmlrpc.beeps URL Scheme . . . . . . . . . . . . . . 7
6. Initial Registrations . . . . . . . . . . . . . . . . . . . 9
6.1 Registration: The XML-RPC Profile . . . . . . . . . . . 9
6.2 Registration: The xmlrpc.beep URL Scheme. . . . . . . . 9
6.3 Registration: The xmlrpc.beeps URL Scheme . . . . . . . 10
6.4 Registration: The System (Well-Known) TCP port number
for XML-RPC over BEEP . . . . . . . . . . . . . . . . . 10
7. Security Considerations . . . . . . . . . . . . . . . . . . 11
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 11
Appendix
A. Acknowledgements. . . . . . . . . . . . . . . . . . . . . . . 13
B. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 14
Full Copyright Statement . . . . . . . . . . . . . . . . . . . . 15
1. Introduction π«§
This memo explains how XML-RPC [1] messages get transmitted using a BEEP profile [2] π
Throughout this memo, "request" and "response" mean the "methodCall" and "methodResponse" elements from the XML-RPC specification [1] π The words "peer", "client", "server", and "one-to-one" are used in the BEEP sense. Specifically, Sections 2.1 and 2.1.1 of [2] cover BEEP roles and exchange styles π§
2. BEEP Profile Identification πͺͺ
The BEEP profile for XML-RPC is identified as:
http://iana.org/beep/transient/xmlrpc
You put that in the BEEP "profile" element when you create a channel π
When the first channel gets created successfully in BEEP, the "serverName" attribute in the "start" element tells you which "virtual host" the server-role peer is. Here's an example:
<start number='1' serverName='stateserver.example.com'>
<profile uri='http://iana.org/beep/transient/xmlrpc' />
</start>
The "serverName" attribute is basically the BEEP version of HTTP's "Host" request-header field (c.f., Section 14.23 of [3]) π
The BEEP profile for XML-RPC has two states, "boot" (the initial state) and "ready" β¨
- In the "boot" state, the peer asking to create the channel sends a "bootmsg". This can happen during channel initialization or in a "MSG" message π
- If the other peer sends back a "bootrpy" (during channel initialization or in a "RPY" message), the channel enters the "ready" state π₯³
- Otherwise, the other peer sends an "error" (during channel initialization or in an "ERR" message), and the state does not change π
- In the "ready" state, the initiating peer starts an XML-RPC message pattern by sending a "MSG" message that holds a request π¨ The other peer finishes the pattern by sending back a "RPY" message that holds a response π
2.1 Profile Initialization π·
The boot message is how you identify the resource that the channel bound to the BEEP profile for XML-RPC is accessing π
Here are the DTD definitions for the boot message and its response:
<!ELEMENT bootmsg EMPTY>
<!ATTLIST bootmsg
resource CDATA #REQUIRED>
<!ELEMENT bootrpy EMPTY>
The boot message has exactly one mandatory attribute, "resource". It's kind of like HTTP's "abs_path" Request-URI parameter (c.f., Section 5.1.2 of [3]) π
If the server-role peer recognizes the requested resource, it replies with a boot response. But if the boot message is badly formed, or the requested resource isn't recognized, the server-role peer replies with an error message instead (c.f., Section 7.1 of [2]) π¬
Usually, the boot message and its response get exchanged during channel initialization (c.f., Section 2.3.1.2 of [2]) β
Here's a successful boot exchange during channel initialization:
C: <start number='1' serverName='stateserver.example.com'>
C: <profile uri='http://iana.org/beep/transient/xmlrpc'>
C: <![CDATA[<bootmsg resource='/NumberToName' />]]>
C: </profile>
C: </start>
S: <profile uri='http://iana.org/beep/transient/xmlrpc'>
S: <![CDATA[<bootrpy />]]>
S: </profile>
Now the channel bound to the BEEP profile for XML-RPC is in the "ready" state π
Here's one where the boot exchange fails:
C: <start number='1' serverName='stateserver.example.com'>
C: <profile uri='http://iana.org/beep/transient/xmlrpc'>
C: <![CDATA[<bootmsg resource='/NameToCapital' />]]>
C: </profile>
C: </start>
S: <profile uri='http://iana.org/beep/transient/xmlrpc'>
S: <![CDATA[<error code='550'>resource not
S: supported</error>]]>
S: </profile>
The channel did get created successfully, but it stays stuck in the "boot" state π
3. XML-RPC Message Packages π¦
The BEEP profile for XML-RPC sends requests and responses encoded as UTF-8, using the media type "application/xml" [4] π For example:
I: MSG 1 1 . 0 364
I: Content-Type: application/xml
I:
I: <?xml version="1.0"?>
I: <methodCall>
I: <methodName>examples.getStateName</methodName>
I: <params>
I: <param>
I: <value><i4>41</i4></value>
I: </param>
I: </params>
I: </methodCall>
I: END
And here's the associated response:
L: RPY 1 1 . 201 100
L: Content-Type: application/xml
L:
L: <?xml version="1.0"?>
L: <methodResponse>
L: <params>
L: <param>
L: <value><string>South Dakota</string></value>
L: </param>
L: </params>
L: </methodRespose>
L: END
4. XML-RPC Message Exchange π
A request/response exchange means you send a request, and that gets you a response back π
The BEEP profile for XML-RPC does this with a one-to-one exchange. The client sends a "MSG" message containing a request, and the server sends back a "RPY" message containing a response π«Ά
The BEEP profile for XML-RPC does not use the "ERR" message for XML-RPC faults during one-to-one exchanges. Whatever response the server generates always comes back in the "RPY" message π ββοΈ
5. URL Schemes π
This memo defines two URL schemes, "xmlrpc.beep" and "xmlrpc.beeps". They identify XML-RPC over BEEP over TCP π¦ Right now there is no "generic" URL scheme for XML-RPC defined, so don't go looking for one π
5.1 The xmlrpc.beep URL Scheme πΈ
The "xmlrpc.beep" URL scheme uses the "generic URI" syntax from Section 3 of [5], specifically:
- The scheme component is the value "xmlrpc.beep" π
- The authority component uses the server-based naming authority from Section 3.2.2 of [5] πͺ
- The path component maps to the "resource" in the boot message sent during profile initialization. If the path is absent, it defaults to "/" π
Both the scheme and the authority components are case-insensitive π
For example, this URL:
xmlrpc.beep://stateserver.example.com/NumberToName
might end up producing the exchange shown in Section 2.1 β¨
5.1.1 Resolving IP/TCP Address Information πΊοΈ
The "xmlrpc.beep" URL scheme means you're using the BEEP profile for XML-RPC over TCP/IP π
If the authority component has a domain name and a port number, like this:
xmlrpc.beep://stateserver.example.com:1026
then the DNS gets queried for the A RRs for that domain name, and the port number is used directly π―
If the authority component has a domain name and no port number, like this:
xmlrpc.beep://stateserver.example.com
then the SRV algorithm [6] runs with a service parameter of "xmlrpc-beep" and a protocol parameter of "tcp" to figure out the IP/TCP addressing information. If no appropriate SRV RRs turn up (for example, for "_xmlrpc-beep._tcp.stateserver.example.com"), then the DNS gets queried for the A RRs for the domain name, and the port number used is the one IANA assigned for the registration in Section 6.4 π§
If the authority component has an IP address, like this:
xmlrpc.beep://10.0.0.2:1026
then the DNS is not queried, and the IP address is used directly. If a port number is there, it's used directly too. If not, the port number used is the one IANA assigned for the registration in Section 6.4 π«‘
Using literal IPv6 addresses in URLs is discouraged, I know, but if you do use one in a "xmlrpc.beep" URL, it must conform to the syntax specified in [7] π π
5.2. The xmlrpc.beeps URL Scheme π
Okay bestie, xmlrpc.beeps is basically xmlrpc.beep but make it private π€«. It's identical in every way to the xmlrpc.beep scheme from Section 5.1, with one extra step: before you start the BEEP profile for XML-RPC, the BEEP session must be tuned for privacy π. Both schemes also use the exact same address resolution algorithms and parameters from Section 5.1.1 (same service name for SRV lookups, same TCP port, and so on), so you don't have to relearn anything π
.
There are two ways to tune a BEEP session for privacy:
- a transport security profile may be successfully started; or,
- a user authentication profile that supports transport security may be successfully started.
Either way, the client must present the authority component of the URL in the serverName attribute of the start element it uses to tune the session for privacy π.
When TLS is used for privacy, the client must verify that the authority component of the URL matches the server's identity as presented in the server's certificate. Section 2.4 of [9] describes the matching process π΅οΈββοΈ.
For the URL:
xmlrpc.beeps://stateserver.example.com/NumberToName
the whole process might look like this π¦:
S: <wait for incoming connection @ stateserver.example.com>
C: <open connection to stateserver.example.com>
C: RPY 0 0 . 0 52
C: Content-Type: application/xml
C:
C: <greeting />
C: END
S: RPY 0 0 . 0 110
S: Content-Type: application/xml
S:
S: <greeting>
S: <profile uri='http://iana.org/beep/TLS' />
S: <profile uri='http://iana.org/beep/SASL/DIGEST-MD5' />
S: </greeting>
S: END
C: MSG 0 1 . 52 158
C: Content-Type: application/xml
C:
C: <start number='1' serverName='stateserver.example.com'>
C: <profile uri='http://iana.org/beep/TLS'>
C: <![CDATA[<ready />]]>
C: </profile>
C: </start>
C: END
S: RPY 0 1 . 110 121
S: Content-Type: application/xml
S:
S: <profile uri='http://iana.org/beep/TLS'>
S: <![CDATA[<proceed />]]>
S: </profile>
S: END
... TLS negotiations ...
S: RPY 0 0 . 0 88
S: Content-Type: application/xml
S:
S: <greeting>
S: <profile uri='http://iana.org/beep/transient/xmlrpc'>
S: </greeting>
S: END
C: RPY 0 0 . 0 52
C: Content-Type: application/xml
C:
C: <greeting />
C: END
... use the server's certificate to verify that it is
in fact stateserver.example.com ...
C: MSG 0 1 . 112 211
C: Content-Type: application/xml
C:
C: <start number='3' serverName='stateserver.example.com'>
C: <profile uri='http://iana.org/beep/transient/xmlrpc'>
C: <![CDATA[<bootmsg resource='/NumberToName' />]]>
C: </profile>
C: </start>
C: END
S: RPY 0 2 . 341 402
S: Content-Type: application/xml
S:
S: <profile uri='http://iana.org/beep/transient/xmlrpc'>
S: <![CDATA[<bootrpy />]]>
S: </profile>
S: END
6. Initial Registrations π
6.1. Registration: The XML-RPC Profile πΈ
Here's the registration for the XML-RPC profile, all the fields in order β¨:
Profile Identification: http://iana.org/beep/transient/xmlrpc
Messages exchanged during Channel Creation: bootmsg, bootrpy
Messages starting one-to-one exchanges: bootmsg, methodCall
Messages in positive replies: bootrpy, methodResponse
Messages in negative replies: error
Messages in one-to-many exchanges: none
Message Syntax: methodCall, methodResponse as defined in [1]
Message Semantics: c.f., [1]
Contact Information: Ward Harold <wharold@us.ibm.com>
6.2. Registration: The xmlrpc.beep URL Scheme π¦
And here's the registration for xmlrpc.beep π:
URL scheme name: xmlrpc.beep
URL scheme syntax: c.f., Section 5.1
Character encoding considerations: c.f., the "generic URI" syntax
defined in Section 3 of [5]
Intended usage: identifies a XML-RPC resource made available using
the BEEP profile for XML-RPC
Applications using this scheme: c.f., "Intended usage", above
Interoperability considerations: n/a
Security Considerations: c.f., Section 7
Relevant Publications: c.f., [1], and [2]
Contact Information: Ward Harold <wharold@us.ibm.com>
Author/Change controller: the IESG
6.3. Registration: The xmlrpc.beeps URL Scheme π
And the private one, xmlrpc.beeps π«Ά:
URL scheme name: xmlrpc.beeps
URL scheme syntax: c.f., Section 5.2
Character encoding considerations: c.f., the "generic URI" syntax
defined in Section 3 of [5]
Intended usage: identifies a XML-RPC resource made available using
the BEEP profile for XML-RPC after the BEEP session has been tuned
for privacy
Applications using this scheme: c.f., "Intended usage", above
Interoperability considerations: n/a
Security Considerations: c.f., Section 7
Relevant Publications: c.f., [1], and [2]
Contact Information: Ward Harold <wharold@us.ibm.com>
Author/Change controller: the IESG
6.4. Registration: The System (Well-Known) TCP port number for XML-RPC over BEEP π
The port registration, bestie π:
Protocol Number: TCP
Message Formats, Types, Opcodes, and Sequences: c.f., Section 2.1
Functions: c.f., [1]
Use of Broadcast/Multicast: none
Proposed Name: XML-RPC over BEEP
Short name: xmlrpc-beep
Contact Information: Ward Harold <wharold@us.ibm.com>
7. Security Considerations π₯
Okay, serious moment, no cap π₯Ί. Service provisioning is a policy matter, but at a minimum, all implementations must provide the following tuning profiles:
- for authentication:
http://iana.org/beep/SASL/DIGEST-MD5 - for confidentiality:
http://iana.org/beep/TLS(using theTLS_RSA_WITH_3DES_EDE_CBC_SHAcipher) - for both:
http://iana.org/beep/TLS(using theTLS_RSA_WITH_3DES_EDE_CBC_SHAcipher supporting client-side certificates)
Further, implementations may choose to offer MIME-based security services providing message integrity and confidentiality, such as OpenPGP [8] or S/MIME [10] π.
Regardless, you should consult Section 9 of [2] for a discussion of BEEP-specific security issues. This part is non-negotiable, periodt π.
8. References π
- [1] Winer, D., "XML-RPC Specification", January 1999,
http://www.xmlrpc.com/spec - [2] Rose, M., "The Blocks Extensible Exchange Protocol Core", RFC 3080, March 2001.
- [3] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P. and T. Berners-Lee, "Hypertext Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.
- [4] Murata, M., St. Laurent, S. and D. Kohn, "XML Media Types", RFC 3023, January 2001.
- [5] Berners-Lee, T., Fielding, R. and L. Masinter, "Uniform Resource Identifiers (URI): Generic Syntax", RFC 2396, August 1998.
- [6] Gulbrandsen, A., Vixie, P. and L. Esibov, "A DNS RR for specifying the location of services (DNS SRV)", RFC 2782, February 2000.
- [7] Hinden, R., Carpenter, B. and L. Masinter, "Format for Literal IPv6 Addresses in URL's", RFC 2732, December 1999.
- [8] Elkins, M., Del Torto, D., Levien, R. and T. Roessler, "MIME Security with OpenPGP", RFC 3156, August 2001.
- [9] Newman, C., "Using TLS with IMAP, POP3 and ACAP", RFC 2595, June 1999.
- [10] Ramsdell, B., "S/MIME Version 3 Message Specification", RFC 2633, June 1999.
- [11] O'Tuathail, E. and M. Rose, "Using the Simple Object Access Protocol (SOAP) in Blocks Extensible Exchange Protocol (BEEP)", RFC 3288, June 2002.
Appendix A. Acknowledgements π«Ά
This document is based, in part, on Using SOAP in BEEP [11], and the author gratefully acknowledges the contributions of Marshall Rose π.
Appendix B. IANA Considerations π·
The IANA has registered the profile specified in Section 6.1, and has selected an IANA-specific URI, e.g.,
The IANA has registered "xmlrpc.beep" and "xmlrpc.beeps" as URL schemes, as specified in Section 6.2 and Section 6.3, respectively. (See: http://www.iana.org/assignments/uri-schemes)
The IANA has registered "XML-RPC over BEEP" as a TCP port number (602), as specified in Section 6.4. (See: http://www.iana.org/assignments/port-numbers)
Author's Address π‘
Ward K Harold
IBM
11400 Burnet Road
Austin, Texas 78759
US
Phone: +1 512 838 3622
EMail: wharold@us.ibm.com
Full Copyright Statement Β©οΈ
Copyright (C) The Internet Society (2003). All Rights Reserved.
This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards, in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.
The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.
This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Acknowledgement π
Funding for the RFC Editor function is currently provided by the Internet Society β¨.
π¦ where this page comes from
- ietf: rfc3529 2003-04
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms