Skip to content

Commit

Permalink
Add platform confidential directory on Settings (#618)
Browse files Browse the repository at this point in the history
Problem: The server don't have a directory to save the platform certificates generated by sevctl.

Solution: Set that directory field on settings class and ensure to create the folder on initialization step.
  • Loading branch information
nesitor authored Jun 5, 2024
1 parent df26f8b commit b1ca017
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/aleph/vm/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,11 @@ class Settings(BaseSettings):
"with SEV and SEV-ES",
)

CONFIDENTIAL_DIRECTORY: Path = Field(
None,
description="Confidential Computing default directory. Default to EXECUTION_ROOT/confidential",
)

# Tests on programs

FAKE_DATA_PROGRAM: Optional[Path] = None
Expand Down Expand Up @@ -409,6 +414,7 @@ def setup(self):

os.makedirs(self.EXECUTION_LOG_DIRECTORY, exist_ok=True)
os.makedirs(self.PERSISTENT_VOLUMES_DIR, exist_ok=True)
os.makedirs(self.CONFIDENTIAL_DIRECTORY, exist_ok=True)

self.API_SERVER = self.API_SERVER.rstrip("/")

Expand Down Expand Up @@ -467,6 +473,8 @@ def __init__(
self.EXECUTION_LOG_DIRECTORY = self.EXECUTION_ROOT / "executions"
if not self.JAILER_BASE_DIR:
self.JAILER_BASE_DIR = self.EXECUTION_ROOT / "jailer"
if not self.CONFIDENTIAL_DIRECTORY:
self.CONFIDENTIAL_DIRECTORY = self.CACHE_ROOT / "confidential"

class Config:
env_prefix = "ALEPH_VM_"
Expand Down

0 comments on commit b1ca017

Please sign in to comment.