-
-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Overview
Follow-up issue for Oracle Cloud Object Storage AFS adapter to implement additional authentication methods and enhancements that were deferred from the initial implementation in #35 (merged in #36).
Background
The initial Oracle Cloud Object Storage adapter implementation (#36) successfully delivered:
- ✅ Config file authentication
- ✅ Instance principal authentication
- ✅ Core connector functionality
- ✅ Path validation
- ✅ Unit tests
- ✅ Documentation
However, some features were marked as future work and need to be implemented.
Remaining Tasks
1. Resource Principal Authentication
Priority: Medium
Effort: ~4 hours
- Implement
ResourcePrincipalAuthenticationDetailsProvidersupport - Add configuration methods for resource principal
- Update
OracleCloudObjectStorageConfiguration.CreateResourcePrincipalProvider() - Add unit tests for resource principal configuration
- Update documentation with resource principal examples
Use Case: Required for OCI Functions to authenticate without storing credentials.
Implementation Notes:
private IBasicAuthenticationDetailsProvider CreateResourcePrincipalProvider()
{
// Research correct OCI .NET SDK API for resource principal
// Current placeholder throws NotImplementedException
return ResourcePrincipalAuthenticationDetailsProvider.Build();
}2. Simple Authentication with Direct Credentials
Priority: Low
Effort: ~6 hours
- Implement simple authentication using user OCID, tenancy OCID, fingerprint, and private key
- Add configuration methods:
SetSimpleAuth(userOcid, tenancyOcid, fingerprint, privateKeyPath, passphrase) - Handle private key file reading and parsing
- Add region configuration for simple auth
- Add unit tests for simple authentication
- Update documentation with simple auth examples
Use Case: Useful for testing and scenarios where config file is not available.
Implementation Notes:
private IBasicAuthenticationDetailsProvider CreateSimpleProvider()
{
// Research correct constructor signature for SimpleAuthenticationDetailsProvider
// May need to read private key file and convert to appropriate format
return new SimpleAuthenticationDetailsProvider(
tenancyOcid: TenancyOcid,
userOcid: UserOcid,
fingerprint: Fingerprint,
privateKeyPath: PrivateKeyPath,
passphrase: PrivateKeyPassphrase?.ToCharArray()
);
}3. Custom Endpoint Configuration
Priority: Low
Effort: ~2 hours
- Research how to set custom endpoint in OCI .NET SDK
- Implement endpoint configuration in
OracleCloudObjectStorageConnector.New() - Add validation for custom endpoint URLs
- Add unit tests for custom endpoint
- Update documentation
Use Case: Required for using OCI-compatible storage services or testing with local emulators.
Current Code:
// Note: Custom endpoint configuration would need to be set via ClientConfiguration
// if needed in the future4. Integration Tests
Priority: High
Effort: ~8 hours
- Create integration test project
- Set up test OCI bucket and credentials (use environment variables)
- Implement tests for:
- File upload/download
- Large file multipart upload (>5 GiB)
- Directory operations
- File move/copy operations
- Concurrent operations
- Error handling (network failures, permission errors)
- Add CI/CD integration (optional, may require OCI credentials in CI)
- Document how to run integration tests
Note: Integration tests require actual OCI account and credentials.
5. Performance Benchmarks
Priority: Medium
Effort: ~6 hours
- Create benchmark project using BenchmarkDotNet
- Benchmark scenarios:
- Small file operations (< 1 MB)
- Medium file operations (1-100 MB)
- Large file operations (> 100 MB)
- Concurrent operations
- Caching vs non-caching performance
- Compare with other AFS adapters (AWS S3, Azure Storage)
- Document performance characteristics
- Identify optimization opportunities
6. Additional Enhancements
Priority: Low
Effort: Variable
- Add support for OCI Object Storage lifecycle policies
- Add support for object metadata
- Add support for server-side encryption configuration
- Add support for object versioning
- Implement progress callbacks for large uploads
- Add support for pre-signed URLs
- Optimize blob listing for large directories (pagination improvements)
Success Criteria
- All authentication methods working and tested
- Integration tests passing with real OCI Object Storage
- Performance benchmarks documented
- Documentation updated with all examples
- No breaking changes to existing API
Dependencies
- OCI .NET SDK documentation: https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/dotnetconcepts.htm
- OCI .NET SDK GitHub: https://github.com/oracle/oci-dotnet-sdk
- Existing implementation:
afs/oraclecloud/objectstorage/
Related Issues
- Migrate Oracle Cloud Object Storage AFS Adapter from Eclipse Store #35 - Original migration request (closed)
- feat: Add Oracle Cloud Object Storage AFS adapter #36 - Initial implementation PR (merged)
Notes
- Tasks can be implemented incrementally in separate PRs
- Integration tests and benchmarks may require OCI account setup
- Resource principal and simple auth require research into correct OCI .NET SDK APIs
- Consider creating separate issues for larger tasks (integration tests, benchmarks)