Configuration of Access Control Policy in REsource LOcation And Discovery (RELOAD) Base ProtocolStonyfish, Inc.petithug@acm.org
This document describes an extension to the REsource LOcation And Discovery (RELOAD) base protocol to distribute the code of new Access Control Policies without having to upgrade the RELOAD implementations in an overlay.
The RELOAD base protocol specifies an Access Control Policy as "defin[ing] whether a request from a given node to operate on a given value should succeed or fail."
The paragraph continues saying that "[i]t is anticipated that only a small number of generic access control policies are required", but there is indications that this assumption will not hold.
On all the RELOAD Usages defined in other documents than the RELOAD base protocol, roughly 50% defines a new Access Control Policy.
The problem with a new Access Control Policy is that, because it is executed when a Store request is processed, it needs to be implemented by all the peers and so requires an upgrade of the software.
This is something that is probably not possible in large overlays or on overlays using different implementations.
For this reason, this document proposes an extension to the RELOAD configuration document that permits to transport the code of a new Access Control Policy to each peer.
This extension defines a new element <access-control-code> that can be optionally added to a <kind> element in the configuration document.
The <access-control-code> element contains ECMAScript code that will be called for each StoredData object in a StoreReq processed by a peer.
The code receives four parameters, corresponding to the Resource-ID, Signature, Kind and StoredDataValue of the value to store.
The code returns true or false to signal to the implementation if the request should succeed or fail.
For example the USER-MATCH Access Control Policy defined in the base protocol could be redefined by inserting the following code in an <access-control-code> element:The <kind> parameters are also passed to the code, so the NODE-MULTIPLE Access Control Policy could be implemented like this: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 peer receiving a <kind> definition containing an access-control-code elemtn , either by retrieving it from the configuration server or in a ConfigUpdateReq message, MUST reject this configuration if the kind element is not signed or if the signature verification fails.
If the <access-control-code> element is present in the namespace allocated to this specification, and the Access Control Policy is not natively implemented, then the code inside the element MUST be called for each DataValue found in a received StoreReq for this Kind.
For each call to the code, the following ECMAScript objects, properties and functions MUST be available:
An opaque object representing the Resource-ID, as an array of bytes.
A function that returns true if hashing the concatenation of the arguments according to the mapping function of the overlay algorithm is equal to the Resource-ID.
Each argument is an array of bytes.
The rfc822Name stored in the certificate that was used to sign the request, as a String object.The Node-ID stored in the certificate that was used to sign the request, as an array of bytes.The id of the Kind associated with the entry, as a Number object.
If the Kind associated with the entry is registered by IANA, contains the name as a String object.
If not, this property is undefined.
The name of the Data Model associated with the entry, as a String object.The name of the Access Control Policy associated with the entry, as a String object.The value of the max-count element in the configuration file, as a Number object.The value of the max-size element in the configuration file as a Number object.
If the Access Control is MULTIPLE-NODE, contains the value of the max-node-multiple element in the configuration file, as a Number object.
If not, this property is undefined.
If the Data Model is ARRAY, contains the index of the entry, as a Number object.
If not, this property is undefined.
If the Data Model is DICTIONARY, contains the key of the entry, as an array of bytes.
If not, this property is undefined.
The date and time used to store the entry, as a Date object.The validity for the entry in seconds, as a Number object.Indicates if the entry value exists, as Boolean object.This property contains an opaque object that represents the whole data, as an array of bytes.
The properties SHOULD NOT be modifiable or deletable and if they are, modifying or deleting them MUST NOT modify or delete the equivalent internal values (in other words, the code cannot be used to modify the elements that will be stored).
The value returned by the code is evaluated to true or false, according to the ECMAScript rules.
If the return value of one of the call to the code is evaluated to false, then the StoreReq fails, the state MUST be rolled back and an Error_Forbidden MUST be returned.
TBDNo IANA considerations.This document was written with the xml2rfc tool described in .Key words for use in RFCs to Indicate Requirement LevelsHarvard University1350 Mass. Ave.CambridgeMA 02138- +1 617 495 3864sob@harvard.edu
General
keyword
In many standards track documents several words are used to signify
the requirements in the specification. These words are often
capitalized. This document defines these words as they should be
interpreted in IETF documents. Authors who follow these guidelines
should incorporate this phrase near the beginning of their document:
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.
Note that the force of these words is modified by the requirement
level of the document in which they are used.
REsource LOcation And Discovery (RELOAD) Base ProtocolThis specification defines REsource LOcation And Discovery (RELOAD), a peer-to-peer (P2P) signaling protocol for use on the Internet. A P2P signaling protocol provides its clients with an abstract storage and messaging service between a set of cooperating peers that form the overlay network. RELOAD is designed to support a P2P Session Initiation Protocol (P2PSIP) network, but can be utilized by other applications with similar requirements by defining new usages that specify the kinds of data that must be stored for a particular application. RELOAD defines a security model based on a certificate enrollment service that provides unique identities. NAT traversal is a fundamental service of the protocol. RELOAD also allows access from "client" nodes that do not need to route traffic or store data for others. Legal THIS DOCUMENT AND THE INFORMATION CONTAINED THEREIN ARE PROVIDED ON AN "AS IS" BASIS AND THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST, AND THE INTERNET ENGINEERING TASK FORCE, DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION THEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.ECMAScript Language Specification 3rd EditionWriting I-Ds and RFCs using XMLInvisible Worlds, Inc.660 York StreetSan FranciscoCA94110US+1 415 695 3975mrose@not.invisible.nethttp://invisible.net/
General
RFCRequest for CommentsI-DInternet-DraftXMLExtensible Markup LanguageThis memo presents a technique for using XML
(Extensible Markup Language)
as a source format for documents in the Internet-Drafts (I-Ds) and
Request for Comments (RFC) series.Service Discovery Usage for REsource LOcation And Discovery (RELOAD)REsource LOcation and Discovery (RELOAD) does not define a generic service discovery mechanism as part of the base protocol. This document defines how the Recursive Distributed Rendezvous (ReDiR) service discovery mechanism used in OpenDHT can be applied to RELOAD overlays to provide a generic service discovery mechanism.A Usage for Shared Resources in RELOAD (ShaRe)This document defines a RELOAD Usage for shared write access to RELOAD Resources. Shared Resources in RELOAD (ShaRe) form a basic primitive for enabling various coordination and notification schemes among distributed peers. Access in ShaRe is controlled by a hierarchical trust delegation scheme maintained within an access list. A new USER-CHAIN-ACL access policy allows authorized peers to write a Shared Resource without owning its corresponding certificate. This specification also adds mechanisms to store Resources with a variable name which is useful whenever peer-independent rendezvous processes are required.This section shows the ECMAScript code that could be used to implement the standard Access Control Policies defined in .[[Note that base-13 do not state exactly the length of i when concatenated in the hash input]] defines a specific Access Control Policy (NODE-ID-MATCH) that need to access the content of the entry to be written.
If implemented as specified by this document, the <kind> element would look something like this:
Note that the code for the BigNumber object was removed from this example, as the licensing terms are unclear.
The code is available at .
The branching-factor variable in the code must match the <redirBranchingFactor> element, which is not accessible to the code.
The signer of the kind must be sure that the two match.
This section must be removed before publication as an RFC.Made clear that an unsigned kind with this extension must be rejected.
Removed the kind.params array, and converted the max-count, max-size and max-node-multiple as Number objects.
Fixed the examples.
Removed the parsing of extensions in the kind element.
The former system did not work with namespaces or attributes, and the right solution (xpath) is probably too complex.
The value of the parameters can still be manually mirrored in the script, so there is perhaps no need for the added complexity.
Also fixed the examples.
Reference draft-p2psip-share instance of draft-p2psip-disco.Added a "Running Code Considerations" section that contain the reference to the reference implementation and script tester.NitsChanged reference from JavaScript to ECMAScript.Changed signature from equals() to equalsHash().Fixed the examples following implementation.Replaced automatic decoding of value by ECMAScript code.Added the type of each property.Specified that the code cannot be used to modify the value stored.
Reference Implementation and Access Control Policy script tester (<http://debian.implementers.org/testing/source/reload.tar.gz>).
Marc Petit-Huguenin.
Implements version -02.
Need to convert ShaRe Usages USER-CHAIN-ACL and USER-PATTERN-MATCH.