1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501
|
<pre>Internet Engineering Task Force (IETF) N. Borenstein
Request for Comments: 7072 Mimecast
Category: Standards Track M. Kucherawy
ISSN: 2070-1721 November 2013
<span class="h1">A Reputation Query Protocol</span>
Abstract
This document defines a mechanism to conduct queries for reputation
information over the HyperText Transfer Protocol (HTTP) using
JavaScript Object Notation (JSON) as the payload meta-format.
Status of This Memo
This is an Internet Standards Track document.
This document is a product of the Internet Engineering Task Force
(IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by the
Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in <a href="./rfc5741#section-2">Section 2 of RFC 5741</a>.
Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
<a href="http://www.rfc-editor.org/info/rfc7072">http://www.rfc-editor.org/info/rfc7072</a>.
Copyright Notice
Copyright (c) 2013 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and the IETF Trust's Legal
Provisions Relating to IETF Documents
(<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
<span class="grey">Borenstein & Kucherawy Standards Track [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc7072">RFC 7072</a> A Reputation Query Protocol November 2013</span>
Table of Contents
<a href="#section-1">1</a>. Introduction ....................................................<a href="#page-2">2</a>
<a href="#section-2">2</a>. Terminology and Definitions .....................................<a href="#page-2">2</a>
<a href="#section-2.1">2.1</a>. Key Words ..................................................<a href="#page-2">2</a>
<a href="#section-2.2">2.2</a>. Other Definitions ..........................................<a href="#page-3">3</a>
<a href="#section-3">3</a>. Description .....................................................<a href="#page-3">3</a>
<a href="#section-3.1">3.1</a>. Overview ...................................................<a href="#page-3">3</a>
<a href="#section-3.2">3.2</a>. URI Template ...............................................<a href="#page-3">3</a>
<a href="#section-3.3">3.3</a>. Syntax .....................................................<a href="#page-4">4</a>
<a href="#section-3.4">3.4</a>. Response ...................................................<a href="#page-6">6</a>
<a href="#section-3.5">3.5</a>. Protocol Support ...........................................<a href="#page-6">6</a>
<a href="#section-4">4</a>. IANA Considerations .............................................<a href="#page-7">7</a>
<a href="#section-5">5</a>. Security Considerations .........................................<a href="#page-7">7</a>
<a href="#section-6">6</a>. References ......................................................<a href="#page-8">8</a>
<a href="#section-6.1">6.1</a>. Normative References .......................................<a href="#page-8">8</a>
<a href="#section-6.2">6.2</a>. Informative References .....................................<a href="#page-8">8</a>
<a href="#appendix-A">Appendix A</a>. Acknowledgements .......................................<a href="#page-9">9</a>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
This document defines a method to query a reputation data service for
information about an entity, using the HyperText Transfer Protocol
(HTTP) as the transport mechanism and JSON as the payload meta-
format.
The mechanism is a two-stage query:
1. A client retrieves a template from a server that describes the
construction of a Universal Resource Identifier (URI) that will
be the actual query;
2. The client then uses the constructed URI to request the
reputation data from the server.
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Terminology and Definitions</span>
This section defines terms used in the rest of the document.
<span class="h3"><a class="selflink" id="section-2.1" href="#section-2.1">2.1</a>. Key Words</span>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [<a href="#ref-KEYWORDS" title=""Key words for use in RFCs to Indicate Requirement Levels"">KEYWORDS</a>].
<span class="grey">Borenstein & Kucherawy Standards Track [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc7072">RFC 7072</a> A Reputation Query Protocol November 2013</span>
<span class="h3"><a class="selflink" id="section-2.2" href="#section-2.2">2.2</a>. Other Definitions</span>
Other terms of importance in this document are defined in [<a href="./rfc7070" title=""An Architecture for Reputation Reporting"">RFC7070</a>]
and [<a href="./rfc7071" title=""A Media Type for Reputation Interchange"">RFC7071</a>].
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Description</span>
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. Overview</span>
The components to the question being asked are the following:
o The subject of the query;
o The name of the host, or the IP address, at which the reputation
service is available;
o The name of the reputation application, i.e., the context within
which the subject is being evaluated;
o Optionally, names of the specific reputation assertions or
attributes that are being requested.
There is no discovery protocol for finding reputation services.
These are typically subscription services, negotiated between
operators through some out-of-band method.
Assertions are discussed in [<a href="./rfc7071" title=""A Media Type for Reputation Interchange"">RFC7071</a>].
The name of the application, if given, is expected to be one
registered with IANA in the "Reputation Applications" registry, which
is defined in [<a href="./rfc7071" title=""A Media Type for Reputation Interchange"">RFC7071</a>]. A server receiving a query about an
application it does not recognize or explicitly support (e.g., by
virtue of private agreements or experimental extensions) MUST return
a 404 error code.
A reputation query made via [<a href="#ref-HTTP" title=""Hypertext Transfer Protocol -- HTTP/1.1"">HTTP</a>] encodes the question being asked
in an HTTP GET method. The specific syntax of the query itself is
specified by retrieving a URI template from the reputation service,
completing the template, and then issuing the query.
<span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>. URI Template</span>
The template file is retrieved by requesting the [<a href="#ref-WELL-KNOWN-URI">WELL-KNOWN-URI</a>]
"repute-template" from the host providing reputation service, using
HTTP. (The registration for this well-known URI is in <a href="#section-4">Section 4</a>.)
The server returns the template file in a reply that MUST use the
<span class="grey">Borenstein & Kucherawy Standards Track [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc7072">RFC 7072</a> A Reputation Query Protocol November 2013</span>
text/plain media type (see [<a href="#ref-MIME" title=""Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies"">MIME</a>]) and SHOULD include an Expires
field (see Section 14.21 of [<a href="#ref-HTTP" title=""Hypertext Transfer Protocol -- HTTP/1.1"">HTTP</a>]) indicating a duration for which
the template is to be considered valid by clients and not re-queried.
If an Expires field is present, the client SHOULD NOT send another
query to the same server prior to the timestamp in the field. If no
Expires field is present, the client SHOULD wait at least one day
before sending another query to the same server (i.e., the client
assumes a default expiration of one day).
The template file might contain more than one template. Such a file
MUST have each template separated by a carriage return (ASCII 0x0D)
and newline (ASCII 0x0A) character, as is typical for most text-based
Internet protocols.
Each template in the file is expanded using the variables that are
the parameters to the query. These parameters are either the subject
about which reputation information is sought (or details associated
with it) or other parameters that are established out-of-band with
the reputation service; they are not established by any automated
discovery described here. The client then attempts to query each
expanded template that uses a URI scheme it is capable of querying,
in the order presented in the file, until the client finds one to
which it can establish a usable connection and issue the query.
For example, given the following template:
http://{service}/{application}/{subject}/{assertion}
A query about the use of the domain "example.org" in the "email-id"
application context to a service run at "example.com", where that
application declares a required "subject" parameter, requesting the
"SPAM" reputation assertion, would be formed as follows:
http://example.com/email-id/example.org/spam
<span class="h3"><a class="selflink" id="section-3.3" href="#section-3.3">3.3</a>. Syntax</span>
The syntax for the [<a href="#ref-URI" title=""Uniform Resource Identifier (URI): Generic Syntax"">URI</a>] of the query is constructed using a template
as per [<a href="#ref-URI-TEMPLATE">URI-TEMPLATE</a>]. (See <a href="#section-3.2">Section 3.2</a>.) Clients MUST provide the
following values in the expansion of the template:
application: The name of the application reputation in whose context
the request is being made. These names are registered with IANA,
and conform to the ABNF "token" found in [<a href="#ref-MIME" title=""Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies"">MIME</a>].
<span class="grey">Borenstein & Kucherawy Standards Track [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc7072">RFC 7072</a> A Reputation Query Protocol November 2013</span>
service: The hostname or IP address to which the query is being
sent. This MUST be the same as the host to which the template
query was issued.
subject: The subject of the query, extracted from some content to be
evaluated. The subject portion of the template conforms to the
ABNF "value" found in [<a href="#ref-MIME" title=""Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies"">MIME</a>].
The following variable can also be provided. It is not mandatory in
this model, but a specific application (defined in its own extension
document) might declare it mandatory in a specific context:
assertion: The name of the specific assertion of interest to the
client. Assertion names conform to the ABNF "token" found in
[<a href="#ref-MIME" title=""Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies"">MIME</a>]. If absent, the client is indicating that it requests all
available assertion information.
If a template contains a variable that is not required and the client
does not have a value to insert, it substitutes the empty string into
the template in place of that variable. Service providers crafting
templates MUST do so such that a client doing an empty variable
expansion will still produce a syntactically and semantically valid
and unambiguous URI. For example, given this template:
http://{service}/{application}/{subject}/{assertion}/{a}/{b}
If "{a}" and "{b}" are optional and "{a}" expands to the empty
string, then the resulting URI will have adjacent backslash ("/",
ASCII 0x2F) characters and one path component after the assertion.
If the server interpreting the URI's path component removes or
ignores adjacent backslash characters (such as is done with the UNIX
filesystem), the server will be unable to distinguish an empty "{a}"
from an empty "{b}", and it could serve the wrong response. Where
possible, the template needs to be constructed such that expansion of
optional variables yields an unambiguous result. For example, an
unambiguous version of the above would be:
http://{service}/{application}/{subject}/{assertion}/a={a}/b={b}
...or, even better, using URI template set expansions:
http://{service}/{application}/{subject}/{assertion}{?a,b}
Every application space has a set of assertions applicable to its own
context. [<a href="./rfc7071" title=""A Media Type for Reputation Interchange"">RFC7071</a>] defines a single assertion assumed to exist in
any application that does not define its own assertion set.
<span class="grey">Borenstein & Kucherawy Standards Track [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc7072">RFC 7072</a> A Reputation Query Protocol November 2013</span>
Reputation applications can extend the set of optional or required
query parameters as part of their IANA registration actions. The set
enumerated above establishes the base set common to all of them.
Further, additional required or optional extension query parameters
might be defined by specific reputation service providers, though
these are private arrangements between client and server and will not
be registered with IANA.
Authentication between reputation client and server is outside the
scope of this specification. It could be provided through a variety
of available transport-based or object-based mechanisms, including a
later extension of this specification.
<span class="h3"><a class="selflink" id="section-3.4" href="#section-3.4">3.4</a>. Response</span>
The response is expected to be contained in a media type designed to
deliver reputons. A media type designed for this purpose,
"application/reputon+json", is defined in [<a href="./rfc7071" title=""A Media Type for Reputation Interchange"">RFC7071</a>].
If the server generates responses that contain an Expires field (see
Section 14.21 of [<a href="#ref-HTTP" title=""Hypertext Transfer Protocol -- HTTP/1.1"">HTTP</a>]), that timestamp MUST align with the
"expires" field within the response, if any. Failing to do so can
result in a state where the response has expired, but the HTTP reply
has not, and the client would in that case be unable to get a fresh
answer from the reputation server.
<span class="h3"><a class="selflink" id="section-3.5" href="#section-3.5">3.5</a>. Protocol Support</span>
A client has to implement HTTP in order to retrieve the query
template as described in <a href="#section-3.2">Section 3.2</a>. Accordingly, a server can
assume the client will be able to handle a URI template that produces
a URI for the query using the "http" URI scheme. The template could
yield a query string that uses some other URI scheme, in which case
the client could try that URI as well if it supports issuing queries
with that URI scheme.
A server SHOULD include support for providing service over HTTP, and
publish templates indicating support for this, as a baseline for
interoperability with arbitrary clients.
<span class="grey">Borenstein & Kucherawy Standards Track [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc7072">RFC 7072</a> A Reputation Query Protocol November 2013</span>
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. IANA Considerations</span>
This document registers the "repute-template" well-known URI in the
"Well-Known URI" registry as defined by [<a href="#ref-WELL-KNOWN-URI">WELL-KNOWN-URI</a>], as follows:
URI suffix: repute-template
Change controller: IETF
Specification document(s): [<a href="./rfc7072">RFC7072</a>]
Related information: none
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Security Considerations</span>
This document defines particular uses of existing protocols for a
specific application. In particular, the basic protocol used for
this service to retrieve a URI template from a well-known location is
basic HTTP, which is not secure without certain extensions. Security
issues relevant to use of URI templates are discussed in
[<a href="#ref-URI-TEMPLATE">URI-TEMPLATE</a>], and those relevant to well-known URI definitions and
retrieval are discussed in [<a href="#ref-WELL-KNOWN-URI">WELL-KNOWN-URI</a>].
The reputation service itself will use HTTP or other transport
methods to issue queries and receive replies. Those protocols have
registered URI schemes and, as such, presumably have documented
security considerations. The protocol described here operates atop
those URI schemes, and does not itself present new security
considerations.
Reputation mechanisms represent an obvious security concern, in terms
of the validity and use of the reputation information. These issues
are beyond the scope of this specification. General information
pertaining to using or providing reputation services can be found in
[<a href="#ref-CONSIDERATIONS">CONSIDERATIONS</a>].
The security considerations applicable to HTTP (see Section 15 of
[<a href="#ref-HTTP" title=""Hypertext Transfer Protocol -- HTTP/1.1"">HTTP</a>] apply, since this query mechanism for reputation uses that
protocol. If it is desirable to conceal the content of the query and
its response, use of encryption techniques such as HTTP over TLS
[<a href="#ref-HTTPS" title=""HTTP Over TLS"">HTTPS</a>] can be used.
<span class="grey">Borenstein & Kucherawy Standards Track [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc7072">RFC 7072</a> A Reputation Query Protocol November 2013</span>
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. References</span>
<span class="h3"><a class="selflink" id="section-6.1" href="#section-6.1">6.1</a>. Normative References</span>
[<a id="ref-HTTP">HTTP</a>] Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext
Transfer Protocol -- HTTP/1.1", <a href="./rfc2616">RFC 2616</a>, June 1999.
[<a id="ref-KEYWORDS">KEYWORDS</a>] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>, March 1997.
[<a id="ref-MIME">MIME</a>] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
Extensions (MIME) Part One: Format of Internet Message
Bodies", <a href="./rfc2045">RFC 2045</a>, November 1996.
[<a id="ref-RFC7070">RFC7070</a>] Borenstein, N., Kucherawy, M., and A. Sullivan, "An
Architecture for Reputation Reporting", <a href="./rfc7070">RFC 7070</a>, November
2013.
[<a id="ref-RFC7071">RFC7071</a>] Borenstein, N. and M. Kucherawy, "A Media Type for
Reputation Interchange", <a href="./rfc7071">RFC 7071</a>, November 2013.
[<a id="ref-URI-TEMPLATE">URI-TEMPLATE</a>]
Gregorio, J., Fielding, R., Hadley, M., Nottingham, M.,
and D. Orchard, "URI Template", <a href="./rfc6570">RFC 6570</a>, March 2012.
[<a id="ref-URI">URI</a>] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
Resource Identifier (URI): Generic Syntax", STD 66, <a href="./rfc3986">RFC</a>
<a href="./rfc3986">3986</a>, January 2005.
[<a id="ref-WELL-KNOWN-URI">WELL-KNOWN-URI</a>]
Nottingham, M. and E. Hammer-Lahav, "Defining Well-Known
Uniform Resource Identifiers (URIs)", <a href="./rfc5785">RFC 5785</a>, April
2010.
<span class="h3"><a class="selflink" id="section-6.2" href="#section-6.2">6.2</a>. Informative References</span>
[<a id="ref-CONSIDERATIONS">CONSIDERATIONS</a>]
Kucherawy, M., "Operational Considerations Regarding
Reputation Services", Work in Progress, May 2013.
[<a id="ref-HTTPS">HTTPS</a>] Rescorla, E., "HTTP Over TLS", <a href="./rfc2818">RFC 2818</a>, May 2000.
<span class="grey">Borenstein & Kucherawy Standards Track [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc7072">RFC 7072</a> A Reputation Query Protocol November 2013</span>
<span class="h2"><a class="selflink" id="appendix-A" href="#appendix-A">Appendix A</a>. Acknowledgements</span>
The authors would like to thank the following for their contributions
to this work: Simon Hunt, Mark Nottingham, David F. Skoll, and Mykyta
Yevstifeyev.
Authors' Addresses
Nathaniel Borenstein
Mimecast
203 Crescent St., Suite 303
Waltham, MA 02453
USA
Phone: +1 781 996 5340
EMail: nsb@guppylake.com
Murray S. Kucherawy
270 Upland Drive
San Francisco, CA 94127
USA
EMail: superuser@gmail.com
Borenstein & Kucherawy Standards Track [Page 9]
</pre>
|