Features
This document describes optional features and configuration options available in the Teydex KYC system.
Chunking
Chunking is an optional feature that allows large files to be uploaded in smaller pieces, improving reliability and user experience for uploads over unstable connections.
When to Use Chunking
- Large file uploads (typically > 5MB)
- Unstable network connections
- Mobile environments with bandwidth constraints
- Environments requiring upload resume capability
Configuration
Chunking can be enabled through configuration settings. When enabled, the system will automatically handle file uploads in chunks rather than as single large requests.
How It Works
The chunking process follows a specific API sequence:
- Initialize Upload: Call
POST /transaction/upload-chunk-init/to prepare the server for chunked upload - Upload Chunks: Call
POST /transaction/upload-chunk/repeatedly for each file chunk - Check Status: Use
GET /transaction/upload-chunk-status/to verify chunk upload progress - Finalize Upload: Call
POST /transaction/upload-chunk-finalize/to complete the upload and reassemble the file
API Endpoints
1. Initialize Chunked Upload
Endpoint: POST /transaction/upload-chunk-init/
Purpose: Prepares the server for receiving file chunks and returns upload session details.
Request Body
{
"filename": "document.jpg",
"file_size": 2048576,
"chunk_size": 1024,
"total_chunks": 2000
}
Response Body
{
"upload_id": "abc123-def456-ghi789",
"chunk_size": 1024,
"expires_at": "2024-01-15T10:30:00Z"
}
2. Upload File Chunk
Endpoint: POST /transaction/upload-chunk/
Purpose: Uploads individual file chunks with metadata.
Request Body (multipart/form-data)
upload_id: abc123-def456-ghi789
chunk_number: 1
chunk_data: [binary data]
chunk_hash: sha256_hash_of_chunk
Response Body
{
"upload_id": "abc123-def456-ghi789",
"chunk_number": 1,
"status": "received",
"next_chunk": 2
}
3. Check Upload Status
Endpoint: GET /transaction/upload-chunk-status/
Purpose: Returns the current status of chunked upload progress.
Query Parameters
upload_id: The upload session ID
Response Body
{
"upload_id": "abc123-def456-ghi789",
"total_chunks": 2000,
"uploaded_chunks": 1500,
"missing_chunks": [1501, 1502, 1505],
"status": "in_progress"
}
4. Finalize Upload
Endpoint: POST /transaction/upload-chunk-finalize/
Purpose: Completes the upload process and assembles chunks into the final file.
Request Body
{
"upload_id": "abc123-def456-ghi789",
"file_hash": "sha256_hash_of_complete_file"
}
Response Body
{
"upload_id": "abc123-def456-ghi789",
"status": "completed",
"file_url": "/media/uploads/document.jpg",
"file_size": 2048576
}
Benefits
- Reliability: Failed uploads can resume from the last successful chunk
- Performance: Better handling of large files on mobile networks
- User Experience: Progress indication for large uploads
- Bandwidth Efficiency: Failed uploads don't require starting over
LDAP Authentication
LDAP (Lightweight Directory Access Protocol) integration allows enterprises to use their existing directory services for user authentication and authorization in the Teydex system.
When to Use LDAP
- Enterprise environments with existing Active Directory or LDAP infrastructure
- Centralized user management requirements
- Single sign-on (SSO) integration needs
- Organizations requiring role-based access control mapped from directory groups
How It Works
- User Authentication: Users log in with their LDAP credentials
- Directory Search: System searches for the user in the configured LDAP directory
- Attribute Mapping: User attributes (name, email, etc.) are mapped from LDAP to application fields
- Group Authorization: LDAP groups are mapped to application roles for access control
- Session Creation: Local session is created with appropriate permissions
Supported Features
- User Authentication: Validate credentials against LDAP directory
- Attribute Mapping: Map LDAP attributes to application user fields
- Group-Based Authorization: Map LDAP groups to application roles
- Flexible Configuration: Configurable search bases, filters, and bind credentials
Configuration
LDAP authentication is configured through environment variables. For detailed configuration options and examples, see the LDAP Integration section in setup.md.
Available application roles that can be mapped from LDAP groups:
api_user: API Userread_only: Read-Only (default role)administrator: Administratorcustomer_representative: Customer Representativecustomer_representative_manager: Customer Representative Manager