authentication
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| authentication [2025/03/22 16:50] – created winter | authentication [2026/01/20 17:32] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| - Server A wants to prove its identity to Server B | - Server A wants to prove its identity to Server B | ||
| - | - Server A tells Server B its dialback endpoint, via Server B's auth endpoint listed in its [[instance metadata]] | + | - Server A tells Server B its dialback endpoint, via Server B' |
| - Server B independently connects to the given endpoint and sends a secret token | - Server B independently connects to the given endpoint and sends a secret token | ||
| - Server A, having received the secret, sends it back to Server B's auth endpoint | - Server A, having received the secret, sends it back to Server B's auth endpoint | ||
| - Server B responds with an auth token, which Server A can use in subsequent requests to prove who it is | - Server B responds with an auth token, which Server A can use in subsequent requests to prove who it is | ||
| - | {{page>include:stub}} | + | Note that the dialback process is unidirectional, |
| + | |||
| + | |||
| + | ===== In detail ===== | ||
| + | |||
| + | **Step 1.** A sends a GET request to B's '' | ||
| + | |||
| + | **Step 2.** B sends a POST request to the endpoint given by A in step 1, with the request body set to the '' | ||
| + | |||
| + | **Step 3.** A, now knowing the secret given by B in step 2, sends another GET request to B's '' | ||
| + | |||
| + | |||
| + | <WRAP center round todo 60%> | ||
| + | todo: refreshing? errors? authenticated requests? | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== In diagram form ===== | ||
| + | |||
| + | < | ||
| + | @startuml | ||
| + | skinparam responseMessageBelowArrow true | ||
| + | |||
| + | |||
| + | participant " | ||
| + | participant " | ||
| + | == Server A wants to prove its identity with Server B == | ||
| + | A -> B: "" | ||
| + | ""? | ||
| + | ""& | ||
| + | A <-- B: 202 Accepted / 204 No Content | ||
| + | ...Potentially some delay... | ||
| + | B -> A: "" | ||
| + | "" | ||
| + | "" | ||
| + | B <-- A: 202 Accepted / 204 No Content | ||
| + | A -> B: "" | ||
| + | ""? | ||
| + | ""& | ||
| + | A <-- B: 200 OK / 201 Created\n\ | ||
| + | {{json\n{\n\ | ||
| + | " | ||
| + | " | ||
| + | }\n}} | ||
| + | == Authenticated request == | ||
| + | A -> B: "" | ||
| + | <& | ||
| + | A <-- B: < | ||
| + | == Server A wants to refresh the token == | ||
| + | ...A bit before the expires date... | ||
| + | A -> B: "" | ||
| + | ""? | ||
| + | <& | ||
| + | |||
| + | A <-- B: 200 OK / 201 Created\n\ | ||
| + | | ||
| + | " | ||
| + | " | ||
| + | | ||
| + | @enduml | ||
| + | </ | ||
| + | |||
| + | <WRAP center round todo 80%> | ||
| + | are we sure that this can use different HTTP response codes? e.g. "200 OK / 201 Created" | ||
| + | </ | ||
authentication.1742662200.txt.gz · Last modified: (external edit)
