feat: implement credential manager #78
Open
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.
Implement Unified Credential Manager
🎯 Overview
This PR introduces a comprehensive credential management system for Halberd, refactoring the existing monolithic credential handling into a clean, modular architecture that supports all four cloud providers (AWS, Azure, GCP, Entra ID) through a unified interface.
📊 Changes Summary
✨ Key Features Implemented
🏗️ Core Architecture
core/credential_manager.py
): Central orchestrator for all cloud provider credentialscore/credential_types.py
): Common data structures and provider configurationscore/providers/
): Extensible provider system with abstract base class🔌 Provider System
core/providers/base_provider.py
): Abstract interface defining credential operations🎨 Enhanced UI/UX
mdi:aws
,mdi:microsoft
,mdi:google-cloud
icons🛠️ Technical Improvements
Error Handling & Robustness
JWT Token Processing (
core/entra/token_info.py
):tid
,idtyp
,exp
,scp
,roles
)GCP Credential Management
New Deletion Method (
core/gcp/gcp_access.py
):delete_credential_by_name()
method for targeted credential removalAWS Session Management
Fixed Missing Decorator (
core/aws/aws_session_manager.py
):@classmethod
decorator toremove_session()
methodUI Enhancements (
assets/halberd.css
)💡 Code Quality Improvements
Separation of Concerns
DRY Principles
Type Safety
✅ Testing & Validation
🔄 Migration Impact
📁 Files Modified
core/credential_manager.py
core/credential_types.py
core/providers/
(4 files)assets/halberd.css
halberd.py
core/entra/token_info.py
core/gcp/gcp_access.py
🎯 Test Plan