Add a concise table of the URL tree to webapi.rst. #1663
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
3 Participants
Notifications
Due Date
No due date set.
Reference: tahoe-lafs/trac-2024-07-25#1663
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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?
I would like to see a section of webapi.rst with a concise table of all handled URLs (or prefixes). For each url, a complete list of possible operations initiated by that URL would be extremely useful.
Exhaustive query parameters per operation might make the table too cluttered.
The use case is an operations engineer under time pressure without specific knowledge of Tahoe-LAFS needs to understand the URL structure in order to implement access control, caching, load balancing, or other opsy policies.
As a first attempt to do this automatically, I learned that Nevow Page's will delegate requests to sub-url-paths by looking for
child_<path segment>
attributes or methods. A quick grep gives a basic partial picture of the URL namespace (see below).The
allmydata.web.root.Root
class is a good starting point. There are at least these top-level handlers:/operations
/storage
/uri
/cap
/file
/named
/status
/statistics
This is based on this simplistic grep:
See also: #1662
The URL handling path can also be modified by the
putChild
method. A grep shows two cases of static file handling:allmydata.web.root.Root.*init*
at the end it adds all files in thestatic
resource directory to the root URL namespace. For my repository that gives:/d3-2.4.6.min.js
/d3-2.4.6.time.min.js
/download_status_timeline.js
/icon.png
/jquery-1.6.1.min.js
/tahoe.css
allmydata.webish.WebishServer.buildServer
ifstaticdir
is truthy (and its default resolves to~/.tahoe/public_html
by default), it gets added under this subpath:/static/
Good start! Thanks! Whoever wants to write a patch for the docs based on this should go ahead and mark it as
review-needed
.I feel only moderate confidence that the URL structure above is complete enough to make sound URL-path-based access control decisions.
For example, when I request a directory node, my browser makes a request for
/webform_css
but I haven't found the source of this request processing. A quick search suggests it's in a dependency calledformless
:The results of this ticket would inform tickets #1665, #860, and #587.
22:56 < nejucomo> marlowe: The first pass could contain path-pattern,
http-methods, interesting-query-parameters, and a short note
about what operations are available there.
22:56 < nejucomo> marlowe: The first pass could contain path-pattern,
http-methods, interesting-query-parameters, and a short note
about what operations are available there.
22:57 < nejucomo> Actually, that might be even too specific for the first pass.
Maybe just path-pattern and a short description of what
purpose that path servers (especially which information it
leaks and what state it can change).
22:58 < marlowe> change noted
22:58 < nejucomo> Something like: "/file/<CAP" - "This url path is used to read
and update files in the grid." "/status/<…>" - "This path
gives status for current upload, download, verification, and
repair operations."
thedod wrote at #1866:
zooko wrote at #1866:
+1 (a half-renamed thing is worse, IMHO)
Created #1868 (rename "uri" to "cap" everywhere).
Replying to zooko:
Duplicate of #1715 (change all docs and generated URLs to point to "/cap" instead of "/uri"). Note my disagreement in ticket:1715#comment:87230.