|
1 | 1 | ```mermaid |
2 | 2 | sequenceDiagram |
3 | | - participant Inviter |
4 | | - participant InviteSenderServer as Invite Sender Server |
5 | | - participant InviteReceiverServer as Invite Receiver Server |
6 | | - participant Invitee |
7 | 3 |
|
8 | | - Inviter->>InviteSenderServer: Calls Invite API |
9 | | - InviteSenderServer->>InviteSenderServer: Creates an invite record in the database |
10 | | - Note right of InviteSenderServer: Dispatch notification (Email) to invitee\n- Token\n- invite sender server FQDN |
| 4 | + %% Instance A components |
| 5 | + box "Instance A" #0f2749 |
| 6 | + participant InviteManagerA as InviteManager A |
| 7 | + participant GatewayA as Gateway A |
| 8 | + participant HTTPA as HTTP API A (ocm, sm) |
| 9 | + end |
11 | 10 |
|
12 | | - InviteSenderServer->>Invitee: Send Email with Token and Server FQDN |
13 | | - Invitee->>InviteReceiverServer: Submit invite acceptance form\n(Token, invite sender server FQDN) |
14 | | - |
15 | | - InviteReceiverServer->>InviteSenderServer: Discover the OCM API of the inviter server |
16 | | - InviteReceiverServer->>InviteReceiverServer: Adds FQDN of invite sender server as trusted server |
| 11 | + %% OCM Invitation Flow |
| 12 | + %% Actors |
| 13 | + actor UserA as Alice |
| 14 | + actor UserB as Bob |
| 15 | +
|
| 16 | + %% Instance B components |
| 17 | + box "Instance B" #0f2749 |
| 18 | + participant HTTPB as HTTP API B (ocm, sm) |
| 19 | + participant GatewayB as Gateway B |
| 20 | + participant InviteManagerB as InviteManager B |
| 21 | + end |
| 22 | +
|
| 23 | + %% Invitation creation |
| 24 | + UserA ->> HTTPA: POST /generate-invite (ocm, sm) |
| 25 | + HTTPA ->> GatewayA: /generate-invite |
| 26 | + GatewayA ->> InviteManagerA: GenerateInviteToken |
| 27 | + Note right of InviteManagerA: store token in database |
| 28 | + InviteManagerA -->> GatewayA: return token |
| 29 | + GatewayA -->> HTTPA: return token |
17 | 30 |
|
18 | | - InviteReceiverServer->>InviteSenderServer: Accept invite API Call\n(InviteAcceptanceRequestDto) |
19 | | - Note left of InviteReceiverServer: InviteAcceptanceRequestDto\n+ recipientProvider: string\n+ token: string\n+ userID: string\n+ email: string\n+ name: string |
| 31 | + alt |
| 32 | + HTTPA ->> UserB: Send Email with Alice's Server FQDN and Token |
| 33 | + else |
| 34 | + HTTPA ->> UserA: Raw or Base64 encoded "token@FQDN" |
| 35 | + UserA ->> UserB: Aice passes token to Bob |
| 36 | + end |
20 | 37 |
|
21 | | - InviteSenderServer->>InviteSenderServer: Add invite receiver FQDN as trusted server |
22 | | - InviteSenderServer->>InviteSenderServer: Mark the invitation record as accepted |
23 | | - InviteSenderServer->>InviteSenderServer: Add invite receiver in the contacts table |
24 | | - InviteSenderServer->>InviteReceiverServer: Return InviteAcceptanceResponseDto |
| 38 | + alt |
| 39 | + UserB ->> UserB: Accept token manually in the EFSS UI |
| 40 | + UserB ->> HTTPB: POST /accept-invite (ocm, sm) |
| 41 | + else Use WAYF |
| 42 | + UserB ->> HTTPA: TODO |
| 43 | + end |
| 44 | + |
| 45 | + %% Invitation acceptance on B |
| 46 | + UserB ->> HTTPB: POST /accept-invite (ocm, sm) |
| 47 | + HTTPB ->> GatewayB: ForwardInvite |
| 48 | + GatewayB ->> InviteManagerB: ForwardInvite |
| 49 | + InviteManagerB ->> HTTPA: Discover the OCM API of the inviter server |
| 50 | + HTTPA ->>InviteManagerB: OCM discovery data |
| 51 | + InviteManagerB ->> InviteManagerB: Adds FQDN of invite sender server as trusted server |
| 52 | + InviteManagerB ->> HTTPA: POST /invite-accepted (ocm) |
| 53 | + rect rgb(191, 223, 255) |
| 54 | + Note right of UserB: InviteAcceptanceRequestDto |
| 55 | + rect |
| 56 | + Note right of UserB: recipientProvider: string |
| 57 | + Note right of UserB: token: string |
| 58 | + Note right of UserB: userID: string |
| 59 | + Note right of UserB: email: string |
| 60 | + Note right of UserB: name: string |
| 61 | + end |
| 62 | + end |
| 63 | +
|
| 64 | + %% Process acceptance on A |
| 65 | + HTTPA ->> GatewayA: AcceptInvite |
| 66 | + GatewayA ->> InviteManagerA: AcceptInvite |
| 67 | + Note right of InviteManagerA: get token from database |
| 68 | + InviteManagerA ->> InviteManagerA: Add Bob's server FQDN as trusted server |
| 69 | + InviteManagerA ->> InviteManagerA: Mark the invitation record as accepted |
| 70 | + InviteManagerA ->> InviteManagerA: Add Bob in the contacts table |
| 71 | + InviteManagerA -->> GatewayA: return Alice user |
| 72 | + GatewayA -->> HTTPA: return Alice user |
25 | 73 | |
26 | | - Note right of InviteReceiverServer: InviteAcceptanceResponseDto\n+ UserId: string\n+ Email: string\n+ Name: string |
27 | | - InviteReceiverServer->>Invitee: Adds Invite sender as contact |
| 74 | + %% Propagation to B |
| 75 | + HTTPA ->> InviteManagerB: return Alice user |
| 76 | + rect rgb(191, 223, 255) |
| 77 | + Note right of UserA: InviteAcceptanceResponseDto |
| 78 | + rect |
| 79 | + Note right of UserA: userID: string |
| 80 | + Note right of UserA: email: string |
| 81 | + Note right of UserA: name: string |
| 82 | + end |
| 83 | + end |
| 84 | + InviteManagerB ->> InviteManagerB: Add Alice in the contacts table |
| 85 | + InviteManagerB -->> GatewayB: return |
| 86 | + GatewayB -->> HTTPB: return |
| 87 | + HTTPB -->> UserB: return |
| 88 | +
|
28 | 89 | ``` |
0 commit comments