1
0
mirror of https://github.com/falk-werner/webfuse synced 2025-06-13 12:54:15 +00:00

updates documentation

This commit is contained in:
Falk Werner 2019-04-13 22:18:52 +02:00
parent 9345f947cc
commit 1b15f30f2f
5 changed files with 28 additions and 17 deletions

View File

@ -38,11 +38,10 @@ webfuse solves this problem by using the [WebSocket](https://en.wikipedia.org/wi
With webfuse it is possible to implement remote filesystems based on websockets.
A reference implementation of such a daemon is provided within the examples. The picture above describes the workflow:
- The websocket filesystem daemon (*webfuse daemon*) mounts a filesystem on startup.
It starts the websocket server and waits for incoming connections.
- The websocket filesystem daemon (*webfuse daemon*) waits for incoming connections.
- A remote filesystem provider connects to webfuse daemon via websocket protocol.
The example includes such a provider implemented in HTML and JavaScript.
- A remote filesystem provider connects to webfuse daemon via websocket protocol and adds one or more filesystems.
*Note: the examples include such a provider implemented in HTML and JavaScript.*
- Whenever the user makes filesystem requests, such as *ls*, the request is redirected via webfuse daemon to the connected filesystem provider
@ -275,10 +274,21 @@ Read from an open file.
### Requests (Provider -> Adapter)
#### add_filesystem
Adds a filesystem.
fs provider: {"method": "add_filesytem", "params": [<name>], "id": <id>}
webfuse daemon: {"result": {"id": <name>}, "id": <id>}
| Item | Data type | Description |
| ----------- | ----------| ------------------------------- |
| name | string | name and id of filesystem |
#### authtenticate
Authenticate the provider.
If authentication is enabled, a provider must be authenticated by the adapter before the adapter will send any messages.
If authentication is enabled, a provider must be authenticated by the adapter before filesystems can be added.
fs provider: {"method": "authenticate", "params": [<type>, <credentials>], "id": <id>}
webfuse daemon: {"result": {}, "id": <id>}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -1,12 +1,10 @@
@startuml
participant "Filesystem Provider\n(e.g. Webbrowser)" as provider
participant "webfuse\ndaemon" as daemon
actor "user" as user
group directory listing fails without authentication
user -> daemon : ls
daemon -> daemon : is_authenticated
daemon -->x user : error: no entry
group add filesystem fails without authentication
provider -> daemon : add_filesystem
daemon -->x provider : error: access denied
end
@ -17,12 +15,10 @@ daemon -> daemon: check(credentials)
daemon --> provider: result
end
group directory listing succeeds after authentication
user -> daemon : ls
daemon -> daemon : is_authenticated
daemon -> provider : readdir
provider --> daemon : readdir_resp
daemon --> user : [., ..]
group add filesystem succeeds after authentication
provider -> daemon: add_filesystem
daemon -> daemon : fuse_mount
daemon -> provider: okay
end
@enduml

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

@ -4,7 +4,6 @@ participant "webfuse\ndaemon" as daemon
actor "user" as user
group startup
daemon -> daemon : fuse_mount
daemon -> daemon : start ws
end
...
@ -16,9 +15,15 @@ provider -> daemon : connect
daemon -> daemon: check credentials
daemon --> provider: okay
end
provider -> daemon: add_filesystem
daemon -> daemon : fuse_mount
daemon -> provider: okay
end
...
group directory listing
user -> daemon : ls
daemon -> provider : readdir