Opened 4 years ago

Last modified 2 years ago

#17387 new task

ExtraRelayDescriptorFields needs proposal number

Reported by: virgil Owned by:
Priority: Low Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-relay
Cc: virgil Actual Points:
Parent ID: Points: medium
Reviewer: Sponsor:

Description

Filename: ExtraRelayDescriptorFields.txt
Title: Adding X-namespace to extra-info descriptor for key:value pairs
Author: Virgil Griffith
Created: 2015-09-30
Status: Open


1. Motivation
We wish to allow developers to build new applications atop relays. Towards
this end, we wish to add the ability for users to specify arbitrary new
key-value entries under the "X-" namespace to the extra-info descriptor.
The canonical applications for this are adding a bitcoin donation address,
networking of tor2web nodes, and display operator information on a
Roster[1] page.


2. Proposal
Allow optional key-value lines in the relay's torrc file.

The following would be added to section 2.1.2 of the dir-spec [2]
(Extra-info document format):

========================================================
"X-" CustomKey SP CustomValue NL

CustomKeyChar = "a"-"z" / "0" - "9" / "-" / "_"
CustomKey = 1*32 CustomKeyChar

CustomValueChar = atext / specials
CustomValue = 1*1024 CustomValueChar

There can be multiple X-fields, for example...

X-bitcoin 19mP9FKrXqL46Si58pHdhGKow88SUPy1V8
X-gravatar https://s.gravatar.com/avatar/d27fce46c9ac41a41bb52455ae75701d
X-linkedin https://www.linkedin.com/in/virgilgr
X-keybase http://fncuwbiisyh6ak3i.onion/virgil
X-favoritequote Be excellent to each other.  Party on dudes!
X-foo bar

The same CustomKey appearing more than once is disallowed.
Possible values for CustomValueChar as specified per RFC 2822
sections 3.2.1 and 3.2.4 [3].

The sum size accounting for all such custom fields is truncated to 5
kilobytes.
========================================================

To mitigate the chance of a malformed torrc file, I additionally propose
that the relay descriptor be scanned and if it does not match the
specification, that it exit with error telling her torrc file is a likely
culprit.

References
[1] [http://tor-roster.org/ http://tor-roster.org]
[2] https://gitweb.torproject.org/torspec.git/tree/dir-spec.txt#n700
[3] https://www.ietf.org/rfc/rfc2822.txt

Child Tickets

Change History (10)

comment:1 Changed 4 years ago by virgil

Modified for clarity as well as feedback from isis.

=====

Filename: ExtraRelayDescriptorFields.txt

Title: Adding X-namespace to extra-info descriptor for key:value pairs

Author: Virgil Griffith

Created: 2015-09-30

Status: Open

1. Motivation

We wish to allow developers to build new applications atop relays. Towards

this end, we wish to add the ability for users to specify arbitrary new

key-value entries under the "X-" namespace to the extra-info descriptor.

The canonical applications for this are adding a bitcoin donation address,

networking of tor2web nodes, and display operator information on a

Roster[1] page.

2. Proposal

Allow optional key-value lines in the relay's extra-info descriptor.  These key-value pairs are specified in the relay's torrc file.

The following would be added to section 2.1.2 of the dir-spec [2] (extra-info document format):

========================================================

"X-" CustomKey SP CustomValue NL

CustomKeyChar = "a"-"z" / "0" - "9" / "-" / "_"

CustomKey = 1*32 CustomKeyChar

CustomValueChar = atext / specials

CustomValue = 1*1024 CustomValueChar

There can be multiple X-fields, for example...

X-bitcoin 19mP9FKrXqL46Si58pHdhGKow88SUPy1V8

X-gravatar https://s.gravatar.com/avatar/d27fce46c9ac41a41bb52455ae75701d

X-keybase http://fncuwbiisyh6ak3i.onion/virgil

X-favoritequote Be excellent to each other.  Party on dudes!

X-foo bar

The same CustomKey appearing more than once is disallowed. Possible values for CustomValueChar as specified per RFC 2822 sections 3.2.1 and 3.2.4 [3].

The sum size accounting for all such custom fields is truncated to 5 kilobytes.

========================================================

To mitigate the chance of an unintentionally malformed torrc file, I additionally propose that the extra-info descriptor be parsed by the client and if it does not match the specification, tor exits with error that a malformed torrc file is the likely culprit.

References

[1] http://tor-roster.org

[2] https://gitweb.torproject.org/torspec.git/tree/dir-spec.txt#n700

[3] https://www.ietf.org/rfc/rfc2822.txt

comment:2 Changed 4 years ago by nickm

Milestone: Tor: 0.2.8.x-final

comment:3 Changed 4 years ago by nickm

Priority: MediumLow

comment:4 Changed 4 years ago by nickm

Milestone: Tor: 0.2.8.x-finalTor: 0.2.9.x-final

Throw most 0.2.8 "NEW" tickets into 0.2.9. I expect that many of them will subsequently get triaged out.

comment:5 Changed 3 years ago by nickm

Points: medium

comment:6 Changed 3 years ago by isabela

Milestone: Tor: 0.2.9.x-finalTor: 0.2.???

tickets market to be removed from milestone 029

comment:7 Changed 3 years ago by teor

Milestone: Tor: 0.2.???Tor: 0.3.???

Milestone renamed

comment:8 Changed 3 years ago by nickm

Keywords: tor-03-unspecified-201612 added
Milestone: Tor: 0.3.???Tor: unspecified

Finally admitting that 0.3.??? was a euphemism for Tor: unspecified all along.

comment:9 Changed 2 years ago by nickm

Keywords: tor-03-unspecified-201612 removed

Remove an old triaging keyword.

comment:10 Changed 2 years ago by nickm

Keywords: tor-relay added
Note: See TracTickets for help on using tickets.