mirror of
https://github.com/vacp2p/specs.git
synced 2026-01-09 15:28:03 -05:00
Add diagram in overview
This commit is contained in:
@@ -10,12 +10,65 @@ Interest Group: [@sukunrt], [@achingbrain]
|
|||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
This spec defines an authentication scheme of libp2p Peer IDs in accordance with
|
This spec defines an HTTP authentication scheme of libp2p Peer IDs in accordance
|
||||||
[RFC 9110](https://datatracker.ietf.org/doc/html/rfc9110). The authentication
|
with [RFC 9110](https://datatracker.ietf.org/doc/html/rfc9110). The
|
||||||
scheme is called `libp2p-PeerID`.
|
authentication scheme is called `libp2p-PeerID`.
|
||||||
|
|
||||||
## Protocol Overview
|
## Protocol Overview
|
||||||
|
|
||||||
|
At a high level, challenges are exchanged and signed by each peer to
|
||||||
|
authenticate themselves to each other. The protocol works whether the Client
|
||||||
|
provides the first challenge, or the Server provides the first challenge.
|
||||||
|
|
||||||
|
Example Diagram of Server initiated handshake
|
||||||
|
```
|
||||||
|
┌─────────┐ ┌────────┐
|
||||||
|
│ Client │ │ Server │
|
||||||
|
└─────────┘ └────────┘
|
||||||
|
│ initial request │
|
||||||
|
├────────────────────────────>│
|
||||||
|
│ │
|
||||||
|
│ 401; challenge-client │
|
||||||
|
│<────────────────────────────┤
|
||||||
|
│ │
|
||||||
|
│ client-sig + │
|
||||||
|
│ challenge-server │
|
||||||
|
│ [client authenticated] │
|
||||||
|
├────────────────────────────>│
|
||||||
|
│ │
|
||||||
|
│ server-sig │
|
||||||
|
│ [server authenticated] │
|
||||||
|
│<────────────────────────────┤
|
||||||
|
│ │
|
||||||
|
│ application data │
|
||||||
|
├────────────────────────────>│
|
||||||
|
│ │
|
||||||
|
│ resp │
|
||||||
|
│<────────────────────────────┤
|
||||||
|
```
|
||||||
|
|
||||||
|
Example Diagram of Client initiated handshake
|
||||||
|
```
|
||||||
|
┌────────┐ ┌────────┐
|
||||||
|
│ Client │ │ Server │
|
||||||
|
└────────┘ └────────┘
|
||||||
|
│ challenge-server │
|
||||||
|
├────────────────────────────>│
|
||||||
|
│ │
|
||||||
|
│ challenge-client + │
|
||||||
|
│ server-sig │
|
||||||
|
│ [server authenticated] │
|
||||||
|
│<────────────────────────────┤
|
||||||
|
│ │
|
||||||
|
│ client-sig + │
|
||||||
|
│ application data │
|
||||||
|
│ [client authenticated] │
|
||||||
|
├────────────────────────────>│
|
||||||
|
│ │
|
||||||
|
│ resp │
|
||||||
|
│<────────────────────────────┤
|
||||||
|
```
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Param Name | Description |
|
| Param Name | Description |
|
||||||
|
|||||||
Reference in New Issue
Block a user