feat: cloud abstraction layer, OIDC auth, and comprehensive tests#28
Open
wdvr wants to merge 6 commits into
Open
feat: cloud abstraction layer, OIDC auth, and comprehensive tests#28wdvr wants to merge 6 commits into
wdvr wants to merge 6 commits into
Conversation
## Cloud Provider Abstraction (Phase 1) - Add `providers/` module with pluggable interface for AWS/GCP/custom - `providers/base.py`: Abstract CloudProvider, AuthProvider, RegistryProvider - `providers/aws.py`: Full AWS implementation wrapping boto3 - `providers/gcp.py`: GCP stub with NotImplementedError placeholders - `providers/custom.py`: Documented template for custom providers ## OIDC Authentication Module - `shared/auth/oidc.py`: JWT verification with multi-issuer support - `shared/auth/api_keys.py`: API key creation and validation - `shared/auth/audit.py`: Audit logging for traceability ## Test Suite - 25 test files covering CLI, services, and E2E flows - Unit tests for reserve, edit, cancel, availability, connect commands - Service tests for API endpoints and job processor - E2E test stubs for AWS us-west-1 test cluster ## Architecture Documentation - `progress.md`: Migration plan with 6 phases - Identifies all AWS-specific dependencies - Defines provider interface for storage, snapshots, auth Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- test_api_endpoints.py: FastAPI endpoint tests (auth, jobs, availability) - test_job_processor.py: PGMQ polling and job management tests - test_disk_reconciler.py: Volume discovery, orphan detection, cross-AZ migration - conftest.py: Mock fixtures for PostgreSQL, K8s, AWS Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Enhanced docstrings with usage examples - Added LVM/Ceph/iSCSI integration patterns for custom providers - Added LDAP/OIDC/SAML auth examples Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds the foundation for making ODC cloud-agnostic, along with comprehensive tests.
Cloud Provider Abstraction (Phase 1 of migration)
providers/base.py: Abstract interfaces forCloudProvider,AuthProvider,RegistryProviderproviders/aws.py: Full AWS implementation wrapping existing boto3 codeproviders/gcp.py: GCP stub withNotImplementedError(ready for implementation)providers/custom.py: Documented template for custom cloud providersOIDC Authentication Module
shared/auth/oidc.py: JWT verification supporting multiple issuers (GitHub, Google, Okta)shared/auth/api_keys.py: API key creation and validation with scopesshared/auth/audit.py: Full audit logging for traceability (user → action → resource)Test Suite (25 test files)
Architecture Documentation
progress.md: Comprehensive migration plan with 6 phasesFiles Changed
Test plan
pytest tests/unit/ -vNext Steps
After merge:
🤖 Generated with Claude Code