-
Notifications
You must be signed in to change notification settings - Fork 0
/
initialize.plantuml
64 lines (61 loc) · 1.79 KB
/
initialize.plantuml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
@startuml Sequence
skinparam backgroundColor transparent
hide footbox
box "D2D Client"
participant S as "Web App\n(running in the browser)"
participant C as "Service\n(local or remote host)"
end box
box "plgd hub"
participant CA as "Certificate Authority"
participant OA as "OAuth 2.0 Server"
end box
S -> C: GetConfiguration
return
alt #GetConfiguration.device_authentication_mode == PRE_SHARED_KEY
alt #GetConfiguration.is_initialized == true
note over C #aqua
D2D Client - service is initialized.
end note
else false
S -> C ++: Initialize\n(preshared key)
activate S
return
note over C #aqua
D2D Client - service is initialized.
end note
deactivate S
end
else X509
S -> OA ++: Authenticate user
return JWT User token
alt #GetConfiguration.is_initialized == true
note over C #aqua
D2D Client - service is initialized.
end note
else false
alt #GetConfiguration.remote_provisioning.mode == SELF
S -> C ++: Initialize\n(User token)
activate S
return
note over C #aqua
D2D Client - service is initialized.
end note
deactivate S
else USER_AGENT
S -> OA ++: Get /.well-known/jwks.json
activate S
return jwks.json
S -> C ++: Initialize\n(jwks.json, User token)
return Identity certificate challenge\n(D2D Client Identity CSR, state)
S-> CA ++: Sign D2D Client Identity CSR\n(CSR, User token)
return Identity Certificate chain
S -> C ++: Finish Initialize\n(Identity Certificate Chain, User token, state)
return
note over C #aqua
D2D Client - service is initialized.
end note
deactivate S
end
end
end
@enduml