Basic Handshake Flow Specification
Overview
This document defines the basic handshake flow of the ATH protocol, which is the core specification that all ATH implementations must follow.Core Roles
The ATH protocol is a three-party protocol involving three independent participating roles:| Role | English Name | Responsibility |
|---|---|---|
| User | User | Owner of resources, holds ultimate authorization decision power |
| Client | Client | The agent that acts on behalf of the user to execute tasks and access service resources |
| Server | Server | Provider of resources, offering API services and data resources |
Core Principles
Trusted Handshake Principle
For a client to successfully access server resources, two conditions must be met simultaneously:- Obtain explicit authorization from the user (User Authorization)
- Obtain explicit authorization from the server (Server Authorization) Both are indispensable.
Handshake Flow
Preliminary Step: User Pre-Authorization
Before using the client, the user pre-grants delegated permissions to the client: User Authorization Credential Structure:Step 1: Client Identity Declaration
Message Structure:Step 2: Server Identity Response
Message Structure:Step 3: Client Identity Proof
Message Structure:Step 4: Identity Verification Result
Message Structure:Step 5: Permission Request
Message Structure:Step 6: Server Requests Authorization Confirmation from User
Message Structure (Server → User):Step 7: User Returns Authorization Confirmation Result
Message Structure (User → Server):Step 8: Permission Approval Result
Message Structure:Step 9: Handshake Complete
Message Structure:Error Handling
For detailed error code definitions, please refer to the Error Specification document.Security Requirements
- All messages must be transmitted using TLS 1.3 encryption
- All signatures must use algorithms with at least 256-bit security strength
- Nonces must be generated using cryptographically secure random generators
- Timestamp drift must not exceed 5 minutes to prevent replay attacks
- User authorization credentials must be signed by the user’s private key and cannot be forged