Skip to content

Commit

Permalink
docs: add decision
Browse files Browse the repository at this point in the history
  • Loading branch information
PhearZero committed Apr 24, 2024
1 parent b2e10be commit 977e48f
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .decisions/4-Fido-Extension.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Overview

Deprecate ARC-31/Arbitrary Auth Message in favor of custom FIDO2 extension

## Decisions

- Remove connect module and endpoints
- Use FIDO2 Attestation/Assertions for device linking

## Implementation

```mermaid
sequenceDiagram
participant Website
participant Server
participant Wallet
Note over Website, Wallet: Link devices
Website->>Server: Subscribe to 'wss:link'
Website-->>Website: Display QR Connect Request ID
Wallet->>Website: Scan QR Code
Server-->>Wallet: Get Challenge/Options
Wallet->>Server: POST FIDO2 Credential + Liquid Auth Signature
Server-->>Server: Validate Signatures
Server-->>Website: HTTPOnly Session
Server->>Wallet: Ok Response + HTTPOnly Session
Server->>Website: Emit to `wss:link` client
Note over Website, Wallet: Signaling Channels
Website-->>Server: Subscribe to 'wss:offer-description'
Website-->>Server: Subscribe to 'wss:offer-candidate'
Wallet-->>Server: Subscribe to 'wss:answer-description'
Wallet-->>Server: Subscribe to 'wss:answer-candidate'
Note over Website, Wallet: Peer Offer
Wallet-->>Wallet: On answer-description, set Remote SDP
Wallet-->>Wallet: On answer-candidate, add ICE Candidate
Wallet-->>Wallet: Create Peer Offer & DataChannel
Wallet-->>Server: Emit `wss:offer-description`
Wallet-->>Server: Emit `wss:offer-candidate`
Note over Website, Wallet: Peer Answer
Website-->>Website: On offer-description, set Remote SDP and create Answer
Website-->>Website: On offer-candidate, add ICE Candidate
Website-->>Server: Emit `wss:answer-description`
Website-->>Server: Emit `wss:answer-candidate`
Note over Website, Wallet: Data Channel
Website-->>Wallet: On DataChannel, Emit Messages
```

*Note: It may be possible to handle signaling in a fully decentralized manner in the future.
2 changes: 2 additions & 0 deletions .decisions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@

- [1. Service Authentication](1-Service-Authentication.md)
- [2. Bidirectional-Communications](2-Bidirectional-Communication.md)
- [3. Peer-to-Peer-Signaling](3-Peer-to-Peer-Signaling.md)
- [4. Fido-Extension](4-Fido-Extension.md)

0 comments on commit 977e48f

Please sign in to comment.