RFC 2609
Service Templates and Service: Schemes
RFC 2609 β¨
Service Templates and Service: Schemes π
okay bestie, this one is all about service: URLs π¦ It's written by E. Guttman, C. Perkins, and J. Kempf, all from Sun Microsystems. It's a Standards Track doc, dated June 1999, and it updates RFC 2165. The header doesn't list anything it obsoletes. Lowkey, the authors are giving main character energy π
Status of This Memo β¨
This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited. πΈ
Copyright Notice π
Copyright (C) The Internet Society (1999). All Rights Reserved.
Abstract π₯
okay so the "service:" URL scheme name is used to define URLs (called "service: URLs" in this document) that are mainly meant for the Service Location Protocol to spread out service access info π‘ These schemes give client-based network software an extensible framework to grab the configuration info it needs to actually use network services. When you register a service: URL, it comes with a set of well-defined attributes that describe the service. Those attributes either hand configuration info to client software, or spell out service characteristics that matter to end users π
This document describes a formal procedure for defining and standardizing new service types and attributes for use with the "service:" scheme. The formal descriptions of service types and attributes are templates that both humans and machines can understand π§ They SHOULD be used by administrative tools to parse service registration information, and by client applications to provide localized translations of service attribute strings. β¨
Table of Contents π
1. Introduction 2
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . 3
1.2. Service Location Protocol . . . . . . . . . . . . . . 5
1.2.1. Compatibility with SLPv1 . . . . . . . . . . . 5
2. Service URL Syntax and Semantics 5
2.1. Service URL Syntax . . . . . . . . . . . . . . . . . 5
2.2. Service URL Semantics . . . . . . . . . . . . . . . . 8
2.3. Use of service: URLs . . . . . . . . . . . . . . . . 9
2.4. Specifying the Service Type-Specific URL Syntax. . . . 10
2.5. Accommodating Abstract Service Types . . . . . . . . 10
2.5.1. Advertising Abstract Service Types . . . . . . 11
3. Syntax and Semantics of Service Type Specifications 12
3.1. Syntax of Service Type Templates . . . . . . . . . . 12
3.2. Semantics of Service Type Templates. . . . . . . . . . 15
3.2.1. Definition of a Service Template . . . . . . . 15
3.2.2. Service Type . . . . . . . . . . . . . . . . . 16
3.2.3. Version Number . . . . . . . . . . . . . . . . 16
3.2.4. Description . . . . . . . . . . . . . . . . . 16
3.2.5. Syntax of the Service Type-specific URL Part . 17
3.2.6. Attribute Definition . . . . . . . . . . . . 17
4. A Process For Standardizing New Service Types 21
5. IANA Considerations 22
6. Internationalization Considerations 24
6.1. Language Identification and Translation. . . . . . . . 24
7. Security Considerations 25
A. Service Template Examples 26
A.1. FOO . . . . . . . . . . . . . . . . . .. . . . . . . . 26
A.2. Abstract Service Type: Net-Transducer . . . . . . . . 28
A.3. Concrete Service Type: Net-Transducer:Thermometer . . 29
A.4. service: URLs and SLP . . . . . . . . . . . . . . . . 30
B. Acknowledgments 30
C. References 31
D. Authors' Addresses 32
E. Full Copyright Statement 33
1. Introduction π¦
okay so this document describes a URL scheme called service: URL, which defines network access info for network services using a formal notation. It also explains how to define a set of attributes to go with a service: URL. These attributes let end users and programs pick between network services of the same type that have different capabilities π The attributes are defined in a template document that's readable by people and machines π
A client uses attributes to select a particular service. Service selection happens by grabbing the service: URL that offers the right configuration for that client. Service type templates define the syntax of service: URLs for a particular service type, plus the attributes that come along with a service: URL in a service registration. π§
Templates are used for the following distinct purposes: π
- Standardization
The template is reviewed before it is standardized. Once it is standardized, all versions of the template are archived by IANA.
- Service Registration
Servers making use of the Service Location Protocol [10] register themselves and their attributes. They use the templates to generate the service registrations. When registering, the service must use the specified values for its attributes. π«Ά
- Client presentation of Service Information
Client applications may display service information. The template provides type information and explanatory text which may be helpful in producing user interfaces. β¨
- Internationalization
Entities with access to the template for a given service type in two different languages may translate between the two languages.
A service may register itself in more than one language using templates, though it has been configured by an operator who registered service attributes in a single language. πΈ
All grammar encoding follows the Augmented BNF (ABNF) [8] for syntax specifications. π
1.1. Terminology π₯
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 RFC 2119 [6]. π
The following terminology is used for describing service: URLs. π
- service scheme
A URL scheme whose name starts with the string "service:" and is followed by the service type name, constructed according to the rules in this document.
- service: URL
A URL constructed according to the service scheme definition. It typically provides at least the following: the name of an access protocol, and an address locating this service. The service: URL may include url path information specific to the type of service, as well as attribute information encoded according to the URL grammar. The service: URL is used by the Service Location Protocol to register and discover the location of services. It may be used by other protocols and in documents as well. π¦
- service type
A name identifying the semantics by which the remainder of the service: URL is to be understood. It may denote either a particular network protocol, or an abstract service associated with a variety of protocols. If the service type denotes a particular protocol, then the service type name SHOULD either be assigned the name of a particular well known port [2] by convention or be the Assigned Numbers name for the service [1]. π
- abstract service type
A service type name which is associated with a variety of different protocols. An example is given in Section A. Section 2 discusses various ways that abstract types can be accommodated. π§
- service registration
A service: URL and optionally a set of attributes comprise a service registration. This registration is made by or on behalf of a given service. The URL syntax and attributes must conform to the service template for the registered service. π
- service template
A formal description of the service attributes and service scheme associated with a particular service type. π
1.2. Service Location Protocol π‘
The Service Location Protocol version 2 [10] allows service: URLs to be registered and discovered, though service: URLs may be also used in other contexts. β¨
Client applications discover service registrations by issuing queries for services of a particular type, specifying the attributes of the service: URLs to return. Clients retrieve the attributes of a particular service by supplying its service: URL. Attributes for all service registrations of a particular type can also be retrieved. π
Services may register themselves, or registrations may be made on their behalf. These registrations contain a service: URL, and possibly attributes and digital signatures. π«Ά
1.2.1. Compatibility with SLPv1 πΈ
This document adopts the encoding conventions of SLPv2. π
Compatibility with SLPv1 [[15]] is possible, if the following conventions are observed: π₯
- Abstract service types must not be used. SLPv2 specifies the use of Service URLs with abstract service types. SLPv1 does not support them. Thus, a service template which is to serve both SLPv1 and SLPv2 must not use abstract service types. π
- The syntax for representing opaque values in this document is consistent with SLPv2. The syntax must be converted for use with SLPv1. Instead of a sequence of
"\FF" then "\" HEXDIG HEXDIGfor each byte in the opaque value, SLPv1 uses radix-64 notation. π§ - Escape characters are significantly differently in SLPv1 and SLPv2. Instead of using escaped byte notation for escaped characters, SLPv1 uses the HTML convention
&' `#' 1*DIGIT `;'. π
2. Service URL Syntax and Semantics β¨
This section describes the syntax and semantics of service: URLs. π¦
2.1. Service URL Syntax β¨
okay bestie, the syntax of a service: URL MUST conform to an 'absolute URI' as defined by [5] π
It's giving "different enough from a generic URI that you should just treat it as an opaque URI" unless you've got a proper parser for service: URLs π
Every service: URL has the same syntax up to the 'url-part' π After the service scheme, the rest depends on the service type π Every single one has a service access point portion too, which tells you the address of the service you want to reach π§
The <sap> field's syntax depends on how the service type is defined πΈ The <sap> is the service access point, and it describes how to get to the service π¦ Here's a tea moment: upper and lower case are both recognized in the <service-type> field, but the name gets case-folded into lower case π
So service types are NOT distinguished by case. "http" and "HTTP" are the same service type, which lines up with normal URL practice as laid out in [5] π«Ά
The ABNF for a service: URL is:
service: URL = "service:" service-type ":" sap
service-type = abstract-type ":" url-scheme / concrete-type
abstract-type = type-name [ "." naming-auth ]
concrete-type = protocol [ "." naming-auth ]
type-name = resname
naming-auth = resname
url-scheme = resname
; A recognized URL scheme name, standardized
; either through common practice or through
; approval of a standards body.
resname = ALPHA [ 1*(ALPHA / DIGIT / "+" / "-") ]
sap = site [url-part]
site = ipsite / atsite / ipxsite
ipsite = "//" [ [ user "@" ] hostport ]
hostport = host [ ":" port ]
host = hostname / hostnumber
hostname = *( domainlabel "." ) toplabel
alphanum = ALPHA / DIGIT
domainlabel = alphanum / alphanum *[alphanum / "-"] alphanum
toplabel = ALPHA / ALPHA *[ alphanum / "-" ] alphanum
hostnumber = ipv4-number
ipv4-number = 1*3DIGIT 3("." 1*3DIGIT)
port = 1*DIGIT
; A port number must be included if the
; protocol field does not have an IANA
; assigned port number.
user = *[ uchar / ";" / "+" / "&" / "=" ]
ipxsite = "/ipx/" ipx-net ":" ipx-node ":" ipx-socket
ipx-net = 8 HEXDIGIT
ipx-node = 12 HEXDIGIT
ipx-socket = 4 HEXDIGIT
atsite = "/at/" at-object ":" at-type "" at-zone
at-object = 1*31apple-char
at-type = 1*31apple-char
at-zone = 1*31apple-char
apple-char = ALPHA / DIGIT / safe / escaped
= ; AppleAscii [7] values that are not
= ; from the restricted range must be escaped.
= ; NOTE: The escaped values do NOT correspond
= ; to UTF-8 values here: They are AppleAscii
= ; bytes.
url-part = [ url-path ] [ attr-list ]
url-path = 1 * ( "/" *xchar )
; Each service type must define its
; own syntax consistent
; with [5].
attr-list = 1 * ( ";" attr-asgn )
attr-asgn = attr-id / attr-id "=" attr-value
safe = "$" / "-" / "_" / "." / "~"
extra = "!" / "*" / "'" / "(" / ")" / "," / "+"
uchar = unreserved / escaped
xchar = unreserved / reserved / escaped
escaped = 1*(`\' HEXDIG HEXDIG)
reserved = ";" / "/" / "?" / ":" / "@" / "&" / "=" / "+"
unreserved = ALPHA / DIGIT / safe / extra
IPX addresses [14] have three parts: a network, a node and a socket π The IPX network number is a four-byte number in network order, written in hexadecimal, and it names an IPX subnet π§ The node is the network interface card π₯οΈ It's a six-byte hex number that's usually the same as the interface card's node ID π The socket is the specific service access point, given a network and node β¨ IPX sockets are like TCP/IP ports, and please don't mix them up with Berkeley sockets π
AppleTalk addresses [9] are made of an object, a type and a zone π The object is a human-readable string π The type is an identifier that is NOT meant to be readable π€ The zone is the AppleTalk Zone name, which is human-readable again πΈ These names use characters from the AppleAscii set [7], so they don't equate to escaped ASCII or UTF-8 characters π
The characters "=" and "*" are reserved, and they can't show up in the names, not even in binary form π«
In cases other than the AppleTalk grammar, some characters must be escaped before use. To escape any character, put a % in front of the two digits that give its ASCII value π¦
2.2. Service URL Semantics π§
The service scheme-specific information after the "service:" URL scheme identifier gives you everything you need to access the service ποΈ As we just saw in the last subsection, a service: URL looks like this:
service: URL = "service:" service-type ":" site url-path
where <site> has one of the following forms could refer to an <ipsite>, <ipxsite> or <atsite> if the service URL points to an IP, IPX or AppleTalk service access point, respectively π
As discussed in Section 1, the <service-type> can be either a concrete protocol name or an abstract type name π―
The <ipsite> field is usually a domain name (DNS) or an IP network protocol address for the service, and it might also have a port number π Quick bestie tip, straight from the doc: DNS hostnames are preferred for ease of renumbering π§ The <site> field can be null if other information in the service URL or the service attributes is enough to use the service π
The <sap> field lets you provide more info (through <url-path> and <attr-list>) that can uniquely locate the service or resource when the <site> alone isn't enough π For IP addresses, the <site> field starts with "//" π The other address families supported are IPX [14] and AppleTalk [9] π¦
An <attr-list> field goes at the end of the <url-part> field, but it is never required to exist in any service location registration π«§
The <attr-list> field is a list of attribute assignments separated by semicolons (";"), in this form:
attr-id "=" attr-value
or, for keyword attributes:
attr-id
Attributes become part of a service: URL when they're required to access a particular service π For example, an ACAP [13] service might need the client to authenticate through Kerberos π‘οΈ If the service registration includes that attribute, the ACAP client can use the correct SASL [11] authentication mechanism π The ACAP server's registration might look like:
service:acap://some.where.net;authentication=KERBEROSV4
Other attributes of an ACAP server aren't appropriate to put in the URL, though π For instance, the list of users who have access to the server helps when you're picking an ACAP server, but a client doesn't need it to use the registered service π
Attributes associated with a service: URL are not usually included in the service: URL π«Ά They're stored and retrieved through other mechanisms π The service: URL uniquely identifies a particular service agent or resource, and it's used when you're registering or requesting attribute information π§ The Service Location Protocol describes how that information gets registered by network services and fetched by client software β¨
2.3. Use of service: URLs πΈ
The service: URL is meant to let arbitrary client/server and peer-to-peer systems use a standardized, dynamic way to discover service access points π¦
Service: URLs are supposed to be selected based on how suitable their attributes are π A client application can get the URLs of several services of the same type and pick the most preferable one using their attributes π― The client then uses the service: URL to talk directly to a service π‘
Attributes are specified with a formal service template syntax, described in Section 3 π§Ύ If a service: URL registration includes attributes, the registering agent SHOULD also keep track of the attributes that characterize the service π«Ά
Registrations can be checked against the formal attribute specification in the template, either by the client or by an agent acting for the client π Service registrations are typically done using the Service Location Protocol [10] (SLP) π SLP gives service: URLs a way to be obtained dynamically, based on the service's attributes π
Service: URLs can also come from documents and other protocols π In that case, the URL might not come with the service attributes π The context where the URL shows up should make it clear, if possible, when the service is appropriate to use π§ For example, a mail message might recommend a service for when you're at a branch office π’ Or an HTML document might include a service: URL as a pointer to a service, with text describing what the service does and who is allowed to use it π
2.4. Specifying the Service Type-Specific URL Syntax π
When a service type gets specified, the specification includes the syntax for all URLs that services of that type register π§© For example, the "lpr" service type might be defined with service: URLs in this form:
service:printer:lpr://<address of printer>/<queue name>
The part of the URL after the printer's address:
"/" <queue name>
is specific to the lpr service type and corresponds to the <url-path> field of the general service: URL syntax π¨οΈ That part gets specified when the lpr service type is specified π
2.5. Accommodating Abstract Service Types π¦
okay so an abstract service type is basically a whole category of service that can be built by a bunch of different service agents π
To register a service: URL for an abstract service type, you use the 'abstract-type' grammar rule from section 3.1. π This gives you a URL with enough info to actually use the service: the protocol, the address, and the path. The thing is, unlike a "concrete" service: URL, the service type alone isn't enough to figure out how to access it. An abstract service type stands for a class of service types instead. The next subsection breaks this down more β¨
Concrete service templates inherit every attribute from the abstract service template they came from πΈ And an attribute defined in the abstract template MUST not be defined again in the concrete one. This keeps templates super easy to read π
Like, say an abstract service template for the service type ' Abstract' defines an attribute FOO. Every concrete template derived from it, like ' Abstract:Concrete', automatically includes FOO. That derived template MUST NOT redefine FOO, per the rule above π
There's another example in Section A π§
2.5.1. Advertising Abstract Service Types π£
Some services are built on top of several protocols that are already popular and are each their own service in their own right π That's where an abstract service type is the move. The big thing is that all the info the service needs has to be clearly defined π
Let's say someone is building a network service for dynamically loading device drivers. The client needs these three pieces of info before it can load and instantiate the driver:
- The protocol used to load the driver code, for example, "ftp", "http" or "tftp"
- A pathname identifying where the driver code is located, for example "/systemhost/drivers/diskdrivers.drv",
- The name of the driver, for example, "scsi".
The temptation is to smoosh the first two items into a URL and then stick that inside a service: URL. π Please don't do this. Here's the example to avoid:
service:ftp:/x3.bean.org/drivers/diskdrivers.drv;driver=scsi
That's a service: URL that seems to point to where you can grab the driver, but it's not the vibe π
ββοΈ
Instead, an abstract service-type SHOULD be used. The service type isn't "ftp", like the example shows. It's "device-drivers" π And the service: URL that should be used, following the rules in section [6], looks like this:
service:device-drivers:ftp://x3.bean.org/drivers/diskdrivers.drv;
driver=scsi;platform=sys3.2-rs3000
Other URLs for the same service using other protocols work too, like these:
service:device-drivers:tftp://x2.bean.org/vol3/disk/drivers.drv;
driver=scsi;platform=sys3.2-rs3000
service:device-drivers:http://www.bean.org/drivers/drivpak.drv;
driver=scsi;platform=sys3.2-rs3000
So if you search SLP for the service type "device-drivers", you can get back all three URLs above π Then the client picks whichever access protocol is the best fit for the resource it wants π¦
The core requirement is that the abstract service type MUST be well specified π₯ This is so that program code or human users have enough info to actually access the service. Every time, a well-specified abstract type will include either an access protocol plus a network address where the service lives, or an embedded URL for a standardized URL scheme that explains how to access the service. In the example above there are three more requirements: a URL path is included for access protocols so you know which document to download, and two attributes are included to describe the driver π§ββοΈ
3. Syntax and Semantics of Service Type Specifications π
Service type specifications are documents written in a formal syntax that define the properties that matter for service registration π Those properties are:
- General information on the service type specification itself,
- The syntax of the service type-specific part of the service URL,
- The definition of attributes associated with a service.
The service type specification document is called the service type template πΈ
The next subsections cover the syntax and semantics of service type templates π
3.1. Syntax of Service Type Templates π
Service template documents are encoded in a simple form β¨ They can be translated into any language or character set, but the template used for standardization MUST be encoded in the 0x00-0x7F subrange of UTF-8 [16] (which corresponds to ASCII character encoding) and be in English.
A template document starts with a block of text that assigns values to five document identification items. Those five items can show up in any order inside the block, but conventionally the "template-type" item, which assigns the service type name, sits at the very top of the document to give context for the rest of it π¦ The attribute definition item comes after the document identification items.
All items end with a blank line. The reserved characters are ";", "%", "=", ",", "#", LF, and CR. Reserved characters MUST be escaped. The escape sequence is the same as the one described in [5] π₯
Heads up bestie: the template is UTF-8 encoded, but it gets submitted as part of a work in progress, which is encoded in ASCII. Every character outside the ASCII range MUST be escaped using the\' HEXDIG HEXDIGsyntax. For example, the letter e with an accent aigue becomes\c3\a9. Unfortunately this makes the template way less readable in the submission π Hopefully some public domain tools will show up to turn escaped UTF-8 back into human-readable text π
Values in value lists are separated by commas. A value list ends at a newline that isn't preceded by a comma. If the newline is preceded by a comma, the value list keeps going onto the next line π
Attribute identifiers, attribute type names, and flags are all case insensitive, so upper and lower case can both be used to write them in the template document β¨ Newlines are significant in the grammar. They separate one item from another, and they also separate parts of an item internally π«Ά
String values are treated as a sequence of non-whitespace tokens, which can have embedded whitespace, separated from each other by whitespace. Commas split lists of strings. String values get trimmed so any run of whitespace inside a string gets squished down to a single space, and any leading or trailing whitespace gets removed. For example:
" some value , another example "
becomes
"some value" and "another example".
There's no ambiguity in string tokenization, because values in value lists are separated by a comma. Also, string tokens are NOT delimited by double quotes (") like they usually are in programming languages π The quotes here are just for show!
Attribute tags and values are useful for directory look-ups. In this case, decoding of character escapes and trimming of whitespace MUST be performed before string matching. On top of that, string matching SHOULD be case insensitive π
Templates follow this ABNF [8] grammar π§
template = tem-attrs attr-defs
tem-attrs = schemetype schemevers schemetext schemeurl
schemetype = "template-type=" scheme term
schemevers = "template-version=" version-no term
schemetext = "template-description=" newline desc term
schemeurl = "template-url-syntax=" newline url-bnf term
url-bnf = *[ com-chars ]
; An ABNF describing the <url-path> production
; in the service: URL grammar of Section 2.1.
scheme = service-type [ "." naming-auth ]
service-type = scheme-name
naming-auth = scheme-name
scheme-name = ALPHA [1*schemechar] [ "." 1*schemechar ]
schemechar = ALPHA / DIGIT / "-" / "+" /
version-no = 1*DIGIT "." 1*DIGIT
langtag = 1*8ALPHA ["-" 1*8ALPHA]
; See [3]
desc = *[ com-chars ]
; A block of free-form text for reading by
; people describing the service in a short,
; informative manner.
term = newline newline
attr-defs = *( attr-def / keydef )
attr-def = id "=" attrtail
keydef = id "=" "keyword" newline [help-text] newline
attrtail = type flags newline [value-list] [help-text]
[value-list] newline
id = 1*attrchar
type = "string" / "integer" / "boolean" / "opaque"
flags = ["m"/"M"] ["l"/"L"] ["o"/"O"] ["x"/"X"]
value-list = value newline / value "," value-list /
value "," newline value-list
help-text = 1*( "#" help-line )
; A block of free-form text for reading by
; people describing the attribute and
; its values.
help-line = *[ com-chars ] newline
attrchar = schemechar / ":" / "_" / "$" / "~" / "@" / "." /
"|" / "<" / ">" / "*" / "&"
value = string / integer / boolean / opaque
string = safe-char *[safe-char / white-sp] safe-char
integer = [ "+" | "-" ] 1*DIGIT
boolean = "true" / "false"
opaque = "\FF" 1*( "\" HEXDIG HEXDIG)
; Each byte of opaque value is hex encoded.
; The format corresponds to [10].
; Newlines are ignored in decoding opaque
; values.
com-chars = safe-char / white-sp / "," / ";"/ "%"
safe-char = attrchar / escaped / " " / "!" / '"' / "'" /
"|" / "(" / ")" / "+" / "-" / "." / ":" /
"=" / "?" / "[" / "]" / "{" / "/" / "{" /
"$"
; All UTF-8 printable characters are
; included except ",", "%", ";", and "#".
escaped = 1*(`\' HEXDIG HEXDIG)
white-sp = SPACE / HT
newline = CR / ( CR LF )
3.2. Semantics of Service Type Templates π
The service type template defines the service attributes and the service: URL syntax for a particular service type π The attribute definition covers the attribute type, default values, allowed values, and other info.
Note that 'template-type', 'template-version', 'template-description' and 'template-url-syntax' have all been defined as attributes π These attributes MAY accompany any service registration using SLPv2 β¨
3.2.1. Definition of a Service Template β¨
okay so a service template has four items in it π here's the vibe for each one:
template-typeπ This is the scheme name of the service scheme. It's made of the service type name plus an optional naming authority name, and the two are separated by a period. Check 3.2.2 for the rules on service type names.template-versionπ¦ This is the version number of the service type specification.template-descriptionπΈ This is a description of the service that's written so people can read it. Think of it as the little blurb that makes the service make sense to a human.template-url-syntaxπ§ This is the syntax of the service type-specific URL part of the service: URL.- attribute definitions π This is a collection of zero or more definitions for the attributes that go with the service in service registrations. It can be empty, so no pressure π
Each of the subsections below covers one of these items, so we're doing them one by one bestie π«Ά
3.2.2. Service Type π
The service scheme is the service type name plus an optional naming authority name. The two are separated by a period. The service scheme gets tacked onto the service: URL scheme identifier, and it's also the value of the template-type item in the template document. If the naming authority name is missing, it's assumed to be IANA. no cap, that's the default π
3.2.3. Version Number π
The version number of a service type template is the value of the template-version item. A draft proposal starts at 0.0, and the minor number goes up by one every time there's a revision. A standardized template starts at 1.0. Adding optional attributes bumps the minor number by one. Adding required attributes, changing a definition, or removing attributes bumps the major number by one. The whole point is that an old service template still accurately, if incompletely, defines the attributes of a service registration as long as the template and the registration only differ in their minor version. β¨ See Section 4 for more detail on how to use the template-version attribute.
3.2.4. Description π
The description is a block of text that people can read, written in the language of the template, and it's the value of the template-description item. It should be sufficient to identify the service to human readers and give a short, informative description of what the service does. π
If the service type matches a particular protocol, the protocol specification MUST be cited here. Wait, I need to be careful, that wording is not in the original: the original says "must be cited here", so I'm keeping that lowercase. The protocol need not be a standardized protocol π¦ The template might point at a proprietary specification and send the reader to a contact person for more info. Very helpful, very iconic π
3.2.5. Syntax of the Service Type-specific URL Part π§
The syntax of the service type-specific part of the service: URL lives in the template document as the value of the template-url-syntax item. The <url-path> field of the service: URL is there to give extra info for locating a service when the <addr-spec> field isn't enough. It's also how <url-path> tells URLs of one service type apart from URLs of another service type. For example, for the lpr service type, the <url-path> might be defined so that it has to include the queue name, while other service types don't need that info at all π¨οΈ
The syntax for the <url-path> field MUST accompany the definition of a new service type, unless the URL scheme has already been standardized and isn't a service: URL. The syntax goes into the template document as an ABNF [8] that follows the URL syntax rules described in [5]. A service scheme doesn't have to support a <url-path>, so no stress πΈ The <url-path> field can be super simple, or even left out entirely. If the URL scheme has already been standardized, the template-url-syntax item SHOULD include a reference to the right standardization documents. Abstract service types are allowed to hand this field off to the template documents for their concrete instances π
3.2.6. Attribute Definition π
The bulk of the template is usually spent defining service type-specific attributes, and this is the part where the drama happens π An attribute definition precisely specifies the attribute's type, any other restrictions on it (like whether it's multi-valued, optional, and so on), some text that people can read describing it, and lists of default and allowed values. The only required info is the attribute's type. Everything else is optional β¨ Registration, deregistration, and using attributes in queries can be done with the Service Location Protocol [10] or some other method. Talking about that stuff is out of scope for this document, so we're skipping it π
Attributes are how you tell different services of the same type apart. They carry the info used to pick out the particular service you want to connect to, whether that's a program with a human interface or a program doing it automatically. Attributes can be encoded in different character sets and different languages. The procedure for that is in Section 6 π
An attribute definition begins with the attribute's identifier and ends with a single empty line. Attribute definitions have five components, listed in the order they show up in a definition:
- An attribute identifier, which acts as the name of the attribute.
- Attribute descriptors (type and flags).
- An optional list of values that get assigned to the attribute by default.
- An optional block of text that people can read, giving a short, informative description of the attribute.
- An optional list of allowed values that restrict the value or values the attribute can take on.
3.2.6.1. The Attribute Identifier π
An attribute definition starts with the attribute's identifier, and that identifier works as the name of the attribute. The characters you can use in an attribute identifier are limited to the ones that count as unrestricted for inclusion in a URL according to [5]. The reason is that services can show prominent attributes in their service: URL registrations. Every attribute identifier has to be unique within the template. Identifiers are case folded, so upper case and lower case characters count as the same thing π
3.2.6.2. The Attribute Type π¦
Attributes can have one of five types: string, integer, boolean, opaque, or keyword. The attribute's type gets separated from its identifier by an equal sign (=), and it follows the equal sign on the same line. The string, signed integer, and boolean types have the standard programming language or database semantics. Integers are limited to signed values that can be represented in 32 bits. The character set used for strings isn't specified when the template is defined. It gets determined by the service registration instead πΈ Booleans have the standard syntax. Opaques are byte-escaped values that can hold any other kind of data. Keywords are attributes that have no characteristics except that they exist (and maybe the descriptive text in their definition) π§
Keyword and boolean attributes put restrictions on the other parts of the attribute definition. Keyword attribute definitions MUST have no flag information after the type definition, and they MUST NOT have a default or allowed values list either. Wait, that last bit isn't quite right: the original says keyword attribute definitions MUST have no flag information following the type definition, nor any default or allowed values list. So I'm keeping it exactly that way: the MUST covers the flags, and the nor-any-list part is what the original says, and I'm not adding anything new. Boolean attributes are single value only, so multi-valued boolean attributes are not allowed π
3.2.6.3. Attribute Flags π
Flags decide other characteristics of an attribute. Keyword attributes are the one exception, since they can't have any flags. Otherwise, flags come after the attribute type on the same line as the attribute identifier, and they're separated from each other by whitespace. Flags can show up in any order after the attribute type. Other information must not follow the flags, and only one flag identifier of a particular flag type is allowed per attribute definition π
Here's what the flags mean β¨
oorOπ This marks the attribute as optional. If this flag is missing, the attribute is required in every service registration.morMπ This means the attribute can take on multiple values. If this flag is there, every value in a multi-valued attribute has the same type as the type given in the type part of the attribute definition. Boolean attributes must not include this flag.lorLπ This means the attribute is literal, which means it isn't meant to be translated into other languages. If this flag is there, the attribute isn't considered readable by people and should not be translated when the template is translated. Check Section 6 for more about translation πΈxorXπ₯ This means clients SHOULD include the indicated attribute in requests for services. Leaving this attribute out won't sufficiently differentiate the service. If services are obtained without selecting this attribute, they will quite likely be useless to the client π
The values for multivalued attributes are an unordered set. You can't delete individual values from a multivalued attribute, and deleting the attribute itself removes the entire set of values π¦
3.2.6.4. Default Value or List π§
If the attribute definition includes a default value, or a default values list for multivalued attributes, it starts on the second line of the attribute definition. It keeps going over the following lines until a line ends without a comma. Because of that, newlines can't be embedded in values unless they're escaped. See Section 2.1 π
Particular attribute types and definitions put limits on the default values list. Keyword attributes must not have a list of defaults. If an optional attribute's definition has an allowed values list, then a default value or list isn't optional anymore. It's required. The reason is that defining an attribute with an allowed values list is meant to restrict the values the attribute can take on, so requiring a default value or list makes sure the default is a member of the given set of allowed values π
The default value or list is what the attribute gets if no values are assigned to it when a service is registered. If an optional attribute's definition includes no default value or list, these defaults get assigned:
- String values are assigned the empty string.
- Integer values are assigned zero.
- Boolean values are assigned false.
- Opaque values are assigned a byte array containing no values.
- Multi-valued attributes are initialized with a single value.
For translating nonliteral attributes, the default values list is treated as an ordered set, and translations MUST maintain that order. πβ¨
3.2.6.5. Descriptive Text π
Okay so, right after the default values list (if there is one), you SHOULD include a block of descriptive text in the attribute definition π This text is for people to read, so it should have a short, informative description of the attribute. It can also give extra info, like what the allowed values look like. It's mainly designed for interactive browsing tools to show off π To set it apart from the rest of the definition, every line starts with a crosshatch character (#) π¦ But parsing and other tools shouldn't treat it as a comment, bestie, because it's a real, integral part of the attribute definition β¨ Inside that block, the text is transferred verbatim, indentation and line breaks and all, so any formatting survives π
3.2.6.6. Allowed Values List β¨
Finally, the attribute definition wraps up with an optional allowed values list π«Ά It comes after the descriptive text or, if the descriptive text isn't there, right after the initial values list. Its syntax is identical to the initial values list, and it also ends with a line that does not end in a comma. If the allowed values list is present, assignment to attributes is restricted to members of the list π₯
Just like the default values list, the allowed values list is also treated as an ordered set for translation purposes πΈ
3.2.6.7. Conclusion of An Attribute Definition π
An attribute definition concludes with a single empty line π And that's a wrap, bestie π
4. A Process For Standardizing New Service Types π
New service types can be suggested super simply, just by providing a service type template and a short description about how to use the service π The template MUST have its template-version template attribute set to 0.0.
MAJOR revision numbers come before the '.', and MINOR revision numbers come after it π¦
The minor version number goes up once with each change until it hits 1.0. There is no guarantee that any version of the service template is backward compatible before it reaches 1.0 π₯Ί
Once a service template has reached 1.0, the definition is "frozen" for that version βοΈ New templates must be defined, of course, to refine that definition, but the following rules must be followed:
A MINOR revision number signifies a compatible change. A MAJOR revision number signifies an incompatible change π This is formalized by these rules:
- Any new optional attribute defined for the template increases the minor version number by one. All other attributes for the version must continue to be supported as before. A client which supports
1.xcan still use later versions of1.y(wherex<y) as it ignores attributes it doesn't know about. - Adding a required attribute, removing support for an attribute, or changing the definition of an attribute requires changing the major version number of a service template. A client application may be unable to make use of this information, or it may need to obtain the most recent service template to help the user interpret the service information. π
The template is submitted to a special mailing list, see section 5. This document must include a 'template begins here' and 'template ends here' marking, in text, so that it is trivial to cut and paste the template from the submission βοΈ
The list will be available at svrloc-list@iana.org. Ideally, experts in the implementation and deployment of the particular protocol are consulted, so as to add or delete attributes or change their definition and make the template as useful as possible π§ The mailing list will be maintained even when the SVRLOC WG goes dormant, for the purpose of discussing service templates.
All published versions of the template must be available on-line, including obsolete ones π
Once consensus is achieved, the template should be reissued with possible corrections, having its Version number set to 1.0. Templates with version numbers below 1.0 are not submitted to the IANA. From that point onwards, templates are submitted. See Section 5 for details on how templates are submitted to an IANA registry of templates π·
5. IANA Considerations π·
It is the responsibility of the IESG (e.g., Applications Area director) to appoint a Designated Expert (see [12].) Anyone may ask for clarification of a service template. This is to solicit input from the concerned community. It is up to the appointed reviewer to determine whether clarification requests are satisfied. It is the reviewer's responsibility to see that all reasonable clarification requests are met before the template is submitted for inclusion in the IANA registry π
When the reviewer has determined that the template submission is ready, he or she will submit the template to the IANA for inclusion in a registry. Mailing list participants supply input to the process, but they do not make the decision whether to accept a service template π«Ά
If a dispute arises over the decisions made by the reviewer, the matter may be appealed according to normal IETF procedure, as described for the Standards Track process βοΈ
The IANA will maintain a mail forwarding alias for the work of this list, so that "svrloc-list@iana.org" points to a mail server supplied by a volunteer organization π
The service template submission MUST be of the form:
Name of submitter:
Language of service template:
Security Considerations:
Template Text:
----------------------template begins here-----------------------
. . .
-----------------------template ends here------------------------
The service template file has a naming convention:
<service-type> "." <version-no> "." <langtag>
Each of these fields are defined in Section 2. They correspond to the values of the template fields "type" and "template-version". The files for the example templates in this document (see Section A) are called:
"foo.0.0.en",
"Net-Transducer.0.0.en",
"Net-Transducer:Thermometer.0.0.de" and
"Net-Transducer:Thermomoter.0.0.en".
The reviewer will ensure that the template submission to IANA has the correct form and required fields π
No service type template will be accepted for inclusion in the service template registry unless the submission includes a security considerations section and contact information for the template document author π
The IANA will maintain a registry containing both the service type templates and the template description document containing the service type template, including all previous versions ποΈ The IANA will receive notice to include a service template in the registry by email from the reviewer. This message will include the service template itself, which is to be registered π¨
Neither the reviewer nor the IANA will take any position on claims of copyright or trademark issues with regard to templates π ββοΈ
6. Internationalization Considerations π
The service: URL must be encoded using the rules set forth in [5]. The character set encoding is limited to specific ranges within the US-ASCII character set [4] π€
The template is encoded in UTF-8 characters π
6.1. Language Identification and Translation π£οΈ
The language used in attribute strings should be identified by supplying a Language Tag [3] in the Service Template submission (see Section 5) π³οΈβπ
A program can translate a service registration from one language to another, provided it has both the template of the language for the registration and the template of the desired target language. All standardized attributes are in the same order in both templates. All non-arbitrary strings, including the descriptive help text, are directly translatable from one language to another. Non-literal attribute definitions, attribute identifiers, attribute type names, attribute flags, and the boolean constants "true" and "false" are never translated. Translation of attribute identifiers is prohibited because, as with domain names, they can potentially be part of a service: URL, and therefore their character set is restricted. In addition, as with variable identifiers in programming languages, they could become embedded into program code π€―
All strings used in attribute values are assumed translatable unless explicitly defined as being literal, so that best effort translation (see below) does not modify strings which are meant to be interpreted by a program, not a person π€
An example of a translated service template is included in Section A π§
There are two ways to go about translation: standardization and best effort.
When the service type is standardized, more than one document can be submitted for review. One service type description is approved as a master, so that when a service type template is updated in one language, all the translations (at least eventually) reflect the same semantics π
If no document exists describing the standard translation of the service type, a 'best effort' translation for strings should be done π«‘
7. Security Considerations π±
Service type templates provide information that is used to interpret information obtained by the Service Location Protocol. If these templates are modified or false templates are distributed, services may not correctly register themselves, or clients might not be able to interpret service information. That is a big deal, so please guard your templates like your diary π
The service: URLs themselves specify the service access point and protocol for a particular service type. These service: URLs could be distributed and point to a location for a service other than the one clients normally want to use π¨ The Service Location Protocol [10] distributes service: URLs and has an authentication mechanism that allows service: URLs of registered services to be signed, and for the signatures to be verified by clients βοΈ
Each Service Template will include a security considerations section, which will describe security issues with using the service scheme for the specific Service Type π‘οΈ
A. Service Template Examples π§
The text in the template example sections is to be taken as being a single file. They are completely fictitious (ie. the examples do not represent real services) π¦
The FOO example shows how to use service templates for an application that has very few attributes. Clients request the FOO server where their user data is located by including their user name as the value of the user attribute π
The Net-Transducer example shows how abstract service types are defined and how a corresponding concrete instance is defined. A system might support any of several NetTransducer services. Here we give only one concrete instance of the abstract type π
It is not necessary to register concrete templates for an abstract service type if the abstract service type template is completely clear as to what possible values can be used as a concrete type, and what their interpretation is π
A.1. FOO
Okay bestie, here's the FOO service template submission example π
Name of submitter: "Erik Guttman" <Erik.Guttman@sun.com>
Language of service template: en
Security Considerations:
If the USER and GROUPS attributes are included a
possibility exists that the list of identities for users or groups
can be discovered. This information would otherwise be difficult
to discover.
Template Text:
-------------------------template begins here-----------------------
template-type=FOO
template-version=0.0
template-description=
The FOO service URL provides the location of an FOO service.
template-url-syntax=
url-path= ; There is no URL path defined for a FOO URL.
users= string M L O
# The list of all users which the FOO server supports.
groups= string M L O
# The list of all groups which the FOO server supports.
--------------------------template ends here------------------------
Now this template could get a German glow-up too π by registering another version, say in German:
Name of submitter: "Erik Guttman" <Erik.Guttman@sun.com>
Language of service template: de
Security Considerations:
Wenn die USER und GROUPS Eigenschaften inbegriffen sind,
besteht die Moeglichkeit, dass die Liste der Identitaeten
von Benutzern oder Gruppen endeckt werden kann. Diese
Information wurde unter anderen Umstaenden schwierig zu
entdecken sein.
Template Text:
-------------------------template begins here-----------------------
template-type=FOO
template-version=0.0
template-description=
Der FOO Service URL zeigt die Stelle von einem Foo Service an.
template-url-syntax=
url-path= ; Es gibt keinen fuer den FOO URL definierten Pfad.
users= string M L O
# Die Liste aller Users, die der FOO Server unterstuetzt.
groups= string M L O
# Die Liste aller Gruppen, die der FOO Server unterstuetzt.
--------------------------template ends here------------------------
Note that the attribute tags are not translated. β¨ If translations are desired, the suggested convention is to define a separate attribute called localize-<tag> for each attribute tag you want to localize. This will aid in displaying the attribute tags in a human interface π«Ά
For example, in the case above, the following two attributes could be defined:
localize-users= string
Benutzer
localize-groups= string
Gruppen
The attributes (in SLPv2 attribute list format) for a service registration of a FOO service based on this template, in German, could be:
(users=Hans,Fritz),(groups=Verwaltung,Finanzbuchhaltung),
(template-type=FOO),(template-version=0.0),(template-description=
Der FOO Service URL zeigt die Stelle von einem Foo Service an.),
(template-url-syntax= \OD url-path= ; Es gibt kein fuer den FOO
URL definiert Pfad. \OD),(localize-users=Benutzer),
(localize-groups=Gruppen)
Anyone who gets these attributes could display Benutzer=Hans,Fritz in a human interface using the included information π§ Note that the template attributes have been included in this registration. This is OPTIONAL, but it makes it possible to discover which template was used to register the service. Iconic, right? π
A.2. Abstract Service Type: Net-Transducer
An example submission of an abstract service type template is:
Name of submitter: "Erik Guttman" <Erik.Guttman@sun.com>
Language of service template: en
Security Considerations:
See the security considerations of the concrete service types.
Template Text:
-------------------------template begins here-----------------------
template-type=Net-Transducer
template-version=0.0
template-description=
This is an abstract service type. The purpose of the Net-
Transducer service type is to organize into a single category
all network enabled Transducers which have certain properties.
template-url-syntax=
url-path= ; Depends on the concrete service type.
; See these templates.
sample-units= string L
# The units of sample that the Transducer provides, for instance
# C (degrees Celsius), V (Volts), kg (Kilograms), etc.
sample-resolution= string L
# The resolution of the Transducer. For instance, 10^-3 means
# that the Transducer has resolution to 0.001 unit.
sample-rate= integer L
# The speed at which samples are obtained per second. For
# instance 1000 means that one sample is obtained every millisecond.
--------------------------template ends here------------------------
A.3. Concrete Service Type: Net-Transducer:Thermometer
This is another service template submission example πΈ It supplies a concrete service type that matches the abstract template above.
Name of submitter: "Erik Guttman" <Erik.Guttman@sun.com>
Language of service template: en
Security Considerations:
There is no authentication of the Transducer output. Thus,
the Thermometer output could easily be spoofed.
Template Text:
-------------------------template begins here-----------------------
template-type=service:Net-Transducer:Thermometer
template-version=0.0
template-description=
The Thermometer is a Net-Transducer capable of reading temperature.
The data is read by opening a TCP connection to one of the ports
in the service URL and reading an ASCII string until an NULL
character is encountered. The client may continue reading data at
no faster than the sample-rate, or close the connection.
template-url-syntax=
url-path = "ports=" ports-list
port-list = port / port "," ports
port = 1*DIGIT
; See the Service URL <port> production rule.
; These are the ports connections can be made on.
location-description=string
# The location where the Thermometer is located.
operator=string O
# The operator to contact to have the Thermometer serviced.
--------------------------template ends here------------------------
A.4. service: URLs and SLP
A user with an FOO enabled calendar application should not have to know the address of their FOO server π The calendar client program can use SLP to get the FOO service URL automatically, say service:foo://server1.nosuch.org, by issuing a Service Request. If that FOO server fails, the calendar client can issue the same service request again to find the backup FOO server, say service:foo://server2.nosuch.org. In both cases, the service: URL conforms to the FOO service template, and so do the associated attributes (user and group.) Main character energy π
A network thermometer based on the above template could be advertised with the SLPv2 attribute list:
URL = service:net-transducer:thermometer://v33.test/ports=3211
Attributes = (location-description=Missile bay 32),
(operator=Joe Agent), (sample-units=C),
(sample-resolution=10^-1),(sample-rate=10),
(template-type=service:net-transducer:thermometer),
(template-version=0.0),(template-description=
The Thermometer is a Net-Transducer capable of reading temperature.
The data is read by opening a TCP connection to one of the ports
in the service URL and reading an ASCII string until an NULL
character is encountered. The client may continue reading data at
no faster than the sample-rate, or close the connection.),
(template-url-syntax= \0D "ports=" port-list \OD
port-list = port / port "," ports \OD
port = 1*DIGIT \OD
; See the Service URL <port> production rule. \OD
; These are the ports connections can be made on.\OD)
This could be super useful for a technician who wanted to find Thermometers in Missile bay 32, for example π₯
Note that the template attributes are advertised. The template-url-syntax value requires explicit escaped CR characters so that the ABNF syntax is correct. Details matter, bestie π
B. Acknowledgments
Huge thanks to Michael Day and Leland Wallace for helping with the IPX and AppleTalk address syntax portions π¦ Ryan Moats gave valuable feedback throughout the writing of this document, so shoutout to him too π«Ά
C. References
[1] Protocol and service names, October 1994. ftp://ftp.isi.edu/in-notes/iana/assignments/service-names.
[2] Port numbers, July 1997. ftp://ftp.isi.edu/in-notes/iana/assignments/port-numbers.
[3] Alvestrand, H., "Tags for the Identification of Languages", RFC 1766, March 1995.
[4] ANSI. Coded Character Set -- 7-bit American Standard code for Information Interchange. X3.4-1986, 1986.
[5] Berners-Lee, T., Fielding, R. and L. Masinter, "Uniform Resource Identifiers (URI): Generic Syntax", RFC 2396, August 1998.
[6] Bradner, S., "Key Words for Use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
[7] Apple Computer. Inside Macintosh. Addison-Wesley, 1993.
[8] Crocker, D. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", RFC 2234, November 1997.
[9] S. Gursharan, R. Andrews, and A. Oppenheimer. Inside AppleTalk. Addison-Wesley, 1990.
[10] Guttman, E., Perkins, C., Veizades, J. and M. Day, "Service Location Protocol Version 2", RFC 2608, June 1999.
[11] Myers, J., "Simple Authentication and Security Layer (SASL)", RFC 2222, October 1997.
[12] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs, BCP 26, RFC 2434, October 1998
[13] Newman C. and J. Myers, "ACAP -- Application Configuration Access Protocol", RFC 2244, November 1997.
[14] Inc Novell. IPX RIP and SAP Router Specification. Part Number 107-000029-001, Version 1.30, May 1996.
[15] Veizades, J., Guttman, E., Perkins, C. and S. Kaplan, "Service Location Protocol", RFC 2165, July 1997.
[16] Yergeau, F., "UTF-8, a transformation format of ISO 10646", RFC 2279, January 1998.
D. Authors' Addresses
Questions about this memo can be directed to the folks below π
Erik Guttman
Sun Microsystems
Bahnstr. 2
74915 Waibstadt
Germany
Phone: +49 7263 911484
Fax: +1 650 786 5992
EMail: erik.guttman@sun.com
Charles E. Perkins
Sun Microsystems
15 Network Circle
Menlo Park, CA 94303
USA
Phone: +1 650 786 6464
Fas: +1 650 786 6445
EMail: cperkins@sun.com
James Kempf
Sun Microsystems
15 Network Circle
Menlo Park, CA 94303
USA
Phone: +1 650 786 5890
Fax: +1 650 786 6445
EMail: james.kempf@sun.com
E. Full Copyright Statement π
Copyright (C) The Internet Society (1999). All Rights Reserved. π
okay so this part is the legal bit, but it's still lowkey important π You can copy this document and pass it around to other people, and you can translate it. You can also write your own stuff that comments on it, explains it, or helps people implement it, and you can publish and distribute that stuff, all or partly, with no restrictions at all. The one catch is that the copyright notice and this paragraph have to stay on every copy and every derivative work π«Ά
What you can't do is change this document itself. Like, you can't delete the copyright notice or the references to the Internet Society or other Internet organizations. There are two exceptions: developing Internet standards, where you have to follow the copyright procedures in the Internet Standards process, and translating it into languages other than English πΈ
The permissions here are perpetual, meaning they don't expire, and the Internet Society or anyone who takes over from them can't take them back β¨
This document and everything in it is provided "AS IS" π THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED. That includes, but isn't limited to, any promise that using the information won't infringe anyone's rights, and 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: rfc2609 1999-06
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms