This commit is contained in:
eraden 2023-04-10 08:58:59 +02:00
parent 23a0c1aa2c
commit e9b38577dd
8 changed files with 94 additions and 2 deletions

View File

@ -8,6 +8,13 @@ Web server for WebDAV resources
## Architecture ## Architecture
<img src="https://code.ita-prog.pl/Tsumanu/puffball/raw/branch/master/assets/components.svg">
### File streaming ### File streaming
<img src="https://code.ita-prog.pl/Tsumanu/puffball/raw/branch/master/assets/stream.svg"> <img src="https://code.ita-prog.pl/Tsumanu/puffball/raw/branch/master/assets/stream.svg">
## Dependencies
* Garage (https://hub.docker.com/r/dxflrs/garage)
* PostgreSQL

BIN
assets/components.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

29
assets/components.puml Normal file
View File

@ -0,0 +1,29 @@
@startuml
actor "Client"
agent "Pathfinder"
agent "Sentinel"
database "Session PostgreSQL"
"Sentinel" -- "Session PostgreSQL"
boundary "Mailman"
cloud "Mail Service"
"Mailman" -- "Mail Service"
agent "Keeper"
database "Account PostgreSQL"
"Keeper" -- "Account PostgreSQL"
agent "Fileye"
cloud "S3 storage"
"Fileye" -- "S3 storage"
"Client" ~~ "Pathfinder"
"Pathfinder" ~~ "Sentinel"
"Pathfinder" ~~ "Keeper"
"Pathfinder" ~~ "Fileye"
"Pathfinder" ~~ "Mailman"
@enduml

1
assets/components.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 8.2 KiB

55
assets/session.puml Normal file
View File

@ -0,0 +1,55 @@
@startuml
group Register
Client -> Pathfinder : E-Mail + Login form
Pathfinder -> Keeper : Save account info
alt No errors
Keeper -> Pathfinder : E-Mail address
Pathfinder -> Mailman : Send sign-in url with TOKEN
Pathfinder -> Client : OK with Check e-mail
else Invalid data
Keeper -> Pathfinder : Failed
Pathfinder -> Client : BAD_REQUEST with errors
end
end
group Sign In (First step)
Client -> Pathfinder : Send Login form
Pathfinder -> Keeper : Load user profile
alt Valid
Keeper -> Pathfinder : User e-mail
Pathfinder -> Mailman : Send sign-in url with TOKEN
Pathfinder -> Client : OK with Check e-mail
else Invalid
Keeper -> Pathfinder : Not found
Pathfinder -> Client : OK with Check e-mail
end
end
group Sign In (Second step)
Client -> Pathfinder : Visit sign-in url from e-mail
Pathfinder -> Mailman : Check TOKEN
alt Valid token
Mailman -> Pathfinder : Found
Pathfinder -> Sentinel : Generate JWT
Sentinel -> Pathfinder : JWT
Pathfinder -> Client : FOUND with JWT
else Invalid token
Mailman -> Pathfinder : Not found
Pathfinder -> Client : UNAUTHORIZED
end
end
group Check session
Client -> Pathfinder : Validate JWT
Pathfinder -> Sentinel : Check JWT
alt Valid JWT
Sentinel -> Pathfinder : Valid
Pathfinder -> Client : FOUND
else Invalid JWT
Sentinel -> Pathfinder : Invalid
Pathfinder -> Client : UNAUTHORIZED
end
end
@enduml

1
assets/session.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -3,7 +3,6 @@
Client -> Pathfinder Client -> Pathfinder
Pathfinder -> Sentinel : Check authorization Pathfinder -> Sentinel : Check authorization
Sentinel -> LoggedState : Logged
alt User Authorized alt User Authorized
Sentinel -> Pathfinder : Authorized Sentinel -> Pathfinder : Authorized
Pathfinder -> Fileye : Open stream Pathfinder -> Fileye : Open stream

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB