URL formats for HTTP-based storage server #1565
Labels
No Label
0.2.0
0.3.0
0.4.0
0.5.0
0.5.1
0.6.0
0.6.1
0.7.0
0.8.0
0.9.0
1.0.0
1.1.0
1.10.0
1.10.1
1.10.2
1.10a2
1.11.0
1.12.0
1.12.1
1.13.0
1.14.0
1.15.0
1.15.1
1.2.0
1.3.0
1.4.1
1.5.0
1.6.0
1.6.1
1.7.0
1.7.1
1.7β
1.8.0
1.8.1
1.8.2
1.8.3
1.8β
1.9.0
1.9.0-s3branch
1.9.0a1
1.9.0a2
1.9.0b1
1.9.1
1.9.2
1.9.2a1
LeastAuthority.com automation
blocker
cannot reproduce
cloud-branch
code
code-dirnodes
code-encoding
code-frontend
code-frontend-cli
code-frontend-ftp-sftp
code-frontend-magic-folder
code-frontend-web
code-mutable
code-network
code-nodeadmin
code-peerselection
code-storage
contrib
critical
defect
dev-infrastructure
documentation
duplicate
enhancement
fixed
invalid
major
minor
n/a
normal
operational
packaging
somebody else's problem
supercritical
task
trivial
unknown
was already fixed
website
wontfix
worksforme
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Reference: tahoe-lafs/trac-2024-07-25#1565
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Ticket #510 is about speaking to storage servers with mostly-plain HTTP. One
piece of this is deciding what the URLs should look like. Downloading a share
from the storage server should be a simple HTTP "GET", using a
Range:
header to fetch less than the whole share. But we also need ways to discover
which shares are available for download, and eventually ways to upload data
to the server too.
Here's the starting point that I implemented in my prototype (which still
uses Foolscap and get_buckets() to discover shares):
GET /storage/imm/SI/%(storage_index)s/share/%(shnum)d
: retrieves dataGET /storage
: this currently returns a human-readable page describingThe next steps:
GET /storage/imm/SI/%(storage_index)s/shares
: return a JSON list ofGET /storage/imm/SI/%(storage_index)s/all_shares
: return a JSONI put "imm" into the URL because the current storage server treats immutable
and mutable shares very differently (they have different container formats).
It's not trivial to take an SI and switch on the type of share that it points
to. It might be cleaner to fix the server to handle this well, and then
remove the "imm" from the URL. OTOH, it might be better to leave them
distinct.
We need similar URLs for reading from mutable shares; they can probably be
the same but with "mut" instead of "imm".
We'll need POST URLs for uploading files and modifying mutable shares, as
well as adding/renewing leases and other storage server methods. The request
bodies will be more complicated since they'll need authorization signatures
or something. But the basic URL target could be:
POST /storage/imm/SI/%(storage_index)s/shares/%(shnum)d
: startPOST /storage/mut/SI/%(storage_index)s/shares/%(shnum)d
: modify theAll of this presumes that Accounting is not being enforced on read access. At
least one of the designs I've drawn up offers
read=False
control, as astick for the storage operator to use against a client who doesn't pay their
bills (but still less drastic than
store=False
, which deletes all theirdata). To enforce
read=False
, the GETs would need to be authorized,which either involves adding an extra signature header, or implementing them
with a POST instead (and putting the signature in the request body).
This has been resolved as part of https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2925