Skip to content

Commit a3e261d

Browse files
mention group accounts as well as single-user accounts
1 parent c74bc6e commit a3e261d

File tree

3 files changed

+75
-74
lines changed

3 files changed

+75
-74
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* Servers may now offer any extension features they want.
1010
* Several mistakes in the text and wire examples were fixed.
1111
* Several confusing formulations in the text were improved.
12+
* Mention "group accounts", to which multiple human users have access.
1213

1314
# draft-dejong-remotestorage-03.txt
1415

draft-dejong-remotestorage-04.txt

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,17 @@ Table of Contents
7272
12.1. WebFinger................................................12
7373
12.2. OAuth dialog form........................................13
7474
12.3. OAuth dialog form submission.............................14
75-
12.4. OPTIONS preflight........................................14
75+
12.4. OPTIONS preflight........................................15
7676
12.5. Initial PUT..............................................15
77-
12.6. Subsequent PUT...........................................15
77+
12.6. Subsequent PUT...........................................16
7878
12.7. GET......................................................16
7979
12.8. DELETE...................................................17
8080
13. Distributed versioning........................................17
8181
14. Security Considerations.......................................19
8282
15. IANA Considerations...........................................20
8383
16. Acknowledgments...............................................20
84-
17. References....................................................20
85-
17.1. Normative References.....................................20
84+
17. References....................................................21
85+
17.1. Normative References.....................................21
8686
17.2. Informative References...................................21
8787
18. Authors' addresses............................................22
8888

@@ -147,15 +147,14 @@ Internet-Draft remoteStorage December 2014
147147
* content type
148148
* content length
149149

150-
150+
For a document, the server stores, and should be able to produce:
151151

152152

153153
de Jong [Page 3]
154154

155155
Internet-Draft remoteStorage December 2014
156156

157157

158-
For a document, the server stores, and should be able to produce:
159158

160159
* current version
161160
* content type
@@ -198,14 +197,14 @@ Internet-Draft remoteStorage December 2014
198197
that content length is measured in octets (bytes), not in
199198
characters.
200199

200+
A folder description is a map containing a string-valued 'ETag'
201201

202202

203203
de Jong [Page 4]
204204

205205
Internet-Draft remoteStorage December 2014
206206

207207

208-
A folder description is a map containing a string-valued 'ETag'
209208
field, representing the folder's current version.
210209

211210
A successful GET request to a folder MUST be responded to with a
@@ -248,14 +247,14 @@ Internet-Draft remoteStorage December 2014
248247
the full document contents in the body, the document's content type
249248
in a 'Content-Type' header, its content length in octets (not in
250249
characters) in a 'Content-Length' header, and the document's current
250+
version as a strong ETag in an 'ETag' header.
251251

252252

253253
de Jong [Page 5]
254254

255255
Internet-Draft remoteStorage December 2014
256256

257257

258-
version as a strong ETag in an 'ETag' header.
259258

260259
Note that the use of strong ETags prohibits changing the response
261260
body based on request headers; in particular, the server will not be
@@ -300,6 +299,7 @@ Internet-Draft remoteStorage December 2014
300299

301300

302301

302+
303303
de Jong [Page 6]
304304

305305
Internet-Draft remoteStorage December 2014
@@ -329,7 +329,7 @@ Internet-Draft remoteStorage December 2014
329329
existing folder's name at the same level.
330330
* 412 for a conditional PUT or DELETE request whose pre-condition
331331
fails (see "Versioning" below),
332-
* 507 in case the user's account is over its storage quota,
332+
* 507 in case the account is over its storage quota,
333333
* 4xx for all malformed requests (e.g. foreign characters in the
334334
path), as well as for all PUT and DELETE requests to
335335
folders,
@@ -459,8 +459,9 @@ Internet-Draft remoteStorage December 2014
459459
10. Application-first bearer token issuance
460460

461461
To make a remoteStorage server available as 'the remoteStorage of
462-
<user> at <host>', exactly one link of the following format SHOULD
463-
be added to the WebFinger record [WEBFINGER] of <user> at <host>:
462+
<account> at <host>', exactly one link of the following format
463+
SHOULD be added to the WebFinger record [WEBFINGER] of <account> at
464+
<host>:
464465

465466
{
466467
"href": <storage_root>,
@@ -478,9 +479,11 @@ Internet-Draft remoteStorage December 2014
478479
presented.
479480

480481
If <auth-dialog> is a URL, the user can supply their credentials
481-
there (how, is out of scope), and allow or reject a request by the
482-
connecting application to obtain a bearer token for a certain list
483-
of access scopes.
482+
for accessing the account (how, is out of scope), and allow or
483+
reject a request by the connecting application to obtain a bearer
484+
token for a certain list of access scopes. Note that an account
485+
will often belong to just one human user, but may also belong to a
486+
group of multiple users (the remoteStorage of <group> at <host>).
484487

485488
If <auth-dialog> is null, the client will not have a way to obtain
486489
an access token, and SHOULD send all requests without Authorization
@@ -496,15 +499,15 @@ Internet-Draft remoteStorage December 2014
496499
token in the URI query parameter as per section 2.3 of [BEARER],
497500
instead of in the request header.
498501

499-
Another example is "http://tools.ietf.org/html/rfc7233" with a
500-
string value of "GET" if Content-Range headers are supported for
501-
502502

503503
de Jong [Page 10]
504504

505505
Internet-Draft remoteStorage December 2014
506506

507507

508+
509+
Another example is "http://tools.ietf.org/html/rfc7233" with a
510+
string value of "GET" if Content-Range headers are supported for
508511
GET requests as per [RANGE], "PUT" if they are supported for PUT
509512
requests, and "GET,PUT" if supported for both.
510513

@@ -528,7 +531,6 @@ Internet-Draft remoteStorage December 2014
528531
client_id parameter in favor of relying on the redirect_uri
529532
parameter for client identification.
530533

531-
532534
11. Storage-first bearer token issuance
533535

534536
The provider MAY also present a dashboard to the user, where they
@@ -546,21 +548,22 @@ Internet-Draft remoteStorage December 2014
546548
When the user gestures they want to use a certain application whose
547549
manifest is present on the dashboard, the dashboard SHOULD redirect
548550
to the application or open it in a new window. To mimic coming back
549-
from the OAuth dialog, it MAY add 'access_token' and 'scope'
550-
fields to the URL fragment.
551551

552552

553553
de Jong [Page 11]
554554

555555
Internet-Draft remoteStorage December 2014
556556

557557

558+
from the OAuth dialog, it MAY add 'access_token' and 'scope'
559+
fields to the URL fragment.
558560

559561
Regardless of whether 'access_token' and 'scope' are specified, it
560562
SHOULD add a 'remotestorage' field to the URL fragment, with a
561-
value of the form <user> '@' <host>. When the application detects
562-
this parameter, it SHOULD resolve the WebFinger record for <user> at
563-
<host> and extract the <storage_root> and <storage_api> information.
563+
value of the form <account> '@' <host>. When the application detects
564+
this parameter, it SHOULD resolve the WebFinger record for <account>
565+
at <host> and extract the <storage_root> and <storage_api>
566+
information.
564567

565568
If no access_token was given, then the application SHOULD also
566569
extract the <auth_endpoint> information from WebFinger, and continue
@@ -569,10 +572,10 @@ Internet-Draft remoteStorage December 2014
569572
Note that whereas a remoteStorage server SHOULD offer support for
570573
the application-first flow with WebFinger and OAuth, it MAY choose
571574
not to support the storage-first flow, provided that users will
572-
easily remember their <user> '@' <host> WebFinger address at that
575+
easily remember their <account> '@' <host> WebFinger address at that
573576
provider. Applications SHOULD, however, support both flows, which
574577
means checking the URL for a 'remotestorage' parameter, but giving
575-
the user a way to specify their WebFinger address if there is none.
578+
the user a way to specify the WebFinger address if there is none.
576579

577580
If a server provides an application manifest dashboard, then it
578581
SHOULD merge the list of applications there with the list of
@@ -596,15 +599,15 @@ Internet-Draft remoteStorage December 2014
596599
In application-first, an in-browser application might issue the
597600
following request, using XMLHttpRequest and CORS:
598601

599-
GET /.well-known/webfinger?resource=acct:michiel@michielbdejon\
600-
g.com HTTP/1.1
601-
602602

603603
de Jong [Page 12]
604604

605605
Internet-Draft remoteStorage December 2014
606606

607607

608+
609+
GET /.well-known/webfinger?resource=acct:michiel@michielbdejon\
610+
g.com HTTP/1.1
608611
Host: michielbdejong.com
609612

610613
and the server's response might look like this:
@@ -644,17 +647,17 @@ motestorage-04",
644647
end-point, it will typically redirect the user to this URL, in
645648
order to obtain a bearer token. Say the application is hosted on
646649
https://drinks-unhosted.5apps.com/ and wants read-write access to
647-
the user's "myfavoritedrinks" scope:
648-
649-
GET /oauth/michiel?redirect_uri=https%3A%2F%2Fdrinks-unhosted.5\
650-
apps.com%2F&scope=myfavoritedrinks%3Arw&client_id=https%3A%2F%2Fdrinks-\
650+
the account's "myfavoritedrinks" scope:
651651

652652

653653
de Jong [Page 13]
654654

655655
Internet-Draft remoteStorage December 2014
656656

657657

658+
659+
GET /oauth/michiel?redirect_uri=https%3A%2F%2Fdrinks-unhosted.5\
660+
apps.com%2F&scope=myfavoritedrinks%3Arw&client_id=https%3A%2F%2Fdrinks-\
658661
unhosted.5apps.com&response_type=token HTTP/1.1
659662
Host: 3pp.io
660663

@@ -668,7 +671,6 @@ unhosted.5apps.com&response_type=token HTTP/1.1
668671
<title>Allow access?</title>
669672
...
670673

671-
672674
12.3. OAuth dialog form submission
673675

674676
When the user submits the form, the request would look something
@@ -696,15 +698,15 @@ XjzzzHNjkd1CJxoQubA1o%3D&token_type=bearer&state=
696698

697699
12.4. OPTIONS preflight
698700

699-
When an in-browser application makes a cross-origin request which
700-
may affect the server-state, the browser will make a preflight
701701

702702

703703
de Jong [Page 14]
704704

705705
Internet-Draft remoteStorage December 2014
706706

707707

708+
When an in-browser application makes a cross-origin request which
709+
may affect the server-state, the browser will make a preflight
708710
request first, with the OPTIONS verb, for instance:
709711

710712
OPTIONS /storage/michiel/myfavoritedrinks/ HTTP/1.1
@@ -722,7 +724,6 @@ Internet-Draft remoteStorage December 2014
722724
Access-Control-Allow-Headers: Authorization, Content-Length, Co\
723725
ntent-Type, Origin, X-Requested-With, If-Match, If-None-Match
724726

725-
726727
12.5. Initial PUT
727728

728729
An initial PUT may contain an 'If-None-Match: *' header, like this:
@@ -749,12 +750,12 @@ ntent-Type, Origin, X-Requested-With, If-Match, If-None-Match
749750
12.6. Subsequent PUT
750751

751752

752-
753753
de Jong [Page 15]
754754

755755
Internet-Draft remoteStorage December 2014
756756

757757

758+
758759
A subsequent PUT may contain an 'If-Match' header referring to the
759760
ETag previously returned, like this:
760761

@@ -797,14 +798,14 @@ e.io/spec/modules/myfavoritedrinks/drink"}
797798
Or a 200 OK status, plus a response body:
798799

799800
HTTP/1.1 200 OK
800-
Access-Control-Allow-Origin: https://drinks-unhosted.5apps.com
801801

802802

803803
de Jong [Page 16]
804804

805805
Internet-Draft remoteStorage December 2014
806806

807807

808+
Access-Control-Allow-Origin: https://drinks-unhosted.5apps.com
808809
Content-Type: application/json; charset=UTF-8
809810
Content-Length: 106
810811
ETag: "1382694048000"
@@ -847,14 +848,14 @@ charset=UTF-8","Content-Length":106}}}
847848
Referer: https://drinks-unhosted.5apps.com/?
848849
If-Match: "1382694045000"
849850

850-
And the server may respond with a 412 Conflict or a 200 OK status:
851851

852852

853853
de Jong [Page 17]
854854

855855
Internet-Draft remoteStorage December 2014
856856

857857

858+
And the server may respond with a 412 Conflict or a 200 OK status:
858859

859860
HTTP/1.1 412 Conflict
860861
Access-Control-Allow-Origin: https://drinks-unhosted.5apps.com
@@ -897,14 +898,14 @@ Internet-Draft remoteStorage December 2014
897898
to the root folder, it is not necessary to poll each document for
898899
changes individually.
899900

900-
As an example, the root folder may contain 10 directories,
901901

902902

903903
de Jong [Page 18]
904904

905905
Internet-Draft remoteStorage December 2014
906906

907907

908+
As an example, the root folder may contain 10 directories,
908909
each of which contain 10 directories, which each contain 10
909910
documents, so their paths would be for instance '/0/0/1', '/0/0/2',
910911
etcetera. Then one GET request to the root folder '/' will be
@@ -930,11 +931,11 @@ Internet-Draft remoteStorage December 2014
930931
application launch dashboard.
931932

932933
A malicious party could link to an application, but specifying a
933-
remoteStorage user address that it controls, thus tricking the user
934-
into using a trusted application to send sensitive data to the wrong
935-
remoteStorage server. To mitigate this, applications SHOULD clearly
936-
display to which remoteStorage server they are sending the user's
937-
data.
934+
remoteStorage account address that it controls, thus tricking the
935+
user into using a trusted application to send sensitive data to the
936+
wrong remoteStorage server. To mitigate this, applications SHOULD
937+
clearly display to which remoteStorage server they are sending the
938+
user's data.
938939

939940
Applications could request scopes that the user did not intend to
940941
give access to. The user SHOULD always be prompted to carefully
@@ -947,14 +948,14 @@ Internet-Draft remoteStorage December 2014
947948
therefore NOT be used for anything else, and the user SHOULD be
948949
warned not to visit any web pages on that origin. In particular, the
949950
OAuth dialog and launch dashboard or token revokation interface
950-
SHOULD be on a different origin than the remoteStorage interface.
951951

952952

953953
de Jong [Page 19]
954954

955955
Internet-Draft remoteStorage December 2014
956956

957957

958+
SHOULD be on a different origin than the remoteStorage interface.
958959

959960
Where the use of bearer tokens is impractical, a user may choose to
960961
store documents on hard-to-guess URLs whose path after
@@ -999,12 +1000,12 @@ Internet-Draft remoteStorage December 2014
9991000
Levels", BCP 14, RFC 2119, March 1997.
10001001

10011002

1002-
10031003
de Jong [Page 20]
10041004

10051005
Internet-Draft remoteStorage December 2014
10061006

10071007

1008+
10081009
[IRI]
10091010
Duerst, M., "Internationalized Resource Identifiers (IRIs)",
10101011
RFC 3987, January 2005.
@@ -1017,7 +1018,6 @@ Internet-Draft remoteStorage December 2014
10171018
"Section 4.2: Implicit Grant", in: Hardt, D. (ed), "The OAuth
10181019
2.0 Authorization Framework", RFC6749, October 2012.
10191020

1020-
10211021
17.2. Informative References
10221022

10231023
[HTTPS]

0 commit comments

Comments
 (0)