Overview
Profile files are the primary mechanism for distributing access credentials to data recipients. They contain:Server Endpoint
The URL of the Delta Sharing server
Authentication
Bearer token for secure API access
Expiration
Optional token expiration timestamp
Version Info
Protocol version for compatibility
Profile File Format
Profile files are JSON documents with the following structure:Field Specifications
| Field | Type | Required | Description |
|---|---|---|---|
| shareCredentialsVersion | Integer | Yes | Profile file format version (currently 1) |
| endpoint | String | Yes | URL of the Delta Sharing server |
| bearerToken | String | Yes | Authentication token for API requests |
| expirationTime | String | No | Token expiration in ISO 8601 format |
shareCredentialsVersion
TheshareCredentialsVersion field indicates the profile file format version:
- Current version:
1 - Purpose: Enables non-backward-compatible changes to profile format
- Client behavior: Display upgrade message if version is unsupported
When the profile format evolves, the version number will increment. Clients should validate they support the specified version before attempting to connect.
endpoint
The server endpoint URL where the Delta Sharing server is hosted:- Must be a valid HTTPS URL
- Should end with a trailing slash
- Forms the base for all API requests
bearerToken
The authentication token used for all API requests:Authorization header of every request:
expirationTime
Optional timestamp indicating when the bearer token expires:2021-11-12T00:12:29.0Z(UTC)2021-11-12T00:12:29.123Z(with milliseconds)
If
expirationTime is omitted, the token is treated as never expiring. However, servers may still enforce server-side expiration policies.- Check expiration before making requests
- Display clear error messages when tokens expire
- Prompt users to request new profile files
Complete Example
Here’s a fully-populated profile file example:profile.json
Storage Locations
Profile files should be stored securely on the recipient’s system. Common locations include:- Linux/macOS
- Windows
- Environment Variables
User Home Directory:Project Directory:Permissions:
Using Profile Files
Python (delta-sharing)
Python (Manual)
Apache Spark
Pandas (delta-sharing connector)
Profile File Distribution
Data providers typically distribute profile files through secure channels:Secure Distribution
Provider sends profile file through secure channel:
- Encrypted email
- Secure file transfer
- Password-protected archive
- Identity provider integration
Email Distribution
Email Distribution
Send profile as encrypted attachment:
- Use PGP/GPG encryption
- Password-protect ZIP archive
- Send password through separate channel
Web Portal
Web Portal
Provide secure download portal:
- Require authentication
- Enable MFA
- Log download activity
- Allow token rotation
API-based
API-based
Integrate with identity providers:
- OAuth 2.0 flows
- SAML authentication
- Automated profile generation
- Dynamic token management
Token Management
Expiration Handling
Clients should handle token expiration gracefully:Token Rotation
Best practices for token rotation:-
Provider side:
- Generate new tokens before old ones expire
- Provide overlap period for migration
- Send notifications before expiration
-
Recipient side:
- Monitor expiration dates
- Update profile files promptly
- Test new credentials before old ones expire
Revocation
When credentials are compromised:Troubleshooting
Common Issues
401 Unauthorized
401 Unauthorized
Connection Errors
Connection Errors
Causes:
- Incorrect endpoint URL
- Network connectivity issues
- Firewall blocking requests
- Verify endpoint URL is correct
- Test network connectivity:
curl {endpoint}/shares - Check firewall rules
Unsupported Version
Unsupported Version
Causes:
- Client doesn’t support profile version
- Outdated client library
- Upgrade client library
- Check documentation for version compatibility
Validation Script
Best Practices
Security
Security
- Store profile files in secure locations with restricted permissions
- Never commit profile files to version control
- Use
.gitignoreto exclude profile files - Rotate tokens regularly
- Monitor for unauthorized access
Organization
Organization
- Use descriptive filenames (e.g.,
production-sales-share.json) - Maintain separate profiles for different environments
- Document which profile is for which purpose
- Keep backups of valid profiles
Lifecycle Management
Lifecycle Management
- Track expiration dates
- Set up expiration notifications
- Test new profiles before old ones expire
- Document token rotation procedures
- Maintain audit logs of profile usage
Next Steps
Protocol Overview
Understand authentication and the REST protocol
Access Modes
Learn about URL-based and directory-based access
Quick Start
Get started using Delta Sharing
Client Libraries
Explore available client implementations