-
Notifications
You must be signed in to change notification settings - Fork 0
AUTHENTICATION_ARCHITECTURE.md
# CeloHT Authentication Architecture ## Overview CeloHT uses a security-first authentication architecture designed to protect users, community members, agents, administrators, developers, and platform services. Authentication is the process of verifying the identity of an actor before granting access to protected CeloHT resources. CeloHT separates: - User authentication - Wallet authentication - Administrative authentication - Service-to-service authentication - Developer authentication - Session management The architecture is designed to support Web3-native authentication while maintaining compatibility with conventional application authentication mechanisms. --- ## 1. Authentication Principles CeloHT follows these principles: 1. Never trust an unauthenticated request. 2. Never expose private keys or authentication secrets. 3. Minimize authentication data collection. 4. Prefer cryptographic wallet verification for blockchain-related operations. 5. Separate authentication from authorization. 6. Use short-lived credentials whenever practical. 7. Require stronger authentication for privileged operations. 8. Log security-relevant authentication events without storing sensitive credentials. 9. Apply rate limiting and abuse protection. 10. Design authentication mechanisms for future scalability. --- ## 2. Authentication Domains CeloHT may operate across multiple authentication domains. ### 2.1 Public Users Public users may access: - Public website pages - Educational resources - Public documentation - Public impact information - Public blockchain information These resources generally do not require authentication. ### 2.2 Registered Users Authenticated users may access protected services such as: - Personal profiles - Training progress - Community services - Transaction history - Agent-related services - Personalized platform features ### 2.3 Wallet Users Blockchain operations may require wallet-based authentication. Supported wallet interactions may include: - Valora - MiniPay - WalletConnect-compatible wallets - Other compatible Celo wallets Wallet authentication must never require CeloHT to receive or store a user's private key or seed phrase. ### 2.4 Administrators Administrative accounts require stronger authentication controls. Administrative privileges may include: - Platform configuration - User management - Agent management - Content management - Treasury-related interfaces - Security operations - Infrastructure management Administrative authentication should use multi-factor authentication whenever supported. --- ## 3. Wallet Authentication CeloHT's Web3 authentication model is based on cryptographic ownership verification. The platform may issue an authentication challenge containing: - Random nonce - Timestamp - Domain - Intended application - Expiration time - Requested wallet address The user signs the challenge using their wallet. The backend verifies the cryptographic signature. If verification succeeds, the wallet address becomes authenticated for the current session. ### Important Security Rule CeloHT must never request: - Seed phrases - Private keys - Wallet recovery phrases - Private signing keys Users should sign authentication messages directly through their wallet. --- ## 4. Authentication Flow A typical wallet authentication flow is: ```text User | v CeloHT Application | | Request authentication challenge v Authentication Service | | Generate nonce v User Wallet | | Sign challenge v Authentication Service | | Verify signature v Session Service | | Create authenticated session v CeloHT Application
Authentication challenges must use unpredictable nonces.
Each nonce should:
- Be generated using a cryptographically secure random generator.
- Be unique.
- Have a limited lifetime.
- Be invalidated after successful authentication.
- Be associated with the intended authentication context.
Nonce reuse must be prevented.
This protects against replay attacks.
Authenticated sessions should be:
- Short-lived where practical
- Revocable
- Bound to the authenticated identity
- Protected against session fixation
- Protected against session theft
- Invalidated after security-sensitive events
Session credentials must never be placed in URLs.
If browser cookies are used, security attributes should include:
Secure HttpOnly SameSite
where appropriate.
If CeloHT uses access tokens, the architecture should distinguish:
Used for short-lived API access.
Used to obtain a new access token when appropriate.
Refresh tokens require stronger protection and should be revocable.
Tokens must not contain sensitive information unnecessarily.
Protected API endpoints must verify:
- Authentication credential
- Credential validity
- Credential expiration
- User identity
- Required authorization
- Request integrity where applicable
Authentication failures should return standardized responses without exposing internal security information.
Internal services should authenticate with each other using dedicated credentials.
Examples include:
- API services
- Background workers
- Blockchain services
- Notification services
- Data services
- Monitoring services
Service credentials must be:
- Unique per service
- Rotatable
- Stored securely
- Scoped to required permissions
Administrative access represents a high-risk authentication domain.
Recommended controls:
- Multi-factor authentication
- Strong password policy where passwords are used
- Hardware security keys where practical
- Short session lifetime
- IP/device monitoring where appropriate
- Privileged action logging
- Immediate credential revocation after compromise
Administrative credentials must never be shared between individuals.
Authentication endpoints should implement rate limiting.
Controls should address:
- Login attempts
- Signature verification attempts
- Password reset requests
- Authentication challenge generation
- Token refresh requests
Rate limiting should reduce:
- Brute-force attacks
- Credential stuffing
- Denial-of-service attacks
- Automated abuse
Account recovery mechanisms must avoid creating weaker security paths.
Recovery procedures may include:
- Verified email recovery
- Wallet ownership verification
- Administrator-assisted recovery
- Strong identity verification where required
Recovery mechanisms must not bypass critical authorization controls.
Security-relevant authentication events should be logged.
Examples:
- Successful authentication
- Failed authentication
- Wallet authentication
- Session creation
- Session termination
- Credential rotation
- Password reset
- MFA changes
- Administrative authentication
Logs must not contain:
- Passwords
- Private keys
- Seed phrases
- Authentication tokens
- Secret API keys
CeloHT should consider:
CeloHT wallet integrations must follow these requirements:
- Never request seed phrases.
- Never request private keys.
- Never silently initiate transactions.
- Clearly display transaction intent.
- Clearly identify signing requests.
- Verify chain/network information.
- Validate wallet addresses.
- Protect against malicious transaction parameters.
Authentication data should be minimized.
CeloHT should collect only information required to operate the relevant service.
Wallet addresses should be treated as potentially sensitive identifiers even though blockchain transactions are public.
Authentication data must follow the principles defined in:
DATA_PRIVACY.md
If authentication infrastructure is compromised, CeloHT should be able to:
- Revoke compromised credentials.
- Invalidate affected sessions.
- Rotate service credentials.
- Review authentication logs.
- Identify affected accounts.
- Notify relevant stakeholders when appropriate.
- Document the incident.
- Implement corrective controls.
Production authentication infrastructure should enforce:
- HTTPS
- Secure credential storage
- Strong cryptographic primitives
- Secure session management
- Rate limiting
- Audit logging
- Credential rotation
- Least privilege
- Dependency updates
- Security monitoring
CeloHT authentication is designed around three core concepts:
IDENTITY | v AUTHENTICATION | v SESSION | v AUTHORIZATION
Authentication establishes who the actor is.
Authorization determines what that actor is allowed to do.
These systems must remain logically separated.
-
AUTHORIZATION_MODEL.md -
SMART_CONTRACT_SECURITY.md -
DATA_PRIVACY.md -
SECURITY.md -
GOVERNANCE.md -
NO_TOKEN_POLICY.md -
BLOCKCHAIN_INTEGRATION.md -
API_ARCHITECTURE.md
Document: Authentication Architecture
Project: CeloHT
Classification: Technical / Security Documentation
Status: Architecture Reference
© 2026 CeloHT - Open Source. Global Impact. Licensed under Apache.