Skip to content

Commit d569758

Browse files
authored
Replace diagram with Mermaid syntax (#281)
1 parent 9efcc44 commit d569758

File tree

1 file changed

+13
-19
lines changed

1 file changed

+13
-19
lines changed

docs/security.mdx

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ By default, Yorkie allows requests from any origin. To enhance security, you can
1111

1212
Each project in Yorkie can have its own allowed origins settings, which can be managed through the [Dashboard]({{DASHBOARD_PATH}}).
1313

14-
<Alert status="warning"> Allowed origins settings are project-specific and may take up to **10 minutes** to be applied due to caching. </Alert>
15-
1614
#### Configuring Allowed Origins
1715

1816
1. Open the Project Settings page in the Dashboard.
@@ -25,21 +23,19 @@ Each project in Yorkie can have its own allowed origins settings, which can be m
2523

2624
The Auth Webhook provides fine-grained access control by validating client requests through an external authentication server. This allows you to enforce custom authorization logic, ensuring that only authorized users can access and modify Yorkie documents.
2725

28-
```
29-
(5) Response (4) Handle request
30-
┌─────────────────┐ ┌──┐
31-
│ │ │ │ (3) Response
32-
▼ │ ▼ │ - allowed
33-
┌──────┐ ┌┴─────┤ - reason ┌───────────────┐
34-
│Client├────────────►│Server│◄──────────────┤External Server│
35-
└──────┘ (1)Request └────┬─┘ └───────────────┘
36-
- token │ ▲
37-
- dockey └──────────────────────┘
38-
(2) Call webhook
39-
- token
40-
- dockey
41-
- verb: r or rw
42-
```
26+
<Mermaid
27+
chart={`sequenceDiagram
28+
participant Client
29+
participant Server
30+
participant External Server
31+
32+
Client->>Server: (1) Request<br/>- token<br/>- dockey
33+
Server->>External Server: (2) Call webhook<br/>- token<br/>- dockey<br/>- verb: r or rw
34+
External Server->>Server: (3) Response<br/>- allowed<br/>- reason
35+
Server->>Server: (4) Handle request
36+
Server->>Client: (5) Response
37+
`}
38+
/>
4339

4440
The authentication process follows these steps:
4541

@@ -61,8 +57,6 @@ You can easily set up the Auth Webhook via the the [Dashboard]({{DASHBOARD_PATH}
6157

6258
Alternatively, you can configure the webhook using the Yorkie CLI. See updating the project for details. Refer to the [updating the project](/docs/cli#updating-the-project).
6359

64-
<Alert status="warning"> Changes to the configuration may take up to 10 minutes to take effect. </Alert>
65-
6660
##### 2. Client Configuration
6761

6862
To provide authentication tokens dynamically, use the `authTokenInjector` option when creating a Yorkie client:

0 commit comments

Comments
 (0)