feat(FN-007): implement credential storage with Fernet encryption

- Add DatabaseCredentialStorage with async CRUD operations
- Create Credential SQLAlchemy model with encrypted values
- Update GitCredential and AccessTokenCredential to support async
- Fix SSH key encryption to use Fernet instead of base64 placeholder
This commit is contained in:
2026-05-16 13:41:07 +02:00
parent 8b4784f5ed
commit 25db3f81b0
4 changed files with 60 additions and 8 deletions
+3 -3
View File
@@ -40,13 +40,13 @@ class CredentialStorage(abc.ABC):
"""Abstract storage backend for :class:`GitCredential` records."""
@abc.abstractmethod
def create(self, credential: GitCredential) -> uuid.UUID:
async def create(self, credential: GitCredential) -> uuid.UUID:
"""Persist *credential* and return its ID."""
@abc.abstractmethod
def get(self, credential_id: uuid.UUID) -> GitCredential | None:
async def get(self, credential_id: uuid.UUID) -> GitCredential | None:
"""Retrieve a credential by ID, or ``None`` if not found."""
@abc.abstractmethod
def delete(self, credential_id: uuid.UUID) -> None:
async def delete(self, credential_id: uuid.UUID) -> None:
"""Remove a credential by ID."""