<metaname="dct.abstract"content="This document describes the format used by SightingDB to give automated context to a given Attribute by counting occurrences and tracking times of observability. SightingDB was designed to provide to MISP a Scalable and Fast way to store and retrieve Attributes."/>
<metaname="description"content="This document describes the format used by SightingDB to give automated context to a given Attribute by counting occurrences and tracking times of observability. SightingDB was designed to provide to MISP a Scalable and Fast way to store and retrieve Attributes."/>
<p>This document describes the format used by SightingDB to give automated context to a given Attribute by counting occurrences and tracking times of observability. SightingDB was designed to provide to MISP a Scalable and Fast way to store and retrieve Attributes.</p>
<h1id="rfc.status"><ahref="#rfc.status">Status of This Memo</a></h1>
<p>This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.</p>
<p>Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.</p>
<p>Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."</p>
<p>This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) 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.</p>
<hrclass="noprint"/>
<h1class="np"id="rfc.toc"><ahref="#rfc.toc">Table of Contents</a></h1>
<ulclass="toc">
<li>1. <ahref="#rfc.section.1">Introduction</a>
</li>
<ul><li>1.1. <ahref="#rfc.section.1.1">Conventions and Terminology</a>
<pid="rfc.section.1.p.1">Adding context to any Attribute is the key that makes it useful. While there exist numerous ways of doing it, SightingDB does it by just counting. Whenever somebody retrieves an Attribute, this counting is provided, allowing anyone to understand whenever something was observed few or many times.</p>
<h1id="rfc.section.1.1">
<ahref="#rfc.section.1.1">1.1.</a><ahref="#conventions-and-terminology"id="conventions-and-terminology">Conventions and Terminology</a>
</h1>
<pid="rfc.section.1.1.p.1">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 <ahref="#RFC2119"class="xref">[RFC2119]</a>.</p>
<pid="rfc.section.2.1.p.1">The SightingDB format is in JSON <ahref="#RFC8259"class="xref">[RFC8259]</a> format and used to query a SightingDB compatible connector. In SightingDB, a Sighting Object is composed of a single JSON object. This object contains the following fields: value, first<em>seen, last</em>seen, count, tags, ttl and consensus.</p>
<pid="rfc.section.2.1.1.p.1">The fields described previously describe an Attribute and all the required characteristics. However they are stored in a Namespace. A Namespace is similar to a path in a file-system where the same file can be stored in multiple places.</p>
<pid="rfc.section.2.1.2.p.1">A Namespace with multiple levels MUST be separated with the slash '/' character. There is no specification on how they are structured, since it depends on the use cases.</p>
<pid="rfc.section.2.1.2.p.2">A Namespace starting with the underscore '_' character means it is private and internal to SightingDB. There are all reserved for the engine and MUST NOT be used.</p>
<pid="rfc.section.2.1.3.1.p.1">The attribute value, used to store and retrieve information about an attribute. Note that value is not returned back in the JSON object, since it is queried, it is known. The Value is described in a section below, as it is very specific and can be either "as is", a hash, encoded in base64 or any other convenient mechanism.</p>
<pid="rfc.section.2.1.3.1.p.2">The value implementation MUST offer at least: 1) Raw value 2) Base64 URL Encoded 3) SHA256 Hash</p>
<pid="rfc.section.2.1.3.6.p.1">Time To Live, represents the expiration in seconds since the time the Attribute was created. Once it has expired, it moves in the private Namespace _expired.</p>
<pid="rfc.section.2.1.3.6.p.2">When an Attribute has this field set to 0, it means it is not set to expired. This is the default behavior.</p>
<pid="rfc.section.2.1.3.6.p.3">When an Attribute has this field set to a number greater than 0, the expiration status is computed only at retrieval time.</p>
<pid="rfc.section.2.1.3.7.p.1">When a given Attribute Value is stored in different namespaces, the consensus field keeps track of them so it returns in how many different places this attributes exists. This is a simple counter.</p>
<pid="rfc.section.2.3.p.1">The value submitted can be in multiple format according to the use-case. Any implementation MUST offer three alternatives:</p>
<pid="rfc.section.2.3.p.2">1) Raw value: where nothing is encoded and the value is stored AS IS, such as show in the example above with the One Attribute in JSON.</p>
<pid="rfc.section.2.3.p.3">2) SHA256: which prevents from seeing content (see Security Considerations), has a fixed size and is convenient for most requirements</p>
<pid="rfc.section.2.3.p.4">3) Base64 URL: Where the specification of Base64 is followed, except the characters conflicting with an URL argument are replaced</p>
<pid="rfc.section.2.3.p.5">The value is configured as part of the Namespace. The private "_config" Namespace prefix stores this value storage mechanism.</p>
<h1id="rfc.section.2.3.1">
<ahref="#rfc.section.2.3.1">2.3.1.</a><ahref="#configuring-the-value-format-for-a-namespace"id="configuring-the-value-format-for-a-namespace">Configuring the value format for a Namespace</a>
</h1>
<pid="rfc.section.2.3.1.p.1">If one has the Namespace "/Organization1/BU1/ip" and want to store those IP addresses in SHA256, it will be configured like this: The Namespace is kept but prefixed by "<em>config" and has a json object about value format set. "/</em>config/Organization1/BU1/ip"</p>
<pre>{
"value_format":"SHA256"
}
</pre>
<pid="rfc.section.2.3.1.p.2">Where "value_format" is either: "SHA256", "RAW" or "BASE64URL".</p>
<pid="rfc.section.2.4.p.1">When data must be sent and received in large amounts, it is preferable to embed in JSON all the objects at once. As such, for reading and writing, the format is the following:</p>
<pid="rfc.section.2.4.p.3">namespace: is the wanted namespace where to store the value</p>
<pid="rfc.section.2.4.p.4">value: the value one want to track</p>
<pid="rfc.section.2.4.p.5">timestamp: OPTIONAL epoch timestamp to set the value at.</p>
<pid="rfc.section.2.4.p.6">The timestamp is how one can use SightingDB and use old datasets where the first seen and last seen is not relative to "right now".</p>
<pid="rfc.section.3.p.1">While this document solely focuses on the format, the reference implementation is SightingDB. The authentication, the data access is not handled by SightingDB. It is possible a value can leak if the access is too permissive.</p>
<pid="rfc.section.3.p.2">Even a Hashed value can be discovered, as re-hashing known values would match.</p>
<pid="rfc.section.4.p.1">The author wish to thank all the MISP community who are supporting the creation of open standards in threat intelligence sharing. As well as amazing feedback gathered during the MISP Summit 2019 in Luxembourg, in particular with Alexandre Dulaunoy and Andras Iklody.</p>
<a>Bradner, S.</a>, "<ahref="https://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a>", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997.</td>