This repository was archived by the owner on Mar 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
PayID Aliases #26
Open
elmurci
wants to merge
1
commit into
PayString:master
Choose a base branch
from
elmurci:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
PayID Aliases #26
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,194 @@ | ||
--- | ||
coding: utf-8 | ||
|
||
title: PayID Aliases | ||
docname: draft-romero-payid-aliases-01 | ||
category: std | ||
|
||
pi: [toc, sortrefs, symrefs, comments] | ||
smart_quotes: off | ||
|
||
area: security | ||
author: | ||
|
||
- | ||
ins: J. Romero | ||
name: Javi Romero | ||
org: Ripple | ||
street: 315 Montgomery Street | ||
city: San Francisco | ||
region: CA | ||
code: 94104 | ||
country: US | ||
|
||
normative: | ||
RFC2119: | ||
RFC3629: | ||
RFC3986: | ||
RFC5234: | ||
RFC5890: | ||
RFC5892: | ||
RFC8264: | ||
PAYID-DISCOVERY: | ||
title: "The PayID Discovery Protocol" | ||
target: https://tbd.example.com/ | ||
author: | ||
ins: D. Fuelling | ||
fullname: David Fuelling | ||
PAYID-PROTOCOL: | ||
title: "PayID Protocol" | ||
target: https://tbd.example.com/ | ||
author: | ||
- ins: A. Malhotra | ||
fullname: Aanchal Malhotra | ||
- ins: D. Schwartz | ||
fullname: David Schwartz | ||
VERIFIABLE-PAYID: | ||
title: "Verifiable PayID Protocol" | ||
target: https://tbd.example.com/ | ||
author: | ||
- ins: A. Malhotra | ||
fullname: Aanchal Malhotra | ||
- ins: D. Schwartz | ||
fullname: David Schwartz | ||
UNICODE: | ||
title: "The Unicode Standard" | ||
target: http://www.unicode.org/versions/latest/ | ||
author: | ||
surname: The Unicode Consortium | ||
fullname: The Unicode Consortium | ||
|
||
informative: | ||
|
||
--- note_Feedback | ||
This specification is a draft proposal and is part of the | ||
[PayID Protocol](https://payid.org/) initiative. Feedback related to this | ||
document should be sent in the form of a Github issue at: | ||
https://github.com/payid-org/rfcs/issues. | ||
|
||
--- abstract | ||
This specification defines the 'payid' aliases. | ||
|
||
--- middle | ||
|
||
# Introduction | ||
|
||
Although the PayID protocol supports returning multiple addresses in the Payment Account Information Response for a given Network and Environment, | ||
it might be useful to users to be able to create groups within a PayID that can separate accounts by its purpose or use. | ||
|
||
Gmail addresses offer a feature called aliasing that allows the same address to receive emails on some variations of the original address. | ||
For example, if a user owns `[email protected]` emails sent to the following addresses will all resolve to the primary address: | ||
|
||
[email protected] | ||
[email protected] | ||
[email protected] | ||
... | ||
|
||
This kind of feature would be useful in the PayID context, allowing the user to create aliases and group accounts depending on its use or purpose. | ||
|
||
# Terminology | ||
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | ||
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and | ||
"OPTIONAL" in this document are to be interpreted as described in | ||
[RFC2119][]. | ||
|
||
# Definition | ||
|
||
Create the concept of PayID aliases that will allow the user to create PayID aliases linked to the primary one. | ||
For example, by owning `alice$example.com` could allow the user to generate multiple aliases as needed: | ||
|
||
alice+main$example.com | ||
alice+savings$example.com | ||
alice+crypto$example.com | ||
... | ||
|
||
So, in this example, "alice+main$example.com === alice+savings$example.com === alice+crypto$example.com". | ||
|
||
This approach implies that you will get back different payment details for alice+main than you would for alice+savings, for the same Network, Environment tuple. | ||
There will be a "wall" between aliases, so the only way to retrieve an address within "alice+savings$example.com" will be to request the "savings" alias. | ||
Requests made to the main group ("alice$example.com") will not return addresses linked to other aliases. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there any way to get back information for all associated aliases for |
||
|
||
Registrations of PayID variations after the plus sign should be blocked and return an error. | ||
|
||
The syntax convention could allow further features like the generation of single use / one time PayID's or assignment of different policies to different accounts under the same PayID. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. one-time PayIDs |
||
|
||
# Examples | ||
A user with an account name of "alice" at a wallet | ||
service "example.com" will have a primary group of addresses under "[email protected]". | ||
A request to the PayID server might look like this: | ||
|
||
GET /alice HTTP/1.1 | ||
Host: example.com | ||
Accept: application/xrpl-mainnet+json | ||
PayID-version: 1.0 | ||
|
||
And the response: | ||
|
||
HTTP/1.1 200 OK | ||
Content-Type: application/json | ||
Content-Length: 403 | ||
PayID-version: 1.0 | ||
Cache-Control: max-age=0 | ||
Server: Apache/1.3.11 | ||
{ | ||
"payId" : "alice$example.com", | ||
"addresses" : | ||
[ | ||
{ | ||
"paymentNetwork" : "xrpl", | ||
"environment" : "mainnet", | ||
"addressDetailsType" : "CryptoAddressDetails", | ||
"addressDetails" : { | ||
"address" : "XTVQWr6BhgBLW2jbFyqqufgq8T9eN7KresB684ZSHKQ3oDth" | ||
} | ||
} | ||
], | ||
"memo" : "Additional optional Information" | ||
} | ||
|
||
A request to retreive addreses linked to an alias might look like this: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. retrieve addresses |
||
|
||
GET /alice+savings HTTP/1.1 | ||
Host: example.com | ||
Accept: application/xrpl-mainnet+json | ||
PayID-version: 1.0 | ||
|
||
Returning a similar response: | ||
|
||
HTTP/1.1 200 OK | ||
Content-Type: application/json | ||
Content-Length: 403 | ||
PayID-version: 1.0 | ||
Cache-Control: max-age=0 | ||
Server: Apache/1.3.11 | ||
{ | ||
"payId" : "alice$example.com", | ||
"alias" : "savings", | ||
"addresses" : | ||
[ | ||
{ | ||
"paymentNetwork" : "xrpl", | ||
"environment" : "mainnet", | ||
"addressDetailsType" : "CryptoAddressDetails", | ||
"addressDetails" : { | ||
"address" : "XTVQWr6BhgBLW2jbFyqqufgq8T9eN7KresB684ZSHKQ3oDade" | ||
} | ||
} | ||
], | ||
"memo" : "Additional optional Information" | ||
} | ||
|
||
Let's say that the PayID server already holds an account for "bob" ("bob$example.com"). | ||
A request to create any variation with "bob" + "+" (plus sign) + "alias", for example "bob+crypto$example.com", should be blocked and return an error: | ||
|
||
HTTP/1.1 409 OK | ||
Content-Type: application/json | ||
Content-Length: 403 | ||
PayID-version: 1.0 | ||
Cache-Control: max-age=0 | ||
Server: Apache/1.3.11 | ||
{ | ||
"statusCode": 409, | ||
"error": "Conflict", | ||
"message": "There already exists a user with the provided PayID." | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example, by owning
alice$example.com
, the user could be allowed to generate multiple aliases as needed: